From ea80deba971d9612eff12bf348fd8e70a781af62 Mon Sep 17 00:00:00 2001 From: smallsolar Date: Wed, 3 Sep 2025 07:11:57 +0000 Subject: [PATCH] Update alpine_chroot/readme.md --- alpine_chroot/readme.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/alpine_chroot/readme.md b/alpine_chroot/readme.md index 88bfce9..412c023 100644 --- a/alpine_chroot/readme.md +++ b/alpine_chroot/readme.md @@ -8,7 +8,18 @@ * Navigate to `/data` and then run `sh setup.sh` which should setup the chroot (mounting the `/dev` etc) * This will then drop you into a `localhost` shell, 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 `debuggerd` is 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/bin` as read only so it is necessary to temporarily remount this to make the changes: + * `mount -o remount,rw /system` + * `chmod o+w /system/bin` + * Backup debuggerd binary and then replace it with the shell script + * `chmod o-w /system/bin` + * `mount -o remount,ro /system` + ### Links * [alpine-minirootfs](https://dl-cdn.alpinelinux.org/alpine/v3.22/releases/armv7/alpine-minirootfs-3.22.1-armv7.tar.gz) -* [Setting up chroot](https://wiki.alpinelinux.org/wiki/Alpine_Linux_in_a_chroot) \ No newline at end of file +* [Setting up chroot](https://wiki.alpinelinux.org/wiki/Alpine_Linux_in_a_chroot) +* [android - changing system permissions](https://iamcmotc.blogspot.com/2015/04/android-how-to-run-script-or-system.html) \ No newline at end of file