Do you want to test “PostmarketOS_Alpine_Linux_Mate” on it ?
.
my test build is designed to run from the External SDcard so it keep AndroidOS untouched in the Internal Memory, only a boot.img have to be flashed to switch between both OSes as a Dual-Boot.
.
sources and troubleshotings :
Samsung Galaxy J5 2016 (samsung-j5x) - postmarketOS Wiki
Qualcomm Snapdragon 410/412 (MSM8916) - postmarketOS Wiki
downloads :
custom android builds - Browse /PostmarketOS/j5xnlte at SourceForge.net
Default username: user, Default password: 147147
.
PostmarketOS installtion is particular on this device, (and interresting)
it allow running PostmarketOS from an External SD card and let AndroidOS running from the Phone Internal Memory as usual.
We will inserate a piece of software between the Stock Bootloader (Odin mode / Download mode) and the usual Android-BOOT partition,
in fact, a second Bootloader called Lk2nd that act as a Fastboot mode unlike on other Samsung devices.
On devices with lk2nd the boot image is loaded from an ext2 boot partition either on EMMC or SD card. Since lk2nd keeps backwards compatibility with android boot images, you can flash your android boot.img via lk2nd and it will boot that image unless an SD card with postmarketOS is inserted.
lk2nd “secondary” bootloader intended for devices where existing firmware cannot be replaced easily (most smartphones and tablets). In this configuration, lk2nd does not replace the stock bootloader. Instead, it is packed into an Android boot image, which is then loaded by the stock bootloader just like the original Android image. The real operating system can be placed in the boot partition with 512 KiB offset or stored in a ext2 file system. It does not have to be Android or even Linux, any kind of kernel can be packed into an Android boot image.
.
installation and usage instructions :
.
insert a MicroSDcard into your Computer, and find its name by running
lsblk
make sure it is the right one as you will overwrite everything on it. Use a path without partition number at the end, such as /dev/mmcblk0, or /dev/sdd
decompress the downloaded file and write it to your MicroSDcard :
xz --decompress --stdout path-to-pmos-samsung-espresso7.img.xz | sudo dd of=/dev/name-of-your-SDcard bs=4M status=progress
Wait until the command completes and eject the SD card. (you can now manage partitions size using tool like gparted)
.
and flash it using the stock flashing interface :
Boot your phone to bootloader (Odin/Download) mode
by holding Volume Down and Home while powering up.
heimdall flash --BOOT lk2nd.img
.
lk2nd provides the standard Android fastboot protocol for flashing/booting Android boot images.
Press Volume Down while booting to enter Fastboot mode. Press Volume Up while booting to boot into Recovery mode.
If your stock bootloader uses the same key combinations, you need to wait a bit before pressing the volume keys. Usually, waiting until the screen turns on and/or the device vibrates should be enough to make the stock bootloader ignore the keys.
fastboot flash lk2nd lk2nd.img
can be used to update lk2nd directly from its fastboot interface.
.
fastboot flash boot boot.img
will flash the actual boot image with 512 KiB offset into the boot partition. This is done to avoid replacing lk2nd (since it is also booted from the boot partition).
Other fastboot commands work normally.
.
.