中文版:https://github.com/izgzhen/droid-scripts/blob/master/README_Chinese.md
Executable scripts for helping with Android related work.
Most of them are either wrappers of existing third-party tool's released jars or
Android SDK tools' executables e.g. adb
(inside path/to/sdk/platform-tools
),
aapt
(inside path/to/sdk/build-tools/<version>
).
NOTE: Install build tools
path/to/sdk/tools/bin/sdkmanager 'build-tools;29.0.3'
Depends on python3 and msbase
package.
./launch-apk.py launch path/to/apk
NOTE: this python script also supports printing the application label and package of an apk:
./launch-apk.py label path/to/apk
./launch-apk.py package path/to/apk
python debug-sign.py <input-apk-path> <output-apk-path>
baksmali d path/to/apk -o path/to/output/dir
Version: 2.4.0, from https://github.com/JesusFreke/smali/ (also include smali
)
apktool d path/to/apk -o path/to/output/dir
Version: 2.4.1, from https://ibotpeaches.github.io/Apktool/
pkg-classes path/to/apk path/to/txt
- Make a debuggable copy of it using
debug-sign.apk
- (Option 1) Use Android Studio to debug/profile it
- Tools -> Layout Inspector
- Choose the corresponding Activity
- (Option 2) Use scripts:
adb-uidump path/to/output/xml
adb-uidump-compressed path/to/output/xml
aapt dump badging path/to/apk
application-label:
: show package labelpackage: name
: show package name
aapt dump permissions path/to/apk
: show permission
adb shell pm list packages # find the package name from the output
adb shell pm path <package-name> # outputs <target-apk-path>
adb pull <target-apk-path> <apk-output>
adb install path/to/apk
NOTE: Build the Docker image with make
first
Make sure your APK file (not symbolic link) is under apks
in this directory.
./dare.py apks/example.apk <sha256sum>
Then you can find (Java classes) outputs in output/dare/
NOTE: this depends on "Dare" introduced above.
Also, you should set env var ANDROID_SDK
to the Android SDK directory, such that
the tool can find $ANDROID_SDK/platforms/android-23/android.jar
.
path/to/ic3.py path/to/example.apk <sha256sum> <apk-package-name> path/to/dare/classes path/to/output.txt
Then you can find (text-format Protobuf) output at path/to/output.txt
adb shell dumpsys activity