[INCOMPLETE HOW TO] Reconstruct Mi 4c kernel source

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,131
0
Bekasi
Strange, Lollipop ROM but Marshmallow kernel :D
Almost everything working, except:
- In-kernel USB driver not compatible to Lollipop ROM, MTP and adb not working
- Equalizer not working, incompatible soundfx libraries
- Wrong headset button mapping
- I'll check further, still under testing
- I found only adb not working. MTP working with adb debugging disabled.
- Headset button mapping fixed

Stock ROM not my main target but if almost everything working on stock (including camera, sounds, GPS, sensors, IR LED, WiFi, etc), it's time to start CyanogenMod :D
 

solis_f

Senior Member
Mar 26, 2015
1,000
578
0
Done!

Marshmallow branch: https://github.com/kumajaya/android_kernel_xiaomi_msm8992/tree/marshmallow
Lollipop branch: https://github.com/kumajaya/android_kernel_xiaomi_msm8992/tree/marshmallow-for-lollipop

Everything should be working for Marshmallow ROM, adb debuging and equalizer not working for Lollipop ROM (tested on MIUI 7.2.1.0).
Very nice thanks a lot! By saying equalizer what exactly do you mean? Waiting for a flashable zip!

Edit: will mm kernel work on Lollipop roms? I see some people in other devices reporting this
 
Last edited:

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,131
0
Bekasi
Very nice thanks a lot! By saying equalizer what exactly do you mean? Waiting for a flashable zip!

Edit: will mm kernel work on Lollipop roms? I see some people in other devices reporting this
Sounds equalizer, soundfx. I knew about this issue when working for Redmi 2. Updated kernel need updated soundfx blobs.

Boot image contains kernel image + device tree image + ramdisk. In Mi 4c stock ROM case with kernel 3.10.84, I have to restore in kernel logger support to prevent battery manager crash and WiFi patch for a success insmod: https://github.com/kumajaya/android_kernel_xiaomi_msm8992/commits/marshmallow-for-lollipop . Ramdisk always incompatible between ROM. We can repack a same boot + device tree image with a different ramdisk.

EDIT: I boot MIUI ROM with Marshmallow kernel (3.10.84 kernel + dt image + modified stock ramdisk) for development purpose only. Everything works correctly on stock ROM, except already mentioned issues. When I use it for Marshmallow ROM, everything should be working or if something goes wrong, it's userspace problem. For example, no video flicker on stock ROM, should be no video flicker on Marshmallow ROM.
 
Last edited:

solis_f

Senior Member
Mar 26, 2015
1,000
578
0
Sounds equalizer, soundfx. I knew about this issue when working for Redmi 2. Updated kernel need updated soundfx blobs.

Boot image contains kernel image + device tree image + ramdisk. In Mi 4c stock ROM case with kernel 3.10.84, I have to restore in kernel logger support to prevent battery manager crash and WiFi patch for a success insmod: https://github.com/kumajaya/android_kernel_xiaomi_msm8992/commits/marshmallow-for-lollipop . Ramdisk always incompatible between ROM. We can repack a same boot + device tree image with a different ramdisk.
Alright waiting for miui Lollipop kernel when its fully working! Keep up the good work! Thanks a lot!
 
  • Like
Reactions: made-in-tirol

akrai

Senior Member
Apr 21, 2013
130
34
0
do you know if is it possible to add fm radio support? in theory our phone have fm radio, at least that is what the sellers says, but no drivers for fm are included, but another xiaomi phone was also in our same situation and after a year they had fm support...
 

Morloc2

Senior Member
Jan 4, 2013
147
25
0
do you know if is it possible to add fm radio support? in theory our phone have fm radio, at least that is what the sellers says, but no drivers for fm are included, but another xiaomi phone was also in our same situation and after a year they had fm support...
+1
 
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