Skip to content

Instantly share code, notes, and snippets.

@interference-security
Last active November 16, 2024 10:31
Show Gist options
  • Save interference-security/b786d349839ee5bf40bbd1bc2d240a59 to your computer and use it in GitHub Desktop.
Save interference-security/b786d349839ee5bf40bbd1bc2d240a59 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 /

@dfelici87
Copy link

I've the same problem!! help me please!

@interference-security
Copy link
Author

This technique does not work on newer version of Android. Depending upon what you are trying to achieve, you can find alternate ways.

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