Advertisment

Search

Sunday, September 25, 2016

NEW UPDATE!: CyanogenMod 13 for Huawei P9 Lite Update 1

Now that I've had a while to dig into this device, I'm getting to know the challenges with bringing custom ROM's to this device. Getting a fully working build is going to take some time so I would not hold your breath waiting. However I feel like given enough time we'll get all these issues worked out.




RIL:

  1.  There are system properties in phone.prop that have to be sorted out. There's entries for each "modemid". In CyanogeMod, if you open "/sys/firmware/devicetree/base/hisi,modemid" with "File Manager" it will show you your modem id. Mine is "34B412000". Then the corresponding system entries in phone .prop entries must be set.
  2. There are a few partitions that the modem needs that are not being mounted.
  3. More research in the radio log on stock is necessary.
  4. The RIL class may need to be reverse engineered out of telephony-common.jar from stock.
HWComposer:
  1. The hardware composer must be build with a static libbinder. I suspect that the hwcomposer is creating ION memory heaps and surfaceflinger is treating the like standard memory heaps. Surfaceflinger neglects to unmap graphics buffers when the are free so we quickly run out of graphic memory and crash.
  2. We need to trick the build system into allowing use to use MemoryHeapIon without having the hisi libion source. I will need to think about this ...
Sensors:
  1.  Huawei, implemention of sensor seems a bit complicated. Luckily the sensor hub kernel implementation is simple and strait forward. I believe that I could write an opensource sensors lib easily... You can start a sensor, with the a file manager and root, and get a reading.
    1. Open " /sys/class/sensors/acc_sensor/" with a root access file browser.
    2. Open "set_delay" and overwrite 0 with 200. Save.
    3. Open "get_data" and you'll see 3 comma delimited numbers. These are the x,y,z of the accelerometer .
  2. The system just needs a "bridge" functions to read those...
GPS:
  1. Haven't really looked at it
Camera:
  1.  The camera is pretty odd. It seems that the hardware camera lib is dependent on a Java android service... That's strange to me. The service must me in one of the jars or apk's on stock. So the next step is to find it and see if we can get the Android Service Daemon to start it...


So far I have managed to get Audio, Wifi and Bluetooth to work. I created an update zip that you can flash via recovery that will patch the current build. I also disabled deep sleep for now to work around the wake up issue.

I've created a link to the Download page in the "Downloads" section. Unless otherwise stated, links to downloads will be posted there. So the update patch is there by the link to the ROM.