Basic tips

Getting certificate details from an apk

Getting certificate details from an apkkeytool -printcert -jarfile file.apk

apktool - decode and compile APK

java -jar .\apktool.jar decode -r 'C:\tmp\xxxxx.apk'

(inside the decompiled APK (root))
java -jar ..\apktool.jar build -o c:\tmp\new.apk C:\Tools\android\apk_folder

I: Using Apktool 2.5.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether resources has changed...
I: Copying raw resources...
I: Copying libs... (/lib)
I: Copying libs... (/kotlin)
I: Copying libs... (/META-INF/services)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
PS C:\Tools\android\>

Create keystore key

Sign apk with jarsigner

Here, you need to use the alias created when you created the keystore file (baws, in this case).

Align APK to avoid errors

After sign an APK, if you got some erros such as "Failed to extract native libraries, res=-2]", probably you need to align the APK.

As I used jarsigner, my last step is align the APK before installing it.

Execute target activity via ADB

First, check on the Android-Manifest.xml file the package name. It can be found on the first line of the XML file (<?xml version="1.0" encoding="utf-8" standalone="no" ... package="com.x.x.x.x" ...)

Next, pick a target activity, and add the android:name="com.x.x.com.x..v2.ui.dashboard.DashboardActivity"> .. 😇

Add GSM

Frida enumerate users creds (Windows)

Frida minidump - Windows

Drozer: Android App enumeration

Basic commands below:

Last updated

Was this helpful?