Sunday, October 2, 2016

Huawei P9 Lite: How deep the rabbit hole goes...

I'm a big fan of "The Matrix" movies and so I feel as If I have taken the red pill. It's been along time since I had to work with smali code but I figured that the best way to get the RIL code was to reverse engineer (RE) it out of telephony-common.jar . I found a file "" which is the common ril found in that project, and , once I converted the smali code to java, I noticed ( what seemed to be ) significant differences. So, I thought the challenge would be to rework this code into code that would work with CM but, in navigating around my RE code, I saw alot of abstract classes and custom classes proceeded with the prefix 'hw'. So, I started to suspect that just reworking this RIL class was not going to do it. There was much more involved here.

"You've been living in a dream world Neo" -Morpheus

The file "hwTelephony-common.jar contains the actual RIL class ( that just inherits from in "telephony-common.jar and they have modified the class to implement an abstract class which allows them to call functions in HwRILReferenceImpl.jar. This is just the beginning, these classes depend on the entire "Hw" framework; that is to say all of the jars in "/system/framework". Despite the challenges, I thought that perhaps I could get the framework working in CM. So, I spend a couple of days trying to get it running only to realize that it would never work. Then I thought that I could synthesize a working RIL Class by substituting fake info in situations where these 3 classes reached out beyond them selves. So I spent a few days doing that and again I am foiled.

"I bet your feeling a bit like Alice tumbling down the rabbit hole..." -Morpheus

So for the past week or so I've attempted several approaches to getting the RIL working but have made ZERO progress. Now, it starting to make me miserable so, I've got to climb out of the rabbit hole for awhile. Have a little time to absorb what I've learned and let my mind work on the question marks. In the mean time, I'll be trying to work on other things...

No comments:

Post a Comment