Advertisment

Search

Thursday, November 3, 2016

NEW BUILD! CyanogenMod 13 for Hauwei P9 Lite

Since I got my laptop back up and running, I started looking at offline charging. It's something that should be fairly easy because I've worked on it for several other devices. Booting into charging mode mode is not really that different from booting normally. Init just chooses to initialize somethings and not others when in this mode. The problem with charging mode was that it did not show anything on the screen and it eventually rebooted to recovery. So, just like with the initial bring up, my first task was to get adb working but with so many init scripts it was difficult to tell just what things got initialized on "charging" mode vs "normal" mode. I decided to implement an "lpm.rc" to simply diagnostics.

After that was done and I got adb working, I was left with a "charging" mode that was just a blank screen but at least there were no "reboots to recovery". It just sat there happy and blank. After some poking around I noticed that the framebuffer did not have a "mode" set so I wrote the only mode available to /sys/devices/virtual/graphics/fb0/mode and BAM! the charging screen came on!



Then I turned my attention to fingerprint sensor. My first idea was to push the fingerprintd from CM on to stock and see if it would still work. It did, so I added a bunch of diagnostic code to CM's fingerprintd and pushed it on stock and watched the logs. Then I pushed put it on CM and too and watched the logs... Nothing. After thinking about if for a while I realized that fingerprint is a "security" device and there were parts of security that were still broken; the hw keymaster! I remembered thinking that the hw keymaster might not be so hard to fix and it wasn't. It turns out that it just does not support RSA for encryption and decryption and after removing attempts to add RSA for those "2" purposes, the keymaster was online and working; and so was fingerprint!






So, in this build:

  1. Offline Charging fixed.
  2. Fingerprint fixed.
  3. Sdcard detection fixed.
  4. Experimental graphics property tweaks.

INSTALLATION INSTRUCTIONS HAVE CHANGE!

Download available in the downloads section as always...