[ROM] AOSP/CM Jelly Bean 4.2.2 for a2109

For Lenovo, -i 0x17ef should work. Don't forget to add 0x in front of the vendor ID. I don't know Medion's vendor ID, but in Linux lsusb should give it.
The sad truth is that for Medion it does not work, even with the lsusb given vendor ID. But I don't care, I use dd.
 
Last edited:
AOSP:
https://github.com/PJBrs/android_device_lenovo_kai/commits/JellyBean-4.2.2

CM:
https://github.com/PJBrs/android_device_lenovo_kai/commits/cm-10.1

Both should be up-to-date. Small note on AOSP--I just used frameworks/native and frameworks/av from Cyanogenmod and I didn't cherry-pick just the right commits. So I should be able to fix this. And I might have erroneously added the bug about Google Maps to AOSP this way.



For Lenovo, -i 0x17ef should work. Don't forget to add 0x in front of the vendor ID. I don't know Medion's vendor ID, but in Linux lsusb should give it. In Windows I don't know.



Which device do you use? This looks like the partition size for system.img is incorrect. Perhaps I should just upload an update package later. It's a bit risky in that AOSP wants to overwrite the recovery. Then again, at least it works.

One more word regarding the camera. I forgot to add that I didn't yet try to use the camera HAL from TF700 or grouper. Either *might* work. And I noticed in the stock ICS version that it's libjpeg is much simpler than the JB-4.1.1 one. Perhaps we just should use *older* libs :)

Finally, it's a lot of fun seeing more people enjoying this work!
Lenovo A2109. Thanks
 
AOSP:
https://github.com/PJBrs/android_device_lenovo_kai/commits/JellyBean-4.2.2

CM:
https://github.com/PJBrs/android_device_lenovo_kai/commits/cm-10.1

Both should be up-to-date. Small note on AOSP--I just used frameworks/native and frameworks/av from Cyanogenmod and I didn't cherry-pick just the right commits. So I should be able to fix this. And I might have erroneously added the bug about Google Maps to AOSP this way.



For Lenovo, -i 0x17ef should work. Don't forget to add 0x in front of the vendor ID. I don't know Medion's vendor ID, but in Linux lsusb should give it. In Windows I don't know.



Which device do you use? This looks like the partition size for system.img is incorrect. Perhaps I should just upload an update package later. It's a bit risky in that AOSP wants to overwrite the recovery. Then again, at least it works.

One more word regarding the camera. I forgot to add that I didn't yet try to use the camera HAL from TF700 or grouper. Either *might* work. And I noticed in the stock ICS version that it's libjpeg is much simpler than the JB-4.1.1 one. Perhaps we just should use *older* libs :)

Finally, it's a lot of fun seeing more people enjoying this work!
I appreciate *any* dev movement on this device. It makes me not regret buying this instead of the Nexus 7 (in 2012 when I bought this tab).

EDIT: Ubuntu VM set up! Gave it 3GB RAM (half of host's RAM) and all 4 CPU cores. Dev tols set up as well. Just synced Slimbeans 4.2's source last night. Going to try to compile it with your device tree. Anything else I need to do?

EDIT2: Just so you're aware, I'm a total new-comer to compiling android, but I know my way around Linux and finding sources of errors and such.
 
Last edited:
I appreciate *any* dev movement on this device. It makes me not regret buying this instead of the Nexus 7 (in 2012 when I bought this tab).

EDIT: Ubuntu VM set up! Gave it 3GB RAM (half of host's RAM) and all 4 CPU cores. Dev tols set up as well. Just synced Slimbeans 4.2's source last night. Going to try to compile it with your device tree. Anything else I need to do?

EDIT2: Just so you're aware, I'm a total new-comer to compiling android, but I know my way around Linux and finding sources of errors and such.

Looking forward to seeing your results!

In general, I think you should be fine, just make sure that you add my tinyalsa repo to your local_manifest, otherwise sound doesn't work. You might need to patch libwebcore with regard to the switch.pm perl module, but the error message leads to a solution easily.

Now MOST IMPORTANTLY, find a stock 4.2 rom for tf700 and use camera.tegra.so and libnvcamerahdr.so to replace its a2109 counterparts. I tried this yesterday and it made CAMERA WORK IN AOSP!!!!!!!!! :) If you're quick, you'll beat me to the first 4.2 JellyBean build with working GPS and camera ;) I've already added the change to my local tree so you can also wait one day for me to update my cm-10.1 branch. I have no time to build it myself though, and I'm also still trying to see if I can fix my AOSP build by cherry-picking from cyanogenmod frameworks instead of bluntly using their repos.

Finally some hints--things such as copying files go into device_kai.mk. Build flags, such as for old audio blobs and bluetooth go into BoardConfig.mk. You might need to change vendorsetup.sh to align with the slimbean build system. If you make any changes, please make your own branch, so that later I might be able to pull your changes. I'll try to find how I can give you commit rights to my repo, then we can really work together.

GOOD LUCK!!!

P.S., if you really want to get ahead, go study the log of changes between cm-10.1 and cm-10.2 in cyanogenmod's tf700 device tree. You'll see there are no more than fifty changes and I'm planning to use that git log to go forward with 4.3. Main changes, IIRC; integrated fstab, selinux, and possibly adding usbhid to kernel build.
 
With your local_manifest.XML, the otatools from Slimbeans won't build.

EDIT: I think its the Linaro tool chain messing with it. I'll have to get back to you later today since I'm going to be away visiting with family today.
 
Ubuntu 12.04.5, JDK 6, and the Linaro version that is in your local_manifest.xml.

Hmmm... Maybe you should check whether Ubuntu-12.04.5 is compatible with building JellyBean-4.2? JDK6 should be right.

Regarding the toolchain--the linaro thing in my local_manifest.xml is about libjpeg-turbo. I use it to replace stock jpeg in cm-10.1 and aosp, so that's not what should be in your way.

Perhaps try building cm-10.1 first, as a way of getting started? In my experience, getting to know git and the Android build system take quite some time...
 
Hmmm... Maybe you should check whether Ubuntu-12.04.5 is compatible with building JellyBean-4.2? JDK6 should be right.

Regarding the toolchain--the linaro thing in my local_manifest.xml is about libjpeg-turbo. I use it to replace stock jpeg in cm-10.1 and aosp, so that's not what should be in your way.

Perhaps try building cm-10.1 first, as a way of getting started? In my experience, getting to know git and the Android build system take quite some time...
I used the first part of the Lenovo B8000 build guide (first part anyway, right up to "making changes specifically for the B8000"). It was for CM11 though. So it might have too new of a version to compile this... Hmm...
 
For Cyanogenmod 10.1, first install repo. Then create a root directory for your cyanogenmod source (e.g. ~/src/cyanogenmod). Go into that directory and do:

$ repo init -u https://github.com/CyanogenMod/android.git -b cm-10.1

The -b switch selects which branch you'll build.

Add my local_manifest.xml to .repo/local_manifests/ in the root of your source tree.

do $ repo sync

The most difficult step is to get the proprietary blobs. Connect your device, activate adb and put it in your path, do into device/lenovo/kai and run

$ ./extract-files.sh

I've made a setup-makefiles.sh script that is able to mix kai binaries with grouper binaries, but it does need the grouper vendor tree to be present. See proprietary-files.txt and grouper-unique-blob-list.txt for suggestions and (mediocre) documentation. Download the grouper binaries for JellyBean-4.2.2 from here:

https://developers.google.com/android/nexus/drivers#grouperjdq39

You probably don't need them all but I haven't really thought about which ones to leave out. Basically this is a set of archives that each contain one selfextracting script. If you all run them in the root directory of your cyanogenmod tree, you end up with a vendor tree for grouper. Next, go to the device/lenovo/kai tree and run the following:

$ ./setup-makefiles.sh

Now go back to your the root of your source tree, and then it should be as simple as:

$ . build/envsetup.sh && brunch cm_kai-userdebug
 
Last edited:
Followed your mini-guide to a T, just get:
[18:41:58] dblake@ubuntu> ./setup-makefiles.sh
./create-vendor-tree-from-grouper.sh: 26: cd: can't cd to asus
 
Followed your mini-guide to a T, just get:
[18:41:58] dblake@ubuntu> ./setup-makefiles.sh
./create-vendor-tree-from-grouper.sh: 26: cd: can't cd to asus
Sorry, I forgot one of the most important steps in the mini-guide. I edited the post above to fix it. Perhaps PM me if you find more mistakes?
 
So, and here, finally, is CM-10.1, with fully working camera, GPS, bluetooth, audio, video, EGL, USB-OTG, WiFi, and sdcard. I think only WiFi-p2p is missing, but that's a detail I can forget. This is the final CM-10.1 build I'll do, unless anyone finds structural issues (so let me know if you find any!).

cm-10.1-20150410-UNOFFICIAL-kai.zip (md5: 4d96f915ec80f28866b032cc7dc549be)
cwm-6.0.3.7-UNOFFICIAL.img (md5: f463c89f8f246f3600098f5db7bcb182)

Install like you would any custom recovery and rom. If you come from stock or aosp (or any other different rom), I think you need to do a factory reset. For those of you using my previous build, I think you can just install this zip across the previous version.

If you want, you can add the Google apps that go with Android-4.2.2 (dated 20130812), which you can also flash from cwm recovery.
 
Last edited:
Back
Top