Skip to content
Mobile penetration testing android command cheatsheet
Branch: master
Clone or download
mirfansulaiman Update
Add Command for check architecture device android.

```adb shell getprop ro.product.cpu.abi```
Latest commit c6ef303 May 28, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
9a5ba575.0 Burp Certificate in PEM Format Dec 13, 2018 Update May 28, 2019

Command Mobile Penetration Testing Cheatsheet

For this time is about Android :) IOS soon :)

ADB Cheatsheet

Download adb or you can using adb as default from Android Studio.

ADB Command

#Check Android Architecture
$ adb shell getprop | grep abi
# Try to use this command to get simple output :)
$ adb shell getprop ro.product.cpu.abi

#List all application already installed
$ adb shell pm list packages -f | grep -i 'testing'

#Tracing log on android
$ adb logcat | grep

#Install application to device
$ adb install app.testing.apk

# Get the full path of an application
$ adb shell pm path com.example.someapp

# Download the apk to development machine
$ adb pull /data/app/com.example.someapp-2.apk

# Dump activity on app
$ adb shell dumpsys activity top | grep ACTIVITY

Frida Cheatsheet

Install Frida Server on android,
download frida server :

$ adb root # might be required
$ adb push frida-server /data/local/tmp/
$ adb shell "chmod 755 /data/local/tmp/frida-server"
$ adb shell "/data/local/tmp/frida-server &"

Frida Command

# Connect Frida to an iPad over USB and list running processes
$ frida-ps -U

# List running applications
$ frida-ps -Ua

# List installed applications
$ frida-ps -Uai

# Connect Frida to the specific device
$ frida-ps -D 0216027d1d6d3a03

# Trace recv* and send* APIs in Safari
$ frida-trace -i "recv*" -i "send*" Safari

# Trace ObjC method calls in Safari
$ frida-trace -m "-[NSView drawRect:]" Safari

# Launch SnapChat on your iPhone and trace crypto API calls
$ frida-trace -U -f -I "libcommonCrypto*"

#Frida trace every open function while program start
$ frida-trace -U -i open

Frida Tracing

Download : Usage :

$ java -jar FridaAndroidTracer.jar
-a,--expand-array      expand array values
-c,--classes <arg>     classes to be hooked
-j,--jars <arg>        jar files to be included
-o,--output <arg>      output script path
-p,--include-private   include private methods
-s,--skip <arg>        methods to be skipped

AndBug - For Enumerate Class And Method On Application


#Enumerate classes on application
$ andbug classes -p [PID application /] > class.txt

#Enumerate methods on classes
$ andbug methods -p [PID application /] [class name]

Android Log Tracing

Using PIDCAT :

$ ./ []

Decompile APK File

APKX for decompile apk

Usage :

$ apkx -c enjarify -d procyon app.testing.apk

Bytecode Viewer - GUI

To read source code of dex or jar file.
how to run : Just double click on jar file


Install :

$ git clone
$ cd ReverseAPK 
$ ./install

Usage :

$ reverse-apk app.testing.apk

Install Burp Certificate On Android

Convert burp certificate from DER to PEM . If you lazy, you can download PEM file on this repository.

$ openssl x509 -inform DER -in cacert.der -out cacert.pem
# Get subject_hash_old (or subject_hash if OpenSSL < 1.0)
$ openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1
$ mv cacert.pem 9a5ba575.0

Install PEM file to the System Trusted Credentials on device.

$ adb root
$ adb remount  
$ adb push 9a5ba575.0 /system/etc/security/cacerts/  
$ adb shell "chmod 644 /system/etc/security/cacerts/9a5ba575.0"
$ adb shell "reboot" 

If your /system cant mounting, You must mounting first.

$ adb root
$ adb shell
# Check mounting list
$ cat /proc/mounts
#/dev/block/bootdevice/by-name/system /system ext4 ro,seclabel,relatime,discard,data=ordered 0 0
$ mount -o rw,remount -t rfs /dev/block/bootdevice/by-name/system /system
$ adb push 9a5ba575.0 /system/etc/security/cacerts/  
$ adb shell "chmod 644 /system/etc/security/cacerts/9a5ba575.0"
$ adb shell "reboot" 

Install Open Gapps On Android Emulator

Download :
Extract :

$ unzip open_gapps-x86_64******.zip 'Core/*'
$ rm Core/setup*
$ lzip -d Core/*.lz
$ for f in $(ls Core/*.tar); do
  tar -x --strip-components 2 -f $f

Install to Emulator :

$ adb root
$ adb remount
$ adb push etc /system
$ adb push framework /system
$ adb push app /system
$ adb push priv-app /system
$ adb shell stop
$ adb shell start


Android Studio Emulator

This command for run emulator from android studio, make you have already install android studio before.
if you want to root android emulator, please using system without (Google API's) or (Google Play)

# List all emulator
$ emulator.exe -list-avds 
# Run Emulator
$ emulator.exe -avd [EmulatorName]



QARK - Quick Android Review Kit

For quick analyze application on android with scanning the apk or java file and create Proof Of Concept of vulnerability.
Install QARK:

$ git clone
$ cd qark
$ pip install -r requirements.txt
$ pip install . --user  # --user is only needed if not using a virtualenv
$ qark --help

Usage to scan APK:

$ qark --apk path/to/my.apk

Usage to scan Java source code files:

$ qark --java path/to/parent/java/folder
$ qark --java path/to/specific/java/


if you have know about more command or a new trick to do something with Mobile Pentest, please let me know :)
email : /

You can’t perform that action at this time.