62 lines
1.4 KiB
Markdown
62 lines
1.4 KiB
Markdown
# Android Reverse Engineering Skill
|
|
|
|
## Installed Tools
|
|
- adb (Android Debug Bridge)
|
|
- fastboot
|
|
- apktool 2.11.1
|
|
- jadx 1.4.7 (CLI and GUI)
|
|
- apksigner
|
|
- zipalign
|
|
|
|
## Common Workflows
|
|
|
|
### APK Analysis
|
|
```bash
|
|
# Decompile APK
|
|
apktool d app.apk -o app_decompiled
|
|
|
|
# Recompile APK
|
|
apktool b app_decompiled -o app_modified.apk
|
|
|
|
# Sign APK
|
|
apksigner sign --ks keystore.jks app_modified.apk
|
|
|
|
# Analyze with JADX GUI
|
|
jadx-gui app.apk
|
|
|
|
# Analyze with JADX CLI
|
|
jadx -d output_dir app.apk
|
|
```
|
|
|
|
### ADB Commands
|
|
```bash
|
|
adb devices # List devices
|
|
adb shell # Open shell
|
|
adb install app.apk # Install APK
|
|
adb uninstall com.package.name # Uninstall
|
|
adb logcat # View logs
|
|
adb pull /sdcard/file.txt . # Download file
|
|
adb push file.txt /sdcard/ # Upload file
|
|
adb shell pm list packages # List installed packages
|
|
```
|
|
|
|
### APK Modification
|
|
```bash
|
|
# Full workflow
|
|
apktool d original.apk -o work_dir
|
|
# ... modify smali/resources ...
|
|
apktool b work_dir -o unsigned.apk
|
|
zipalign -v 4 unsigned.apk aligned.apk
|
|
apksigner sign --ks mykey.jks aligned.apk
|
|
```
|
|
|
|
## Tool Locations
|
|
- apktool: /opt/tools/apktool
|
|
- jadx: /opt/tools/jadx/bin/jadx
|
|
- jadx-gui: /opt/tools/jadx/bin/jadx-gui
|
|
|
|
## Security Notes
|
|
- Always verify APK signatures before installation
|
|
- Use isolated environment for unknown APKs
|
|
- Be careful with modified APKs - they can bypass security
|