Scripts to automate Android emulator setup for security testing (Burp cert install, Magisk root, AVD fixes)
- rootAVD-certify.sh ---> works on andriod 10 and above (with playstore image)
- Android_Cert_Installer.sh--> works on andriod 9 and below (No_PlayStore Image)
- fix_android_avd.sh--> fixes avd issues eg
emulator -list-avdsis not working
Author: Osezua
Purpose: Automatically root an Android Emulator using Magisk and install a trusted CA certificate (such as Burp Suite’s) into the system trust store.
- Detects and selects AVDs dynamically
- Automatically extracts API level and CPU architecture
- Patches the emulator’s ramdisk using
Magisk - Prompts user with checklists to complete the rooting steps
- Pushes and installs a user-supplied certificate into the system trust store
git clone https://github.com/0s3zu4/android-lab-scripts.gitchmod +x rootAVD-certify.sh./rootAVD-certify.shYou will be prompted to:
- Select your emulator (if none is running)
- Follow instructions to patch Magisk via
rootAVD.sh - Install a certificate file into the emulator
- AVD with writable system image (
-writable-system) adb,openssl, andemulatorCLI tools installed- Android emulator image with API level 24+ (tested with API 28–32)
- a proxy certificate in .crt format in the same directory (eg. burpcert.crt)
Author: Osezua
Purpose: Automatically installs Certificates in DER formats in android studio emulators running android open source
git clone https://github.com/0s3zu4/android-lab-scripts.gitchmod +x Android_Cert_Installer.sh./Android_Cert_Installer.shYou will be prompted to:
- Select your emulator (if none is running)
- Install a certificate file into the emulator
- AVD with writable system image (
-writable-system) adb,openssl, andemulatorCLI tools installed- Android emulator image with API level 24+ (tested with API 28)
- a proxy certificate in .der format in the same directory (eg. burpcert.der)
- Magisk patching is a manual step — wait for full boot and complete all prompts.
- Certificate must be in DER format.
- You’ll be prompted to select the
.derfile if multiple are present. - This modifies
/system/etc/security/cacertsinside the emulator.
This script is for educational and testing purposes only. Do not use it to modify production devices or violate any terms of use. Use responsibly.