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.


Tuesday, September 20, 2016

DEVELOPMENT BUILD: CyanogenMod 13 for Huawei P9 Lite

STOP! READ THIS CAREFULLY BEFORE ATTEMPTING TO FLASH ANYTHING!


This build boots but almost nothing works and installation is a little complicated. I'm putting this out there for testers, builders and devs. Basically people who know how to recover from soft bricks. If you are not one of these then I don't recommend that you attempt to install this.

See the download page here to proceed.


NOTE: I have not had a chance to organize and post my source trees but I intend to in the next few days...



Monday, September 19, 2016

Huawei P9 Lite: It's Alive!

The device arrived on Saturday as expected. I was still working out issues with the releasetools for my CM build when it came. So I didn't get the build done before it arrived but I did finish it later in the day. My P9 Lite came with a case and a screen protector. If I had known that I wouldn't have ordered a case and screen protector separately. I watched a couple of reviews of the device and one of them mentioned that the screen is not Gorilla glass but some sort of regular tempered glass. So I wanted something to protect the screen from scratches. I managed to get the screen protector on there with no bubbles so "BONUS".

Yesterday, I set about completing my initial tasks. Getting the bootloader unlock code was a bit of a pain. In the spot where it asked me for the model, I had to put it in exactly as it was in "About Phone" all caps "HUAWEI VNS-21" and not "Huawei VNS-21" as the tutorial on XDA suggested. After getting the code I quickly unlocked the bootloader and flashed TWRP, did a backup and used dd to backup all partition except, recovery ( it's TWRP i just flashed it so why back it up ), and the /data partition; it's too large to fit on itself. For those that do not know that data partition houses the internal storage...

I flashed my build of CM13 and of course it didn't boot; visually it did not get passed the "bootloader unlocked screen" but adb is was running and I was able to get access. The only problem is that it did not have a shell, which indicates that the system partition was not being mounted, because adbd uses the shell @ /system/bin/sh and alternatively @ /sbin/sh. So, I moddified the init.rc to not remount the "/" tmpfs ro and pushed busybox to /sbin/sh and wahlah adb access.

As TheMarrionette@XDA had told me, the hwcomposer was an issue but I was able to bypass it and force CM to use opengl. However, for some reason I'm not sure of, doing that caused serveral critical services to not start; Namely: zygote, zygote_secondary, installd and netd. Through adb, I was able to start them manually and BAM!

We have lift off!





That being said, almost nothing works ATM. The build will not even boot by itself but this is a significant step forward and I have good idea of how to fix these "initial" issues. It is only a matter of time before we'll have a rough tester build. I honestly did not expect to get this far this fast!

Once I can get CM to boot on its own. I need to get some simple things working.

  1. If the device goes to sleep it will not wake up.
    1. I don't think this is serious. I think it's just the key configuration for the power button.
  2. The on screen navigation bar does not show up.
    1. Again, just a config somewhere.
    2. There used to be a build.prop entry that would turn it on.
  3. I pieced some of this together and I need to work on getting the build system to reproduce some of the "hacks" I've done. 

Thursday, September 15, 2016

Huawei P9 Lite: And so it begins.

Recently I was contacted by "The Marionette@XDA" who asked me If, I'd work on the Huawei P9 Lite. I really enjoy working on devices, especially if they do not have any official support from CyanogenMod or Google. The reason being that there is no real challenge if the already have support. However, It's nearly impossible to develop for a device without out actually having the device to test on/work. So the Huawei P9 Lite community generously donated the funds necessary for me to order the device. I would like to thank:


  1.  Tommi N.    [Red-Killer@XDA](TOP DONOR)
  2. Jakov Gudec             [The Marionette@XDA]
  3. Dominik Hopf           [Senaxo@XDA]
  4. Ayse Guduz               [ndroid1562@XDA]
  5. Michael Pottker
  6. Krzysztof Mikulski  [lsander@XDA]
  7. Malcom Rigg

I like to do something special for my "sponsors". Not sure what that will be but you guys put your money where your mouth is and I wont forget that. Perhaps you can be my testers during development.

My Huawei P9 Lite VNS-21 is expected to arrive either Saturday or Monday but I am eager to get started. So, I'm working "The Marionette's" on the existing device and vendor trees today. I may not end up using them but working on them will help me familiarize myself with the configs. I hope to have a build ready by the time the device gets here but I have a lot to do before I begin testing. Although I am a developer, every device is different and it takes a little while for me to become comfortable with the device. Being over-confident might cause me to brick the device and nobody wants that. My first initial tasks will be:

  1. Unlock the bootloader.
  2. Flash twrp
  3. Use dd to dump (and backup) every partition.
  4. Use the dump of the system partition to verify device and vendor trees.
  5. Study hardware configuration and look for quirks.

I will be developing CyanogenMod 13. If I find that it is more advantageous to switch to AOSP then I will but I'd rather build CM 13 because I am already familiar with it; having just brought up cm 13 for codinalte. I have a few ideas for how to workaround hwcomposer issues.

As soon as I have a booting build I'll start a DEV thread @ XDA




Codinalte/Venturi community:
Bringing up this new device will be taking up most of my time so bug reports will be "noted" but not worked on for sometime; perhaps not till next year but do not worry. I will get to them.

Both codinalte and venturi need kernel bring up's to at least 3.1. for marshmallow. Codinalte already has marshmallow but, you'll notice that battery stats do not report battery consumption for apps. Also bandwith quotas on network interfaces is not working. This is because of a deficiency in the kernel UID_CPU_TIME and it's dependent subsystems are not in the 3.0 kernel and that's why we need a bring up. Time permitting, I intend to start on this spring next year: and yes it is my intention to bring up MM for venturi but for now the focus is on the P9 Lite.


Tuesday, September 13, 2016

NEW BUILD! CyanogenMod 13 for the Galaxy Exhibit / Ace 2e

This build is pretty stable but there still some rough edges that need to be smoothed out. Thanks to a ChronoMonoChrome@xda for his assistance! Gps is not quite there. Blobs seems to be working... no errors but also not location so... It needs a little more investigation. Also MTP is not working. Probably just needs a little research. As far as I can tell everything else is working fine. Have not tried any gApps so... your on your own there.

Not working:
GPS
MTP


Download here

Tuesday, September 6, 2016

Preview BUILD: Carbon MM for Galaxy Exhibit / Ace 2e

The bring up for Marshmallow has not been easy and it's far from complete. Carbon's MM offering seems a bit premature and that's what I have been doing the bring up on so, I've decided to switch to CM13 which I just repo sync'd. That means abandoning the work I've done so far so I thought I'd release a little preview build for you guys to check out. Make sure that you do a backup because you are not going to want to stick with this ROM. There are many issues both serious and minor but it does boot and there are no annoying ui issues.

Working

  • WIFI
  • Bluetooth
  • Internal SD
  • Audio
NOT Working
  • RIL
  • External SD
  • GPS
  • Camera


Download here

Note: I have not yet tried any Gapps so, if you try some and they work, you might leave a link in comments for everyone.

Friday, September 2, 2016

Progress on Marshmallow for codinalte

I spent most of the day yesterday working out the issues with building Marshmallow for codinalte. There were/are some significant issues but I was finally able to boot Marshmallow this morning. There is some sort of race condition in the fuel gauge driver that needs to be worked out. Also, there is an issue with mounting the internal sdcard( witch I have been doing manually through adb) before I can even release this build. It's an engineering build anyways. I just wanted you to guys to know that progress is being made and Marshmallow will is being worked on.

There are probably numerous other issues/things that do not work as well but...