Google Nexus 6P

I finally decided my old Google Galaxy Nexus was done. I couldn’t use the phone in the house, it was having random meltdowns where apps would kill the battery in 4 hours, and was getting text messages duplicated inbound and outbound. Surfing was a slow nightmare. I just could not trust it as I could when it was new, and could not use it reliably for texting. I don’t text a lot, but I do need it to work.

So after reading a gob of reviews, I decided to go Google Nexus 6P, the new Huawei Nexus version in the phone form factor. I ordered the 64Gb version, and the Speck case in black and white. It quickly arrived.

Phone? More like a surfboard. Large, about halfway between the Galaxy Nexus and Nexus 7 Tablet. Fits into my hand, barely. Gorgeous display. I downloaded a selection of apps, redid the 2-factor setups on several accounts, restored a backup using Helium (was Carbon). Called Consumer Cellular (AT&T MVNO) to transfer the number – had to go to local Sears first to get the Nano-SIM, my existing Micro-SIM did not fit. After a bit I had to order cables – it uses the new Type-C USB format, and I needed USB to USB Type-C for connection to a laptop and car charger. Love the format, hate having to buy new cables, but now I won’t ever again.

It calls and texts in the basement in my pocket. Old phone did not. I spilled coffee on it today. The Speck case seals around the edge, and a ArmorSuit Military Grade screen protector prevented anything from touching the screen. I have dropped it several times, no problem. I did get the insurance.

Pros

  • Fast charge, good battery life. Phone used for 10 mins/day, some surfing, mostly WiFi.
  • Great display.
  • Fingerprint unlock is the best. Grab, unlock, go. I would never go back.
  • Android 6 Marshmallow works and looks great for fans of stock Android. No crapware.
  • Unlocked and compatible with Verizon AND AT&T. Can’t wait to try in Canada or Europe.

Cons

  • Big, sometimes gets away from you. If have small hands, it won’t be an easy one-hander. Hard to stow in pockets.
  • New cables required for USB Type-C
  • Expensive
  • That’s it. Great phone.

Jenkins and Android

We use Jenkins to build our Android app. I am converting the build from r12 to r18 (now r20, since Google I/O 2012) which is forcing some config changes, but trying to preserve the old build in case we need to rebuild something old. So I use $ANDROID_HOME, specified in the System config under “Android SDK root”, which each job will specify, to point to the correct SDK. And I define two other vars, ANDROID_HOME_18 and ANDROID_HOME_12 to refer to later.

[EnvInject] - Injecting as environment variables the properties content 
ANDROID_HOME=${ANDROID_HOME_18}
PATH=${ANDROID_HOME_18}/tools:${ANDROID_HOME_18}/platform-tools:${SONAR_RUNNER_HOME}/bin

[EnvInject] - Variables injected successfully.
[locks-and-latches] Checking to see if we really have the locks
[locks-and-latches] Have all the locks, build can start
$ /usr/share/android-sdk-macosx.r18//tools/android list target
/usr/share/android-sdk-macosx.r18//tools/android: line 30: dirname: command not found
/usr/share/android-sdk-macosx.r18//tools/android: line 33: basename: command not found
/usr/share/android-sdk-macosx.r18//tools/android: line 40: dirname: command not found
/usr/share/android-sdk-macosx.r18//tools/android: line 44: dirname: command not found
/usr/share/android-sdk-macosx.r18//tools/android: line 48: basename: command not found
[android] The configured Android platform needs to be installed: android-8
[android] Installing the 'android-8' SDK component(s)...
$ /usr/share/android-sdk-macosx.r18//tools/android update sdk -u -a -t android-8
/usr/share/android-sdk-macosx.r18//tools/android: line 30: dirname: command not found
/usr/share/android-sdk-macosx.r18//tools/android: line 33: basename: command not found
/usr/share/android-sdk-macosx.r18//tools/android: line 40: dirname: command not found
/usr/share/android-sdk-macosx.r18//tools/android: line 44: dirname: command not found
/usr/share/android-sdk-macosx.r18//tools/android: line 48: basename: command not found
: can't find sdkmanager.jar
[android] Using Android SDK: /usr/share/android-sdk-macosx.r18/
[android] Waiting 1 seconds before starting emulator...
$ /usr/share/android-sdk-macosx.r18//platform-tools/adb start-server

Lots of things missing. dirname and basename live in /usr/bin, cannot be found due to bad path. sdkmanager.jar missing. Add /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin to PATH. Better. Still cannot find the android-8 libs. Spent a lot of time, adding debug to the Ant scripts, trying to log the environment. Ready to crack into the source. Sigh.

Read a bit on the Android Emulator Plugin, and it exports ANDROID_HOME. Could it be colliding with mine? I injected a NEW home variable, instead of ANDROID_HOME, and use that to pass in the current SDK location.

[EnvInject] - Injecting as environment variables the properties content 
XXX_ANDROID_HOME=${ANDROID_HOME_18}
PATH=${ANDROID_HOME_18}/tools:${ANDROID_HOME_18}/platform-tools:${SONAR_RUNNER_HOME}/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

[EnvInject] - Variables injected successfully.
[locks-and-latches] Checking to see if we really have the locks
[locks-and-latches] Have all the locks, build can start
[android] Using Android SDK: /usr/share/android-sdk-macosx.r18/
[android] Waiting 1 seconds before starting emulator...
$ /usr/share/android-sdk-macosx.r18//platform-tools/adb start-server
[android] Starting Android emulator
[android] Erasing existing emulator data...
$ /usr/share/android-sdk-macosx.r18//tools/emulator -no-boot-anim -ports 58553,58554 -prop persist.sys.language=en -prop

and that seems to work.

Takeaway : don’t define ANDROID_HOME locally, let the plugin define it. It will anyway.