Skip to end of banner
Go to start of banner

Debugging of mobile apps - Admin Guide

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This Guide describes several options on how to collect logs from Android and iOS applications. Collecting logs is a useful method for debugging of various issues.

Created: April 2018

Permalink:

Introduction

Useful links:

Android Collaboration User Guide

iOS Collaboration User Guide

Collecting logs from Android app

To gather logs from Android app, follow the next steps:

Step 1. Install adb on you PC

Android Debug Bridge (adb) is a command-line tool that allows you to communicate with your device. As it is included in the Android SDK Platform-Tools package, you need to install this package.

Note: If you use MacOS, you can skip downloading thepackage and install it via Terminal:

  • First, install Homebrew (package management software) using the following command:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"


  • Install Android SDK Platform-Tools with this command:

brew cask install android-platform-tools


Step 2. Enable USB debugging on your device

To use adb tool with your Android device connected over USB, you need to enable USB debugging option in the device system settings, under Developer options menu.

On Android 4.2 and higher, Developer options menu is hidden by default. To make it visible:

  • Go to Settings -> About phone and tap Build number seven times. You will see a pop-up message  "You are now a developer"

  • Return to the previous screen to find Developer options at the bottom.


On some Android devices, the Developer options screen might be located or named differently.



Step 3.  Collect logs

for MacOS:

./adb logcat -v time > android-logs.txt


For Windows:

adb.exe logcat -v time > android-logs.txt

Go to folder with adb (adb.exe for Windows)

Step 4. 

  • Connect your Android device to PC/ Mac and confirm allow USB debugging by tapping OK

    When you connect the device, the system asks your permission to accept an RSA key that allows debugging through this computer. This helps to protect the device by ensuring that USB debugging cannot be executed unless you're able to unlock the device and acknowledge the dialog.


  • Reproduce the issue

  • Copy logs from logcat tabs

when Android Studio using on MAC, path to adb from console:
/Users/admin/Library/Android/sdk/platform-tools/adb logcat -v time | tee phone.log 


Start using adb: adb devices

Collecting logs from iOS apps

Starting from iOS Collaboration Version 6.0.35105, it it possible to capture logs right off you mobile device.

To capture logs from iOS app:

  • Go to Settings -> Advanced and enable Debug option:



  • Reproduce the issue to collect logs

  • Return to Settings -> Advanced  and tap Send:



  • Email template with the attached logs is automatically created. You can change/ add new recipients

  • In the Subject field you need to describe the current behavior and body of email and tap Send:



Important! After the report with logs is sent, you need to disable Debug option.

Check / remove push notification subscription on Android/ iOS app

Check push notifications subscription

To check if push notifications (Web push / iOS / Android push) are enabled for an extension:

  • Access via SSH as root and launch the following command:

kamcmd htable.dump mobile_devices_data | grep <EXT>

Where:

<EXT> is the extension of a user.

Remove push notifications subscription

To remove push notifications, use the script: push_remove

  • Remove push notifications for one extension:

push_remove <EXT>


  • Remove push notifications for several extensions:

push_remove <EXT> <EXT> <EXT>


  • Display list of extensions that subscribed to push notifications:

push_remove -list


  • Display help:

push_remove -h

  • No labels