List available emulator AVD names:
emulator -list-avds
Start the emulator with a writable system image (required for some tools like MobSF):
emulator -avd Pixel_5_API_28 -writable-system
Note: If the emulator is not started this way, MobSF may not be able to connect.
Pulling an APK from Google Play (device)
Set the app package name (bundleId):
bundleId="com.wizmirnet.net"
Find the APK path on the device (this extracts the path returned by adb shell pm path):
# PowerShell example (split the output and take the path part)
$apk=(adb shell pm path $bundleId).Split(':')[1].Trim()
Pull the APK from the device to your computer:
adb pull $apk app.apk
Example manual steps (method 1):
# List installed packages (filter as needed)
adb shell pm list packages
# Example package found:
# package:com.android.insecurebankv2
# Get APK path for the package
adb shell pm path com.android.insecurebankv2
# Example output:
# package:/data/app/com.android.insecurebankv2-Jnf8pNgwy3QA_U5f-n_4jQ==/base.apk
# Pull directly using the returned path
adb pull /data/app/com.android.insecurebankv2-Jnf8pNgwy3QA_U5f-n_4jQ==/base.apk
Frida Commands
List processes on a connected device (Frida):
frida-ps -U
Run a codeshare script on an app (example: Android debug mode bypass):
frida --codeshare Raphkitue/android-debug-mode-bypass -U -f com.getmidas.app
Run a custom Frida script:
frida -U -f com.getmidas.app -l ./frida_antiroot.js
SharedPreferences Location
Android SharedPreferences files are stored here on the device:
cd /data/data/<package_name>/shared_prefs/
Starting Frida Server on an Emulator
Push the Frida server binary to the emulator:
adb push frida-server /data/local/tmp/
Make it executable:
adb shell "chmod 755 /data/local/tmp/frida-server"
Start Frida server in the background:
adb shell "/data/local/tmp/frida-server &"
Notes about Syntax
- The dollar sign in a Java class name indicates an inner class.
Example:
const b64Claz = Java.use('java.util.Base64$Decoder');
- If multiple devices are connected, target a specific device with
adb -s:
adb -s 192.168.246.113:5555 shell