Table of Contents

Android tips

HowTo take a screenshot on Android device

On Ice Cream Sandwich (4.0) or above, press the Volume Down and Power buttons at the same time and hold them for a second.

Deploying Android SDK on Ubuntu (32bit)

$ mkdir ~/projects/android
$ cd ~/projects/android/
$ cp ~/Downloads/Android/adt-bundle-linux-x86.zip ./
$ unzip adt-bundle-linux-x86.zip
$ sudo apt-get install ant
$ sudo sudo apt-get install default-jdk
$ echo $PATH
/home/dambi/bin:...
$ ls -l /home/dambi/bin/android
lrwxrwxrwx 1 dambi dambi 58 Dec 24 09:36 /home/dambi/bin/android -> ../projects/android/adt-bundle-linux-x86/sdk/tools/android
$ ls -l /home/dambi/bin/adb
lrwxrwxrwx 1 dambi dambi 63 Dec  5 16:57 /home/dambi/bin/adb -> ../projects/android/adt-bundle-linux-x86/sdk/platform-tools/adb
$

Managing Android project

$ android create project --target 1 --path ~/projects/CarMon/sw/app/android/ObdLogger --activity ObdLogger --package cz.tio.android.obdlogger
$ ant debug install

Debugging

$ adb logcat
$ adb logcat -s ObdLogger:*

Devices

Enable logging on Huawei Ascent G300

Logging feature is disabled by default on that device.

$ adb logcat
Unable to open log device '/dev/log/main': No such file or directory
$

Though logging can be enabled from hidden service menu.