How to Troubleshoot Secured Android Apps Using ADB

 

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 look at this and view this resource.

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.
    • You’ll get a short pop-up in the lower area of your display saying that you’re now a developer.troubleshooting Android apps using ADB
  2. Navigate to Settings > Advanced > Developer options.
    • Check ‘USB debugging’ and click OK on the prompt.
  3. When the device is connected to the computer, you should be prompted to “Allow USB debugging.” If so, check the box to “Always allow from this computer.
  4. Click OK. If you do not see the message appear on your mobile device, disconnect and reconnect the USB cable.
    Enabling USB Debugger Mode on Android

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 appyou can enable Diagnostic Logs at the bottom of the page.
  3. Under Troubleshooting, enable Diagnostic Logs for the Build.
    • You can enable the ability to email or upload logs to Appdome support with a tap in the app within Diagnostic Logs.

 

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. Navigate using the Terminal to the Android SDK directory (for example C:\Program Files\Android\android-sdk\platform-tools).
  5. Type adb logcat.Troubleshooting Android apps using ADB with Appdome
  6. Reproduce the problem. This will create logs you want to examine.
  7. If you want to save the output to file, run:
    adb logcat >/$*some-folder*/android-debug.log

Note! In case your ADB version is 1.0.40 and above plus 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”Here’s a link to a video on extracting diagnostic logs from Android apps.

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. Choose 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.

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.

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.

Paul Levasseur

Have a question?

Ask an expert

DafnaMaking your security project a success!