Skip to content

Instantly share code, notes, and snippets.

@suphon-t
Last active March 12, 2017 02:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suphon-t/e67efa6fc533f9fb472df17a18e87cb3 to your computer and use it in GitHub Desktop.
Save suphon-t/e67efa6fc533f9fb472df17a18e87cb3 to your computer and use it in GitHub Desktop.
Installing Xposed framework on Android emulator

Installing Xposed framework on Android emulator

Step 1 - Enable making changes to /system

You might want to copy the system.img to somewhere else first in case of bootloops.

$ cp ~/Library/Android/sdk/system-images/android-23/google_apis/x86/system.img ~/system.img

And to run the emulator with writable system, you need to add -writable-system flag and specify the system image by using -system <system_path>.

$ emulator -writable-system -netdelay none -netspeed full -avd <avd_name> -system ~/system.img

Step 2 - Installing GenyFlash

GenyFlash is used to run install script from flashable zips. It is created for use with Genymotion but it works great on Android emulator.

$ git clone https://github.com/rovo89/GenyFlash.git
$ cd GenyFlash
$ chmod +x install.sh
$ ./install.sh

After running those commands, GenyFlash should be installed to the emulator.

Step 3 - Installing busybox

I took the steps for installing busybox from alsanchez's gist. Big thanks to him.

First, download the busybox binary from busybox.net

$ wget https://busybox.net/downloads/binaries/1.21.1/busybox-i486 -O busybox

After downloaded, push it to the emulator and install it.

$ adb push 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"

Step 4 - Actually installing Xposed

Copy xposed installer zip to the emulator and install it using flash-archive from GenyFlash

$ adb shell
# flash-archive.sh /path/to/xposed/zip

Step 5 - Reboot

And Xposed should be correctly installed to your Android emulator. Happy hacking :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment