Trace Android Log
To trace errors, failed events or crashes that occur on Android, you can follow these steps:
- If you’re using Windows, you need to set up ADB first. Usually this will be included if you install the Android SDK. For a detailed explanation on how to install it, please refer to this guide
- After you’ve set up ADB, open Windows PowerShell
- Plug your Android device into your laptop / machine
- Afterwards, execute the command below in Windows PowerShell
adb logcat -v time color -s FA FA-SVC- Open the relevant application, and observe the log information that will be shown in Windows PowerShell
- Focus on the important information only, like :
# this log trace shows only failed_events
Logging event: origin=app,name=event_stories_video_load_failed,params=Bundle[{reason=VIDEO_NOT_PLAYABLE_IN_EMBEDDED_PLAYER, user_id=2971485, ga_event_origin(_o)=app, ga_screen_class(_sc)=VideoDetailActivity, ga_screen_id(_si)=-1520296850786855388}]- If you want to trace only crashes that happen, you can use this command :
adb logcat -b crash, main, system -v color -s FA FA-SVCTrace Android HTTP Request
Sometimes, you also need to trace the HTTP request bound. Just ensure whether the API endpoint is not deprecated or you can also do it for API testing later. You can follow several steps to do this :
- Same as before, you need to set up ADB first
- Afterwards, plug your Android device into your laptop / machine
- Allow the debugging confirmation pop-up that will appear on your Android phone
- Open Chrome and navigate to
chrome://inspectin the address bar