Setup
- Download the lastest alpine-minirootfs for armv7 from alpinelinux
- Once you have root access use adb to push these files to
/data/(e.g.adb push setup.sh /data/):alpine-minirootfs-3.22.1-armv7.tar.gzsetup.shbusybox-armv7l
- Navigate to
/dataand then runsh setup.shwhich should setup the chroot (mounting the/devetc) - This will then drop you into a
localhostshell, to get out
Start Up Scripts
- To start up a binary we need to insert a script somewhere in the start up procedure, I noted that the binary
debuggerdis started and didn't think we needed this so instead replaced the binary with a shell script that would start my own programs. - Android mounts its
/system/binas read only so it is necessary to temporarily remount this to make the changes:mount -o remount,rw /systemchmod o+w /system/bin- Backup debuggerd binary and then replace it with the shell script
chmod o-w /system/binmount -o remount,ro /system