Monday, March 30, 2015

Brain surgery on a Nexus 5

A few days ago, my Nexus 5's display started turning colors.  A few minutes later, it stopped showing.

Rather than buying a new phone, I decided to see if it could be repaired with some surgery.  I bought a $70 replacement frame and digitizer and $5 in tools.  The video walkthrough seemed pretty straightforward right?



Little did I realize that I would have to move everything from the old unit to the new frame, including the two power buttons, the battery (the video warns about puncturing and inhaling the toxic chemicals), the front and back camera, antenna board, and the main CPU.   Not to mention the microphone pieces (watch very carefully the video about the additional part you must bring over too!)

You don't really need a dryer gun since the adhesive is pretty easy to remove.  The tricky part is getting the shell of the phone off -- they are connected with small snap-ins that can break if you're not careful. Once I managed to get a few of these snap-ins loose, I could use a flathead screwdriver to remove the rest around the edge.  The video also shows what you need to do if you don't have a replacement digitizer like the part that I ordered -- I skipped over that step.

3 hours later, after making sure every single part was moved over (again, check the microphone and the part that sits below it!) it's working great. At first I thought I had failed because only the screen turned on. The battery had apparently drained so upon plugging in, I was able to see the Android Lollipop screen.  My only major issue is that I may have damaged on of the two antenna ports on the board, but the phone operates fine with just a single one plugged into it.  I plan to solder the other cable onto the socket just in case.

Nonetheless, I hope I just saved myself $400 on a new Nexus phone!


Wednesday, February 11, 2015

Want to verify your W2 submission form?

A few weeks ago, I got a letter from the SSA notifying me that my electronic employer W2 submission was wrong. I knew it was related to the electronic file format generated by Wave, but wasn't sure what was happening. After waiting 2 weeks for a response from their support team, I decided to write a small script to figure out what was happening...

https://gist.github.com/rogerhu/bef3c9cba4005f346002

It confirmed to me that their generation was off by a factor of 10.  It was fixed later by the company without notifying customers about the issue.

Also, it turns out that the SSA provides a Java applet called AccuWage that allows third-party companies to verify that their file format generation is correct...

Saturday, February 7, 2015

How to get IntelliJ to recompile Android resource files

If you want to use IntelliJ to build your Android projects, make sure that the SDK versions in your Project SDK matches that in your Preferences->Module SDK. Otherwise, you may find that you have to click Rebuild Project each time you make changes to the XML version!

Monday, December 29, 2014

User location API's in Android

With the new framework with Google Play, you have to update your code now to use this unified GoogleApiClient.Builder() approach:

http://android-developers.blogspot.com/2014/02/new-client-api-model-in-google-play.html

There are now actually two ways to get location from Android. The 2nd way attempts to unify the various LocationProviders (GPS, network, other applications, etc.) into one API:

http://www.rahuljiresal.com/2014/02/user-location-on-android/