How to Troubleshoot Secured Android Apps by Using ADB

Last updated May 2, 2023 by Appdome

Device logs are used for troubleshooting apps. This KB article discusses 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. This Knowledge Base article provides step-by-step instructions for gathering Android device logs using ADB while troubleshooting apps.

We hope you find this knowledge base 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 about how to install and use ADB.

Appdome is a no-code mobile app security platform designed to add security features in mobile apps.

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.

Using Appdome, there are no development or coding prerequisites to build secured apps. There is no SDK and no library to manually code or implement in the app. The Appdome technology adds the relevant standards, frameworks, stores, and logic to the app automatically, with no manual development work at all.

Prerequisites for Troubleshooting Secured Android Apps Using ADB

In order to use ADB, you’ll need:

  • Android SDK.  Make sure that platform-tools have included ADB in this package.
  • USB Driver for the mobile device
  • Android app that has enabled diagnostic logs

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 in the lower area of your display saying that you are now a developer.
      Lev1.2
  2. Navigate to Settings > Advanced > Developer options.
  3. Enable (toggle on) the option 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. Here’s a resource that guides one through installing ADB on Mac, Windows, or Linux.
  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

How Do I Learn More?

Check out this blog for more information about obtaining logs from Logcat using Android Studio.

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

Related Articles

Thank you!

Thanks for visiting Appdome! Our mission is to make mobile integration 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.

NEED HELP?

let's solve it together

ShlomiMaking your security project a success!
By filling out this form, you opt-in to recieve emails from us.