Dockerized Android debugging tools: Android Debug Bridge (adb), Objection, and Frida.
266
This documents describes how to set-up an virtual Android device and how to control it using various tools.
VirtualBox will be used to create a virtual machine running Android, and Docker will be used to create an environment for running the various debug tools: Android Debug Bridge (adb), Objection, and Frida.
.iso image file from here
adb from a docker container to android guest), add another Host-Only network adapter and use the adapter that is being used in the other virtual machineGPT creationNew -> Primary -> 4000MB -> Beginning -> Bootable --> WriteNew -> Logical -> Beginning -> WriteQuitsda1ext4 filesystemGRUBread-write (root)RebootDeveloper options on Android by going to Settings -> System -> About Tablet -> Build Number and pressing 10 times on this menu itemSettings -> System -> Developer options:
Stay awakeUSB debuggingSettings -> System -> About Tablet -> Status -> IP addressVirtualBox Manager GUI -> Settings -> Shared Folders and select a folder from your real machine, that will be accessible to the virtual machine. For example, to map "D:\Data" to "/d/misc" inside the VM:
Folder Path: D:\DataFolder Name: /d/miscAuto-mountMake permanentdocker pull arikwe/android-debug-tools
Dockerfile found in this repository with the following command:
docker build -t android-debug-tools .
docker run -it --rm -v //d/misc:/misc -p 5555 --name android-debug-tools arikwe/android-debug-tools
This will spin up a bash shell inside a Docker container, with the debugging tools to debug Android devices.
Note: If you chose to build the image locally using the Dockerfile, make sure to remove the "arikwe/" prefix from the image name in the command above.
You can use adb for various tasks, like gaining shell access to the virtual Android device, upload files and sideload APK files
From the bash shell, connect to the Android virtual device using the IP shown in the device Status menu item, inside the settings (as noted in the Android Virtual Machine setup part) using the following command (replace the IP)
adb connect 192.168.99.106
After a successful connection, you can sideload APK files, for example, from your host machine's shared folder (e.g., D:\Data), and install them using the following command
adb install /misc/my-super-application.apk
Xposed Framework can be used to turn off device-wide SSL pinning using the TrustMeAlready module
Xposed frameworkYou can use Objection to bypass Android's certificate pinning for a certain application. This technique is described here.
For example, to patch an APK using Objection:
objection patchapk -s /misc/my-super-application.apk
adb install /misc/my-super-application.objection.apk
Now run the application in Android and turn off the SSL pinning:
objection explore
android sslpinning disable
or try by using the following single-line command:
objection run android sslpinning disable
Content type
Image
Digest
Size
526.2 MB
Last updated
almost 7 years ago
docker pull arikwe/android-debug-tools