yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Harrynowl:
You need to fix up SELinux and the init scripts. Taking a shield tablet device tree, renaming things to mocha and changing the fstab isn't enough. As far as I can tell the shieldtablet device tree also has dependency on a shield common tree. There's also no value in creating a new thread each time you push new commits :)

Our kernel from Xiaomi is also pretty useless without commit history. The device tree is also from shield tablet, not Nexus 9.

We also have a tree for building TWRP with OmniROM that you can compile TWRP 3.0.2.0 with.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] highwaystar_ru:
What kernel repo is upstream one for tegra android? Like CAF for quallcom.

I've tried to merge xiaomi changes on l4t kernel https://github.com/HighwayStar/android_kernel_xiaomi_mocha

Merged dts files and arch/boot/march-tegra with some required drivers, but still cant boot it. Found somewhere here that l4t kernels is not for android, but for GNU/Linux, but what kernel is for android?

Cyanogenmod's shield kernel?
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Harrynowl:
git://nv-tegra.nvidia.com/linux-3.10.git

I used rel-tn8-l-r7-shieldtablet8 to make a start on doing this. You could also use android_kernel_shield from CyanogenMod repo as it comes from the same place. But it will have a lot of extra commits for things not useful for mocha.

Here's what I have so far:

https://github.com/harrynowl/nvidia_tegra-3.10
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] highwaystar_ru:
Oh, intresting, cloned same url, but started other branch l4t/l4t-r21.5.

What status of your tree? Cant boot? We need minimal bootable kernel to be able to get dmesg and make further progress.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Harrynowl:
Untested, been doing device bring up. That kernel won't work yet anyway it's missing atmel, synaptic and battery firmware. (Plus the code that goes with it)

Some devs have one that gets to recovery but only 1 CPU core can come online and the CPU gets a bit hot. Unfortunately their commit history is hard to follow so I've not had a proper look at it yet
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] drakonizer:
My my...it's been a while since I've seen a cringe-worthy dev thread on XDA. So OP just used the device tree from Nexus 9 (a 64-bit device with a different processor and nothing in common with the Mi Pad other than the fact that they use Nvidia SoCs and are both tablets), unmodified KITKAT kernel sources from Xiaomi (which takes work to make it boot, even on KK) and KITKAT userspace blobs to compile the ROM, and for some reason decided to share it without testing. The 10-post rule is meant to keep such people out of the development sub-forums, but obviously that's not working.

I do not understand why the moderators are allowing this thread to remain open. It's just a thread by a wannabe dev offering a non-bootable ROM that has the potential to brick the devices of many newbies who may decide to try this.

This thread is even more useless than the other "DEVS-ONLY" thread someone else made. Honestly, the entire Mi Pad forum is filled with people who either expect Android 7.1.1 to magically appear on their tabs just because Xiaomi released outdated kernel sources or just wanna create threads like this for the "thanks or whatever". The never ask for ETA rule seems to just float over their heads.

Now to some useful information. I believe, even if we patch the kernel enough for it to theoretically boot cm13, it probably won't, considering the outdated userspace blobs for the Mi Pad. Unless someone has the knowledge to take their tab apart and figure out how to get UART data, it will be virtually impossible for the mi pad kernel to boot any new version of Android. I heard another interesting approach taken by some russian devs at the Xiaomi forums. They've managed to port the kernel from the Nvidia shield (and apparently it's booting). Now this would mean we can use the userspace blobs from the Shield to at least get the ROM booting (most peripherals won't work, but that's step 2). I do not know whether they use GitHub or if they've even open-sourced their work, but now we know that it's possible, so that could be a possible method of approach.

EDIT: LOL. I just read the OP again. The "dev" expects donations to help him work harder. This from a person who posted his way into somehow compiling his first Android build without even having the damn device.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Harrynowl:
I agree, this device has no development threads. Only 2 give me thanks and here's my donation link threads.

They have indeed used GitHub, but I don't believe they want to share the repo just yet so I won't post it publicly. It has many problems to sort and also sadly, they didn't keep the commit history from Nvidia as it was initialised via zip DL. It does boot to recovery though.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] drakonizer:
Oh! I didn't realize we were talking about the same person/team. I'd love to start developing for this device. In fact, I'm working on KEXEC-hardboot and Multirom right now, but I'd like to follow what you guys are doing and contribute as much as I can. Is there an IRC channel/IM app you guys use for communication? If so, I'd appreciate it if you could PM the info.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Sudeep Duhoon:
Kernel Adiutor or similar app?
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] :
Lol, confirming same for android 4.4
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Xinxeta:
I can't see the video. It says that it doesn't exist.

Enviat des del meu falcon usant Tapatalk
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] blackjack®:
Reboot to twrp wipe>advanced>check mark system than resize system
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] OoSTARTERoO:
Changing CPUQuiet really helped much!
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] rocky869:
When the final build is uploaded? I guess everything is fixed except camera which I opened last year after my purchase to check it's working or not.

A new thread Highway_CM 12.1 should be created by this awesome developer and give credit to the Kernel port developer too.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] darryl1234:
Bug: Sometimes when i use a app (usually apps connected to internet) screen gets distorted for a few seconds.

Any1 facing this issue?
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] AbhaYsinGH007:
I have faced this issue on cm12.1 as well as miui
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] highwaystar_ru:
I will create new thread soon, I'm now rebuilding from scratch with missing symbols added with LD_PRELOAD lib, so it will be easier to build by anoyone who wants to help.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] OoSTARTERoO:
I carefully searched my logcat to see what's causing problem with geforce now streaming.

And i found a problem

There's a problem with "AdapterDecoder" which eventually causes streaming to fail with errorcode 80341005

01-10 17:30:43.946 E/AdaptorDecoder(6324): AdaptorDecoder:: GetExtensionIndex(DisableDPB) OMX_Error: 80001001.

I don't know what is causing this error

But i think it is related to Exoplayer

I'll leave a logcat here to solve problem

I think there is buffer problem with h264 decoding
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Kage Yume:
Bug report: Navigational keys remain active after the screen is turned off. I can still tap the navigational keys and get vibrating feedback.

Is there anyway to fix that? Thanks in advance.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] rohit25:
Can we have a new thread opened with the correct dev being recognized... Don't want any1 else taking the credit.. as we almost have all the major bugs sorted out.. (don't care for camera)
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] blackjack®:
me too +1

---------- Post added at 12:11 PM ---------- Previous post was at 12:07 PM ----------

for me on miui stock rom miui smoke i never see this issue
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] highwaystar_ru:
I've created new thread for CM12.1 with new build (video playback lags fix included) https://xdaforums.com/mi-pad/development/cyanogenmod-12-1-mipad-mocha-t3535640
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] darryl1234:
Can i flash the update directly without clean wipe ?
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] thepetro95:
Thank you to Everyone you keep Mi Pad alive
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] sirarisma:
I have that issue, using cover with pad on
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Harrynowl:
I am working independently of these developers, they shared their repo with me to see if I could help fix some errors (currently, only 1 CPU core can online and the CPU overheats).

Currently I am maintaining this repo: https://github.com/harrynowl/nvidia_tegra-3.10

The other guys are doing good work but their commits are not very well documented which makes it hard to follow, and they erased the commit history on import. So I am following their own work (and contributing myself, of course) here.

I also started a device tree here: https://github.com/harrynowl/android_device_xiaomi_mocha

And updated the vendor blobs here: https://github.com/harrynowl/android_vendor_xiaomi_mocha

Device starts to boot, but craps the bed at SELinux (doesn't like the policy version) and doesn't get very far. Xiaomi kernel loads. st_sensor_hub is broken though so I told it to GTFO in the defconfig for now.

A laggy 5.1.1 boots using KitKat blobs, Wi-Fi etc seems OK. Probably force closes here and there. Will probably have to hex edit some blobs.

But I feel best long term solution is to do Xiaomis work for them and re-base their kernel, as commit history-less kernels are crap for development.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Rohit99:
Oh sorry

[MENTION=5258151]drakonizer[/MENTION] This was my first build and have resources to build the rom , thought some dev might help me bringing up this rom and this is the response i get . Sorry should i request to close this thread .
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] drakonizer:
Does LP boot with those repos? That's cool, I know LP booted with the unmodified Kk kernel with the same issues. I've been hunting for the device tree for quite some time. I think LP would be a better place to start cause it would have better compatibility with the blobs.

I know it probably won't work, but have you tried using some blobs from the Nvidia Shield? It might work with the Shield kernel port I was talking about. Of course there will be broken peripherals like camera that are Xiaomi proprietary, but we could write wrappers for that and use the Xiaomi cam blobs.

---------- Post added at 09:01 AM ---------- Previous post was at 08:59 AM ----------

That is not the message I got from reading the OP.

1) there was already a discussion thread. You didn't need to make one.

2) if you know it's your first build, you shouldn't have uploaded it without testing.

3) if you've never done this before, you have no right to ask for donations.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Rohit99:
My Bad

Should i request to close the thread or delete this project?
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Sudeep Duhoon:
I agree to all points.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Harrynowl:
The problem was you submitted something without testing or appropriate knowledge to back it up, as the extent of the development submitted to the git repo by yourself is changing file names.

When asking for donations to work harder you need to do work to begin with.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] highwaystar_ru:
Ok, reporting kernel progress here:

https://github.com/HighwayStar/android_kernel_xiaomi_mocha/commits/mocha-rel-st8-l-r7

I started from scratch again on top of nvidia rel-st8-l-r7-shieldtablet8 branch. Imported all changes from Insei shield based repo as one patch, and identified some upstream patches in changes and commit them as original upstream patches. Next imported changes to bump SELinux version 30 (which needed fro Android M). And last committed all left Insei changes as one big commit. This need to be sorted out and recommitted as smaller ones or even dropped.

Kernel now boots and can load SELinux policy, but stopped somewhere in init. Not sure if it caused by testing over 4.4 based MIUI rom installed. Had no time to build full cm13 to check.

Here is current state dmesg from /proc/last_kmsg http://hastebin.com/maciwixowi.vbs
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] drakonizer:
Looks like SELinux is guilty.

[ 7.699384] type=1403 audit(1481907031.529:2): policy loaded auid=4294967295 ses=4294967295
[ 7.699728] init: (Initializing SELinux non-enforcing took 0.03s.)
[ 7.701903] init: SELinux: Could not set context for /init: Operation not supported on transport endpoint
[ 7.701916] init: restorecon failed: Operation not supported on transport endpoint
[ 7.701926] init: Security failure; rebooting into recovery mode...
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] highwaystar_ru:
This should be fixed by merging 364a09b74ecbcee9411c3677212f0392d3c876de SELinux: Enable setting security contexts on rootfs inodes.

Will try it tomorrow
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Harrynowl:
Yes.

Are you testing on stock kitkat? SElinux v26 is the policy version on the xiaomi ROM by examining it with sesearch

Here's a list of commits that should ideally be merged.

The 3.10.33 Kernel on the Shield release understands up to policy v28, same as our Xiaomi kernel I think.

I merged a lot of upstream into the Xiaomi kernel source as I don't really have time to port an entire kernel (or the necessary understanding either, being honest).

https://github.com/harrynowl/android_kernel_xiaomi_mocha
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] highwaystar_ru:
I'm building boot.img with your cm-13.0 device tree and booting it via fastboot on mipad with installed MIUI. So it should do all work in ramdisk and hagn/reboot when going to actual /system.

I merged all selinux commit you suggested to separate branch https://github.com/HighwayStar/android_kernel_xiaomi_mocha/commits/mocha-selinux

All commits merged fine but "selinux: nlmsgtab: add SOCK_DESTROY to the netlink mapping tables". I've skipped it, beause it need some other code about SOCK_DESTROY_BACKPORT.

Now intersting part: how to test kernel if it hangs somewhere in init? When I remove /init from ramdisk kernel boots and reboots to recovery or system with dmesg:

7.641058] Warning: unable to open an initial console.
[ 7.641191] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[ 7.641196] Please append a correct "root=" boot option; here are the available partitions:
[ 7.641207] b300 61071360 mmcblk0 driver: mmcblk
[ 7.641216] b301 2048 mmcblk0p1 d8a3bf58-2e6a-4c99-0c23-0f885419c9f8
[ 7.641224] b302 2048 mmcblk0p2 baf09b89-1f7f-8aaa-ab89-649606750ceb
[ 7.641231] b303 8192 mmcblk0p3 f0073059-965c-8254-d7b4-710b17915f8a
[ 7.641238] b304 8192 mmcblk0p4 a9aaeba6-a431-0ad9-b2fa-7982d6626e63
[ 7.641244] b305 4096 mmcblk0p5 eca0f293-0dc8-c30d-2c8e-121efc923323
[ 7.641251] b306 4096 mmcblk0p6 8f1f2f88-a640-5936-9aa0-614b35d70795

But with init in place it never reboots (trying to wait up to 10 minutes), on hard reboot with powerbutton it doesnt produce /proc/last_kmsg to check what's going wrong. Any Ideas how to get dmesg from hang-in-init device?

P.S> Ok, got dmesg from recovery built with latest kernel http://hastebin.com/numepicewe.vbs

It doesnt show anything on screen and seems waiting for somathing to start with messages

[ 13.003073] binder: 141:141 transaction failed 29189, size 0-0
[ 14.003159] binder: 141:141 transaction failed 29189, size 0-0
[ 15.003240] binder: 141:141 transaction failed 29189, size 0-0
[ 16.003317] binder: 141:141 transaction failed 29189, size 0-0

adb also cannot connected, may be it's related to binder messages

PPS>

Seems like binmder fail not kernel issue but device tree problem. Replaced kernel in working twrp recovery with new one and it boots and working adb. No imge on screen but backligth is on and seems to react on touch (backligth become brigther)
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Harrynowl:
Yeah, I managed to break the device tree when playing about with the joyous SEPolicy and haven't gone and resolved that yet. I believe compiling against the HEAD at 8718f068ffe0b1dbc394a2b662e0ee4516dfa137 was the last successful build.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Palm Trees:
[MENTION=7738209]Harrynowl[/MENTION] you said, you might be interested, which leads me to ask - is anyone else thinking of taking on the task of making a CM 13 rom for Mi Pad 2? Should be an easier task than it is currently with the Mi Pad 1.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Harrynowl:
I'll try if I buy one, but Christmas time is already expensive ;)
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Palm Trees:
That's true ;) The consistently lowest price for the Mi Pad 2 has been at Geekbuying (and no, I'm not paid or affiliated) - in case you want to buy one next year.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] highwaystar_ru:
Reporting some progress on minimal bootable kernel.

Check here https://github.com/HighwayStar/android_kernel_xiaomi_mocha/commits/minimal-boot todays commits.

This can boot with old twrp image, display and adb working. Commits easilly can be ported to latest cm-13.0 shield kernel.

Main problem with kernel hangs was caused by old Broadcom driver. I've disabled it until merge updated driver code.

Today's version lack of support for touchscreen, wifi, camera, sound, but it's for keep minimal xiaomi code.

Current problem is broken device tree. When building CM13 recovery it cant mount anything. We need working device tree to make progress with cm13.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] OoSTARTERoO:
Thanks for your reporting!
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Harrynowl:
Have you tried with this TWRP image?
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] drakonizer:
What device tree do you guys use for TWRP? The one from TeamWin GitHub doesn't seem to work for me.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Palm Trees:
What's your thoughts on that? Any useful?
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Harrynowl:
Mi Pad 2 64GB acquired. One popped up for 30% less than usual so I thought why not.

Sadly this does mean Mi Pad 1 has to go.

So I'm out for mocha development I'm afraid guys. But I'll stop for a Latte.

Compile with Omni rather than CM if you are not trying that already.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] drakonizer:
Of course, I'm using Omni itself. The tree works for my other devices.

Sad to see you go man. Thanks for your work.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] highwaystar_ru:
I fixed device tree a little https://github.com/HighwayStar/android_device_xiaomi_mocha

Now recovery build fine. When booted adb works but screen doesnt and dmesg full off binder messages posted above. There is also no dts/dtb building at that moment, using old prebuilt from device tree.

My currenct recovery dmesg https://hastebin.com/afowaxasec.vbs

Any ideas how to fix or debug ?

[ 15.594249] binder: 121:121 transaction failed 29189, size 0-0
[ 16.594329] binder: 121:121 transaction failed 29189, size 0-0
[ 17.594411] binder: 121:121 transaction failed 29189, size 0-0
[ 18.594491] binder: 121:121 transaction failed 29189, size 0-0
[ 19.594570] binder: 121:121 transaction failed 29189, size 0-0
[ 20.594647] binder: 121:121 transaction failed 29189, size 0-0
[ 21.594725] binder: 121:121 transaction failed 29189, size 0-0
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Palm Trees:
Where did you get it?
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Harrynowl:
eBay :)

Just checking kernel stuff as I've not compiled for x86 targets before. Nice to see there's commit history on this one
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] highwaystar_ru:
I've made new tree for mocha based on CyanogenMod 12.1 shield tree. I've replace old repo https://github.com/HighwayStar/android_device_xiaomi_mocha

REcovery built from this one boots and starts adb, but no image. Backligth works, but no UI. There is no binder errors for now, I think black screen caused by not loading GPU firmware.

Current dmesg https://hastebin.com/ugepobosik.vbs
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Palm Trees:
By KonstaT right? If only someone would donate a device to him, you would see new roms and plenty development :)

I'll check Ebay - thanks.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] serninator:
can you boot it? or are you still working on it?
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Harrynowl:
The OP/"developer" hasn't been seen after collecting his thanks for posting this thread.Take that as you will :)

The other guys are hard at work on providing us a more useful kernel base.

Good work :)

There are some things to disable in the defconfig that might help with no display.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] serninator:
I Knew it that after all other devs said him he did nothing, he probably doesn´t comeback.

I read that someone was working o Nvidia Shield kernel as a base for our MarshMallow kernel and I wanna know how it's going, because I think MM in this tablet should be incredible Awesome. I have MiPad but I know nothing about ROMs in developer meaning, I only can offer myself as a tester.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Harrynowl:
Well the inention wasn't to attack him and scare him off, it's just disrespectful to people who are trying to do work when someone is posting no work and taking credit.

Then when someone else posts a potentially working build that working dev gets slammed for opening new threads and not working with the other devs (in my experience).
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] serninator:
I didn't say you attack him or what you said was wrong. I feel really bad, when I saw this post I send it to a differents groups where I am to talk about MiPad but after read that it is not bootable...

I wise someone could port MM functional to my miPad, cause I have no ****ing hope Xiaomi will do It...
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] anasahmad17:
HarryNowl please keep helping with the development to the other guy who is working.. Not the Op I mean. I own a mipad and really wish to see atleast LP Boot on it..

Wish xiaomi release MM for it..
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Artemka2008:
I'll just leave it here
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] rauldzmartin:
What does it mean? And where can I follow the thread?
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] drakonizer:
It means they got the Shield kernel port booting on Android. This would probably mean less kernel stuff to do to port Lollipop (because the Shield Kernel was for Lollipop). Unfortunately, we do not know what hardware peripherals work at the moment, nor do we have the source code to take a look. Nevertheless, this is a great achievement, and definitely a step forward.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] :
Good news. Blame Xiaomi for not making LP or MM for such a good device with such a powerful processor.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] Artemka2008:
I used our zImage and modified device tree. Cameras, sound, WiFi and 3D works. I used standard miui blobs. All 4 CPU cores works also.
[Xiaomi Mi Pad ROMs, Kernels, Recoveries, & Other D] drakonizer:
Great to know. But for Lollipop most of the Xiaomi userspace blobs won't work, so we need to find out if the Shield's blobs work well on our device. Since we're using the same kernel (and hopefully some similar drivers, it *should* work, right? Have you guys tried it?