View what your smart mobile device and apps are up to behind the scenes

This applies to Android but I assume similar is possible on Apple iOS devices.

You can enable debugging and check all running processes and services, view the system log(s) to get much more details on what is happening with the OS and Apps than what you can get by default.

Viewing logs and some other debugging requires using a computer with USB cable and some of Software Development Kit components initially but supports access over WiFi after that.

It was not straight forward even for a person with IT experience but hopefully this how to guide with screenshots has simplified. I am open to feedback and can update it if anyone tries and runs into issues.

I am not a developer but needed to enable debugging on my phone to find out more about what I thought might be unusual or unexpected behavior with location tracking.

After I accepted the prompt on my Samsung phone to install the software update for Android version 10, I started getting notifications that some apps were requesting location in the background and did I want to allow this, only when running the app or not at all.

One example was a notification about Map My Ride which I was not using at the time but do use to track my exercise when cycling. I figured only when I use the app was a good choice but later I noticed after using the App it was not showing a route or just a straight line from start and end of my rides and very little stats. I changed permission for the app to allow getting location in the background and all was good again.

I was curious if the notification from Android was delayed or if the App was requesting location when I was not using it. I always close the app after my rides but some apps continue to run after closing. If needed you can force close via Settings, Apps but some will auto start when you restart your device or before whether you use the app or not. There is a permission to not allow to run in the background but that can cause issues with some apps.

By default under Settings Location you can see what apps have permissions but not a history. I have disabled tracking history globally on my device and on my Google account so it should only store locations while I am using an App that is using GPS. I also don’t need high accuracy so disabled using WiFi and Bluetooth to save battery and reduce data collection.

Enabling Debugging

You need to do a few things to be able to enable debugging and view the running processes, Android log etc …

You can enable several pages of debugging option on at least Android.

Warning, do not change anything you are not sure about as you may get unexpected results.

Enabling USB Debugging on an Android Device
  1. On the device, go to Settings > About <device>.
  2. Tap the Build number seven times to make Settings > Developer options available.
  3. Then enable the USB Debugging option. Tip: You might also want to at least temporarily enable the Stay awake option, to prevent your Android device from sleeping while plugged into the USB port.

See Images 1 to 3 below.

To go any further you need a Windows, Mac or Linux computer and download at least parts of the Android SDK

The full SDK is around 700 MB.

https://developer.android.com/studio

or just the SDK command line tools which are a few MBs plus one or two small packages.

https://developer.android.com/studio#command-tools

After you extract you can use sdkmanager to download the Platform Tools package which has Android Debug Bridge (adb) which is used to connect to your device over USB or WiFi.

Open a command window and go to folder android_sdk/tools/bin

Run

sdkmanager packages “platforms;android-28″ “extras”

You can drop “extras” if you going to use OEM USB driver for your device.

https://developer.android.com/studio/command-line/adb

Or download the tools directly here:

https://developer.android.com/studio/releases/platform-tools

Check for an USB driver for your device from the manufacturer

https://developer.android.com/tools/extras/oem-usb

In my case I had installed Samsung DeX to control my Samsubg phone from my computer via USB so it had already installed the driver.

If there is not a specific driver for your device or you want to try a genetic usb driver you can download the google driver.

sdkmanager packages “extras”
When done, the driver files are downloaded into the \extras\google\usb_driver\ directory.
For installation information, read Install a USB Driver.

Run adb to connect to device

android_sdk/…/adb

shell

logcat -d

To create the log on your computer

Then you can view and search in it.

E.g. search for location to find out more about the times apps requesting your devices location.

More information

https://developer.android.com/studio/command-line/logcat

Figure 1.

Figure 2.

Figure 3.

Related

Using Google Chrome Console On Any Mobile Device!
Sep 13 ’19 ・1 min read

About Kevin Yaworski

I use my blog to write about things I find interesting or that I think are matter of public interest.
This entry was posted in Computers and Internet, News and politics, Science & Technology and tagged , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s