How to Troubleshoot Secured Android Apps Using ADB

Last updated March 10, 2024 by Appdome

Appdome’s no-code mobile app security platform offers mobile developers, DevSec and security professionals a convenient and reliable way to protect Android and iOS apps without coding. When a user clicks Build My App, Appdome leverages a microservice architecture filled with 1000s of security plugins, and an adaptive code generation engine that matches the correct required plugins to the development environment, frameworks, and methods in each app.

Learn how to troubleshoot secured Android apps using ADB. Whenever you have issues with an app, it’s features, or the built-in SDK these logs can help find the root cause of the issue.

We hope you find this article useful and enjoy using Appdome!

How to Troubleshoot Secured Android Apps Using ADB

ADB stands for Android Debug Bridge. Troubleshooting secured Android apps using ADB enables you to connect an Android device over a USB cable to your computer.  With this connection you can uninstall apps, issue shell commands to your device, install apps, and do more administrative functions that help while troubleshooting. For more information on this see the [Logcat command-line tool article] and view this article on how to install and use ADB.

Prerequisites for Troubleshooting Secured Android Apps Using ADB

In order to use ADB, you’ll need:

  • Android SDK.
  •  Platform-tools that include ADB in their package.
  • USB Driver for the mobile device
  • Android app that have diagnostic logs enabled

To facilitate the usage of ADB, you need to allow USB debugging on your device:

  1. Enable Developer Options on the Android Device.
    • Navigate to Settings > About Phone.
    • Scroll to the bottom.
    • Tap Build number seven (7) times.
      Lev1
    • You’ll get a short pop-up message in the lower area of your display saying “Developer mode has been enabled”.
      Lev1.2
  2. Navigate to Settings > Advanced > Developer options.
  3. Toggle on USB debugging and click OK on the prompt.
  4. When the device is connected to the computer, you should be prompted to Allow USB debugging.
    Lev2.2
    If so, select the check box Always allow from this computer.
    3ln
  5. Click OK. If you do not see the message appear on your mobile device, disconnect and reconnect the USB cable.

3 Easy Steps to Troubleshoot Secured Android Apps Using ADB

Appdome’s Diagnostic Logs features are also useful when troubleshooting secured Android apps using ADB.

  1. Check with Appdome support to see if your account can enable Diagnostic Logs on app builds.
  2. While Fusing/Building an app you can enable Diagnostic Logs at the bottom of the page.
  3. Under Appdome Dev Options, enable Diagnostic Logs for the Build.
    • You can enable sending email messages or uploading logs to Appdome support with a tap in the app within Diagnostic Logs.
      Screen Shot 2022 12 01 At 14.44.31

Gathering Android Device Logs Using ADB

  1. Connect a USB cable to the mobile device.
  2. For more details, follow this guide on How to set up ADB on your computer
  3. Open CLI (Terminal on a Mac) (Start > Run > CMD on Windows).
  4. Type adb logcat -c
    This command clears all existing logs.
  5. Type adb logcat -v time > FileName.txt
    When this command is executed, the logs are collected into the file specified by using the <FileName.txt> variable.

  6. Reproduce the issue, to create the logs you want to examine.
  7. After the issue has been reproduced, type Control+C.
    The Control+C command creates the text file specified above.

Note:  If your ADB version is 1.0.40 and above, and your device is LG:

  1. The device name can be gained by entering “adb devices.”  This command will also tell you if the device is connected to the computer.
  2. Run: adb -s <device name> shell -t “logcat”

How to Obtain Device Logs Using Android Studio

  1. Connect your Android device to your computer over the USB cable.
  2. Open Android Studio.
  3. Click Logcat.
  4. Select the option No Filters in the bar on the top right. You will see the Android device logs being gathered.
  5. Highlight the wanted log messages and press Command + C.
  6. Open a text editor and paste all data.
  7. Save this log file as a .log.

Related Articles

If you have any questions, please send them our way at support.appdome.com or via the chat window on the Appdome platform.

Thank you!

Thanks for visiting Appdome! Our mission is to secure every app on the planet by making mobile app security easy. We hope we’re living up to the mission with your project. If you don’t already have an account, you can sign up for free.

Appdome

Want a Demo?

Test Secured Mobile Apps

TomWe're here to help
We'll get back to you in 24 hours to schedule your demo.