[HOW-TO] Building CM10, AOKP & TeamBaked For The JB Bootloader [Ubuntu 12.04+ 64-bit]

Search This thread

craigacgomez

Senior Member
Jan 29, 2010
2,215
3,924
Tustin
[HOW-TO] Building CM10, AOKP & TeamBaked For The JB Bootloader [Ubuntu 12.04+ 64-bit]

As many of you know, I no longer have my Transformer Prime, and hence cannot continue development for this device. So until the official CM10, AOKP and TeamBaked ROMs are updated to support the new JellyBean bootloader, as a final useful contribution to this device, I decided to provide a how-to guide to help people make their own builds.

This guide assumes that you have some experience building ROMs for Android and that you are comfortable with Linux. It is focused towards building on Ubuntu 12.04+ 64-bit.

1. Prepare the system (common for CM10, AOKP & TeamBaked)

a. Install Java JDK6
Code:
$ wget https://raw.github.com/flexiondotorg/oab-java6/master/oab-java.sh
$ chmod +x oab-java.sh
$ sudo ./oab-java.sh
$ sudo apt-get install sun-java6-jdk

b. Install required applications
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
  zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
  libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
  libxml2-utils xsltproc zlib1g-dev:i386 schedtool pngcrush
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

c. Get the repo binary
Code:
$ mkdir -p ~/bin
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

2. Building CM10

a. Get the CM10 source
Code:
$ mkdir -p ~/CM10
$ cd ~/CM10
$ repo init -u git://github.com/CyanogenMod/android.git -b jellybean
$ repo sync -j8

b. Get my JB device, kernel & vendor source trees (You could use any other, just make sure it includes the changes needed for the JB bootloader and has the 3.1 kernel)
Code:
//JB device source to device/asus/tf201
$ mkdir -p ~/CM10/device/asus
$ cd ~/CM10/device/asus
$ git clone git://github.com/craigacgomez/android_device_asus_tf201.git -b cm_jb tf201

//JB kernel source to kernel/asus/tf201
$ mkdir -p ~/CM10/kernel/asus
$ cd ~/CM10/kernel/asus
$ git clone git://github.com/craigacgomez/android_kernel_asus_tf201 -b 10.4.2.15-nvtegra tf201

//JB vendor source to vendor/asus/tf201
$ mkdir -p ~/CM10/vendor/asus
$ cd ~/CM10/vendor/asus
$ git clone git://github.com/craigacgomez/vendor_proprietary_asus_tf201 -b jellybean tf201

c. Comment out CMUpdater since this is not an official build (No harm in leaving it there as long as people are instructed not to use it)
Code:
$ cd ~/CM10/vendor/cm/config/
$ gedit common.mk [comment the line which says CMUpdater \]

d. Resync & build
Code:
$ cd ~/CM10
$ repo sync -j8
$ sh vendor/cm/get-prebuilts
$ . build/envsetup.sh && brunch tf201

3. Building TeamBaked

a. Get the TeamBaked source
Code:
$ mkdir -p ~/BAKED
$ cd ~/BAKED
$ repo init -u https://github.com/TeamBAKED/platform_manifest.git -b jb
$ repo sync -j8

b. Delete the tf201 directories
Code:
$ mkdir -p ~/BAKED/device/asus
$ rm -rf tf201
$ mkdir -p ~/BAKED/kernel/asus
$ rm -rf tf201
$ mkdir -p ~/BAKED/vendor/asus
$ rm -rf tf201

c. Get my JB device, kernel & vendor source trees (You could use any other, just make sure it includes the changes needed for the JB bootloader and has the 3.1 kernel)
Code:
//JB device source to device/asus/tf201
$ mkdir -p ~/BAKED/device/asus
$ cd ~/BAKED/device/asus
$ git clone git://github.com/craigacgomez/android_device_asus_tf201.git -b blackbean_jb tf201

//JB kernel source to kernel/asus/tf201
$ mkdir -p ~/BAKED/kernel/asus
$ cd ~/BAKED/kernel/asus
$ git clone git://github.com/craigacgomez/android_kernel_asus_tf201 -b 10.4.2.15-nvtegra tf201

//JB vendor source to vendor/asus/tf201
$ mkdir -p ~/BAKED/vendor/asus
$ cd ~/BAKED/vendor/asus
$ git clone git://github.com/craigacgomez/vendor_proprietary_asus_tf201 -b jellybean tf201

d. Resync & build
Code:
$ cd ~/BAKED
$ repo sync -j8
$ . build/envsetup.sh && brunch tf201

4. Building AOKP

a. Get the AOKP source
Code:
$ mkdir -p ~/AOKP
$ cd ~/AOKP
$ repo init -u https://github.com/AOKP/platform_manifest.git -b jb
$ repo sync -j8

b. Get my JB device, kernel & vendor source trees (You could use any other, just make sure it includes the changes needed for the JB bootloader and has the 3.1 kernel)
Code:
//JB device source to device/asus/tf201
$ mkdir -p ~/AOKP/device/asus
$ cd ~/AOKP/device/asus
$ git clone git://github.com/craigacgomez/android_device_asus_tf201.git -b aokp_jb tf201

//JB kernel source to kernel/asus/tf201
$ mkdir -p ~/AOKP/kernel/asus
$ cd ~/AOKP/kernel/asus
$ git clone git://github.com/craigacgomez/android_kernel_asus_tf201 -b 10.4.2.15-nvtegra tf201

//JB vendor source to vendor/asus/tf201
$ mkdir -p ~/AOKP/vendor/asus
$ cd ~/AOKP/vendor/asus
$ git clone git://github.com/craigacgomez/vendor_proprietary_asus_tf201 -b jellybean tf201

c. Add tf201 to the vendor & build setup
Code:
$ cd ~/AOKP/vendor/aokp
$ gedit vendorsetup.sh
Add this line vendorsetup.sh below add_lunch_combo aokp_tf101-userdebug
Code:
add_lunch_combo aokp_tf201-userdebug
Code:
$ cd ~/AOKP/vendor/aokp/products
$ gedit AndroidProducts.mk
Add this line vendorsetup.sh below $(LOCAL_DIR)/tf101.mk \
Code:
$(LOCAL_DIR)/tf201.mk \
Code:
$ cd ~/AOKP/vendor/aokp/products
$ touch tf201.mk
$ gedit tf201.mk
Add these line to tf201.mk
Code:
# Inherit device configuration for tf201.
$(call inherit-product, device/asus/tf201/full_tf201.mk)

# Inherit some common AOKP stuff.
$(call inherit-product, vendor/aokp/configs/common_tablet.mk)
$(call inherit-product, vendor/aokp/configs/gsm.mk)

PRODUCT_NAME := aokp_tf201
PRODUCT_DEVICE := tf201
PRODUCT_BRAND := asus
PRODUCT_MODEL := Transformer Prime TF201
PRODUCT_MANUFACTURER := asus
PRODUCT_BUILD_PROP_OVERRIDES += \
    PRODUCT_NAME=EeePad \
	BUILD_FINGERPRINT="asus/US_epad/EeePad:4.1.1/JRO03C/US_epad-10.4.2.15-20120917:user/release-keys" \
	PRIVATE_BUILD_DESC="US_epad-user 4.1.1 JRO03C US_epad-10.4.2.15-20120917 release-keys" \

PRODUCT_COPY_FILES +=  \
    vendor/aokp/prebuilt/bootanimation/bootanimation_1280_800.zip:system/media/bootanimation.zip

d. Resync & build
Code:
$ cd ~/AOKP
$ repo sync -j8
$ . build/envsetup.sh && brunch tf201
 
Last edited:

lortay78

Senior Member
Sep 25, 2010
291
41
Boise, Idaho
plus.google.com
Craig, you are so awesome. Thank you so much for all you have done for the community. I hope I can end up with a nexus so I can continue to follow your development, but I'm also glad for the instruction and inspiration to start figuring out how to do more myself. Thanks again.
 

qubz

Inactive Recognized Developer
Jun 12, 2007
585
71
A parallel dimension
You're an absolute legend.
I just pressed return to start the build of my first ROM from your previous guide when I saw this.. :eek:
 
Last edited:

craigacgomez

Senior Member
Jan 29, 2010
2,215
3,924
Tustin
Your an absolute legend.

I'm so sorry if I seem mean... but I just had to do this... I'm a grammar nazi!! :p
30110066.jpg
 
Last edited:
  • Like
Reactions: marko! and lortay78

chrischdi

Senior Member
Aug 30, 2010
81
19
Stuttgart
Hey craigacgomez,

thanks for your work.
But I got a problem while trying to build CM10.

Pastebin entry:
http://pastebin.com/st0DfWv4

I'm trying to build it on a server without a gui, what should make no problems. Installed all the requirements you mentioned.

Do you know how to get rid of this error?

Greetz
Chrischdi
 

craigacgomez

Senior Member
Jan 29, 2010
2,215
3,924
Tustin
Hey craigacgomez,

thanks for your work.
But I got a problem while trying to build CM10.

Pastebin entry:
http://pastebin.com/st0DfWv4

I'm trying to build it on a server without a gui, what should make no problems. Installed all the requirements you mentioned.

Do you know how to get rid of this error?

Greetz
Chrischdi

libjli.so is a Java binary... somehow it cannot find it... could you try this...
http://serverfault.com/questions/57...ject-file-libjli-so-no-such-file-or-directory
 

marko!

Senior Member
Feb 7, 2011
761
357
Halifax
Thanks for this.
I'm hoping to keep your work going , this is a great start
its sad that you no longer have a prime though.
sent from my Prime
 

gunzy83

Senior Member
Nov 23, 2010
88
18
Brisbane, AU
Thanks for posting this! You are an absolute legend! It is a massive help as I just started setting up my build environment for compiling my own CM10 and maybe even look at Paranoid :silly:
 

craigacgomez

Senior Member
Jan 29, 2010
2,215
3,924
Tustin
Thanks for this.
I'm hoping to keep your work going , this is a great start
its sad that you no longer have a prime though.
sent from my Prime

Thanks for posting this! You are an absolute legend! It is a massive help as I just started setting up my build environment for compiling my own CM10 and maybe even look at Paranoid :silly:

Nice to see people pick up where I left off... to be honest, all I did for this device was the first time for me... I've just been good at modding and I never dug deep into ROM & kernel work before, so I'm pretty sure you guys could do the same or even better!
 
  • Like
Reactions: lortay78

Striatum_bdr

Senior Member
May 29, 2011
4,650
2,176
Marseille
Hi,


many thanks again Craig for all your work..

I tried to follow your guide for Team Baked, and ended up with::

""build/core/product_config.mk:193: *** _nic.PRODUCTS.[[vendor/baked/products/p5wifi.mk]]: "device/samsung/p5wifi/p5wifi.mk" does not exist. "Stop.

"** Don't have a product spec for: 'baked_tf201'
"** Do you have the right repo manifest?
"

Itried running breakfeast command as suggested but same error.

Anyone has a suggestion ?

Thanks
 

craigacgomez

Senior Member
Jan 29, 2010
2,215
3,924
Tustin
Hi,


many thanks again Craig for all your work..

I tried to follow your guide for Team Baked, and ended up with::

""build/core/product_config.mk:193: *** _nic.PRODUCTS.[[vendor/baked/products/p5wifi.mk]]: "device/samsung/p5wifi/p5wifi.mk" does not exist. "Stop.

"** Don't have a product spec for: 'baked_tf201'
"** Do you have the right repo manifest?
"

Itried running breakfeast command as suggested but same error.

Anyone has a suggestion ?

Thanks

Don't run breakfast... just brunch... looks like it has something to do with the p5wifi... try resyncing or comment out that 'add_lunch_combo baked_p5wifi-userdebug' from vendor/baked/vendorsetup.sh
 

lortay78

Senior Member
Sep 25, 2010
291
41
Boise, Idaho
plus.google.com
Don't run breakfast... just brunch... looks like it has something to do with the p5wifi... try resyncing or comment out that 'add_lunch_combo baked_p5wifi-userdebug' from vendor/baked/vendorsetup.sh

My noob is going to start showing here, but when you say "Comment out" does that simply mean putting brackets around? Does it mean deleting that from the script? I haven't tried to build since your first little guide, but I think I put brackets around what it said to "Comment out."
 

csrabear

Member
Jan 3, 2011
40
9
Augusta, GA
Hi,

Commented out all lines except tf201 in vendorsetup.sh and same error.

Add these lines to the manifest.xml, then repo sync and brunch tf201:

<project path="device/samsung/p4-common" name="device_samsung_p4-common" remote="baked" revision="jb" />

<project path="device/samsung/p5wifi" name="device_samsung_p5wifi" remote="baked" revision="jb" /> :good:
 
Last edited:
  • Like
Reactions: Striatum_bdr

Striatum_bdr

Senior Member
May 29, 2011
4,650
2,176
Marseille
Add these lines to the manifest.xml, then repo sync and brunch tf201:

<project path="device/samsung/p4-common" name="device_samsung_p4-common" remote="baked" revision="jb" />

<project path="device/samsung/p5wifi" name="device_samsung_p5wifi" remote="baked" revision="jb" /> :good:

Great !

It does the trick but... lol

Then error with prebuilts arm toolchain,


/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc : binary file impossible to execute

Same error endless. Files are there, permission set to executable...

Is there a way to use arm ubuntu toolchain (easily installed by Synaptic)?

Thanks again
 

Striatum_bdr

Senior Member
May 29, 2011
4,650
2,176
Marseille
You really need a 64 bit os. Compilation started fine, but a some point gcc sdk binaries are used and again the default paths lead only to 64 bits ones.

I'll install a 64 version if ubuntu.

Thanks guys for you helps
 

Top Liked Posts

  • There are no posts matching your filters.
  • 36
    [HOW-TO] Building CM10, AOKP & TeamBaked For The JB Bootloader [Ubuntu 12.04+ 64-bit]

    As many of you know, I no longer have my Transformer Prime, and hence cannot continue development for this device. So until the official CM10, AOKP and TeamBaked ROMs are updated to support the new JellyBean bootloader, as a final useful contribution to this device, I decided to provide a how-to guide to help people make their own builds.

    This guide assumes that you have some experience building ROMs for Android and that you are comfortable with Linux. It is focused towards building on Ubuntu 12.04+ 64-bit.

    1. Prepare the system (common for CM10, AOKP & TeamBaked)

    a. Install Java JDK6
    Code:
    $ wget https://raw.github.com/flexiondotorg/oab-java6/master/oab-java.sh
    $ chmod +x oab-java.sh
    $ sudo ./oab-java.sh
    $ sudo apt-get install sun-java6-jdk

    b. Install required applications
    Code:
    $ sudo apt-get install git-core gnupg flex bison gperf build-essential \
      zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
      libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
      libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
      libxml2-utils xsltproc zlib1g-dev:i386 schedtool pngcrush
    $ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

    c. Get the repo binary
    Code:
    $ mkdir -p ~/bin
    $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
    $ chmod a+x ~/bin/repo

    2. Building CM10

    a. Get the CM10 source
    Code:
    $ mkdir -p ~/CM10
    $ cd ~/CM10
    $ repo init -u git://github.com/CyanogenMod/android.git -b jellybean
    $ repo sync -j8

    b. Get my JB device, kernel & vendor source trees (You could use any other, just make sure it includes the changes needed for the JB bootloader and has the 3.1 kernel)
    Code:
    //JB device source to device/asus/tf201
    $ mkdir -p ~/CM10/device/asus
    $ cd ~/CM10/device/asus
    $ git clone git://github.com/craigacgomez/android_device_asus_tf201.git -b cm_jb tf201
    
    //JB kernel source to kernel/asus/tf201
    $ mkdir -p ~/CM10/kernel/asus
    $ cd ~/CM10/kernel/asus
    $ git clone git://github.com/craigacgomez/android_kernel_asus_tf201 -b 10.4.2.15-nvtegra tf201
    
    //JB vendor source to vendor/asus/tf201
    $ mkdir -p ~/CM10/vendor/asus
    $ cd ~/CM10/vendor/asus
    $ git clone git://github.com/craigacgomez/vendor_proprietary_asus_tf201 -b jellybean tf201

    c. Comment out CMUpdater since this is not an official build (No harm in leaving it there as long as people are instructed not to use it)
    Code:
    $ cd ~/CM10/vendor/cm/config/
    $ gedit common.mk [comment the line which says CMUpdater \]

    d. Resync & build
    Code:
    $ cd ~/CM10
    $ repo sync -j8
    $ sh vendor/cm/get-prebuilts
    $ . build/envsetup.sh && brunch tf201

    3. Building TeamBaked

    a. Get the TeamBaked source
    Code:
    $ mkdir -p ~/BAKED
    $ cd ~/BAKED
    $ repo init -u https://github.com/TeamBAKED/platform_manifest.git -b jb
    $ repo sync -j8

    b. Delete the tf201 directories
    Code:
    $ mkdir -p ~/BAKED/device/asus
    $ rm -rf tf201
    $ mkdir -p ~/BAKED/kernel/asus
    $ rm -rf tf201
    $ mkdir -p ~/BAKED/vendor/asus
    $ rm -rf tf201

    c. Get my JB device, kernel & vendor source trees (You could use any other, just make sure it includes the changes needed for the JB bootloader and has the 3.1 kernel)
    Code:
    //JB device source to device/asus/tf201
    $ mkdir -p ~/BAKED/device/asus
    $ cd ~/BAKED/device/asus
    $ git clone git://github.com/craigacgomez/android_device_asus_tf201.git -b blackbean_jb tf201
    
    //JB kernel source to kernel/asus/tf201
    $ mkdir -p ~/BAKED/kernel/asus
    $ cd ~/BAKED/kernel/asus
    $ git clone git://github.com/craigacgomez/android_kernel_asus_tf201 -b 10.4.2.15-nvtegra tf201
    
    //JB vendor source to vendor/asus/tf201
    $ mkdir -p ~/BAKED/vendor/asus
    $ cd ~/BAKED/vendor/asus
    $ git clone git://github.com/craigacgomez/vendor_proprietary_asus_tf201 -b jellybean tf201

    d. Resync & build
    Code:
    $ cd ~/BAKED
    $ repo sync -j8
    $ . build/envsetup.sh && brunch tf201

    4. Building AOKP

    a. Get the AOKP source
    Code:
    $ mkdir -p ~/AOKP
    $ cd ~/AOKP
    $ repo init -u https://github.com/AOKP/platform_manifest.git -b jb
    $ repo sync -j8

    b. Get my JB device, kernel & vendor source trees (You could use any other, just make sure it includes the changes needed for the JB bootloader and has the 3.1 kernel)
    Code:
    //JB device source to device/asus/tf201
    $ mkdir -p ~/AOKP/device/asus
    $ cd ~/AOKP/device/asus
    $ git clone git://github.com/craigacgomez/android_device_asus_tf201.git -b aokp_jb tf201
    
    //JB kernel source to kernel/asus/tf201
    $ mkdir -p ~/AOKP/kernel/asus
    $ cd ~/AOKP/kernel/asus
    $ git clone git://github.com/craigacgomez/android_kernel_asus_tf201 -b 10.4.2.15-nvtegra tf201
    
    //JB vendor source to vendor/asus/tf201
    $ mkdir -p ~/AOKP/vendor/asus
    $ cd ~/AOKP/vendor/asus
    $ git clone git://github.com/craigacgomez/vendor_proprietary_asus_tf201 -b jellybean tf201

    c. Add tf201 to the vendor & build setup
    Code:
    $ cd ~/AOKP/vendor/aokp
    $ gedit vendorsetup.sh
    Add this line vendorsetup.sh below add_lunch_combo aokp_tf101-userdebug
    Code:
    add_lunch_combo aokp_tf201-userdebug
    Code:
    $ cd ~/AOKP/vendor/aokp/products
    $ gedit AndroidProducts.mk
    Add this line vendorsetup.sh below $(LOCAL_DIR)/tf101.mk \
    Code:
    $(LOCAL_DIR)/tf201.mk \
    Code:
    $ cd ~/AOKP/vendor/aokp/products
    $ touch tf201.mk
    $ gedit tf201.mk
    Add these line to tf201.mk
    Code:
    # Inherit device configuration for tf201.
    $(call inherit-product, device/asus/tf201/full_tf201.mk)
    
    # Inherit some common AOKP stuff.
    $(call inherit-product, vendor/aokp/configs/common_tablet.mk)
    $(call inherit-product, vendor/aokp/configs/gsm.mk)
    
    PRODUCT_NAME := aokp_tf201
    PRODUCT_DEVICE := tf201
    PRODUCT_BRAND := asus
    PRODUCT_MODEL := Transformer Prime TF201
    PRODUCT_MANUFACTURER := asus
    PRODUCT_BUILD_PROP_OVERRIDES += \
        PRODUCT_NAME=EeePad \
    	BUILD_FINGERPRINT="asus/US_epad/EeePad:4.1.1/JRO03C/US_epad-10.4.2.15-20120917:user/release-keys" \
    	PRIVATE_BUILD_DESC="US_epad-user 4.1.1 JRO03C US_epad-10.4.2.15-20120917 release-keys" \
    
    PRODUCT_COPY_FILES +=  \
        vendor/aokp/prebuilt/bootanimation/bootanimation_1280_800.zip:system/media/bootanimation.zip

    d. Resync & build
    Code:
    $ cd ~/AOKP
    $ repo sync -j8
    $ . build/envsetup.sh && brunch tf201
    4
    I'll see if I can help out with CM10.1 and 4.2 stuff... I might be able to make the necessary changes, but I can't test the build...

    Thanks to everyone here... this thread just made the XDA portal...
    2
    Your an absolute legend.

    I'm so sorry if I seem mean... but I just had to do this... I'm a grammar nazi!! :p
    30110066.jpg
    2
    Edited: so far the only change I have had to make to use the AOKP instructions with AOKP 4.2 is the following

    edit device/asus/tf201/BoardConfig.mk

    add this to the arch area
    TARGET_ARCH := arm

    it is building now and I will flash and test asap.
    end edit:

    craig I know that your no longer developing for tf201 but how could I get you to add this to a mr1-staging branch on your github device tree?

    I would fork your repo and do it my self if I wasn't a git noob.
    2
    Hi,


    many thanks again Craig for all your work..

    I tried to follow your guide for Team Baked, and ended up with::

    ""build/core/product_config.mk:193: *** _nic.PRODUCTS.[[vendor/baked/products/p5wifi.mk]]: "device/samsung/p5wifi/p5wifi.mk" does not exist. "Stop.

    "** Don't have a product spec for: 'baked_tf201'
    "** Do you have the right repo manifest?
    "

    Itried running breakfeast command as suggested but same error.

    Anyone has a suggestion ?

    Thanks

    Don't run breakfast... just brunch... looks like it has something to do with the p5wifi... try resyncing or comment out that 'add_lunch_combo baked_p5wifi-userdebug' from vendor/baked/vendorsetup.sh