• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[UNOFFICIAL][14.1][7.1.2][2017-09-11] LineageOS 14.1 for Xiaomi MiPad (mocha)

Search This thread

highwaystar_ru

Senior Member
Sep 17, 2016
342
2,354
Here is first attempt to build LineageOS 14.1 for XiaoMi MiPad

Current state is: mostly working
I finally found solution to fix old mipad stock graphic blobs to load on cm13 and Los 14.1. This build is proof of concept to show it is possible to have Nougat on old good MiPad.

What working:
  • WiFi (better than 12.1, now using opensource wpa_supplicant)
  • Sensors (autorotation works)
  • LEDs
  • audio including microphone
  • hardware accelerated video playback
  • camera

What not working:
  • audio (currently plays only some system sounds, all other failed because of wrong PCM format)
  • camera
    [*]lineage Music add doesnt play anything (3rd paty players seems to work fine)
    [*]windevine drm not working (need updated liibs, to be done in next build)
    [*]probably hardware acceleration playback (missed symbols for some omx libs)
    [*]not enough space to install gapps into /system partition
    [*]random crashes going to system ui restart loop
  • webview crashing with ERROR:gl_fence_egl.cc(63)] Failed to wait for EGLSync. error:EGL_BAD_MATCH (gapps and play market unusable)



Github links:
Device tre (cm-14.1 branch)
Vendors blobs (cm-14.1 branch)
Kernel (cm-14.1 branch)


2017-02-16
Download:lineage-14.1-20170216-UNOFFICIAL-mocha.zip
Changelog:
  • Initial release
2017-02-20
Changelog:
  • Audio fixed
  • Using patched webview, gapps should work now
  • SD card and usb mounting fixed
Download: lineage-14.1-20170220-UNOFFICIAL-mocha.zip

2017-02-26
changelog:
  • random crashes and black screens resolved
  • new Audio HAL based on opensource tinyhal (microphone works now)
  • big system partition (1.2Gb). You have to install it on merged system1 and system2, if you have already merged just install.
  • SD card mount fix included (access to SD card from all apps)
  • hardware accelerated video playback now works
  • cleaned some useless blobs like powerservice daemon
  • updated wifi firmware
Download:lineage-14.1-20170226-UNOFFICIAL-mocha.zip

2017-03-03
Changelog:
  • Fixed mp3 and flac playback in Music app (disabled offloading since it broken for mp3 and enable ffmpeg for other formats)
  • Updated wvm libs, Widevine DRM L3 now works
Download: lineage-14.1-20170303-UNOFFICIAL-mocha.zip

2017-03-11
Changelog:
  • KeyDisabler (alow to enable navbar and disable hardware buttons)
  • Vibrator intensity control
  • hwui props in build.prop makes screen more stable in browsers (black pixels on screen issue)
  • Updated LED capabilities (RGB notification, settings for battery and notification colors, button backligth brightness)
  • Userspace cpuquiet governor by default. Looks like this is best option to get smooth playback. (cores dosnt switches off but only changes its freq)
  • Fixed offline charging mode. Now shows animaton with current battery level. Also previous 14.1 builds cant be offline charged from PC USB port, now this issue resolved
  • return glcomposer compositor. Now looks stable, it should be because of hwui right props added. *broken*
Download: lineage-14.1-20170311-UNOFFICIAL-mocha.zip broken

2017-03-12
  • composer changed back to surfaceflinger. Solves issues with blck screen or reboots in 20170311 build
Download lineage-14.1-20170312-UNOFFICIAL-mocha.zip

2017-04-21
  • test version with Nexus 9 blobs
  • webview slow work resolved with new graphic blobs
  • Browser replaced with Gelllo
  • lineage code updated up to 7.1.2
Known issues:
  • Bluetooth broken
  • Doesnt load proper mac address
  • Some graphic issues in general user interface
Download: lineage-14.1-20170421-UNOFFICIAL-mocha.zip
Download fixed boot.imgboot-20170429.img - fixes wifi and bluetooth issues on 2017-04-21 lineage 14.1 build.

2017-05-02
Changelog:
  • camera works now
  • Browser replaced with Gelllo
  • lineage code updated up to 7.1.2

Known issues:
  • this build still uses old graphic blobs, so webview apps is laggy.
  • if camera doesnt work after dirty flash try to delete /data/nvcam folder from adb root console or root file manager
Download: lineage-14.1-20170502-UNOFFICIAL-mocha.zip

Webview apk is one patched to work on broadcom GPU with same problem as ours: https://github.com/manumanfred/android_external_chromium-webview

2017-09-11 NEW!
Changelog:
  • Lineage OS 14.1 sources updated
  • Webview updated and rebuilt with only changes necessary for Mi Pad. Most of webview related issues now resolved. Faster and smoother scrolling in webview based apps, some apps now startings works, like Gogle Books. See webview patch applied below.
  • device tree cleaned for proper work with proprietary blob files. Now they can be extracted from stock rom or device and makefiles can be properly generated in vendor.
  • Using opensource version of libbt-vendor - maybe some changes in bluetooth perfomance.

Download lineage-14.1-20170911-UNOFFICIAL-mocha.zip from Google Disk or from MailRu mirror

Webview patch applied:
Code:
diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_list.json
index b8f5489ce086..6bf7f9250237 100644
--- a/gpu/config/gpu_driver_bug_list.json
+++ b/gpu/config/gpu_driver_bug_list.json
@@ -1,6 +1,6 @@
 {
   "name": "gpu driver bug list",
-  "version": "10.93",
+  "version": "10.94",
   "entries": [
     {
       "id": 1,
@@ -2542,6 +2542,19 @@
       "features": [
         "rely_on_implicit_sync_for_swap_buffers"
       ]
+    },
+    {
+      "id": 236,
+      "description": "MiPad Nvidia drivers g_ignore_egl_sync_failures work around",
+      "cr_bugs": [123456],
+      "gl_vendor": "NVIDIA.*",
+      "machine_model_name": ["MI PAD"],
+      "os": {
+       "type": "android"
+      },
+      "features": [
+        "ignore_egl_sync_failures"
+      ]
     }
   ],
   "comment": [

special patched webview prebuilts located here https://github.com/HighwayStar/android_external_chromium-webview (branch cm-14.1-mocha)

Merge partitions
Mi Pad by default has 2 /system partition, each 640Mb. It is not enogh to install LineageOS and Gapps. To install 2017-02-25 build and newer you have to merge 2 system partition in one 1.2Gb system partition. To dod this follow instruction http://en.miui.com/thread-118294-1-1.html

Root Access
If you want root access flash addonsu-arm-signed.zip from https://download.lineageos.org/extras

XDA:DevDB Information
LineageOS 14.1 for Xiaomi MiPad (mocha), ROM for the Xiaomi Mi Pad

Contributors
highwaystar_ru, highwaystar_ru
Source Code: https://github.com/HighwayStar/android_device_xiaomi_mocha

ROM OS Version: 7.x Nougat
ROM Kernel: Linux 3.10.x
Based On: CyanogenMod, LineageOS

Version Information
Status: Alpha

Created 2017-02-16
Last Updated 2017-09-11
 

Attachments

  • screen01.png
    screen01.png
    166.6 KB · Views: 36,412

highwaystar_ru

Senior Member
Sep 17, 2016
342
2,354
First! Holy ****, I never thought I'd see the day...

@highwaystar_ru Is there not enough space in /system even after merging system1 and system2?

On merged system it is enogh space, but now /system in rom configured to match stock /system. Not sure for now if it possible to remove LineageOs stock app like browser and email and free some space or just use bigger /system and require to repartition.
 

drakonizer

Retired Forum Moderator
May 10, 2013
1,126
2,340
Death Star
OnePlus 9 Pro
On merged system it is enogh space, but now /system in rom configured to match stock /system. Not sure for now if it possible to remove LineageOs stock app like browser and email and free some space or just use bigger /system and require to repartition.

We could do that...remove some unnecessary packages from https://github.com/LineageOS/android_vendor_cm/blob/cm-14.1/config/common.mk with a PRODUCT_PACKAGES -= line in the device.mk.
But asking users to repartition to install gApps is better in my opinion, for future official Lineage support. There could be a check in the updater_script to verify the user has repartitioned.

I am pretty sure there is no re-configuration necessary to support repartitioned /system partitions.
 
  • Like
Reactions: silvbm

highwaystar_ru

Senior Member
Sep 17, 2016
342
2,354
If it possible to make los14.1 run stable and sound working it is better to go with los14.1. At least it has upstream support, and some things here works better. I cant make opensource wpa_supplicant working on 12.1, but here it works. Microphone in cm12.1 is also hard to fix, because there is only LD_PRELOAD for lib and microphone require MonoPipe class from 4.4 to work, but it will break other things. On cm13 or los14.1 it is possible to use LD_SHIM_LIBS to fix only broken libs and not break working.

For now I'm trying what cause los14.1 unstable, sometimes it may work for hours, but when it crashed to black screen and buttons backlight it starts endless bootloop.
 

Navin9

Member
Apr 5, 2016
47
9
Awesomeeeeeee! Highwaystar. You are simply awesome. never expected the lineageOs, that too for Mi pad. and now you are our only hope.
 
Last edited:

Navin9

Member
Apr 5, 2016
47
9
First! Holy ****, I never thought I'd see the day...

@highwaystar_ru Is there not enough space in /system even after merging system1 and system2?

Did you tried least gapps.

---------- Post added at 12:26 PM ---------- Previous post was at 12:25 PM ----------

First! Holy ****, I never thought I'd see the day...

@highwaystar_ru Is there not enough space in /system even after merging system1 and system2?

Did you tried gapps Pico version
 

Top Liked Posts

  • There are no posts matching your filters.
  • 158
    Here is first attempt to build LineageOS 14.1 for XiaoMi MiPad

    Current state is: mostly working
    I finally found solution to fix old mipad stock graphic blobs to load on cm13 and Los 14.1. This build is proof of concept to show it is possible to have Nougat on old good MiPad.

    What working:
    • WiFi (better than 12.1, now using opensource wpa_supplicant)
    • Sensors (autorotation works)
    • LEDs
    • audio including microphone
    • hardware accelerated video playback
    • camera

    What not working:
    • audio (currently plays only some system sounds, all other failed because of wrong PCM format)
    • camera
      [*]lineage Music add doesnt play anything (3rd paty players seems to work fine)
      [*]windevine drm not working (need updated liibs, to be done in next build)
      [*]probably hardware acceleration playback (missed symbols for some omx libs)
      [*]not enough space to install gapps into /system partition
      [*]random crashes going to system ui restart loop
    • webview crashing with ERROR:gl_fence_egl.cc(63)] Failed to wait for EGLSync. error:EGL_BAD_MATCH (gapps and play market unusable)



    Github links:
    Device tre (cm-14.1 branch)
    Vendors blobs (cm-14.1 branch)
    Kernel (cm-14.1 branch)


    2017-02-16
    Download:lineage-14.1-20170216-UNOFFICIAL-mocha.zip
    Changelog:
    • Initial release
    2017-02-20
    Changelog:
    • Audio fixed
    • Using patched webview, gapps should work now
    • SD card and usb mounting fixed
    Download: lineage-14.1-20170220-UNOFFICIAL-mocha.zip

    2017-02-26
    changelog:
    • random crashes and black screens resolved
    • new Audio HAL based on opensource tinyhal (microphone works now)
    • big system partition (1.2Gb). You have to install it on merged system1 and system2, if you have already merged just install.
    • SD card mount fix included (access to SD card from all apps)
    • hardware accelerated video playback now works
    • cleaned some useless blobs like powerservice daemon
    • updated wifi firmware
    Download:lineage-14.1-20170226-UNOFFICIAL-mocha.zip

    2017-03-03
    Changelog:
    • Fixed mp3 and flac playback in Music app (disabled offloading since it broken for mp3 and enable ffmpeg for other formats)
    • Updated wvm libs, Widevine DRM L3 now works
    Download: lineage-14.1-20170303-UNOFFICIAL-mocha.zip

    2017-03-11
    Changelog:
    • KeyDisabler (alow to enable navbar and disable hardware buttons)
    • Vibrator intensity control
    • hwui props in build.prop makes screen more stable in browsers (black pixels on screen issue)
    • Updated LED capabilities (RGB notification, settings for battery and notification colors, button backligth brightness)
    • Userspace cpuquiet governor by default. Looks like this is best option to get smooth playback. (cores dosnt switches off but only changes its freq)
    • Fixed offline charging mode. Now shows animaton with current battery level. Also previous 14.1 builds cant be offline charged from PC USB port, now this issue resolved
    • return glcomposer compositor. Now looks stable, it should be because of hwui right props added. *broken*
    Download: lineage-14.1-20170311-UNOFFICIAL-mocha.zip broken

    2017-03-12
    • composer changed back to surfaceflinger. Solves issues with blck screen or reboots in 20170311 build
    Download lineage-14.1-20170312-UNOFFICIAL-mocha.zip

    2017-04-21
    • test version with Nexus 9 blobs
    • webview slow work resolved with new graphic blobs
    • Browser replaced with Gelllo
    • lineage code updated up to 7.1.2
    Known issues:
    • Bluetooth broken
    • Doesnt load proper mac address
    • Some graphic issues in general user interface
    Download: lineage-14.1-20170421-UNOFFICIAL-mocha.zip
    Download fixed boot.imgboot-20170429.img - fixes wifi and bluetooth issues on 2017-04-21 lineage 14.1 build.

    2017-05-02
    Changelog:
    • camera works now
    • Browser replaced with Gelllo
    • lineage code updated up to 7.1.2

    Known issues:
    • this build still uses old graphic blobs, so webview apps is laggy.
    • if camera doesnt work after dirty flash try to delete /data/nvcam folder from adb root console or root file manager
    Download: lineage-14.1-20170502-UNOFFICIAL-mocha.zip

    Webview apk is one patched to work on broadcom GPU with same problem as ours: https://github.com/manumanfred/android_external_chromium-webview

    2017-09-11 NEW!
    Changelog:
    • Lineage OS 14.1 sources updated
    • Webview updated and rebuilt with only changes necessary for Mi Pad. Most of webview related issues now resolved. Faster and smoother scrolling in webview based apps, some apps now startings works, like Gogle Books. See webview patch applied below.
    • device tree cleaned for proper work with proprietary blob files. Now they can be extracted from stock rom or device and makefiles can be properly generated in vendor.
    • Using opensource version of libbt-vendor - maybe some changes in bluetooth perfomance.

    Download lineage-14.1-20170911-UNOFFICIAL-mocha.zip from Google Disk or from MailRu mirror

    Webview patch applied:
    Code:
    diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_list.json
    index b8f5489ce086..6bf7f9250237 100644
    --- a/gpu/config/gpu_driver_bug_list.json
    +++ b/gpu/config/gpu_driver_bug_list.json
    @@ -1,6 +1,6 @@
     {
       "name": "gpu driver bug list",
    -  "version": "10.93",
    +  "version": "10.94",
       "entries": [
         {
           "id": 1,
    @@ -2542,6 +2542,19 @@
           "features": [
             "rely_on_implicit_sync_for_swap_buffers"
           ]
    +    },
    +    {
    +      "id": 236,
    +      "description": "MiPad Nvidia drivers g_ignore_egl_sync_failures work around",
    +      "cr_bugs": [123456],
    +      "gl_vendor": "NVIDIA.*",
    +      "machine_model_name": ["MI PAD"],
    +      "os": {
    +       "type": "android"
    +      },
    +      "features": [
    +        "ignore_egl_sync_failures"
    +      ]
         }
       ],
       "comment": [

    special patched webview prebuilts located here https://github.com/HighwayStar/android_external_chromium-webview (branch cm-14.1-mocha)

    Merge partitions
    Mi Pad by default has 2 /system partition, each 640Mb. It is not enogh to install LineageOS and Gapps. To install 2017-02-25 build and newer you have to merge 2 system partition in one 1.2Gb system partition. To dod this follow instruction http://en.miui.com/thread-118294-1-1.html

    Root Access
    If you want root access flash addonsu-arm-signed.zip from https://download.lineageos.org/extras

    XDA:DevDB Information
    LineageOS 14.1 for Xiaomi MiPad (mocha), ROM for the Xiaomi Mi Pad

    Contributors
    highwaystar_ru, highwaystar_ru
    Source Code: https://github.com/HighwayStar/android_device_xiaomi_mocha

    ROM OS Version: 7.x Nougat
    ROM Kernel: Linux 3.10.x
    Based On: CyanogenMod, LineageOS

    Version Information
    Status: Alpha

    Created 2017-02-16
    Last Updated 2017-09-11
    45
    I'm still here. there is no new builds because there is no major progress in device tree development. I made FM radio tuning works, but there is no still sound from radio.

    Also I have found that blobs from https://github.com/Toradex-Apalis-TK1-AndroidTV/proprietary_vendor_toradex_apalis-tk1 are compatible with MiPad and it provides NVIDIA 343 driver. This driver resolves random EGL crash (no need to patch lineage source libEGL), but it still doesnt work with webview.

    But there is another thing. Nexus 9 (flounder/volantis) 32 bit blobs are compatible with MiPad as well, and it provides same NVIDIA 343 driver. Using all jetson blobs and replacing /system/vendor/lib/egl files with one from Nexus 9 vendor image fixes webview issue.

    All these new blobs are great but it breaks camera on lineage 13, and it have to be resolved.
    27
    Sorry for long silence here, but finally did something new. Now Lineage 14.1 with working cam (old blobs) has major improvement in term of working with webview apps like Google books, Gmail and many more.

    2017-09-11 NEW!
    Changelog:
    • Lineage OS 14.1 sources updated
    • Webview updated and rebuilt with only changes necessary for Mi Pad. Most of webview related issues now resolved. Faster and smoother scrolling in webview based apps, some apps now startings works, like Gogle Books. See webview patch applied below.
    • device tree cleaned for proper work with proprietary blob files. Now they can be extracted from stock rom or device and makefiles can be properly generated in vendor.
    • Using opensource version of libbt-vendor - maybe some changes in bluetooth perfomance.

    check first post for download links.
    27
    If it possible to make los14.1 run stable and sound working it is better to go with los14.1. At least it has upstream support, and some things here works better. I cant make opensource wpa_supplicant working on 12.1, but here it works. Microphone in cm12.1 is also hard to fix, because there is only LD_PRELOAD for lib and microphone require MonoPipe class from 4.4 to work, but it will break other things. On cm13 or los14.1 it is possible to use LD_SHIM_LIBS to fix only broken libs and not break working.

    For now I'm trying what cause los14.1 unstable, sometimes it may work for hours, but when it crashed to black screen and buttons backlight it starts endless bootloop.