Difference between revisions of "Samsung-i9100-(Samsung-Galaxy-SII)"

From postmarketOS
Jump to navigation Jump to search
(s/flash_system/flash_rootfs/ (see https://github.com/postmarketOS/pmbootstrap/pull/1373))
Line 1: Line 1:
=== Contributors ===
#REDIRECT [[Samsung_Galaxy_SII_(samsung-i9100)]]
* ollieparanoid
=== What works ===
* Installation to sdcard (<code>pmbootstrap install --sdcard=/dev/mmcblk...</code>)
* Touchscreen
* Weston
* XWayland
=== What does not work ===
* The rest (Wifi, bluetooth, making calls, ...)
* Installation to the device memory (<code>pmbootstrap flasher flash_rootfs</code>, see [https://github.com/postmarketOS/pmbootstrap/issues/422 #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 <code>boot.img</code> (which consists of <code>kernel</code> + <code>initramfs</code>). Instead, the <code>boot.img</code> file is just a regular kernel. Here's an example from a LineageOS <code>boot.img</code> for the i9100 (for &quot;real&quot; boot.img files, <code>file</code> says something like <code>boot.img: Android bootimg, kernel, ramdisk, page size: 2048</code> ):
<pre>/tmp/test # file boot.img
boot.img: Linux kernel ARM boot executable zImage (little-endian)</pre>
However, it is possible to directly integrate a <code>initramfs</code> 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 <code>initramfs</code> independently from the kernel.
The following workaround is currently implemented:
* We flash the ''real'' initramfs to the recovery partition ([https://github.com/postmarketOS/pmbootstrap/blob/master/aports/heimdall/heimdall_flash_kernel.sh source])
* The initramfs [https://github.com/postmarketOS/pmbootstrap/blob/master/aports/linux-samsung-i9100/init 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 [https://forum.xda-developers.com/galaxy-s2/orig-development/isorec-isolated-recovery-galaxy-s2-t3291176 &quot;isorec&quot;].
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 [https://github.com/postmarketOS/pmbootstrap/issues/22 #22]).
=== Links ===
* [https://github.com/postmarketOS/pmbootstrap/tree/master/aports/device-samsung-i9100 Device package]
=== Photos ===
* [https://ollieparanoid.github.io/img/2017-05-26/i9100/telnet.jpg Initramfs asking for the password via telnet]
* [https://ollieparanoid.github.io/img/2017-05-26/i9100/filled.jpg Weston with various programs opened]
* [https://ollieparanoid.github.io/img/2017-05-26/i9100/demos.jpg postmarketOS demo menu (XWayland)]
* [https://ollieparanoid.github.io/img/2017-05-26/i9100/firefox.jpg Firefox (XWayland)]
* [https://ollieparanoid.github.io/img/2017-05-26/i9100/smoke.jpg Weston-smoke demo]

Latest revision as of 01:22, 4 January 2019