Google Updates When They Stop Supporting Pixel and Nexus Phones

Pixel will be supported until October 2019, and Nexus 6P is up to September 2018. :'( It is understandable, since as the generation of phones aggregate, it would be too busy to support all of them and it would be nearly impossible to have bugs in it. But at the same time, it is sad… Continue reading Google Updates When They Stop Supporting Pixel and Nexus Phones

Samsung Galaxy Note 10.1 (2012 Edition) is the best tablet I've ever used... It's been 5 years, and I'm still using it...

Without root access:

ps | grep keywords | grep -v grep | head -1 | awk '{print $2}'

With rooted phone and busybox:

su -c busybox ps | grep keywords | grep -v grep | head -1 | awk '{print $1}'

Turn on/off Theater Mode on Android Wear Programatically

The simplest way is to leverage the adb shell to run settings put global theater_mode_on. settings put global theater_mode_on 1 will turn on theater mode settings put global theater_mode_on 0 will turn off theater mode And the following is the java code to turn on theater mode. Process su = Runtime.getRuntime().exec("su"); DataOutputStream os = new… Continue reading Turn on/off Theater Mode on Android Wear Programatically

It can be done by either simply look at the "About" in Android Settings, or by the following command using adb:

cat /system/build.prop /default.prop | grep -m 1 "ro.product.cpu.abi="

Using Valgrind and Callgrind on Android

Lately we want to understand the cpu utilization of an Android app we wrote. We tried a few things like android-ndk-profiler and easy-performance-analyzer but they did not provide a very detailed results in terms of system calls. They are easy to use but don't tell the details we want to see. Valgrind is a very powerful profiling tool in… Continue reading Using Valgrind and Callgrind on Android