Skip to content

Instantly share code, notes, and snippets.

@sakibguy
Forked from interference-security/writable-avd.md
Created October 15, 2021 14:13
Show Gist options
  • Save sakibguy/2943b6a57c953334d9cc04ddd5323703 to your computer and use it in GitHub Desktop.
Save sakibguy/2943b6a57c953334d9cc04ddd5323703 to your computer and use it in GitHub Desktop.
How to make AVD system and file-system writable?

Source: https://www.linkedin.com/pulse/android-emulator-tips-security-testers-divya-mudgal/

List created Android AVDs:

emulator -list-avds

Start an AVD (without Play Store) with writable "/system":

emulator -avd Pixel_3_XL_API_26 -writable-system

Start ADB daemon as root:

adb root

Remount "/system" because it is by default mounted as "read-only" even if "-writable-system" is used:

adb remount

Get shell access on AVD and change current user to "root":

adb shell

su

Remount "/system" with read-write access:

mount -o rw,remount /system

mount -o rw,remount /

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