Advertisment

Search

Sunday, January 8, 2017

NEW BUILD! Beta 4 CyanogenMod 13 for Huawei/Honor HI6250 Variants

Most of you are probably already aware but since Beta 2, I've been experimenting with trying to support more of the Huawei/Honor Hi6250 variants such as the Honor 5c. A few people from the Honor 5c community had tried my ROM and had said that it worked except for the camera. I was already so familiar with the way the stock ROM worked that I was certain that fixing the camera would be easy and it was. From Beta 2 on to Beta 4 new models kept showing up and working and supporting these new models is fairly simple. All I have to do is set some properties in the system at the correct time to configure for a specific model. Since I don't own these other models I can't really test things but as long as it's as simple as setting these properties, then these models will be supported. Currently the list of supported models, which includes the Huawei P9 Lite | Huawei GT3, Honor 7 lite | Honor 5c | Huawei GR5 mini looks like this:



  • VNS-L21
  • VNS-L22
  • VNS-L23
  • VNS-L31
  • NEM-L21
  • NEM-L22
  • NEM-L51
  • NMO-L21
  • NMO-L31


Ah Bluetooth you pain in my ***. Bluetooth pairing has been an issue for quite awhile and I had almost given up on it. I couldn't seem to find any new ways to approach the problem. I knew that a command was "timing out" (optcode 0x40f) to be exact. I checked the logs from the two android phones and I could see that a connection was being established but, when this optcode was send, there was simply no response ever. In that case the bt hci_layer causes bluetooth to be reset. I tried to find some information about what optcode 0x40f did but I couldn't find anything. I tried serveral other small experiments to see what effect they would have; like increasing the length of the timeout, trying different build configs for the BT HAL. Nothing seemed to do anything. I gave up on it but I never forgot about it. Recently, enzo24754 @ XDA, re-mentioned that he had a work around that allowed him to pair to his device. He had mentioned it before but it was at a time when I had less information about the issues and so, in the confusion, i disregarded it but now, I thought that perhaps I could learn something new about the problem from this workaround and asked him to explain it. I could not get it to work. Perhaps it was just my scenario that didn't work but when another user at XDA said that they had gotten it to work and described in more detail the method that he used it got me thinking. The procedure that was described made me think that perhaps this "optcode" was being issued to early; that maybe it was being send before the connection was established and therefor it was never received and ipso facto, a response was never received and boom "timeout".

So with that in mind I decided to play around with the BT hal and see if I could delay sending the 0x40f optcode until the connection was established. After I got my code all set up and rebuilt the BT hal, it didn't work. The problem was still the same so I thought well, what if I just block the 0x40f optcode. After all you can't timeout on a request that you did not send right? RIGHT! Blocking the 0x40f optcode allowed normal pairing. I just hope that it's not needed....


I know that many of you are wondering about a custom nougat ROM and whether or not I will develop one. It was my intention to build CyanogenMod 14.1 but most of you know that CyanogenMod is  a dead project and the devs have created a fork to continue the work called LineageOS. I have already tried to get through a build of LineageOS 14.1 a few times and I just couldn't get throught it; build errors. I pretty sure they were not related to my code but could have had something to do with my build environment or could have just been a few poorly timed repo syncs ( I did try a few times ). So, I think I'm just going to wait awhile and then sync a couple of nougat ROMs
and if one fails I'll just try the other... might be awhile though, I'm trying to get the money together to get a faster, more powerful laptop so I can do builds more quickly...