Sunday, August 5, 2018

(Cr)atching up on Cr blog progess

Chrome Update
Chrome is still on my radar.  Installing Chrome isn't as easy as installing Chromium.

My current selfish dependency for my Cr-install project is establishing bootable media with the sole purpose of installing Chrome.  Other's scripts and procedures for installing Chrome are already easily found on the Internet, and my own augmentation of that procedure will not require much work.  Creating a purpose built environment for deploying Chrome is taking much longer than expected.

My current choice is minimal linux.  It has been a long time since I've compiled a kernel from source.  The minimal linux environment is nicely organized and allows for modular invocation of failed steps.  I thank the author.  It takes months of work to organize and test a project like minimal linux.

My "goto" operating system for a personal laptop is Fedora.  I began with the kernel from Fedora 28 (kernel-devel).  I renamed the directory and bundled it up to be minimal linux compatible.  I ran in to issues with inline assembly and the includes for SElinux.  Too much floundering steered me to download the source for the same kernel release from kernel.org and to preserve the .config from Fedora 28.  minimal linux was engineered with support for this scenario!  

Last weekend I made it to the point where the kernel now compiles without errors, but the generated ISO lacks the correct glibc (I believe) as busybox cannot launch.  

This Post's Tip for the Day
The way I made sure inline assembly was supported was to launch the build script with
CC_HAVE_ASM_GOTO /build_minimal_linux_live.sh

That is all for now.

You failed me for the last time! I hope.

Background
I ordered two Android HTC One M9's from dailysteals about a year ago (8/15/2017). Classified as pre-owned, I realized it was a crapshoot if they would arrive in the category of "slight blemishes."  I ordered one gold and one gunmetal.  Their purpose: sync my Skype (s4b), HipChat, Slack, JIRA, Confluence, Outlook both at work, and at home, without the need to carry a "work" phone.

They arrived nearly blemish free.  But the first thing I observed was the scuffing around the micro USB charge for the gold M9.  Who ever owned it before me must have tried to mate the connector at night, in total darkness, in order to miss that often.  Edit: I figured out why -> HTC M9 batteries deplete quickly when left on constant charge.  That scuffing was someone removing the adhesive an anti-theft anchor.  These were most likely in-store display models.

Both HTC's had dismal battery life from the time I received them; in fact much worse than I expected.  I think I squeezed around 2 hours of 2048 from one of them while in airplane mode.  I anticipated this being an issue, and for work, I left a magnetic Net2Dot charger cable at my desk.  That HTC, when paired with a Samsung R730T Gear S2, worked pretty well.  Notifications about chat and correspondence would pop up on my watch while I focused on tasks, without having nasty "floating" chat windows or Outlook pop-ups getting in the way.

The Repair Job
In June I ordered two replacement batteries, one for each.

In June I began a tear down of the HTC I kept at home.  That first weekend I floundered for half a day trying to determine why that case was such a challenge to open.  I've dissected HTC's before and even had to resolder the mini USB on my PPC-6700 on a vacation trip.  I've replaced the battery in an iPhone 4S and an iPhone 5. I wasn't prepared for what iFixit listed as a low Serviceability score of 2/10.  I gave up after mangling the LCD bezel.  I sought less frustrating activities to occupy my time.

In early July I regained interest, and searched for others' experiences disassembling the M9.  One fellow used a box knife to score around the perimeter and I found out why after successfully opening the rear aluminum case.  There were at least eight tabs -- see map -- that protrude in to the tab-sized cavities of the aluminum case.  The knife cuts loose the part of the tab that's "clinging for dear life" to the rear case.  This permanently damages the case's ability to provide a firm seal against the elements, but gives a chance to repair the insides.  I cleaned up the tabs a bit further so I could service the battery in the future.



Following iFixit's guide, I was given enough insight to release the vast quantity ZIF connectors, super tiny RF connectors, and the few small screws.  This guide was helpful. The new battery went in to place, taking care to "slide it under" the upper circuit card's annoying ribbon cable presence, but despite the battery's appearance of being a genuine article manufactured by HTC earlier in the year, the battery's metal header connector -- with screw holes to fasten securely in place -- didn't both line up.  A small bit of widening one screw hole in to an oblong shape made it wide enough for me to secure the second screw.  

Later in July, the HTC M9 which I kept at work, while being connected to the slow Net2Dot charger, completely lost power during a two hour Skype conference.  The drain from Skype was too much for the combination of a slow charger and a nearly "depleted" battery.  I attempted to revive it, but received a message that the battery was draining too much current when charging, and not long after that, the screen blipped off. 

The HTC I kept at home, barely had a week of burn-in time with the new battery, but I was committed to keeping my productivity strategy at the office. Keeping this objective meant slogging through a restore of my apps.  The restore, in short, was c omplicated by HTC's backup being unable to migrate anything more than contacts and media, Google's Android backup being unable recognize a backup made a few hours earlier, and a first-timer's acclamation to launching CWM's Helium -- helium being based on adb -- and the rigors of running that version of adb on Fedora 28*.  

I achieved my goal. This HTC was ready to replace the HTC at work. 

The next weekend I tested my seasoned approach on the HTC that was formerly at work.  It took about 3 hours from start to finish.  The map of tabs was useful and allowed me to use square tipped hobbyist knife blades to slowly keep an open perimeter around the tabs. I worked from top (IR port) to bottom.  On reassembly, I observed the top of one ZIF was damaged.  To my surprise it powered up.

Tips for Repair For anyone keen to replace an M9 battery, when one of the wider ZIF connectors resists full insertion, try taking a guitar pick shaped spudger - perhaps even a genuine guitar pick will work - and put it uniformly under the ZIF ribbon -- about 2mm from touching the motherboard ZIF connector.  Then press down on the ribbon so it lays (or mashes) flat against the guitar pick and gradually wiggle left and right to complete full insertion.

Remove as few of the RF connectors as possible.  The connectors were difficult for me to re-align.

When taking a break from the repair, when laying down the exposed LCD and circuit assembly, always lay it down LCD face down. The rear camera's rubberized grommet has a highly sticky adhesive that will stick to flat surfaces and materials like paper.  When it sticks, it can easily get mangled or distorted, thus reducing the ability for the rubber grommet to protect the camera from the elements.

Before starting this project I owned a generic rubberized M9 case.  I also ordered an OtterBox branded case.  I highly recommend the OtterBox case to help protect the phone from the effects of cracking it open for service.

The Result
It's been two weeks since the second was put back together, and I'm pleased with the results.