Collecting logs from Android Support with Logcat. Debugging Android apps.

Jolla Care -

When experiencing issues related to Android applications, collecting logs might provide additional information to what is causing the issue.

You will need to enable the Developer mode for this.

Logcat tool

Logcat is a command-line tool that dumps a log of system messages from the Android driver subsystem.

With the Logcat tool, it goes easily to collect Android logs from the system. There are two ways to use logcat: a) from Sailfish OS b) from Android App Support. The resulting logs differ. Choose a) or b) depending on the problem you want to look at.

1. Open Terminal

2. Get super-user rights

See the help article of the Developer mode.

cd $HOME
export MYHOME=$(pwd)
devel-su

3. Logcat printout to a file

3.1. Jolla 1 and Jolla Tablet

/opt/alien/system/bin/logcat -v time > $MYHOME/android-logs.txt
exit

3.2. Xperia X and Jolla C

a) From Sailfish OS

/usr/libexec/droid-hybris/system/bin/logcat > $MYHOME/android-logs.txt

b) From Android Support

chroot /opt/alien  /system/bin/logcat -v time > $MYHOME/android-logs.txt

3.3. Xperia XA2 and Xperia 10

a) From Android Support

lxc-attach -n aliendalvik -- /system/bin/logcat

The events in the Android system will now be printed to the screen. The command runs until you stop it with <ctrl>C.

lxc-attach -n aliendalvik -- /system/bin/logcat > $MYHOME/android-logs.txt

The events in the Android system will now be printed to file logcat.log The command runs until you stop it with <ctrl>C.

 

b) From Sailfish OS  (for comparison)

/usr/libexec/droid-hybris/system/bin/logcat > $MYHOME/sailfish-logs.txt

 

 

4. Journal and other information

It is always good to collect the journal log, too, as it shows all events in Sailfish system.

Note that you must have the super-user ("root") rights to do this successfully. We assume below in the next commands that you have the setup  from chapter 2 still in effect - if not, redo the commands of chapter 2 first.

journalctl -ab --no-pager  > $MYHOME/journal.txt


The following commands give information on what has been installed to Sailfish:

rpm -qa | grep alien > $MYHOME/rpm-alien.txt
rpm -qa | grep apkd > $MYHOME/rpm-apkd.txt
ssu lr > $MYHOME/ssu-lr.txt
ssu s > $MYHOME/ssu-s.txt

 

Have more questions? Submit a request
Powered by Zendesk