[SOURCE CODE][CM-13.0]Nexus-fy libra and aqua

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,131
0
Bekasi
Based on Nexus 5x device tree source code and blobs, you can Nexus-fy libra (Mi 4c) or aqua (Mi 4s) at home:

Kernel source: https://github.com/kumajaya/android_kernel_xiaomi_msm8992/tree/cm-13.0
Device tree source: https://github.com/kumajaya/android_device_xiaomi_libra/tree/cm-13.0
Vendor blobs: https://github.com/kumajaya/proprietary_vendor_xiaomi/tree/cm-13.0

Cherry-pick:
- http://review.cyanogenmod.org/140184 merged
- http://review.cyanogenmod.org/140411 merged
- http://review.cyanogenmod.org/141292 Please switch to http://review.cyanogenmod.org/141615 Abandoned - libril and rild included in device tree now
- http://review.cyanogenmod.org/141871 merged
- ANT support patch: http://review.cyanogenmod.org/#/q/topic:fix-ant merged

Changelog:
- Non device specific changes also affected us https://www.cmxlog.com/13/bullhead/
- https://github.com/kumajaya/proprietary_vendor_xiaomi/commits/cm-13.0
- https://github.com/kumajaya/android_kernel_xiaomi_msm8992/commits/cm-13.0
- https://github.com/kumajaya/android_device_xiaomi_libra/commits/cm-13.0

To prevent any headache please revert https://github.com/kumajaya/android...mmit/1ef9c6f035842b7c8679976a7db4c3e117cb4b6b for you. Jack will be always disabled for me until I have a new build machine :(

Currently not working:
- RIL
- Sensors
- Camera

Known issue:
- Incorrect power consumption info
- HDR camera crash, Google camera video support crash but older 27008130 version https://github.com/opengapps/arm/tree/master/app/com.google.android.googlecamera/19/nodpi working properly
- LED blinking issue
- Touch vibration not working but call vibration working
- MAC address for WiFi and Bluetooth not get extracted
- No CDMA support Further test still needed
- Permissive SELinux
- Fingerprint support for aqua not working yet

I write this from scratch based on Nexus 5x device tree source and blobs. Camera blobs partially from stock Lollipop, STMicroelectronics LSM6DB0 sensors HAL from stock Lollipop, both wrapped using a clean hack. RIL blobs from Yu sambar, Marshmallow branch. So, no much Lollipop blobs inside. Since based on a Google Nexus device, this is almost AOSP.

Source codes and patch quality so important for me. I learn about it from FBReader author Nikolay Pultsin when porting his desktop e-book reader app to Motorola E680/A1200 Linux mobile phone.

And this is not about ROM sharing but source code sharing, build the ROM yourself ;) A build from me will be available eventually but source code always more important :p Don't cry if I left you someday for a new device, my sources always available online.

Notes:
- Before flash your build, write up your original WiFi and Bluetooth MAC address. Backup your EFS partition in TWRP.
- GApps: http://opengapps.org, ARM64 6.0, nano version recommended.
- No binary ROM from the author. The author pushed his changes to public repository and someone else (emfox) build and upload it online. Development opennes guaranteed, no hidden changes, fully respect open source.
- Single ROM for two device variant. A unified ROM detect and set variant specific properties on boot.

Download link:
Emfox's build: https://goo.gl/iQNZjC
 
Last edited:

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,131
0
Bekasi
My first build available at my google drive, https://goo.gl/iQNZjC
all source from kumajaya, I don't know even if it boots... I cannot test it myself now because 4c is my daily-used phone.

Update: it even including OTA update :)
So, someone else already confirm my source really build able :good: Don't flash it! Still not ready for daily use.
 

emfox

Senior Member
Mar 16, 2011
270
887
0
So, someone else already confirm my source really build able :good: Don't flash it! Still not ready for daily use.
yes.

and though it's simple but maybe someone need it, the local_manifest/libra.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="kumajaya/android_device_xiaomi_libra" path="device/xiaomi/libra" remote="github" revision="cm-13.0" />
  <project name="kumajaya/android_kernel_xiaomi_msm8992" path="kernel/xiaomi/msm8992" remote="github" revision="cm-13.0" />
  <project name="kumajaya/proprietary_vendor_xiaomi" path="vendor/xiaomi" remote="github" revision="cm-13.0" />
</manifest>
 

emfox

Senior Member
Mar 16, 2011
270
887
0
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone