Sid Ramadoss
Sid Ramadoss

Reputation: 521

pushing busybox into android emulator

I've downloaded the source for mips android and have done a "make" and got the emulator running. I want to push the busybox into the emulator. I've downloaded the static compiled busybox binary. Under which directory should I place this and what should I do to push the busybox into the emulator?

Upvotes: 5

Views: 14000

Answers (2)

Ahmed Hassan
Ahmed Hassan

Reputation: 109

  1. Root your emulator
  2. Download this
  3. Extract it then move \system\lib\su and \system\app\superuser.apk to your adb directory.
  4. Run adb and then enter the following:
adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system  
adb push su /system/xbin/su  
adb shell chmod 06755 /system  
adb shell chmod 06755 /system/xbin/su
adb install superuser.apk
  1. Then download busybox from here
  2. Move it to your adb directory
  3. run adb and then enter:
adb shell mkdir /data/busybox
adb push busybox /data/busybox
adb shell
su
cd /data/busybox
chmod 775 busybox
./busybox --install
busybox

Upvotes: 10

Sebastian
Sebastian

Reputation: 671

Updated instructions for 2023

Download busybox binary matching your AVD image architecture from https://github.com/meefik/busybox/tree/master/app/src/main/_libs. For example I downloaded the "arm64-v8a" directory to my desktop.

Execute the following commands (replace image name / device name with your own):

emulator -avd Pixel_6_API_31 -writable-system
adb -s emulator-5554 root
adb -s emulator-5554 remount
adb -s emulator-5554 push ~/Desktop/arm64-v8a/busybox /system/xbin/busybox

Now you can use busybox on your emulator:

adb -s emulator-5554 shell
emulator64_arm64:/ # busybox --help
BusyBox v1.34.1-meefik (2022-01-01 14:33:14 CST) multi-call binary.
...

Upvotes: 1

Related Questions