[GUIDE][ROM][S4] How to build your own Baked BlackBean ROM! [AOSP 4.2.1][NOOB-PROOF]

Search This thread

PippoX3

Senior Member
Aug 12, 2010
1,472
3,198
TN - Italy
aokp.co
Hmm was working like 2 hours ago when I did it, Did you install 13 like you said in the other thread because think you better off using 12.

Edit, silly me you said you on 13 so ya best off using 12.04.

Ah ah ah... nothing better... just I would to try new gnome interface... now I'm tryng a ubuntu 11.10 in virtualbox.
Seems better... but I have a lot of updates to accomplish passage 1. See ya tomorrow. Thanks Darknites.

Update: Fantastic! With Ubuntu 11.10 completely updated, I'm downloading the source, all smooth! After I will build my first rom...! Thanks!
 
Last edited:

Darknites

Senior Member
Jul 2, 2011
6,264
2,528
Ah ah ah... nothing better... just I would to try new gnome interface... now I'm tryng a ubuntu 11.10 in virtualbox.
Seems better... but I have a lot of updates to accomplish passage 1. See ya tomorrow. Thanks Darknites.

Update: Fantastic! With Ubuntu 11.10 completely updated, I'm downloading the source, all smooth! After I will build my first rom...! Thanks!
Remember to use the local_manifest.

Sent from my HTC One S using Tapatalk 4 Beta
 
  • Like
Reactions: PippoX3

PippoX3

Senior Member
Aug 12, 2010
1,472
3,198
TN - Italy
aokp.co
Remember to use the local_manifest.

Sent from my HTC One S using Tapatalk 4 Beta

Uh? Sorry I don't know local_manifest....
I see the https://github.com/TeamBAKED/platform_manifest where I read instructions about terminal strings for sync of repo.

Anyway I tryed on a VirtualBox guest and must break the sync of repo... tooooooooo long! And My pc was too busy. (11.10 or 12.04 was fine)
Now I restart on a real pc... ubuntu 12.04.

Curiosity: I would to build baked and carbon too (ville). I see the procedure are similar... especially within repo sync:
1) repo init -u https://github.com/TeamBAKED/platform_manifest.git -b jb-4.2
2) repo init -u git://github.com/CarbonDev/android.git -b jb2

I suppose, in second case too, it will build a JB 4.2? And I will have the latest build with latest changes? Kernel 3.4 or 3.0? :silly:

Sorry for the too quests! I'm so excited to build... I would like to do too many things at the same time! :victory:
 

Darknites

Senior Member
Jul 2, 2011
6,264
2,528
Uh? Sorry I don't know local_manifest....
I see the https://github.com/TeamBAKED/platform_manifest where I read instructions about terminal strings for sync of repo.

Anyway I tryed on a VirtualBox guest and must break the sync of repo... tooooooooo long! And My pc was too busy. (11.10 or 12.04 was fine)
Now I restart on a real pc... ubuntu 12.04.

Curiosity: I would to build baked and carbon too (ville). I see the procedure are similar... especially within repo sync:
1) repo init -u https://github.com/TeamBAKED/platform_manifest.git -b jb-4.2
2) repo init -u git://github.com/CarbonDev/android.git -b jb2

I suppose, in second case too, it will build a JB 4.2? And I will have the latest build with latest changes? Kernel 3.4 or 3.0? :silly:

Sorry for the too quests! I'm so excited to build... I would like to do too many things at the same time! :victory:

You need to make a local_manifest folder in the .repo folder thats hidden in the baked folder and then put what I put in a local_manifest.xml.

I can't comment on carbon but willing to bet you need local_manifest to work but @$droyd$ should know what you need to know to build that.

If done right then both roms will be on JB 4.2.2 and 3.4 kernel.
 
  • Like
Reactions: PippoX3

PippoX3

Senior Member
Aug 12, 2010
1,472
3,198
TN - Italy
aokp.co
You need to make a local_manifest folder in the .repo folder thats hidden in the baked folder and then put what I put in a local_manifest.xml.

I can't comment on carbon but willing to bet you need local_manifest to work but @$droyd$ should know what you need to know to build that.

If done right then both roms will be on JB 4.2.2 and 3.4 kernel.

Thanks DarkNites. With this: "http://wiki.cyanogenmod.org/w/Doc:_Using_local_manifests" is a little more clear. :p
In the meanwhile I'm preparing a new ubuntu to re-sync repo. And after will see... a step at time... I hope! :D

PS. Carbon is no more under droyd's attentions... anyway I will ask him, when will be... thanks!
 

Darknites

Senior Member
Jul 2, 2011
6,264
2,528
Thanks DarkNites. With this: "http://wiki.cyanogenmod.org/w/Doc:_Using_local_manifests" is a little more clear. :p
In the meanwhile I'm preparing a new ubuntu to re-sync repo. And after will see... a step at time... I hope! :D

PS. Carbon is no more under droyd's attentions... anyway I will ask him, when will be... thanks!

Lol ya I'm not that good at explain stuff like that but it makes sense to me lol.

Ya but he will know whats needed to get a working build unless Ville is on there already.
 
  • Like
Reactions: $droyd$ and PippoX3

Top Liked Posts

  • There are no posts matching your filters.
  • 46
    How to compile your own Baked ROM (jb-4.2 branch)



    I have decided to create a guide on how to build your own Baked Blackbean ROM for the HTC One S. I will make this as simple as possible, so even people with no previous knowledge of Linux can follow this tutorial successfully. The ROMs that you compile are for your personal use only...please do not share or post them to show courtesy to TeamBaked. If you have any questions or have any trouble during any part of this tutorial, feel free to post them and I will try to get you sorted out.

    I've tried to make this guide as comprehensive as possible, explaining what each step does. It should be fairly thorough and easy enough for anyone with a bit of patience to build.


    Requirements:
    • patience (this is the most important)
    • Ubuntu 12.04 64bit, dual-booted or virtual machine
    • some space on your Ubuntu partition, I'd say about 50GB to be very safe
    • an internet connection


    Step 1: Setting up your environment
    1) You need to install the required packages for compiling AOSP. Open up a terminal, and type this in:
    Code:
    sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jre openjdk-6-jdk pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-4.5-multilib g++-4.5-multilib libxml2-utils libxml2 xsltproc
    Lastly:
    Code:
    sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so



    OPTIONAL STEPS (Good if you want to do more Android development in the future)

    Let's configure our USB access.
    Code:
    gksudo gedit /etc/udev/rules.d/51-android.rules
    A text editor should pop up with a blank file. Copy and paste this to the file:
    Code:
    #Acer
    SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
    
    #ASUS
    SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
    
    #Dell
    SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
    
    #Foxconn
    SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
    
    #Garmin-Asus
    SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
    
    #Google
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
    
    #HTC
    SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
    
    #Huawei
    SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
    
    #K-Touch
    SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
    
    #KT Tech
    SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
    
    #Kyocera
    SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
    
    #Lenevo
    SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
    
    #LG
    SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
    
    #Motorola
    SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
    
    #NEC
    SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
    
    #Nook
    SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
    
    #Nvidia
    SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
    
    #OTGV
    SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
    
    #Pantech
    SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
    
    #Philips
    SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
    
    #PMC-Sierra
    SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
    
    #Qualcomm
    SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
    
    #SK Telesys
    SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
    
    #Samsung
    SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
    
    #Sharp
    SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
    
    #Sony Ericsson
    SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
    
    #Toshiba
    SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
    
    #ZTE
    SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
    Save and close the file. Now do this to change its permissions:
    Code:
    sudo chmod a+r /etc/udev/rules.d/51-android.rules



    2) Now we will need to download the Android SDK and set it up properly.
    • Download the SDK here: http://developer.android.com/sdk/index.html
    • Extract the archive to your home directory and name it android-sdk
    • In your home folder, press CTRL + H to show hidden files.
    • Open up your .bashrc and paste this at the end:
      Code:
      # Android tools
      export PATH=${PATH}:~/android-sdk/tools
      export PATH=${PATH}:~/android-sdk/platform-tools
      export PATH=${PATH}:~/bin
    • Open .profile and put this at the end as well:
      Code:
      PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"
    • The SDK has now been setup properly. You can type
      Code:
      android
      in terminal to bring up the SDK menu and install tools/packages if you want.



    Step 2: Getting the source downloaded
    1) Installing repo and syncing the repository.
    Open a new terminal window and type this in:
    Code:
     mkdir ~/bin
    PATH=~/bin:$PATH
    curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
    chmod a+x ~/bin/repo

    Now let's initialize the Baked repo. I am creating a folder name "baked" which is where I will download the source to.
    Code:
    mkdir baked
    cd baked
    repo init -u https://github.com/TeamBAKED/platform_manifest.git -b jb-4.2
    Let's download the source.
    Code:
    repo sync -j#
    The '#' refers to how many simultaneous jobs you want. I usually do -j16 since I have fast fiber-optic internet, so my command would be "repo sync -j16".
    Now the source is downloading. You can leave your computer alone until it is done.



    Step 3: Adding in configurations for ville.

    This step is NOT needed anymore, because the One S has been merged into official BAKED. Skip ahead to step 4! :victory:

    Because TeamBaked doesn't officially support the One S, we will have to add in the parts for ville manually and ensure buildability. I have pre-made everything, so there is really nothing you need to do on your part. You just need to download the parts and place them in their correct directories.

    1) We need to first add a local_manifest.xml so we can integrate the projects needed for ville during repo sync. Luckily, I have already prepared one. :) In baked/.repo/ create a file named "local_manifest.xml", and paste this in:
    Code:

    Save and close. Then do another
    Code:
    repo sync -j#
    so we can now fetch the additional ville-related parts. The manifest tracks the CM10.1 repos for the kernel and msm8960 common stuff, but the device tree that it tracks is from my Github because I have modified it for the Baked ROM. I'll try and keep it as updated as the CM10.1 device tree as development continues.



    2) Now we need another config file, which tells the build system what to execute and which device-specific parameters to be set. Go into baked/vendor/baked/products/ and create a file named "ville.mk". Paste this in:
    Code:
    # Inherit AOSP device configuration for ville.
    $(call inherit-product, device/htc/ville/device_ville.mk)
    
    # Inherit common product files.
    $(call inherit-product, vendor/baked/configs/common.mk)
    
    # Inherit GSM common stuff
    $(call inherit-product, vendor/baked/configs/gsm.mk)
    
    # Setup device specific product configuration.
    PRODUCT_NAME := baked_ville
    PRODUCT_BRAND := HTC
    PRODUCT_DEVICE := ville
    PRODUCT_MODEL := HTC One S
    PRODUCT_MANUFACTURER := HTC
    
    PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=htc_ville BUILD_FINGERPRINT=tmous/ville/ville:4.0.4/IMM76D/96068.7:user/release-keys PRIVATE_BUILD_DESC="=2.35.531.7 CL96068 release-keys" BUILD_NUMBER=96068
    
    # bootanimation
    PRODUCT_COPY_FILES += \
    vendor/baked/prebuilt/bootanimation/bootanimation_540_960.zip:system/media/bootanimation.zip
    Now open up AndroidProducts.mk. We need to tell it to call the configuration file that you just created. Add in
    Code:
    $(LOCAL_DIR)/ville.mk \
    right after vibrantmtd. So the whole file should look something like this (at the time of writing, YMMV):
    Code:
    PRODUCT_MAKEFILES := \
        $(LOCAL_DIR)/captivatemtd.mk \
        $(LOCAL_DIR)/crespo.mk \
        $(LOCAL_DIR)/crespo4g.mk \
        $(LOCAL_DIR)/d2att.mk \
        $(LOCAL_DIR)/d2mtr.mk \
        $(LOCAL_DIR)/d2spr.mk \
        $(LOCAL_DIR)/d2tmo.mk \
        $(LOCAL_DIR)/d2usc.mk \
        $(LOCAL_DIR)/d2vzw.mk \
        $(LOCAL_DIR)/endeavoru.mk \
        $(LOCAL_DIR)/fascinatemtd.mk \
        $(LOCAL_DIR)/galaxysmtd.mk \
        $(LOCAL_DIR)/i9300.mk \
        $(LOCAL_DIR)/grouper.mk \
        $(LOCAL_DIR)/maguro.mk \
        $(LOCAL_DIR)/mako.mk \
        $(LOCAL_DIR)/manta.mk \
        $(LOCAL_DIR)/mesmerizemtd.mk \
        $(LOCAL_DIR)/p3113.mk \
        $(LOCAL_DIR)/p5wifi.mk \
        $(LOCAL_DIR)/toro.mk \
        $(LOCAL_DIR)/tf201.mk \
        $(LOCAL_DIR)/tf300t.mk \
        $(LOCAL_DIR)/tf700t.mk \
        $(LOCAL_DIR)/toroplus.mk \
        $(LOCAL_DIR)/showcasemtd.mk \
        $(LOCAL_DIR)/stingray.mk \
        $(LOCAL_DIR)/vibrantmtd.mk \
        [COLOR="Red"][B]$(LOCAL_DIR)/ville.mk \[/B][/COLOR]
        $(LOCAL_DIR)/wingray.mk



    Step 4: Actually building. FInally!

    1) Open a terminal, and navigate to the baked/ directory.
    2) Type this:
    Code:
    cp external/kernel-headers/original/sound/asound.h prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/sysroot/usr/include/sound/
    You will run into errors if you don't copy over that kernel header. AOSP Jelly Bean glibc sysroot seems to include an asound.h that relies on uint32t which isn't (normally) defined.

    3) Type:
    Code:
    . build/envsetup.sh
    lunch
    4) You will be brought up with a menu that looks something like this:
    Code:
    You're building on Linux
    
    Lunch menu... pick a combo:
         1. mini_armv7a_neon-userdebug
         2. mini_armv7a-userdebug
         [B][COLOR="Red"]3. baked_ville-userdebug[/COLOR][/B]
         4. full_panda-userdebug
         5. baked_toro-userdebug
         6. baked_maguro-userdebug
         7. baked_mako-userdebug
         8. baked_manta-userdebug
         9. baked_toroplus-userdebug
         10. baked_crespo-userdebug
         11. baked_crespo4g-userdebug
         12. baked_grouper-userdebug
         13. baked_captivatemtd-userdebug
         14. baked_d2att-userdebug
         15. baked_d2mtr-userdebug
         16. baked_d2spr-userdebug
         17. baked_d2tmo-userdebug
         18. baked_d2usc-userdebug
         19. baked_d2vzw-userdebug
         20. baked_endeavoru-userdebug
         21. baked_fascinatemtd-userdebug
         22. baked_galaxysmtd-userdebug
         23. baked_i9300-userdebug
         24. baked_mesmerizemtd-userdebug
         25. baked_p3113-userdebug
         26. baked_p5wifi-userdebug
         27. baked_showcasemtd-userdebug
         28. baked_stingray-userdebug
         29. baked_tf201-userdebug
         30. baked_tf300t-userdebug
         31. baked_tf700t-userdebug
         32. baked_vibrantmtd-userdebug
         33. baked_wingray-userdebug
    
    Which would you like? [full-eng]
    See that baked_ville-userdebug is at number 3. So type in '3' or whatever the corresponding number is.

    4) Now wait a minute or two (depending on how fast your computer is) as it calls the makefiles and sets up your build system.

    5) When the 'lunch' has finished, you should see something like this:
    Code:
    ============================================
    PLATFORM_VERSION_CODENAME=REL
    PLATFORM_VERSION=4.2.1
    TARGET_PRODUCT=baked_ville
    TARGET_BUILD_VARIANT=userdebug
    TARGET_BUILD_TYPE=release
    TARGET_BUILD_APPS=
    TARGET_ARCH=arm
    TARGET_ARCH_VARIANT=armv7-a-neon
    HOST_ARCH=x86
    HOST_OS=linux
    HOST_OS_EXTRA=Linux-3.5.3-gentoo-x86_64-Intel-R-_Core-TM-_i7-3930K_CPU_@_3.20GHz-with-gentoo-2.1
    HOST_BUILD_TYPE=release
    BUILD_ID=JOP40D
    OUT_DIR=/home/klin1344/baked/out
    ============================================

    Now type in
    Code:
    mka bacon -j#
    and the build process will begin! Again, here the -j# is an option on how many simultaneous jobs you want. It's common to use a number between 1 and 2 times the number of hardware threads on the computer being used for the build.

    5) When the build is done, you should get a package in baked/out/target/product/ville/.

    6) Flash and enjoy!!



    Updating / Re-building
    Always do a full clean when you want to update your build.

    1) Clean out the previous build(s).
    Code:
    rm -rf out

    2) Sync up the repo to get the latest changes.
    Code:
    repo sync -j#

    3) Follow the tutorial again starting from Step 4.
    10
    I just ran a repo sync and noticed that it is now showing



    Does this mean we no longer have to do Step 3 from the OP?

    Yes, ville has been added to the team baked repository. I have sent builds to beta testers, noe waiting for feedback from all of them. Once I make sure everything is fine the one s will have official baked builds. :)

    Sent from my SGH-T999 using Tapatalk 2
    9
    Troubleshooting

    Troubleshooting

    Coming soon.
    8
    Thank you for your donation even though I didn't directly get donated to. But just a question why would you donate in the first place, for hopes we would include your device? Or to help keep our ROM alive regardless?

    Sent from my Nexus S 4G using Xparent Green Tapatalk 2

    Hey guys I wanted to step in here real quick and make comment to hopefully get this post back on topic. TeamBAKED has no issues with anyone building from our source and I we actually think this tutorial is great. I urge people to learn to compile for their devices, hopefully you get hooked and want to help fix issues you find.

    That being said, the only thing we asked was that since we hadn't release BB7 yet we requested that others also did not release it (unofficially or not). The OP was respecting our request and even asked in this thread to not distribute your build. We greatly appreciate that. We have no problems with unofficial builds, this is open source after all have fun, the only thing we'd request is to no release before we do. Anyone who wants to build or learn to build, drop in our irc channel on freenode, #teamBAKED we are more than happy to help. We are actually in the process of ramping up more devices an if klin is interested in doing official builds please drop in, we are looking for device maintainers. We'd love to get this official.

    Someone asked how do we decide what devices, it mostly boils down to what devices do we have that we can test on. If we don't have the device, we won't release for it unless we find a maintainer who has the device and wants to build it officially. If you are interested in officially maintain something hop on irc and ask for myself or travp we will talk things over with you.

    Hopefully this helps clear things up and gets things back on track. Enjoy.
    8
    Guide is finished and up! If you guys run into ANY errors, feel free to post in the thread and I'll do my best to help you out. Happy building!