Help with ubuntu vm for cm7 - Nook Color Q&A, Help & Troubleshooting

I have jdk installed. Working on sdk. When I run android from tools I get command not found. I think the problem is I have to add platforms dir to path. Can somebody please tell me how, or if u think the problem is something else then what? Thanks everyone.

main problem is 32-bit adb playing nice in 64-bit linux install. general issue discussed here: https://help.ubuntu.com/community/32bit_and_64bit
i would try using getlibs to install required 32-bit library files and dependencies, follow instructions here, except you use "getlibs adb" in the "platform-tools" directory, should get something like this:
Code:
The following extra packages will be installed:
lib32asound2 lib32bz2-1.0 lib32gcc1 lib32ncurses5 lib32ncursesw5
lib32stdc++6 lib32v4l-0 lib32z1 libc6-i386
Suggested packages:
lib32asound2-plugins
The following NEW packages will be installed:
ia32-libs lib32asound2 lib32bz2-1.0 lib32gcc1 lib32ncurses5 lib32ncursesw5
lib32stdc++6 lib32v4l-0 lib32z1 libc6-i386
otherwise set your path environment variables like here, and set up udev for nook color per instructions here.
it's a real PITA, worse comes to worse use whatever adb you have working to get the propietary files and move it into your linux install and move on with the build.
hth

MedLine said:
main problem is 32-bit adb playing nice in 64-bit linux install. general issue discussed here: https://help.ubuntu.com/community/32bit_and_64bit
i would try using getlibs to install required 32-bit library files and dependencies, follow instructions here, except you use "getlibs adb" in the "platform-tools" directory, should get something like this:
Code:
The following extra packages will be installed:
lib32asound2 lib32bz2-1.0 lib32gcc1 lib32ncurses5 lib32ncursesw5
lib32stdc++6 lib32v4l-0 lib32z1 libc6-i386
Suggested packages:
lib32asound2-plugins
The following NEW packages will be installed:
ia32-libs lib32asound2 lib32bz2-1.0 lib32gcc1 lib32ncurses5 lib32ncursesw5
lib32stdc++6 lib32v4l-0 lib32z1 libc6-i386
otherwise set your path environment variables like here, and set up udev for nook color per instructions here.
it's a real PITA, worse comes to worse use whatever adb you have working to get the propietary files and move it into your linux install and move on with the build.
hth
Click to expand...
Click to collapse
I don't have a platforms-tools directory. I skipped the install of eclipse because it said it was optional. I'm trying to install it now. When i tyoe getlibs aapt.from the tools directory like the articles says, all I get r the syntax command options.

newellj79 said:
I don't have a platforms-tools directory. I skipped the install of eclipse because it said it was optional. I'm trying to install it now. When i tyoe getlibs aapt.from the tools directory like the articles says, all I get r the syntax command options.
Click to expand...
Click to collapse
When you install adb, you should see ~/android-sdk-linux_x86/platform-tools/. I added the following line to ~/.profile to place it (and ~/bin) in my $PATH:
PATH=$HOME/android-sdk-linux_x86/platform-tools:$HOME/bin:$PATH

bigbob23 said:
When you install adb, you should see ~/android-sdk-linux_x86/platform-tools/. I added the following line to ~/.profile to place it (and ~/bin) in my $PATH:
PATH=$HOME/android-sdk-linux_x86/platform-tools:$HOME/bin:$PATH
Click to expand...
Click to collapse
Ok. Ill try to press on and figure how to get adb installed. Hopefully after I get that installed I can run getlibs which my understanding is will allow me to then run android from /tools.
Edit.. back to original problem. I can't install adb because I can't run sdk. When i type android
in /tools I get command not found. I can't run getlibs on the platforms-tools directory becuz it doesn't exist, and getlibs aapt in /tools as suggested in the referenced link does nothing but show getlibs help. Grrr. What am I missing!!!

newellj79 said:
Ok. Ill try to press on and figure how to get adb installed. Hopefully after I get that installed I can run getlibs which my understanding is will allow me to then run android from /tools.
Click to expand...
Click to collapse
Where the instructions http://wiki.cyanogenmod.com/wiki/Howto:_Install_the_Android_SDK say to install ADB, you are really installing the SDK. This includes ~/android-sdk-linux_x86/tools.

bigbob23 said:
Where the instructions http://wiki.cyanogenmod.com/wiki/Howto:_Install_the_Android_SDK say to install ADB, you are really installing the SDK. This includes ~/android-sdk-linux_x86/tools.
Click to expand...
Click to collapse
****. Thank you! I was typing android not ./android. My apologies! Please disregard all above posted problems

edit... my mistake

Ok, hopefully this is the last bit of help I need. I successfully made it to the configue build and compile. I get /bin/bash: bison: command not found, a bunch of times, i get 64-bit build environment is needed beyond froyo and I'm in 32, then i get a whole lot of no file or directory. I'm going to try and paste the output here, this is after all the "including"s. thanks
/bin/bash: bison: command not found
/bin/bash: bison: command not found
/bin/bash: bison: command not found
/bin/bash: bison: command not found
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.4
TARGET_PRODUCT=cyanogen_encore
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================
/bin/bash: bison: command not found
The program 'schedtool' is currently not installed. You can install it by typing:
sudo apt-get install schedtool
[email protected]:~/android/system$ sudo apt-get install schedtool
[sudo] password for newellj79:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-2.6.38-8 linux-headers-2.6.38-8-generic
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
schedtool
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 24.7 kB of archives.
After this operation, 86.0 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ natty/universe schedtool i386 1.3.0-1 [24.7 kB]
Fetched 24.7 kB in 0s (36.4 kB/s)
Selecting previously deselected package schedtool.
(Reading database ... 161913 files and directories currently installed.)
Unpacking schedtool (from .../schedtool_1.3.0-1_i386.deb) ...
Processing triggers for man-db ...
Setting up schedtool (1.3.0-1) ...
[email protected]:~/android/system$ . build/envsetup.sh && brunch encore
including device/advent/vega/vendorsetup.sh
including device/bn/encore/vendorsetup.sh
including device/geeksphone/one/vendorsetup.sh
including device/htc/ace/vendorsetup.sh
including device/htc/bravoc/vendorsetup.sh
including device/htc/bravo/vendorsetup.sh
including device/htc/buzz/vendorsetup.sh
including device/htc/click/vendorsetup.sh
including device/htc/desirec/vendorsetup.sh
including device/htc/dream_sapphire/vendorsetup.sh
including device/htc/espresso/vendorsetup.sh
including device/htc/glacier/vendorsetup.sh
including device/htc/heroc/vendorsetup.sh
including device/htc/hero/vendorsetup.sh
including device/htc/inc/vendorsetup.sh
including device/htc/legend/vendorsetup.sh
including device/htc/leo/vendorsetup.sh
including device/htc/liberty/vendorsetup.sh
including device/htc/mecha/vendorsetup.sh
including device/htc/passion/vendorsetup.sh
including device/htc/speedy/vendorsetup.sh
including device/htc/supersonic/vendorsetup.sh
including device/htc/vision/vendorsetup.sh
including device/htc/vivo/vendorsetup.sh
including device/htc/vivow/vendorsetup.sh
including device/huawei/u8220/vendorsetup.sh
including device/lge/p999/vendorsetup.sh
including device/lge/thunderg/vendorsetup.sh
including device/malata/smb_a1002/vendorsetup.sh
including device/malata/smb_b9701/vendorsetup.sh
including device/motorola/droid2/vendorsetup.sh
including device/motorola/jordan/vendorsetup.sh
including device/motorola/morrison/vendorsetup.sh
including device/motorola/shadow/vendorsetup.sh
including device/motorola/sholes/vendorsetup.sh
including device/motorola/zeppelin/vendorsetup.sh
including device/samsung/captivatemtd/vendorsetup.sh
including device/samsung/crespo4g/vendorsetup.sh
including device/samsung/crespo/vendorsetup.sh
including device/samsung/fascinatemtd/vendorsetup.sh
including device/samsung/galaxys2/vendorsetup.sh
including device/samsung/galaxysmtd/vendorsetup.sh
including device/samsung/sidekick4g/vendorsetup.sh
including device/samsung/vibrantmtd/vendorsetup.sh
including device/zte/blade/vendorsetup.sh
including vendor/cyanogen/vendorsetup.sh
including vendor/cyanogen/vendorsetup.sh
/bin/bash: bison: command not found
/bin/bash: bison: command not found
/bin/bash: bison: command not found
/bin/bash: bison: command not found
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.4
TARGET_PRODUCT=cyanogen_encore
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================
/bin/bash: bison: command not found
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.4
TARGET_PRODUCT=cyanogen_encore
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================
/bin/bash: bison: command not found
Checking build tools versions...
build/core/main.mk:76: ************************************************************
build/core/main.mk:77: You are attempting to build on a 32-bit system.
build/core/main.mk:78: Only 64-bit build environments are supported beyond froyo/2.2.
build/core/main.mk:79: ************************************************************
diff: out/target/product/encore/obj/PACKAGING/updater_extensions_intermediates/register.inc.list: No such file or directory
find: `out/target/common/docs/gen': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
build/core/Makefile:21: warning: overriding commands for target `out/target/product/encore/system/etc/wifi/tiwlan.ini'
build/core/base_rules.mk:479: warning: ignoring old commands for target `out/target/product/encore/system/etc/wifi/tiwlan.ini'
build/core/Makefile:21: warning: overriding commands for target `out/target/product/encore/system/lib/hw/overlay.omap3.so'
build/core/base_rules.mk:479: warning: ignoring old commands for target `out/target/product/encore/system/lib/hw/overlay.omap3.so'
build/core/Makefile:21: warning: overriding commands for target `out/target/product/encore/system/lib/libLCML.so'
build/core/base_rules.mk:479: warning: ignoring old commands for target `out/target/product/encore/system/lib/libLCML.so'
build/core/Makefile:21: warning: overriding commands for target `out/target/product/encore/system/lib/libbridge.so'
build/core/base_rules.mk:479: warning: ignoring old commands for target `out/target/product/encore/system/lib/libbridge.so'
build/core/Makefile:21: warning: overriding commands for target `out/target/product/encore/system/lib/libOMX.TI.Video.Decoder.so'
build/core/base_rules.mk:479: warning: ignoring old commands for target `out/target/product/encore/system/lib/libOMX.TI.Video.Decoder.so'
build/core/Makefile:21: warning: overriding commands for target `out/target/product/encore/system/lib/libOMX.TI.AAC.encode.so'
build/core/base_rules.mk:479: warning: ignoring old commands for target `out/target/product/encore/system/lib/libOMX.TI.AAC.encode.so'
build/core/Makefile:21: warning: overriding commands for target `out/target/product/encore/system/lib/libOMX.TI.Video.encoder.so'
build/core/base_rules.mk:479: warning: ignoring old commands for target `out/target/product/encore/system/lib/libOMX.TI.Video.encoder.so'
build/core/Makefile:21: warning: overriding commands for target `out/target/product/encore/system/lib/libOMX_Core.so'
build/core/base_rules.mk:479: warning: ignoring old commands for target `out/target/product/encore/system/lib/libOMX_Core.so'
build/core/Makefile:21: warning: overriding commands for target `out/target/product/encore/system/lib/libOMX.TI.WBAMR.encode.so'
build/core/base_rules.mk:479: warning: ignoring old commands for target `out/target/product/encore/system/lib/libOMX.TI.WBAMR.encode.so'
build/core/Makefile:21: warning: overriding commands for target `out/target/product/encore/system/lib/libOMX.TI.AMR.encode.so'
build/core/base_rules.mk:479: warning: ignoring old commands for target `out/target/product/encore/system/lib/libOMX.TI.AMR.encode.so'
build/core/Makefile:21: warning: overriding commands for target `out/target/product/encore/system/lib/egl/libGLES_android.so'
build/core/base_rules.mk:479: warning: ignoring old commands for target `out/target/product/encore/system/lib/egl/libGLES_android.so'
No private recovery resources for TARGET_DEVICE encore
Header: out/host/linux-x86/obj/include/libexpat/expat.h
Header: out/host/linux-x86/obj/include/libexpat/expat_external.h
Header: out/target/product/encore/obj/include/libexpat/expat.h
Header: out/target/product/encore/obj/include/libexpat/expat_external.h
Header: out/host/linux-x86/obj/include/libpng/png.h
Header: out/host/linux-x86/obj/include/libpng/pngconf.h
Header: out/host/linux-x86/obj/include/libpng/pngusr.h
Header: out/target/product/encore/obj/include/libpng/png.h
Header: out/target/product/encore/obj/include/libpng/pngconf.h
Header: out/target/product/encore/obj/include/libpng/pngusr.h
Header: out/target/product/encore/obj/include/libsonivox/eas.h
Header: out/target/product/encore/obj/include/libsonivox/eas_types.h
Header: out/target/product/encore/obj/include/libsonivox/eas_reverb.h
Header: out/target/product/encore/obj/include/libsonivox/jet.h
Header: out/target/product/encore/obj/include/libsonivox/ARM_synth_constants_gnu.inc
Header: out/target/product/encore/obj/include/libwpa_client/wpa_ctrl.h
host C: mkimage <= system/extras/mkimage/mkimage.c
host C: mkimage <= system/extras/mkimage/crc32.c
system/extras/mkimage/crc32.c:11:18: fatal error: zlib.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/EXECUTABLES/mkimage_intermediates/crc32.o] Error 1
[email protected]:~/android/system$

newellj79 said:
Ok, hopefully this is the last bit of help I need. I successfully made it to the configue build and compile. I get /bin/bash: bison: command not found, a bunch of times, i get 64-bit build environment is needed beyond froyo and I'm in 32, then i get a whole lot of no file or directory. I'm going to try and paste the output here, this is after all the "including"s. thanks
/bin/bash: bison: command not found
system/extras/mkimage/crc32.c:11:18: fatal error: zlib.h: No such file or directory
Click to expand...
Click to collapse
Try 'sudo apt-get install bison zlib1g-dev'

brahahahahaha
you need 64-bit UBuntu: http://groups.google.com/group/android-building/browse_thread/thread/852d63ab6124c87e?pli=1
actually it's not funny because i did the same thing. cloned the entire cm7 gingerbread branch and the whole shebang in Ubuntu 32-bit only to find in the end that Ubuntu 64-bit required.
basically you have to start over. after installing Ubuntu 64-bit, you may run into trouble setting up adb, do yourself a favor and zip up the propietary files you already pulled, just in case, otherwise you're basically there.
good luck.

MedLine said:
brahahahahaha
you need 64-bit UBuntu: http://groups.google.com/group/android-building/browse_thread/thread/852d63ab6124c87e?pli=1
actually it's not funny because i did the same thing. cloned the entire cm7 gingerbread branch and the whole shebang in Ubuntu 32-bit only to find in the end that Ubuntu 64-bit required.
basically you have to start over. after installing Ubuntu 64-bit, you may run into trouble setting up adb, do yourself a favor and zip up the propietary files you already pulled, just in case, otherwise you're basically there.
good luck.
Click to expand...
Click to collapse
Golly. Thank you all kind sirs. I had such problems getting adb to work right I hope I can getit going again. Downloading now.

Any ideas here. Im using vmware which says it supports 32 and 64bit installs. I downloaded Ubuntu 64bit. When I try to make a new vm it says my system does not support 64bit. Please help. (All under 64bit windows 7)

got me on that one. my set up as well, Ubuntu 11.04 (64-bit) in VMWare Workstation 7 on a Windows 7 SP1 (64-bit). downloaded "ubuntu-11.04-desktop-amd64.iso" and VMWare went straight to "Easy Install" and did everything by itself.
sounds like you got pretty far with the build. except for setting up adb, should be smooth sailing once you get the VMWare issue sorted out. to build you really only need adb to run extract-files.sh. if you did this you already have the proprietary files in "/system/vendor/bn/encore/proprietary". for time being you can always zip that up and copy to Ubuntu 64-bit install, if adb proves impossible.

MedLine said:
got me on that one. my set up as well, Ubuntu 11.04 (64-bit) in VMWare Workstation 7 on a Windows 7 SP1 (64-bit). downloaded "ubuntu-11.04-desktop-amd64.iso" and VMWare went straight to "Easy Install" and did everything by itself.
sounds like you got pretty far with the build. except for setting up adb, should be smooth sailing once you get the VMWare issue sorted out. to build you really only need adb to run extract-files.sh. if you did this you already have the proprietary files in "/system/vendor/bn/encore/proprietary". for time being you can always zip that up and copy to Ubuntu 64-bit install, if adb proves impossible.
Click to expand...
Click to collapse
Ill see what I can do tommorrow after work. I've heard of maybe of maybe using wubi too. But I really liked the vmware setup.

I got Ubuntu 64 bit installed using wubi. I think something went wrong with jdk install. When I run. /android it says Java not found. I am suppose to use the ...64 jdk right? N e ways can someone please tell me how to uninstall jdk so I can reinstall it? When I just try to install again it says something to the effect of directory already exists. Thanks again!!
Edit... a Google search shows i just need to delete the directory. So ill do that and try reinstalling it later tonight.

if ./android didn't run script you probably don't have jdk installed.
easiest way to install jdk in Ubuntu 11.04 is use Synaptic Package Manager:
1. System > Administration > Synaptic Package Manager
2. Settings > Repositories > Other Software
3. Check "Canonical Partners" > Close > Reload
4. Quick Filter > type "sun-java6-jdk"
5. Right click sun-java6-jdk > Mark for Installation
6. Apply

MedLine said:
if ./android didn't run script you probably don't have jdk installed.
easiest way to install jdk in Ubuntu 11.04 is use Synaptic Package Manager:
1. System > Administration > Synaptic Package Manager
2. Settings > Repositories > Other Software
3. Check "Canonical Partners" > Close > Reload
4. Quick Filter > type "sun-java6-jdk"
5. Right click sun-java6-jdk > Mark for Installation
6. Apply
Click to expand...
Click to collapse
Awesome. Will try. Family reunion this weekend so I wont get much done untilled Sunday night or Monday. But please stick around.

Back from vaca and need help. I got 64 bit ubuntu setup. ADB and sdk running. When i get to repo init in the cm7 compile guide i get the following error. Please help...
[email protected]:~$ cd ~/android/system/
[email protected]:~/android/system$ repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
Traceback (most recent call last):
File "/home/newellj79/bin/repo", line 603, in <module>
main(sys.argv[1:])
File "/home/newellj79/bin/repo", line 570, in main
_Init(args)
File "/home/newellj79/bin/repo", line 184, in _Init
_CheckGitVersion()
File "/home/newellj79/bin/repo", line 213, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 672, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1213, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
[email protected]:~/android/system$
edit... figured it out. i had to use synapatic to install the listed libraries. duh... i could not find sun-java6-jdk though. I did add the partner repository line as stated. anyways i'm running repo sync right now. will see what happens..

one of the packages didn't get installed, just redo it:
Code:
sudo apt-get installgit-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
cm7 repo should then initialize properly

Related

[TUTORIAL ] Beginning development-the easy way

Ok so this is a guide that me and my friend made for compiling ROMs for our LG-P350 Now, this is pretty much universal and can be used for general development
This is the stuff you will need :
Ubuntu-can be found on the Ubuntu website http://www.ubuntu.com/start-download?distro=desktop&bits=64&release=lts (this is a direct link to the Ubuntu 12.04 64-bit version)
Python (included)
GNU Make
Java Development Kit (JDK) 6
Git
Before you can do anything you need to install Ubuntu. You can go with newer versions but i still think that 10.10 is best and this guide is adapted to it. You can install it like dual boot or use Wubi (Windows Ubuntu Installer). However if you choose Wubi there is a good chance that you won't have enough storage, so that's not recommended.Those who want to dual-boot check out this post http://forum.xda-developers.com/showpost.php?p=34669858&postcount=26
NOTE: You can do this in a virtual machine (for example VM Ware and Virtual box) but it will be a lot slower unless you have a VERY strong CPU and a LOT of RAM.
Generally Python is not needed since it's already in Ubuntu. However if you want to install it separately here's how:
First of all open the terminal. Now copy/paste these codes (one by one) and execute them:
Code:
sudo apt-get install build-essential gcc
cd Downloads
wget http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz
tar -xvzf Python-2.5.6.tgz
cd Python-2.5.6
./configure --prefix=/usr/local/python2.5
make
make test
sudo make install ([B]NOTE[/B]: [I]You will be asked for your password, enter it and press enter[/I])
sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5
Now you need Sun JDK 6. Same procedure as with Python:
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
For those who get package error try these:
Code:
sudo add-apt-repository ppa:sun-java-community-team/sun-java6
sudo apt-get update
sudo apt-get install sun-java6-jdk
sudo update-java-alternatives -s java6-jdk
Now that JDK is installed it's time for GNU Make:
First of all download GNU Make from link given. Download version 3.82
Now extract the downloaded file to your Home directory.
Go to Home directory and change the name of GNU Make To make
Now open the Terminal and type the following codes
Link: http://ftp.gnu.org/gnu/make/
Code:
cd make
./configure
sudo make install
Now make is installed.
Next, we are going to install the dependencies:
FOR UBUNTU 10.10
Codes to type in terminal :
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \ x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \ libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \ libxml2-utils xsltproc
export USE_CCACHE=1
If that method didn't work then try this:
You use the same commands BUT the first one is:
sudo apt-get install git-core gnupg flex bison gperf build-essential
Now it should download some stuff. When its done you need to do the same for the rest in the right order.
NOTE: Since I don't remember the right order i will just put the commands how they should be written if you get error read what's missing and put that in first.
Here are the rest of the lines:
Code:
sudo apt-get install zip curl
sudo apt-get install zlib1g-dev
sudo apt-get install libc6-dev
sudo apt-get install lib32ncurses5-dev
sudo apt-get install ia32-libs
sudo apt-get install x11proto-core-dev
sudo apt-get install libx11-dev
sudo apt-get install lib32readline5-dev
sudo apt-get install lib32z-dev
sudo apt-get install libgl1-mesa-dev g++-multilib
sudo apt-get install mingw32
sudo apt-get install tofrodos python-markdown
sudo apt-get install libxml2-utils
sudo apt-get install xsltproc
FOR UBUNTU 12.04
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 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Now for the Android SDK, ADB and ADB path:
1. SDK (Software-Development-Kit) :
Go to this link and download the Android SDK for Linux:
http://developer.android.com/sdk/index.html
After downloading it, extract it to the Home folder. You can probably extract where you want and change all the steps below to to fit your set up, but I like putting it in Home folder.
When you have extracted it in the Home folder change the name of the folder of android-sdk-linux to sdk.
Then open the Terminal and run these codes:
Code:
cd ~/sdk/tools/
./android sdk
When you run this, a window will pop up. For this you only need "Android SDK Tools" and "Android SDK Platform-tools". Just check these two and install them.
2. ADB (Android-Debug-Bridge):
Run this command to see if your ADB works. You have to have your android device connected in debugging mode.
Run these codes in the Terminal :
Code:
cd ~/sdk/platform-tools ./adb devices
When you entered the codes above, you should see something similar to this:
List of devices attached 0123456789ABCDEF device
NOTE: If you see output like given bellow we need to give the device permissions. Don't worry I had this too when I set my computer up for the first time.
List of devices attached ???????????? no permissions
Here is how we fix it:
Open the Terminal and type this:
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
After you've entered it, a window will pop up that will be blank. Now add the following commands and save it.
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
Now save this File And follow the given codes
After you've entered those codes type these codes in too.
Code:
sudo service udev restart
sudo adb kill-server
sudo adb start-server
After you've entered those codes, restart Ubuntu.
Now to see if the problem is solved type these codes in:
Code:
cd ~/sdk/platform-tools ./adb devices
If everything is ok a output similar to this will be shown:
List of devices attached 0123456789ABCDEF device
Now to add the ADB path to system, so you don't have to cd to the SDK folder every time you want to use ADB:
So, first open up .bashrc with these codes:
Code:
sudo gedit ~/.bashrc
A window will pop up and there will be some text there. Scroll down to the bottom and add these lines:
Code:
export PATH=${PATH}:~/sdk/tools
export PATH=${PATH}:~/sdk/platform-tools
After you've done that, save it and reboot Ubuntu.
If everything is ok, you will get some output when you type the following codes in the terminal.
Code:
./adb devices
OR
Code:
adb shell
If you see:
Code:
adb not found[CODE]
Then it means you've done something wrong and ADB is not configured.
Next is GIT:
Open the browser and download git from given link
[URL]http://git-core.googlecode.com/files/git-1.7.9.6.tar.gz[/URL]
Extract GIT-1.7.9.6.tar.gz to your home directory
Rename the folder you extracted to from GIT-1.7.9.6.tar.gz to git
After you've done that, enter the following codes in the Terminal
[CODE]sudo aptitude build-dep git-core
sudo apt-get install zlib1g-dev
cd git
./configure
make
sudo make install
NOTE: If it doesn't work then install from this link:
http://kibyegon.wordpress.com/2010/0...u-lucid-10-04/
If the commands from above are not working then try this:
Code:
sudo apt-get install git-core
sudo apt-get install git
git
If it worked it should show this:
Code:
usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]
[-p|--paginate|--no-pager] [--no-replace-objects]
[--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]
[--help] COMMAND [ARGS]
The most commonly used git commands are:
add Add file contents to the index
bisect Find by binary search the change that introduced a bug
branch List, create, or delete branches
checkout Checkout a branch or paths to the working tree
clone Clone a repository into a new directory
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
fetch Download objects and refs from another repository
grep Print lines matching a pattern
init Create an empty git repository or reinitialize an existing one
log Show commit logs
merge Join two or more development histories together
mv Move or rename a file, a directory, or a symlink
pull Fetch from and merge with another repository or a local branch
push Update remote refs along with associated objects
rebase Forward-port local commits to the updated upstream head
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
show Show various types of objects
status Show the working tree status
tag Create, list, delete or verify a tag object signed with GPG
See 'git help COMMAND' for more information on a specific command.
Now we will download the Repo and get the source code:
Codes to type in the Terminal :
Code:
mkdir ~/bin
PATH=~/bin:$PATH
sudo apt-get install curl
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
mkdir source
cd source
Ok so up to this part its mostly universal. However after this you need to sync up sources for your device. This will probably take a long time depending on your internet speed since the source is very big (also it will take up a lot of drive space: 14-30GB). After that you should build.
How to build
First you will need to get proprietary drivers from your device.
Connect your device via USB and enter the following commands (from the root of your source repository):
Code:
cd device/xxx/xxx where x is the path to your device
./extract-files.sh
cd ../../..
NOTE: Some developers can include these files in the source itself or can make them available for download from their Github page. Check that out with your developer for more info.
And start the build:
Code:
. build/envsetup.sh xxx
NOTE:Here x also varies since its unique for every device model
Now Android is building. You may need to wait a long time (depending on your hardware-mainly CPU and RAM for example I have a quad core 2.92Ghz CPU and 6GB of HyperX DDR3 ram and it took me about 10min for CM7 and about 20-30 min for CM9).Once it's done you should get this message:
Code:
Package complete:xxx.zip
That is your flashable .zip file you install from recovery.
Credits: Many thanks go to Keyur Maru who helped me learn how to develop and for making the base of this guide.
Reference: http://source.android.com/source/downloading.html
Very good tutorial for beginner
sangosnip69 said:
Very good tutorial for beginner
Click to expand...
Click to collapse
Thanks we tried our best since this is supposed to boost our dev base for our LG
Definitely one to try at home!
Sent from my GT-I9100 using xda premium
Wow 10min is real fast!! I recently tried CM9 directly from one of the Dev's forked repo and after about 4hours of build I got some build error! I need to get a better computer soon if I plan to get my hands real dirty! And if I may I have few suggestions - please mention that it will take a while to download the full repo from google sources else beginners may end up thinking something is wrong(which I did since it took me one full day to sync everything) and that it needs atleast 20-30GB disk space too..(Coz not everyone has Ubuntu as the only OS, I have three in my lapi!!)
A very good guide on the whole for a beginner!!!
pranks1989 said:
Wow 10min is real fast!! I recently tried CM9 directly from one of the Dev's forked repo and after about 4hours of build I got some build error! I need to get a better computer soon if I plan to get my hands real dirty! And if I may I have few suggestions - please mention that it will take a while to download the full repo from google sources else beginners may end up thinking something is wrong(which I did since it took me one full day to sync everything) and that it needs atleast 20-30GB disk space too..(Coz not everyone has Ubuntu as the only OS, I have three in my lapi!!)
A very good guide on the whole for a beginner!!!
Click to expand...
Click to collapse
Very true a great in depth and very informative tutorial for noobs like i was this would have helped me a lot.... Great work
btw pranks1989 i can help you with compiling for defy.... I used to compile roms from eppy's and quarx2k github and never got a error once it else onece eppy pinted out the mistake i was doing.... just send me a pm of your errors and i will try help
Great start for me!
You have been thanked!
Great start for me!
What would the procedure be if you want to create a rom that you can flash via Odin or Heimdall on a Mac client?
The guide I've been looking for ever since I had my first Android device (actually, my Optimus Me is my first Android device)...
Thanks for this great guide. I will try it today.
I already compiled a Rom, it took me 40 min. AMD 8 Core 3,1 MHz and 16 GB DDR3
But when i try a different device i always get errors, i hope your Guide will get me in to it.
serendipityguy said:
You have been thanked!
Great start for me!
What would the procedure be if you want to create a rom that you can flash via Odin or Heimdall on a Mac client?
Click to expand...
Click to collapse
I don't know but it's surely different for odin(I'm not sure that you can).And I don't know on mac either since I use ubuntu and windows. You can look up info on this on the official Android dev website.
Sent from my Optimus Me using xda premium
nerot said:
I don't know but it's surely different for odin(I'm not sure that you can).And I don't know on mac either since I use ubuntu and windows. You can look up info on this on the official Android dev website.
Sent from my Optimus Me using xda premium
Click to expand...
Click to collapse
Odlicno objasnjeno za pocetnike. Svaka cast
Good Beginners Guide. Thank you.
But 90% of it can also be found here:
http://source.android.com/source/initializing.html
This is what i used to build android for the pandaboard a few weeks ago.
And then I have a few questions.
1.
Why do you compile git when you can also download it from apt-sources? Imho this is just confusing for beginners.
2.
Where do you use git in your tutorial?
3.
Didn't you forget lunch and make at the very end of your tutorial?
". build/envsetup.sh" only sets up the environment, imho
(see also here: http://source.android.com/source/building.html)
nerot said:
First you will need to get proprietary drivers from your device.
Connect your device via USB and enter the following commands (from the root of your source repository):
Code:
cd device/xxx/xxx where x is the path to your device
./extract-files.sh
cd ../../..
Click to expand...
Click to collapse
How do I find out what the path is from my device?
I would add the option to install Ubuntu in a VM. Both VMWare player and VirtualBox are free and well supported. This way one can actually create some pre-packaged images with which one can start development right away. In fact I've already made two of them a year ago (one for Froyo and one for Gingerbread):
http://forum.xda-developers.com/showthread.php?t=881845
http://forum.xda-developers.com/showthread.php?t=1022407
One might also make on for ICS (for that Ubuntu 12.04 is also good, and since VMWare Player is free one could use that instead of VirtualBox, as VMWP has more user-friendly features)
If I had a nickle for every time I've seen a thread like this, I would have... a nickle.
Thank you from the bottom of my /dev/hda1
sztupy said:
I would add the option to install Ubuntu in a VM. Both VMWare player and VirtualBox are free and well supported. This way one can actually create some pre-packaged images with which one can start development right away. In fact I've already made two of them a year ago (one for Froyo and one for Gingerbread):
http://forum.xda-developers.com/showthread.php?t=881845
http://forum.xda-developers.com/showthread.php?t=1022407
One might also make on for ICS (for that Ubuntu 12.04 is also good, and since VMWare Player is free one could use that instead of VirtualBox, as VMWP has more user-friendly features)
Click to expand...
Click to collapse
True however unless you have a LOT of ram and a hexa-core CPU compilation under a vm is significantly slower and that's why I didn't add it.But the procedure is the same anyway.
Sent from my Optimus Me using xda premium
Gigadroid said:
How do I find out what the path is from my device?
Click to expand...
Click to collapse
Google is your friend
Sent from my Optimus Me using xda premium
TheBadFish said:
Good Beginners Guide. Thank you.
But 90% of it can also be found here:
http://source.android.com/source/initializing.html
This is what i used to build android for the pandaboard a few weeks ago.
And then I have a few questions.
1.
Why do you compile git when you can also download it from apt-sources? Imho this is just confusing for beginners.
2.
Where do you use git in your tutorial?
3.
Didn't you forget lunch and make at the very end of your tutorial?
". build/envsetup.sh" only sets up the environment, imho
(see also here: http://source.android.com/source/building.html)
Click to expand...
Click to collapse
1.Idk I found this thing simple as well
2.I will review it later since I'm on my phone now and its 00:13 here
3.I don't think it's necessary since I use the same procedure for my rom compilation. I will add it tough just in case someone gets an error.Thanks for the tip.
Sent from my Optimus Me using xda premium
I'll try this on my six core seeing as it would make a perfect devving machine.
just following
Just posting here to follow. I will have to try this tonight. This looks awesome!

[GUIDE] Create your own Ubuntu Touch Image for TF101

This guide is designed to help you compile and flash your own Ubuntu Touch builds for the Asus TF-101.
All source links located in the XDA OP: http://forum.xda-developers.com/showthread.php?t=2168473
Original Instructions and Additional Information: https://wiki.ubuntu.com/Touch/Devices/tf101
Required: Ubuntu 12.04 – 13.04 (VM should work without issue)
Required: CWM Recovery or TWRP Recovery (No version restriction that I know of)
I take no credit for creating anything other than making it easier for the community to have fun and help contribute, please see the XDA OP and thank other members who are working hard to make this happen including JHoltom and Onkel Bebu.
If you are new to Linux please read these directions carefully. I have segmented them into "Setting Up Your Development Environment", "Building The Image", "Sync Repos and Update, "Common Commands and Actions"
Please note the directory locations are important. ~/ represents your home directory. So on my box my full path is /home/thomas/Build/Images/UbuntuTouch (you do not need to include Build, Images, or UbuntuTouch. Just make sure you replace "thomas" with your username or a suitable directory location of your choice but I reccommend using "UbuntuTouch" as your main directory. I will refer to ~/UbuntuTouch and sub-directories so you understand the paths.
Setting Up Your Development Environment
1. Open Terminal and copy/paste the command below. These are the packages needed to create the build before flashing.
sudo apt-get install git gnupg flex bison gperf build-essential zip bzr 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​
2. The PPA has the tools and dependencies to support Precise, Quantal, and Raring. Add the Ubuntu Touch PPA (personal package archive) by adding the following custom source list entry to your /etc/apt/sources.list file.
2a. From Terminal, execute this command:
sudo add-apt-repository ppa: phablet-team/tools (remove space between colon and the p in phablet, if I didn't put a space it would show a smiley face instead)​
2b. (optional) If the above command does not work, you can manually edit your sources.list using an editor of your choice:
deb http://ppa.launchpad.net/phablet-team/tools/ubuntu [dist-codename] main
deb-src http://ppa.launchpad.net/phablet-team/tools/ubuntu [dist-codename] main
*Note: replace [dist-codename] with precise, quantal or raring​
3. From Terminal, execute these 2 commands:
sudo apt-get update
sudo apt-get install phablet-tools android-tools-adb android-tools-fastboot​
4. This next command is important but can be misleading. The Ubuntu Touch porting guide indicated running the command without options first. I had to use -c option to get it to work. If you are experimental do however you wish otherwise if you are new like me just stick with the first command I have listed.
4a. From Terminal, execute the following command:
phablet-dev-bootstrap -c ~/UbuntuTouch
(When prompted, enter name, no need to enter email, prompts for identity press Y if correct, choose Y for color display). This steps takes a fairly long time depending on network speed and your computer speed. It could be an hour or two.​
4b. (optional)Alternatively try this: phablet-dev-bootstrap
5. From Terminal, execute the following commands:
mkdir -p ~/UbuntuTouch/device/asus
mkdir -p ~/UbuntuTouch/kernel/asus​
6. Clone the following repositories into the directory ~/UbuntuTouch/device/asus/ and ~/UbuntuTouch/kernel/asus/ where git clone will be performed for the device and kernel git's respectively.
6a. From terminal, cd to "device" and "kernel" directories respectively to clone the repo into the right locations.
git clone https://github.com/jholtom/android_device_asus_tf101.git tf101 (this clones the git repo into ~/UbuntuTouch/device/asus/
git clone https://github.com/jholtom/kernel_asus_tf101-lumpy.git tf101 (this clones the git repo into ~/UbuntuTouch/kernel/asus/​
Building and Installing The Image
1. From Terminal, cd to ~/UbuntuTouch
1a. From Terminal, execute the following command:
. build/envsetup.sh​
2. From Terminal, execute the following command:
choosecombo release cm_tf101 eng && make -j{number of cores}+1 otapackage
To be clear, your command without quotes is based on single core, dual core, or quad core (the -j option adding 1) "choosecombo release cm_tf101 eng && make -j5 otapackage" (I have a quad core processor, if you had a dual core processor it would be make -j3)​
2a. If you get an error regarding signapk.jar, the file is not in the directory the make file is looking for.
2b. From Terminal, execute the following command:
cp ~/UbuntuTouch/prebuilts/sdk/tools/lib/signapk.jar ~/UbuntuTouch/out/host/linux-x86/framework​
3. Your new build will be called "cm_tf101-ota-eng.root.zip". The file will be located in ~/UbuntuTouch/out/target/product/tf101/.
4. To install your newly created image, boot your tf101 into Recovery.
Wipe data, factory reset. In this order only, first flash cm_tf101-ota-eng.root.zip (your newly created image).
Now download the preinstalled-phablet-armhf.zip from here: http://cdimage.ubuntu.com/ubuntu-touch/daily-preinstalled/current/ OR here: http://cdimage.ubuntu.com/ubuntu-touch-preview/quantal/
Now flash this file.
Clear cache and reboot the tf101.​
5. After your first image is made, it is up to you to choose a new daily build of preinstalled-phablet-armhf.zip and then simply repeat steps in this section.
6. To build the image again, all you need to do is execute steps 1, 1a., and 2.
Sync Repos and Updates
1. At any given time, the repos maintained on JHoltom's github may have updates. If you notice an update when you go to the github site, you will want to sync your local repos before building the image again.
1a. From Terminal, execute the following commands in the respective repo directories (either device OR kernel).
git pull (from ~/UbuntuTouch/device/asus/tf101)
git pull (from ~/UbuntuTouch/kernel/asus/tf101)​
Common Commands and Actions
This section answers some of the question about how and "now what" type things.
Source: https://wiki.ubuntu.com/Touch/ReleaseNotes
Additional Sources: Posts on XDA by JHoltom and Onkel Bebu
***NOTE***The password in all of these images you download is "phablet".
1. How do I access Ubuntu Touch local directories from my desktop using ADB?
1a. From Terminal, execute the following commands in order:
adb root
adb shell
ubuntu_chroot shell
sudo su -
ls​
2. How do I pull a log when the dev asks me to get a log?
2a. From Terminal, execute the following commands in order:
adb root
adb shell "for f in /data/ubuntu/home/phablet/.ubuntu-session/logs/*.log ; do echo \$f: ; cat \$f; echo ; done" > tf101.log
adb shell ls -la /data/ubuntu/etc/ubuntu-session.d/ >> tf101.log​
3. How do I install open-ssh server on the tablet?
3a. From Terminal, execute the following commands:
adb shell
ubuntu_chroot shell
sudo su -
apt-get install openssh-server​
4. How do I SSH into my tablet?
4a. You can SSH from the command line via Terminal OR install FileZilla on your Desktop/Laptop PC.
4b. From Terminal, execute the following commands:
adb shell
ubuntu_chroot shell
sudo su -
ip addr show wlan0
ssh [email protected]_of_device (This is the command for Terminal, otherwise open FileZilla and make your connection there. See question 5 for port forwarding.)​
5. How do I do SSH port forwarding for accessing the TF101 over USB/ADB SSH?
5a. From Terminal, execute the following commands:
adb forward tcp:8888 tcp:22
ssh [email protected] -p 8888​
6. I want to exit adb shell, how do I do it?
6a. From Terminal, you can type several "exit" commands or Ctrl + D till you are back to your home prompt.
7. How do I mount or see system files/directories?
7a. From Terminal in adb shell, execute this command:
sudo mount -t proc proc /proc​
TomTcom said:
Not finished yet, this is a WIP and I'll et you know when everything is done and good to go.
Click to expand...
Click to collapse
Amazing Work man! Hope this help developers to get functional Ubuntu on our Transformer!
TomTcom said:
-Snip-
Required: Linux 12.04 – 13.04 (VM should work without issue)
-snip-
Click to expand...
Click to collapse
Looks good, just one thing, you may want to change the wording of this part from Linux to Ubuntu as most linux distro's won't be version 12.04 or 13.04 and your guide is written for Ubuntu specifically. Other than that great write up
bfmetcalf said:
Looks good, just one thing, you may want to change the wording of this part from Linux to Ubuntu as most linux distro's won't be version 12.04 or 13.04 and your guide is written for Ubuntu specifically. Other than that great write up
Click to expand...
Click to collapse
You're right! Done, thanks!
Sent from my SGH-T999 using Tapatalk 2
Great job! Thanks!
Sent from my Transformer TF101 using Tapatalk 4 Beta
github Authentication
It asks for github Username and Password when trying to clone. Do i have to create account with them or what?
JahRush said:
It asks for github Username and Password when trying to clone. Do i have to create account with them or what?
Click to expand...
Click to collapse
I don't think you have to.
Are you typing the command exactly as the guide is?
You can go directly to the link through the browser. I just checked that. Try being root and git clone?
Sent from my SGH-T999 using Tapatalk 2
TomTcom said:
I don't think you have to.
Are you typing the command exactly as the guide is?
You can go directly to the link through the browser. I just checked that. Try being root and git clone?
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
Heh, was entering link as git clone ht tps://github.com/jholtom/android_d...asus_tf101.git
All good now, thanks!
Noob lost
Sorry if this stupid but I am getting this error and I don't know what to do next. I am trying to learn Linux and this stuff goes over my head.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
Can't find toolchain for unknown architecture:
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
Thanks.
shiangti said:
Sorry if this stupid but I am getting this error and I don't know what to do next. I am trying to learn Linux and this stuff goes over my head.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
Can't find toolchain for unknown architecture:
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
Thanks.
Click to expand...
Click to collapse
You might have missed some stuff. Go back through the guide and tell me what you think worked and didn't work.
Just remember quantal was the only build actually allowing the device to boot however new updates have broke it for our devices so you may want to try something else.
Besides the developer preview is old and fairly useless. Neon graphics engine was the issue. It's not supported on tegra 2.
Even if you build the file the device probably won't boot just so you know.
Sent from my SGH-T999 using Tapatalk 4
Very nice write up. Would this be usable for something like running siriproxy? (I know, a iOS thing on Linux, eek!)
Banetbc said:
Very nice write up. Would this be usable for something like running siriproxy? (I know, a iOS thing on Linux, eek!)
Click to expand...
Click to collapse
I suppose any thing's possible however I'm not a dev. Just dangerous enough to compile and tell others how to do it.
Personally don't use this guide unless you can figure out the new merges, put it together, and even get it to boot. See my post above, it doesn't even boot except on an old quantal build so save yourself time and headache.
Without the neon support for graphics even a successful build of the file only gives a black screen on boot up for non quantal builds.
Sent from my SGH-T999 using Tapatalk 4
Additionally it's based off an old developer preview and many functions and features are non existent on it.
Sent from my SGH-T999 using Tapatalk 4
Of topic: who well does the Ubuntu touch performs on the tf101?
Sent from my Transformer TF101
It's tough to say since many important features we would use were not available. I would characterize the working quantal build as just about "ok".
Sent from my SGH-T999 using Tapatalk 4
Thank you for your guide!
I got an error message when i was trying to run choosecombo (step 2 of Building and Installing The Image).
I already used your 2b command. The signapk.jar file is in the ~/UbuntuTouch/out/host/linux-x86/framework directory.
It tells me that it can't find the choosecombo command. What's wrong?
My OS is: Ubuntu 13.04 32 bit
Thank you for your help!

{Guide} [HOW TO]Building CM11 from source for i9082/L

Here are the steps to build your own kernel from source. This guide is showing you how to build your first the stock kernel on your own..... It is kick start for making things on your own way....
This guide applies to i9082/i9082L and general devices also.:laugh:
This guide assumes you have basic knowledge of linux and linux system configuration.
Prerequisites
Quote:
HTML:
1. Ubuntu 13.10 / BBQLINUX (I personally use this)
2. patience...lots and lots of patience.
Here starts the fun:-
1. Installing ubuntu 13.10.
Quote:
This can be done in 3 ways and I am not gonna cover it all.
- along with windows ,i.e dual boot
- in virtualbox within windows
- as a windows application installation with "wubi" installer
For starting user i think second option, i.e installing in virtualbox is best.
here's starting tutorials
http://www.youtube.com/watch?v=tDDRFiwHujg
NOTE - you should have atleast 100 Gb partion for virtualbox.
2. Setting up building environment.
PHP:
THIS ALL BELOW STEPS ARE NOT NEEDED IF YOU HAVE INSTALLED BBQLINUX, BUILDING ENVIRONMENT IS SET IN BBQLINUX BY DEFAULT. IT WORKS OUT-OF-THE-BOX.
Initializing a fresh Android Build Environment in Ubuntu 13.10 sucks, right? The instructions at the AOSP page are outdated and inaccurate. Near as I can tell, they try to have you install 2 JDKs, the first one not even being the correct link for Saucy Salamander, and the second being OpenJDK. Which might work. But I dunno about all that, I’d rather have Oracle’s official stamp when it comes to building for Android.
Currently most of the guides are up to 12.04 LTS, which is fine and dandy, but being on the cutting edge is nice too.
This guide applies to all variations of Ubuntu 13.10 Saucy Salamander 64 bit. Do not use the 32 Bit version. Also, PAY CLOSE ATTENTION when to use “sudo” and when to not. It can make things funky if you do something as root that you shouldn’t.
Much thanks goes out to Google, ProTekk, Canonical, and everyone else that I read a random paragraph here and snippet there.
First, let’s set up the correct JDK.
Many of you probably have some kind of wrong Java installed unless you’re starting with a fresh Ubuntu base, and even then maybe.
Let’s get rid of that. Copy and paste this into a Terminal window:
Code:
PHP:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Follow the instructions to remove OpenJDK.
If you must keep it, it’s possible. But I’m not going to tell you how to do it here. I don’t want any chance of confusion or mistake.
Now copy and paste the following into the Terminal:
Code:
PHP:
sudo add-apt-repository ppa:webupd8team/java
This will add the correct PPA to your system for updated builds of Java 6 JDK that are compatible with 13.10.
No more unrecognized Java version errors! And it will update automatically with the rest of your system.
Next, we actually need to install the package. More copy-paste:
Code:
PHP:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Follow the on-screen instructions. You have to Accept the Licensing Agreement to complete the install. Hopefully no human centipede clauses.
Let’s make sure the correct version of Java is activated, run the following Terminal command:
Code:
PHP:
java -version
You should see something like the following:
Code:
PHP:
java version “1.6.0_45″ Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
Ok, back to a fresh Terminal prompt. Time for installing the guts to build stuff in Ubuntu:
Code:
PHP:
sudo apt-get install git-core gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python
When that is done installing, run the following command in your Terminal window:
Code:
PHP:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
That’s it on the package side of things.
You guessed it, time for more Terminal. This really is the easiest way, seriously. And it’s totally worth it when you’re basking in the glory of a bunch of people on XDA.
The binary for a program called “repo” will let you talk to git servers and download all that precious source code. That second part after the && allows it to be executable:
Code:
PHP:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Use your favorite text editor to open ~/.bashrc
I like nano:
Code:
PHP:
sudo nano ~/.bashrc
At the very bottom, add the following line:
Code:
PHP:
export PATH=~/bin:$PATH
Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash:
Code:
PHP:
source ~/.bashrc
That should be everything. Now you’re ready to build Android the right way. Luck!
3. Downloading source
Open terminal
To initialize your local repository using the CyanogenMod trees, use a command like this:
HTML:
mkdir cm11
cd cm11
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
Create local_manifest.xml in .repo folder.
PHP:
cd .repo
nano local_manifest.xml
Paste following into the terminal
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/samsung/i9082" name="pawitp/android_device_samsung_i9082" remote="github" revision="cm-11.0" />
<project path="vendor/samsung/i9082" name="k2wl/android_vendor_samsung_i9082" remote="github" revision="master" />
<project path="kernel/samsung/i9082" name="pawitp/android_kernel_samsung_i9082" remote="github" revision="cm-11.0" />
</manifest>
Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash.
Then to sync up:
HTML:
repo sync -j#
# is number of jobs you want to give for your downloading source. I use 2.
Download gonna be huge. Approx 12-15 GB.
So its gonna take while depending upon your internet connection.
You may get errors while downloading, like
HTML:
Sync exited due to fetch errors
Just restart download by
HTML:
repo sync
4. Starting Building process
PHP:
. build/envsetup.sh && time brunch i9082 -j#
Again # is meant for No. of CPU cores you have.
Building gonna take time, depending upon your computer configuration.
Any errors, post here.
I will try my best to solve problems .
Start building your own CM11...
Any suggestion welcome.
reserved for future use.
one more
Just last in case
THANKS K2wl for this amazing guide.
k2wl said:
Here starts the fun
Click to expand...
Click to collapse
Wow that's a really good guide.
You make building from a ROM/Kernel from source much simpler than it should be.
I just replaced my 12.04 LTS with 13.10 last night, was wondering if I shouldn't have, but if it's working good for your development, think I'll keep it for a while. And yes, building a fresh android build environment sucks
I'm new to android development, but so far the linux, java and php code seems mostly regular. Gonna start with kernel first, then maybe try my hand on building a ROM. Thank you for the guide! :good:
iceyhotguy said:
Wow that's a really good guide.
You make building from a ROM/Kernel from source much simpler than it should be.
I just replaced my 12.04 LTS with 13.10 last night, was wondering if I shouldn't have, but if it's working good for your development, think I'll keep it for a while. And yes, building a fresh android build environment sucks
I'm new to android development, but so far the linux, java and php code seems mostly regular. Gonna start with kernel first, then maybe try my hand on building a ROM. Thank you for the guide! :good:
Click to expand...
Click to collapse
Good. Thats the spirit.
keep 13.10. its good.
i switched to BBQLINUX just few days, until earlier i was using 13.10.
kernel develpment is not much hussle.
just be sure...dont add features which make kernel unstable.
i statred with kernel development only...:good::laugh:
and then come to ROM development.
best luck..
if any queries regarding kernel or ROM development, just ask me...i am here to help.
this can be used to build other roms too right .... by just changing the github repo to the rom u wanna build
One more question, how to apply patches?
But, k2wl.
This method builds an Odin flashable file.
How to make flashable zips, which can be flashed through custom recoveries.????
Sent from my iPhone using Tapatalk
rutvikrvr said:
this can be used to build other roms too right .... by just changing the github repo to the rom u wanna build
Click to expand...
Click to collapse
yes its gonna be useful to build other AOSP based roms. like PA,AOKP,OMNI,AICP etc... just need few modifications according to respective roms.
black87 said:
One more question, how to apply patches?
Click to expand...
Click to collapse
copy the patch file to respective directory and apply patch with following command.
HTML:
patch -p1 < patch.diff
eg. if you want to apply bluetooth patch and ur patch name is fixbluetooth.diff
then
HTML:
cd hardware/broadcom/libbt/
git checkout .
patch -p1 < fixbluetooth.diff
if any problems plz tell me..
Ateekujjawal said:
But, k2wl.
This method builds an Odin flashable file.
How to make flashable zips, which can be flashed through custom recoveries.????
Sent from my iPhone using Tapatalk
Click to expand...
Click to collapse
It builds flashable zips only ......with CWM or any other....
@k2wl im getting this error http://pastebin.com/uLy1MGew
rutvikrvr said:
@k2wl im getting this error http://pastebin.com/uLy1MGew
Click to expand...
Click to collapse
check slimrom's github source. instructions are given there.
also @k2wl said that you have to make some other modifications.
Did you try the breakfast command???
rutvikrvr said:
@k2wl im getting this error http://pastebin.com/uLy1MGew
[email protected]:~/slimrom$ . build/envsetup.sh && time brunch i9082 -j4
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including vendor/slim/vendorsetup.sh
including sdk/bash_completion/adb.bash
including vendor/slim/vendorsetup.sh
ls: cannot access device/*/i9082/slim.mk: No such file or directory
build/core/product_config.mk:231: *** Can not locate config makefile for product "slim_i9082". Stop.
Device i9082 not found. Attempting to retrieve device repository from SlimRoms Github (http://github.com/SlimRoms).
Repository for i9082 not found in the SlimRoms Github repository list. If this is in error, you may need to manually add it to .repo/local_manifests/slim_manifest.xml
ls: cannot access device/*/i9082/slim.mk: No such file or directory
build/core/product_config.mk:231: *** Can not locate config makefile for product "slim_i9082". Stop.
** Don't have a product spec for: 'slim_i9082'
** Do you have the right repo manifest?
No such item in brunch menu. Try 'breakfast'
real 0m22.876s
user 0m0.219s
sys 0m0.087s
Click to expand...
Click to collapse
your device folder points to device named cm_i9082, not slim_i9082. thats why.
jst open cm.mk file in device/samsung/i9082 cm.mk and edit its content to slim.
means
if it says in the line cm_i9082 change it to slim_i9082.
save it.
rename the file to slim.mk
and change one more file which will point to slim.mk
i.e androidproducts.mk
change the
HTML:
PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/device_i9082.mk
to
HTML:
PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/slim.mk
after that one more file to be created.
slim.dependencies.
just rename cm.dependencies to slim.dependencies.
and then try that command again.
i am attaching files for you.
jst replace them. or edit as you like.
---------------------------------------------------------------------------------------------------------------------
good to know some one started something.
you downloaded source. thats great....keep up... i will help you as much as i can....
rutvikrvr said:
@k2wl im getting this error http://pastebin.com/uLy1MGew
Click to expand...
Click to collapse
Or simply use i9082 device tree for SlimROMs from my Github. I have made all the necessary changes.
xenon92 said:
Or simply use i9082 device tree for SlimROMs from my Github. I have made all the necessary changes.
Click to expand...
Click to collapse
yep....that will do....
but i think untill and unless he do it himself, he wont understand....
@xenon92 as k2wl is saying.. Il try on my own first otherwise I'll use ur device tree if I'm not able to do it at all... Thanx fr the reply.
Sent from my GT-I9082 using XDA Premium 4 mobile app
EDIT: ITS STARTED BUILDING ..THANX FR THE SUPPORT
rutvikrvr said:
@xenon92 as k2wl is saying.. Il try on my own first otherwise I'll use ur device tree if I'm not able to do it at all... Thanx fr the reply.
Sent from my GT-I9082 using XDA Premium 4 mobile app
EDIT: ITS STARTED BUILDING ..THANX FR THE SUPPORT
Click to expand...
Click to collapse
thats the spirit of learning...keep up...
one more error http://pastebin.com/wcuPHsi0 ..pl help
device/samsung/i9082/overlay/frameworks/base/core/res/res/values/config.xml
just edit this file and delete line number 34,199,205. and save it.
just restart building again.

Guide: How To Build Your Own Stock AOSP For Your Nexus 7 (2013) KVT49L

PHP:
Guide: How To Build AOSP From Source With Linux Mint 16 - Nexus 7 (2013) KVT49L
Important Note: Do NOT use Linux Mint 16 KDE to do this guide, it will seriously mess up your programs menu when you remove the old Java. This guide has been tested and is working on Linux Mint 16 Cinnamon and Linux Mint 16 MATE
Got the KVT49L repos working and guide is updated to reflect this. This build includes several bug fixes from the KOT49H build but it is NOT 4.4.3, just an updated version of 4.4.2.
I started this guide as I could not find a step by step detailed guide to build a stock AOSP from source with Linux Mint 16.
All the steps should work in Ubuntu but I haven't tried so not 100% sure of that.
All this assumes your tablet is already unlocked.
Here goes:
Important note: Anything that is bolded text other then section titles are command line entries that are done in Terminal in Linux Mint. I thought it would be simpler to do it this way then say 'in Terminal' for every entry.
First we need to remove Icedtea Java or OpenJDK.
In Terminal: sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Then in Terminal: sudo add-apt-repository ppa:webupd8team/java
Next: sudo apt-get update && sudo apt-get install oracle-java6-installer
Be sure to accept the licence agreement to install java when it prompts you.
Next: sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python
Follow this with: sudo apt-get install -f
This should fix any dependency errors.
Now: sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Next download the SDK Tools For Linux x64 from this link. https://developer.android.com/sdk/index.html
Then: cd ~/Downloads
And: tar -xvf android-sdk_r22.6.2-linux.tgz
or tab the latest 'android-sdk_xxx.tgz file it they update it and it is a newer version then the one I downloaded to do this.
You can rename the android.sdk_xxx.tgz folder you extracted to SDK.
Then: cd ~/Downloads/SDK/tools
Next: ./android sdk
It will show you the tools that can be installed, just install the highest version API of 'Platform Tools' and 'Tools' for the latest android version '4.4.x' it shows.
Make sure you install the repo tool, in Terminal:
With: mkdir ~/bin
Then: curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
And: curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Now: sudo chmod a+x ~/bin/repo
Now sudo nano ~/.bashrc
Add this to the bottom of the text: export PATH=~/bin:$PATH
Then hit Ctrl-O and enter, it should say it saved the file followed by Ctrl-X to exit.
Then restart bash: source ~/.bashrc
Now lets Initialize the Repository for GIT configuration
First : git config --global user.name {Your Name}
Then: git config --global user.email {[email protected]}
If you have not registered with the GitHub website just doing these two steps works fine.
If you have registered with the GitHub website create a file called .netrc in your home directory, add your GitHub password to it with no spaces on the first line and change the permissions to '600' or you will have to continually authenticate when building the source.
In Terminal:nano ~/.netrc
Then add just your GitHub password (like I said you only need to do this if you have registered with GitHub).
Then 'Ctrl-O' and enter and it'll say it saved it, then 'Ctrl-X' to exit nano.
And then: chmod 0600 ~/.netrc
Now: mkdir ~/AOSP
Then: cd ~/AOSP
Now you get the source code etc: repo init -u https://android.googlesource.com/platform/manifest -b android-4.4.2_r2
Then do in Terminal : repo sync -j12
Use repo sync -j12 for a quad core CPU or Intel I5 or if you have say an quad core I7 with 8 threads you can use repo sync -j24 to speed things up etc.
I have a I7 3930k with 12 threads so I used repo sync -j36. This gives you three threads per logical CPU and speeds things along quite well.
It may take several hours for the sync to finish.
After the sync finishes go to https://developers.google.com/android/nexus/drivers#razorkot49h and download the drivers (binaries) for the Nexus 7 (Wi-fi). You do need to use the KOT49H binaries and they work fine with the KVT49L build.
In Terminal: cp ~/Downloads/asus-flo-kot49h-a9532596.tgz ~/AOSP
Then: cp ~/Downloads/broadcom-flo-kot49h-c33beb3d.tgz ~/AOSP
And: cp ~/Downloads/qcom-flo-kot49h-f92d75b1.tgz ~/AOSP
In Terminal: tar -xvf asus-flo-kot49h-a9532596.tgz
And: tar -xvf broadcom-flo-kot49h-c33beb3d.tgz
Then: tar -xvf qcom-flo-kot49h-f92d75b1.tgz
If you have closed the Terminal after the sync remember to do: cd ~/AOSP
when you open Terminal again before doing the tar commands.
They should be the file names of the binaries for KOT49H that you are extracting but if for any reason the file names are different use the Tab key and tab the correct names in after 'tar -xvf'.
If the names ARE different I'd really check to make sure you downloaded the correct flo binaries.
Then: ./extract-asus-flo.sh
Now also in Terminal: ./extract-broadcom-flo.sh
And: ./extract-qcom-flo.sh
Hint: It will show you a really long licence agreement for each binary that you scroll by hitting the Enter key that takes forever to scroll one line at a time, it has 8 sections and several subsections. Hold the Enter key until you just get past Part 8, section D of the licence and stop there. Now hit enter a few more time one key stroke at a time until you finish Part 8 section E and see the 'Type 'I ACCEPT' to agree to the licence.' and type I ACCEPT If you just scroll by holding the Enter key all the way to the bottom of the licence you'll get an error you never accepted the licence. Then close Terminal.
Building the Sources
Now open Terminal: cd ~/AOSP
Then: . ./build/envsetup.sh
Now to select the type of device we give the following command: lunch
Choose: 11. aosp_flo-userdebug
by entering '11' or whatever number aosp_flo is after your enter the 'lunch' command (it was number 11 on mine).
Now: make -j12 for a quad core cpu or I5 or make -j24 for an I7 etc.
With your tablet connected to your USB cable and the PC: adb root
Then: adb reboot bootloader
And: cd out/target/product/flo
Lastly: fastboot -w flashall
If you get an error on the 'adb' and 'fastboot' commands do these first:
sudo apt-get install android-tools-adb
and: sudo apt-get install android-tools-fastboot
If you get an error when you fastboot -w flashall to do with a '-p' flag needed or 'android-info.txt' is missing it means you forgot to to the 'lunch' command before building the source. Go back to the 'Building The Sources' section.
If you already have a custom recovery installed like TWRP and would rather build a zip file to install with the recovery rather then flash it in adb instead of make -j12 do: make -j12 otapackage
In the /home/"yourusername"/AOSP/out/target/product/flo you have an aosp_flo-ota-eng.___.zip file to flash in your custom recovery.
You will need to wipe/reset data your in recovery before flashing it and re-install all your apps etc.
Installing Custom Recovery, Rooting and Google Apps
If you want to install a custom recovery download TWRP http://techerrata.com/browse/twrp2/flo
Rename the file in Downloads to recovery.img
Then in Terminal with your tablet connected by USB to your PC: adb root
And: adb reboot bootloader
Then: cd ~/Downloads
And: fastboot flash recovery recovery.img
Use the volume buttons on your phone to scroll onto "Restart Bootloader" and hit the powerbutton to select it. After the bootloader reloads, use the volume buttons to scroll to "Recovery Mode" and hit power button again to select it. You should then be in your custom recovery.
If for any reason you get a red android and no recovery just boot into fastboot mode again and reinstall the recovery.img.
And finally, to root your tablet download SuperSu http://download.chainfire.eu/supersu and install the supersu.zip in recovery mode.
Download PA GAPPS from here http://forum.xda-developers.com/showthread.php?t=2397942 if you want the zip to install Google Apps in recovery.
You now have your own rooted vanilla AOSP you compiled yourself, congrats!
P.S. Very likely a good idea wipe/reset data in recovery and start with a clean install, you'll need to install all your programs and stuff anyways I'm sure.
P.P.S.I did download and install the XPOSED Framework apk http://forum.xda-developers.com/showthread.php?t=1574401 after I put AOSP on my tablet so I could install Advanced Power Menu and some other add-ons like Boot Manager and Greenify. As well I installed a custom kernel with Faux Sound and Faux Kernel enhancements.
I think for the download repo tool section you only need the second (commondatastorage) one. The first one no longer works.
Other than that, it looks pretty good.
Awesome thanks!!!
Sent from my Nexus 7 using Tapatalk
meekrawb said:
I think for the download repo tool section you only need the second (commondatastorage) one. The first one no longer works.
Other than that, it looks pretty good.
Click to expand...
Click to collapse
Yeah, you're right, I checked into it.
Thanks!!
I updated the guide and removed that.
meekrawb said:
I think for the download repo tool section you only need the second (commondatastorage) one. The first one no longer works.
Other than that, it looks pretty good.
Click to expand...
Click to collapse
Edit: I see the problem with the second curl command, when I save the post it shortens the url in the command with dots and when you copy and paste it it is incorrect and does not download, I'm trying to figure out how to fix it, every time I save the post no matter if I take the url code out or not it shortens it.
Second edit: I figured out a work-around and added it to the guide. It's half baked how I had to do it but at least it's working now.
hey all, sorry if this is off topic, but ive been looking for help everywhere and im about ready to give up, im trying to build evervolv for flo, i've got the source downloaded and im ready to build, the only thing im having trouble with is getting all the propratairy blobs and device spacific files from the n7. is there a way i can just sync up with cyanogenmods device repo or over right the repo that is build into evervolvs source? thanks for any help.
Andromendous said:
hey all, sorry if this is off topic, but ive been looking for help everywhere and im about ready to give up, im trying to build evervolv for flo, i've got the source downloaded and im ready to build, the only thing im having trouble with is getting all the propratairy blobs and device spacific files from the n7. is there a way i can just sync up with cyanogenmods device repo or over right the repo that is build into evervolvs source? thanks for any help.
Click to expand...
Click to collapse
download the binaries and extract them as was shown in the OP.
Then do
make clobber
. build/envsetup.sh
lunch
make (whatever option you decide, otapackage etc)
Make clobber is important because it ensures you start clean and that the binaries will be properly implemented in your rom.
oldsoldier2003 said:
download the binaries and extract them as was shown in the OP.
Then do
make clobber
. build/envsetup.sh
lunch
make (whatever option you decide, otapackage etc)
Make clobber is important because it ensures you start clean and that the binaries will be properly implemented in your rom.
Click to expand...
Click to collapse
ok, i did all that and still get the same error like below. dunno if i mentioned it, but i am trying to build evervolv
EDIT: the option (5) was "aosp_flo-userdebug
KedarWolf said:
Edit: I see the problem with the second curl command, when I save the post it shortens the url in the command with dots and when you copy and paste it it is incorrect and does not download, I'm trying to figure out how to fix it, every time I save the post no matter if I take the url code out or not it shortens it.
Second edit: I figured out a work-around and added it to the guide. It's half baked how I had to do it but at least it's working now.
Click to expand...
Click to collapse
I think you had the "commondatastorage" one right before. It is the "curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo" that doesn't work anymore.
So instead of those two steps, it should be just this one:
Download the Repo tool and ensure that it is executable:
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
I hope that makes more sense.
Great post! Thanks for this!
meekrawb said:
I think you had the "commondatastorage" one right before. It is the "curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo" that doesn't work anymore.
So instead of those two steps, it should be just this one:
Download the Repo tool and ensure that it is executable:
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
I hope that makes more sense.
Click to expand...
Click to collapse
I fixed the second curl command so it works. Not 100% sure you need the first curl command but it does work in Linux Mint 16 and doesn't mess anything up so I left it in.

[DEV]Build Recovery Using Minimal Setup CM11 (4GB minimal)

EDIT:I've haven't had the need to setup a recovery build environment in sometime now, as such, I'd no longer maintaining this, beginners and novice users are recommended to follow standard setup, while advanced users can probably adopt this to work for them.
So lately I broke my CM11 base which i use for kernel/recovery compiling,
trying nearly everything to fix it failed, So i took the lazy route, deleted it and started a new base,
So for the moment, I left it sync'ing and went to watch the TV, knowing it takes around 3 hours for a full sync,
came back few hours later and sync was complete and before anything I scrolled he terminal backup and realised there is alot of 'junk' that is of no use to kernel/recovery compiling, so I asked around and i was told Helicopter88 had a minimal setup just for that, but it's out of date,
and from one thing into another I came up with this.
This is a stripped down version of CM11 that allows you to compile recoveries from,
It's main feature is that all(most) of the 'junk' which isn't used in recovery build is removed not only saving you time in downloading but also space,
Sync'ing this setup took me 1 hour and 4 minutes and saved me alot of space and download bandwidth.
(for a bit of transparency, I'm running a slightly modified setup, so there can be some discrepancies in the steps, if that’s the case, post about it and hopefully I'll fix it, though looking through, everything seems correct, I'll also describe my setup in a new post below if you're interested)
1) setup your packages
For linux based systems (32bit & 64bit)
Code:
sudo apt-get install bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-6-jdk openjdk-6-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev
For Linux based System (64bits ONLY)
Code:
sudo apt-get install g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
2) Setup Repo
Change droid_root to whatever directory you prefer
Code:
mkdir -p ~/bin
PATH="$HOME/bin:$PATH"
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
droid_root="~/android/cm11"
mkdir -p ~/$droid_root
cd [I]droid_root[/I]
repo init -u https://github.com/Thunder07/minimal_android.git -b cm-11.0_min
3) Setup Up Environment
Now, you're almost done, just wait for the sync to finish and run these commands,
Which will setup your environment and download your device tree if required.
remove the {} and replace the content with actual device code name
Do also keep in-mind that you'd need to run these 2 lines every-time you start a new shell when building the recovery.
and that you're cd into your droid_root.
Note: calling breakfast the 1st time will through few error, call it again should throw a dependency error, which we will fix in the next step
Code:
source build/envsetup.sh
breakfast {DEVICE_CODE_NAME}
I'm using an htc one x, so my commands would look like this
DONT RUN THIS CODE, ITS FOR HTC ONE X ONLY
Code:
source build/envsetup.sh
breakfast endeavouru
4) Removing Android Build Requirements
the error should look something like this
Code:
build/core/product_config.mk:239: *** _nic.PRODUCTS.[[device/BRAND/DEVICE/cm.mk]]: "[B]hardware[/B]/ti/wlan/mac80211/wl128x-wlan-products.mk" does not exist. Stop.
and as you might have guessed from the word hardware, the build (CM) is expecting files assoicated with hardware, which are not required by the recovery.
Open $droid_root/device/BRAND/DEVICE/ preferably in file manager
Note: that DEVICE & BRAND refer to you device name and brand and not a directory called BRAND/DEVICE
open cm.mk and change this
Code:
# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)
# Enhanced NFC
$(call inherit-product, vendor/cm/config/nfc_enhanced.mk)
# Inherit device configuration
$(call inherit-product, device/htc/endeavoru/full_endeavoru.mk)
To look like this.
Don't copy and paste as these file contains reference to my device (htc/endeavoru)
as you can see the highlighted bit is the changes you need to make.
Code:
# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/[B][COLOR="Green"]common.mk[/COLOR][/B])
# Enhanced NFC
[B][COLOR="Green"]#[/COLOR][/B]$(call inherit-product, vendor/cm/config/nfc_enhanced.mk)
# Inherit device configuration
[B][COLOR="Green"]#[/COLOR][/B]$(call inherit-product, device/htc/endeavoru/full_endeavoru.mk)
Now, onto DEVICE.mk
is a bit more messy to desribe so i paste a diff to illustrate: http://pastebin.com/jNDGhSPe
Note you can probably get away with leaving PRODUCT_COPY_FILES alone and just removing the hardware related $(call inherit-product, hardware/*.mk)
but just as well, you've got no use for them in this current setup​
5) Build
Bofore you start Building, make sure you're building the recovery you want TWRP/CWM/CWM_Phil/CM simple Recovery cloned into $droid_root/bootable/recovery/
Now for the building part itself, this will build the kernel & recovery and create a flashable image
Note:Make sure you're cd'ed to $droid_root and remember to do step 3 EVERYTIME you open a new shell
Code:
mka recoveryimage
Reserve: advance setup
To speed up the building process I've taken the process a step further, instead of building the kernel with the recovery,
I'd build both seperately and use the zImage as a prebuilt image, that way whenever I can "mka recoveryimage", I dont have to go through the process of building the zImage, even though it might already be built and fast enough, I'd rather just skip it all,
if you want to do the same, follow this.
For this part I'm assuming you know how to build a kernel, so i wont go through it.
so open $droid_root/device/BRAND/DEVICE/Boardconfig.mk
Code:
TARGET_KERNEL_SOURCE := kernel/BRAND/DEVICE
TARGET_KERNEL_CONFIG := cyanogenmod_endeavoru_defconfig
replace it with this
Code:
TARGET_PREBUILT_KERNEL := LOCATION_TO_PREBUILT_ZIMAGE
TARGET_PREBUILT_RECOVERY_KERNEL := LOCATION_TO_PREBUILT_ZIMAGE
open AndroidBoard.mk
Note: your AndroidBoard.mk may already have this, so be sure to check before replacing anything.
Code:
ALL_PREBUILT += $(INSTALLED_KERNEL_TARGET)
Replace With
Code:
file := $(INSTALLED_KERNEL_TARGET)
ALL_PREBUILT += $(file)
$(file): $(TARGET_PREBUILT_KERNEL) | $(ACP)
$(transform-prebuilt-to-target)
and you're done,
Now whenever you run "mka recoveryimage", a prebuilt zImage will be used,
and whenever you rebuild your kernel, "mka recoveryimage" would use that image.
reserve... just incase
Can I use Minimal set up for cm12.0 for building CWM recovery?
Thunder07 said:
reserve... just incase
Click to expand...
Click to collapse
Can I follow this guide for making a CWM recovery for compiling a CWM recovery for my android mobile(Celkon Q 500, android 4.4.2, Broadcom chip based), by replacing cm11.0 with cm 12.0? Please guide.
Eversmile23 said:
Can I follow this guide for making a CWM recovery for compiling a CWM recovery for my android mobile(Celkon Q 500, android 4.4.2, Broadcom chip based), by replacing cm11.0 with cm 12.0? Please guide.
Click to expand...
Click to collapse
Hi, sorry for the late reply, I'm buzy these days,
but I just updated the repo to allow for that.
though I didn't/dont have the time to test the changes myself.
Can youexplain a bit furher>
Thunder07 said:
Hi, sorry for the late reply, I'm buzy these days,
but I just updated the repo to allow for that.
though I didn't/dont have the time to test the changes myself.
Click to expand...
Click to collapse
As I am new to this 'building from source', I could not understand your statement ' I just updated the repo to allow for that'. What exactly, I will have to do to achieve my goal as I stated previously?
Eversmile23 said:
As I am new to this 'building from source', I could not understand your statement ' I just updated the repo to allow for that'. What exactly, I will have to do to achieve my goal as I stated previously?
Click to expand...
Click to collapse
You asked if you can use cm12 for the recovery building, before yesterday the answer was no, but I've updated the repo to use cm12 code... If you change cm11 to cm12 that is.
Also, if you're new to this, I'll avoid this particular guide as I won't be able to guide you through it if it doesn't work, as I'm busy for the next 2 weeks.
Sent from my A0001 using XDA Free mobile app
Good job
Gửi từ SM-G906K của tôi bằng cách sử dụng Tapatalk
Please help. I do not undertstand why 'repo sync' always fails at a particular stage, though I have 30+ GB of disk space available in my working folder named 'cm12'. Following is the last screen message :
Fetching project platform/external/ant-glob
Fetching projects: 8% (40/495) Receiving objects: 86% (2389/2771), 26.68 MiBerror: RPC failed; result=56, HTTP code = 200iB | 124.00 KiB/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
remote: Sending approximately 1.94 GiB ...
remote: Counting objects: 85, done
remote: Finding sources: 100% (85/85)
error: RPC failed; result=56, HTTP code = 200iB | 88.00 KiB/s
fatal: The remote end hung up unexpectedly
Now should I run 'repo sync' again or should I use 'repo sync -j1' ?
topic no support good
Gửi từ MX4 Pro của tôi bằng cách sử dụng Tapatalk
Eversmile23 said:
Please help. I do not undertstand why 'repo sync' always fails at a particular stage, though I have 30+ GB of disk space available in my working folder named 'cm12'. Following is the last screen message :
Fetching project platform/external/ant-glob
Fetching projects: 8% (40/495) Receiving objects: 86% (2389/2771), 26.68 MiBerror: RPC failed; result=56, HTTP code = 200iB | 124.00 KiB/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
remote: Sending approximately 1.94 GiB ...
remote: Counting objects: 85, done
remote: Finding sources: 100% (85/85)
error: RPC failed; result=56, HTTP code = 200iB | 88.00 KiB/s
fatal: The remote end hung up unexpectedly
Now should I run 'repo sync' again or should I use 'repo sync -j1' ?
Click to expand...
Click to collapse
No point in using j1, try sync, if it fails you might have to start fresh.
But the error at it reads is an error in the host and not your problem.
29y6145 said:
topic no support good
Gửi từ MX4 Pro của tôi bằng cách sử dụng Tapatalk
Click to expand...
Click to collapse
Sent from my A0001 using XDA Free mobile app
Thunder07 said:
So lately I broke my CM11 base which i use for kernel/recovery compiling,
trying nearly everything to fix it failed, So i took the lazy route, deleted it and started a new base,
So for the moment, I left it sync'ing and went to watch the TV, knowing it takes around 3 hours for a full sync,
came back few hours later and sync was complete and before anything I scrolled he terminal backup and realised there is alot of 'junk' that is of no use to kernel/recovery compiling, so I asked around and i was told Helicopter88 had a minimal setup just for that, but it's out of date,
and from one thing into another I came up with this.
This is a stripped down version of CM11 that allows you to compile recoveries from,
It's main feature is that all(most) of the 'junk' which isn't used in recovery build is removed not only saving you time in downloading but also space,
Sync'ing this setup took me 1 hour and 4 minutes and saved me alot of space and download bandwidth.
(for a bit of transparency, I'm running a slightly modified setup, so there can be some discrepancies in the steps, if that’s the case, post about it and hopefully I'll fix it, though looking through, everything seems correct, I'll also describe my setup in a new post below if you're interested)
1) setup your packages
For linux based systems (32bit & 64bit)
Code:
sudo apt-get install bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-6-jdk openjdk-6-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev
For Linux based System (64bits ONLY)
Code:
sudo apt-get install g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
2) Setup Repo
Change droid_root to whatever directory you prefer
Code:
mkdir -p ~/bin
PATH="$HOME/bin:$PATH"
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
droid_root="~/android/cm11"
mkdir -p ~/$droid_root
cd [I]droid_root[/I]
repo init -u https://github.com/Thunder07/minimal_android.git -b cm-11.0_min
3) Setup Up Environment
Now, you're almost done, just wait for the sync to finish and run these commands,
Which will setup your environment and download your device tree if required.
remove the {} and replace the content with actual device code name
Do also keep in-mind that you'd need to run these 2 lines every-time you start a new shell when building the recovery.
and that you're cd into your droid_root.
Note: calling breakfast the 1st time will through few error, call it again should throw a dependency error, which we will fix in the next step
Code:
source build/envsetup.sh
breakfast {DEVICE_CODE_NAME}
I'm using an htc one x, so my commands would look like this
DONT RUN THIS CODE, ITS FOR HTC ONE X ONLY
Code:
source build/envsetup.sh
breakfast endeavouru
4) Removing Android Build Requirements
the error should look something like this
Code:
build/core/product_config.mk:239: *** _nic.PRODUCTS.[[device/BRAND/DEVICE/cm.mk]]: "[B]hardware[/B]/ti/wlan/mac80211/wl128x-wlan-products.mk" does not exist. Stop.
and as you might have guessed from the word hardware, the build (CM) is expecting files assoicated with hardware, which are not required by the recovery.
Open $droid_root/device/BRAND/DEVICE/ preferably in file manager
Note: that DEVICE & BRAND refer to you device name and brand and not a directory called BRAND/DEVICE
open cm.mk and change this
Code:
# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)
# Enhanced NFC
$(call inherit-product, vendor/cm/config/nfc_enhanced.mk)
# Inherit device configuration
$(call inherit-product, device/htc/endeavoru/full_endeavoru.mk)
To look like this.
Don't copy and paste as these file contains reference to my device (htc/endeavoru)
as you can see the highlighted bit is the changes you need to make.
Code:
# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/[B][COLOR="Green"]common.mk[/COLOR][/B])
# Enhanced NFC
[B][COLOR="Green"]#[/COLOR][/B]$(call inherit-product, vendor/cm/config/nfc_enhanced.mk)
# Inherit device configuration
[B][COLOR="Green"]#[/COLOR][/B]$(call inherit-product, device/htc/endeavoru/full_endeavoru.mk)
Now, onto DEVICE.mk
is a bit more messy to desribe so i paste a diff to illustrate: http://pastebin.com/jNDGhSPe
Note you can probably get away with leaving PRODUCT_COPY_FILES alone and just removing the hardware related $(call inherit-product, hardware/*.mk)
but just as well, you've got no use for them in this current setup​
5) Build
Bofore you start Building, make sure you're building the recovery you want TWRP/CWM/CWM_Phil/CM simple Recovery cloned into $droid_root/bootable/recovery/
Now for the building part itself, this will build the kernel & recovery and create a flashable image
Note:Make sure you're cd'ed to $droid_root and remember to do step 3 EVERYTIME you open a new shell
Code:
mka recoveryimage
Click to expand...
Click to collapse
i need to change endevoru to my device name and htc to n=my brand name everywhere.. right??
jackey31 said:
i need to change endevoru to my device name and htc to n=my brand name everywhere.. right??
Click to expand...
Click to collapse
basically, but each device tree is different, so this tutorial is to explain how and why to do it.
you probably need some basic knowledge of how to build the recovery using the proper way, before attempting this.
can you port for me??? please
Thunder07 said:
basically, but each device tree is different, so this tutorial is to explain how and why to do it.
you probably need some basic knowledge of how to build the recovery using the proper way, before attempting this.
Click to expand...
Click to collapse
thanks for writing such a great guide for compiling cwm..
but i can't do this bcause i don't know much abt it ..
i don't have linux based os..
very slow and limited internet connection, would probably take a week to download 4gb source.. ..
so can you port for my device.. i will upload..
recovery.img
boot.img
build.prop
and i have extracted recovery.fstab so know the mount points..
thanking you in advance..
syncing repo..
Thunder07 said:
basically, but each device tree is different, so this tutorial is to explain how and why to do it.
you probably need some basic knowledge of how to build the recovery using the proper way, before attempting this.
Click to expand...
Click to collapse
i installed linux mint in virtual box.. currently syncing repo...
my net gets disconnected after 40 minutes i don't know why... so i have run repo sync again every time i got disconnected.
has it started syncing from the begining?? or just picked up from the last point when my net got disconnected??
will i ever be able to sync it??..
jackey31 said:
i installed linux mint in virtual box.. currently syncing repo...
my net gets disconnected after 40 minutes i don't know why... so i have run repo sync again every time i got disconnected.
has it started syncing from the begining?? or just picked up from the last point when my net got disconnected??
will i ever be able to sync it??..
Click to expand...
Click to collapse
if you run "repo sync" after you're disconnected it will continue from where it left off.
can't sync
Thunder07 said:
if you run "repo sync" after you're disconnected it will continue from where it left off.
Click to expand...
Click to collapse
i can never sync this repo.. my connection drops after 400 mb so stuck at 70 % project 80/114 platform/prebuilts/tools 445mb..
i have run repo sync several time it starts downloading this project from the beginning.. :crying::crying:
i does not actually resume it restarts the project which was not completely downloaded.

Categories

Resources