Skip to main content

Debug and Test Android Apps

Interact with the Web Interface Tools and Features

If you haven't created an Android device already, check out our Quickstart for Android article.

Install an APK

  • Click on the Apps tab and use the Install button to load your APK file.

Apps page

  • If your program is just a command-line executable:
  1. Use the Files tab to open a file browser then click the UPLOAD button to upload it somewhere in the file system.

files page

  1. Then, use the Console (type su for root privileges) to make it executable.
  • Otherwise, the app should show up in the app list and you can use the Launch button to start it; you should also see it in the Launcher.

Capture System Calls with CoreTrace

Use CoreTrace to capture system calls made by your program, check out our Tracing Threads and Processes with CoreTrace article.

Use Frida Through the Web Interface

  1. Navigate to the Frida tab located on the left hand side of the UI.

Frida UI

  1. Click "Select A Process" where you can then choose from a list of active processes on that specific device. Select a running process and click the "Attach" button.

Select Frida Process

  1. Once attached, you also have the option to execute scripts by navigating to the scripts tab found next to the console tab and clicking execute next to the respective script. You can use the scripts that come natively installed on the device or you can upload your own.

Upload Frida Script

Utilize Frida from Your Workstation

Before using Frida through the terminal, you need make sure you have Frida installed on your work station and have connected to the VPN, please see our Corellium VPN article for more instruction regarding a VPN. You also need to have ADB installed, which we have instructions for as well. For more information about changing the built-in frida-server version refer here.

  1. After you have connected to the VPN, grab the ADB connect command from the Corellium UI.

UI ADB Frida

  1. Start the frida-server on the device.
frida-server -l {Host IP} &

You can kill the frida-server by finding the PID associated with the frida-server.

ps -e | grep frida-server
  1. You can now attach to an application using the application identifier and the Host IP of the device. As an example, here is how you would attach to the clock application from your local workstation:
Frida -H {Host IP} -f com.android.deskclock 

Debug the APK

Investigating logcats is a useful method for understanding how the device is handling an application.

  1. If you've been doing things to your device the logcat will reflect that. For a logcat to only contain relevant information about the application you are testing, reboot the device before capturing the logs.

  2. Navigate to the device terminal.

  3. Become super user su.

  4. Remount the file system.

mount -o remount,rw / 
  1. Run the following command to grab the logcats and redirect the output into a file. The created file will appear relative to whatever directory you are in at the time.
logcat > applogs.txt

Programatically Accomplish These Tasks

  • Download the Corellium Node.js API: https://github.com/corellium/corellium-api
  • Read the README file for more useful tools (for instance checking if an app is already installed and uninstalling it, as well as retrieving log files - if your app writes one).