Better Battery Statistics with Battery Historian

Posted on Mon 17 August 2015 in android • Tagged with android, battery, debug

Continuing the relentless quest to keep my phone speedy, I stumbled upon a developer tool that is useful to anyone needing to troubleshoot a slow, short-living or overheating phone -- Battery Historian

battery historian

Battery Historian shows you a much more detailed and informative battery stats chart, highlighting the individual apps and sync services which are keeping your phone awake/busy in the background. It also shows network, wifi status, gps and more.

Using this tool I identified that the Facebook Messenger app was waking up to send stats. Also, Google+ was syncing for ~40s in the bakground at times.


$ git …
Continue reading

Debugging Android Performance & Battery Issues--Like a Developer

Posted on Sat 15 August 2015 in android • Tagged with android, battery, debug

I have a frustrating relationship with my phone's performance. I can cleanup my phone for a few days, but it tends to revert to being sluggish within no time. I've had dozens of devices and they all suffer from this.

There's a lot of voodoo about Android Performance and Battery life--task managers, factory resets, etc.

Here's a more developer-oriented process using adb .

Using ADB to identify process hogs

By connecting your device to the Android SDK, you can use ADB to identify process hogs. If you can, just remove the app. Otherwise, delete it's data (see pm clear below)

$ adb …
Continue reading

Validating side-loaded APKs

Posted on Thu 13 August 2015 in android • Tagged with android, apk, debug

I was desperate to try Hangouts 4.0 for Android, but suspicious of side-loading. I wanted to verify the APK signature cert had Google's fingerprint of


Here's how to check the signatures on an APK, as usual, in shell functions (JDK needed)

apk-check () {
    jarsigner -verify -verbose -certs $1

apk-print-cert () {
    keytool -list -printcert -jarfile $1

# usage
# make sure it's verified
$ apk-check *apk|grep verified
  s = signature was verified
jar verified.
# show …
Continue reading

First Things First, on AWS

Posted on Fri 07 August 2015 in android • Tagged with aws, secuity, tutorial

I was chatting with a buddy who was moving his web sites from dedicated hosting to AWS. Let's just say the FTUE isn't great. That triggered a quick brain-dump of what you should do when you first get started with AWS.

  • understand pets v cattle. In aws all resources should be "cattle", not pets. Periodically terminate instances to test this.
  • activate cloudtrail (in all regions). Use Loggly to index cloudtrail (free or ~$20/mo)
  • create restricted IAM users. Never use your root acct. Activate MFA.
  • Use IAM ec2-instance roles instead of stored credentials whenever possible.
  • Get familiar with IAM management …
Continue reading