From postmarketOS
Revision as of 01:08, 30 March 2018 by Ollieparanoid (talk | contribs) (s/flash_system/flash_rootfs/ (see
Jump to navigation Jump to search


  • ollieparanoid

What works

  • Installation to sdcard (pmbootstrap install --sdcard=/dev/mmcblk...)
  • Touchscreen
  • Weston
  • XWayland

What does not work

  • The rest (Wifi, bluetooth, making calls, ...)
  • Installation to the device memory (pmbootstrap flasher flash_rootfs, see #422)

How to enter flash mode

  • Connect an USB cable
  • Make sure, the device is powered off
  • Hold power + volume down
  • As soon, as the samsung logo appears on the screen, only press volume down

Boot process

Unlike most other Android devices, the i9100 can not boot a boot.img (which consists of kernel + initramfs). Instead, the boot.img file is just a regular kernel. Here's an example from a LineageOS boot.img for the i9100 (for "real" boot.img files, file says something like boot.img: Android bootimg, kernel, ramdisk, page size: 2048 ):

/tmp/test # file boot.img
boot.img: Linux kernel ARM boot executable zImage (little-endian)

However, it is possible to directly integrate a initramfs into the kernel at kernel compile time (this is totally different from the boot.img approach, if this is unclear to you, please ask in the channel), and this is what the Android ROMs do on the i9100. While it is not a big deal in the Android compilation process, it is a problem for postmarketOS, because we want to be able to build the initramfs independently from the kernel.

The following workaround is currently implemented:

  • We flash the real initramfs to the recovery partition (source)
  • The initramfs init script built into the kernel checks if the recovery partition contains a compressed initramfs, and if it does, it extracts it and passes execution to the real initramfs' init script.
  • This idea is based on something called "isorec".

While this works for the i9100, this approach needs to be improved to also work on other Samsung devices, that need to be flashed with heimdall, like the i9070 (see #22).