Android Penetration Testing: Blog 1

Prerequisites:

AVD creation:

emulator -avd testAVD

AVD Rooting

emulator -avd testAVD -writable-system -selinux disabled -qemu -enable-kvm
adb install <apk2>.apk
Once the installation is successful, you’ll see the APKs installed in your AVD
adb root && adb remount
adb push su /system/xbin/su
adb shell chmod 06755 /system/xbin/su
adb shell su --install
adb shell su --daemon&
adb shell setenforce 0

Root Persistence

Extended controls can be accessed from the … menu
1. Launch the emulator: $HOME/Android/Sdk/emulator/emulator -avd testAVD -writable-system -selinux disabled -qemu -enable-kvm2. Restore the saved snapshot3. Run the following commands:
a. adb root && adb remount
b. adb shell su --daemon&

A security professional. I break things. I fix things. OSCP. OSWE. Spreading the knowledge :)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store