-
-
Save alsanchez/2ebb6a066721bc67c5c8 to your computer and use it in GitHub Desktop.
#!/bin/bash | |
wget "http://www.busybox.net/downloads/binaries/latest/busybox-i486" -O /tmp/busybox | |
adb push /tmp/busybox /data/data/busybox | |
adb shell "mount -o remount,rw /system && mv /data/data/busybox /system/bin/busybox && chmod 755 /system/bin/busybox && /system/bin/busybox --install /system/bin" |
with the current Android emulator, you have to start the emulator with "-writable-system" in order to remount and make modifications to the system folder. e.g.:
emulator -avd "Pixel_2_XL_API_27" -writable-system
The current busybox installer is inside .../busybox/ so I made a few modifications to make it work.
#!/bin/bash wget --no-parent --no-host-directories --cut-dirs 3 -r https://busybox.net/downloads/binaries/1.30.0-i686/ -P /tmp/busybox adb push /tmp/busybox /data/data/busybox adb shell "mount -o rw,remount /system && mv /data/data/busybox /system/bin/busybox && chmod 755 /system/bin/busybox/busybox && /system/bin/busybox/busybox --install /system/bin"
Could it be that you have an error in the path of the last command?
As far as I see it (and successfully tried it) it should be:
adb shell "mount -o rw,remount /system && mv /data/data/busybox /system/bin/busybox && chmod 755 /system/bin/busybox && /system/bin/busybox --install /system/bin"
I could not remount /system
on an API 30 emulator. disable-verity
left me with a non-bootable emulator. Instead of trying to fix it I tried using an API 25 emulator, without running into that issue.
If you need to run on a later API level, perhaps https://android.stackexchange.com/questions/186630/android-o-failed-to-mount-system-dev-block-dm-0-is-read-only helps.
The current busybox installer is inside .../busybox/ so I made a few modifications to make it work.