Android Recovery

From postmarketOS
Revision as of 10:12, 27 December 2018 by Ollieparanoid (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Android devices usually have a recovery partition, where another boot.img file can be flashed. It contains another kernel, and an extra initramfs, which is basically the whole recovery system. TWRP is the most popular recovery system, and before that CWM was most popular.

Starting postmarketOS initramfs via adb

adb push ~/.local/var/pmbootstrap/chroot_rootfs_samsung-klte/boot/initramfs-samsung-klte /tmp/initramfs.cpio.gz
adb shell

cd /tmp
gzip -d initramfs.cpio.gz
cpio -i < initramfs.cpio

umount /data
umount /system
chroot /tmp/ /bin/sh
. ./

export PATH=/usr/bin:/bin:/usr/sbin:/sbin
/bin/busybox --install -s
/bin/busybox-extras --install -s

extract_initramfs_extra /boot/initramfs-samsung-klte-extra

See also