Enable remote content debugging of Android apps

Mobile Center supports testing non-packaged hybrid Android apps, provided that remote content debugging has been enabled in the app. Before testing a non-packaged hybrid Android app, inspect your app to see if remote content debugging is enabled. For details on remote debugging and how to see check if this enabled in your app, see Google Developer.

If remote content debugging is not already enabled, you can set up Mobile Center to automatically enable this, after an app is uploaded to the server. Alternatively, you can use the Android Enabler tool to manually enable remote content debugging.

Automatically enable remote content debugging

Setting up Mobile Center to automatically enable remote debugging in Android hybrid apps uses Mobile Center's app packaging mechanism, and requires you to configure several settings.

Although the app packaging mechanism is used, unlike packaged apps, no record and replay libraries are added to the app.

To enable automatic remote content debugging:

  1. On the Mobile Center Server machine, open the server properties file:
  2. Linux: <Path to your server installation folder>/server/conf/server.properties
    Windows <Path to your server installation folder>\server\conf\server.properties
  3. To active remote debugging, add the following line:
    APP_UPLOAD_ENABLE_REMOTE_DEBUGGING=true
  4. In Mobile Center Lab Management console, open the Administration > Settings page. In the packaging service section for Android, set the following:
    • IP address and port of the machine that will be used by the packaging service. By default, the Android package service machine is set to localhost.
    • Set the protocol type to http or https, depending on whether the connection is secure.
  5. Restart the Mobile Center server.

For Android apps that use services requiring a private key you also need to set up app signing services.

Back to top

Manually enable remote content debugging

You can manually enable remote content debugging in your app from the command line using the Android Enabler tool.

Prerequisites:

The packaging process should be run on a machine that meets the following requirements:

  • The Java Runtime Environment (v7.X or higher) is installed
  • The JRE_HOME environment variable is defined
  • 1.5 GB free RAM (Recommended)

To enable remote content debugging:

  1. Copy the following to the testing tool machine:

    • AndroidTools folder. You can find this folder in the server folder on the Mobile Center server machine.

    • Your app (.apk file)
  2. Run the enabler on your app.

Back to top

Troubleshooting

There may be times when enabling remote debugging does not succeed. This can happen when: