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
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.
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"
Copy xposed installer zip to the emulator and install it using flash-archive from GenyFlash
$ adb shell
# flash-archive.sh /path/to/xposed/zip
And Xposed should be correctly installed to your Android emulator. Happy hacking :)