DEV Community

Roman Nesterov
Roman Nesterov

Posted on

Use apkanalyzer for get info from apk with docker

Pull docker image with android sdk

% docker pull thyrlian/android-sdk
Enter fullscreen mode Exit fullscreen mode

Launch container with apk file mount to /app.apk path and bash interactive console

% docker run --rm -it -v $HOME/Downloads/some-android-app.apk:/app.apk thyrlian/android-sdk bash
Enter fullscreen mode Exit fullscreen mode

Before use apkanalyzer you must install necessary build tools

# sdkmanager --install 'build-tools;29.0.2'
Enter fullscreen mode Exit fullscreen mode

Check debuggable mode

# apkanalyzer manifest debuggable /app.apk
(output)
true | false
Enter fullscreen mode Exit fullscreen mode

Get permissions

# apkanalyzer manifest permissions /app.apk
(output)
android.permission.FLASHLIGHT
android.permission.RECORD_AUDIO
android.permission.READ_PRIVILEGED_PHONE_STATE
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_COARSE_LOCATION
android.permission.INTERNET
android.permission.ACCESS_NETWORK_STATE
android.permission.CHANGE_NETWORK_STATE
android.permission.ACCESS_WIFI_STATE
android.permission.CAMERA
android.permission.MODIFY_AUDIO_SETTINGS
android.permission.READ_EXTERNAL_STORAGE
android.permission.READ_PHONE_STATE
Enter fullscreen mode Exit fullscreen mode

More info at https://developer.android.com/studio/command-line/apkanalyzer

Top comments (0)