yashsingh1/xdaforums huggingface dataset:
[Android] jjhiza:
It doesn't shut down, but depending on how many cores you utilize, your PC can be pretty useless during the repo sync. I use - j32 (quad core + hyperthreading), and my laptop lags like crazy of I want to do other tasks. If I use - j12 though, my computer is fine. If you need to use your machine while the repo is syncing, just use a lower number. :)
[Android] ThePresence:
Previously I've used command 'repo sync' only but my pc gets shut down due to power loss now I've used command 'repo sync -j12' this will make any difference??? and what's this -j12 for???
[Android] jjhiza:
-j# is the number of cores you want to initialize for downloading the repo. More cores = a faster download. If you have a dual core computer, I'd suggest using multiples of 2, up to maybe 12. I bought my computer, specifically for building Android, so I have a Quad core +hyperthreading Ivy Bridge processor, and I can repo sync at - j32 (haven't tried any higher).

The command I use to sync is:

repo sync -f -j32

the -f will help you avoid fetch errors.
[Android] TimmyTossPot:
Awesome guide, thanks!
[Android] ThePresence:
thanks for your help mate...... :)
[Android] ThePresence:
I'm so noob in Android devlopment...so can you guys please help me....actually I've successfully synced repo.....but as our device is officially not supported so I'm unable to use lunch or brunch command... what I've to do next can you help me please??? I really wanted to learn.....
[Android] pantmunu:
problem

so after this command

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

i get this error

[sudo] password for darkstone:

Reading package lists... Done

Building dependency tree

Reading state information... Done

E: Unable to locate package lib32ncurses5-dev

E: Unable to locate package ia32-libs

E: Unable to locate package lib32z-dev

E: Unable to locate package lib32readline-gplv2-dev

E: Unable to locate package lib32readline5

E: Unable to locate package lib32readline6

E: Unable to locate package lib32bz2-dev
[Android] ThePresence:
probably you've installed ubuntu from windows installer hence you're getting this error.... you've to install Ubuntu through CD....
[Android] ridobe:
I've reinstalled Ubuntu 3 times and with this guide I can be back up and running in 5 minutes. Immensely helpful and extremely accurate guide. Makes for changing distros a breeze. Thank you so much. Bookmarked.
[Android] pantmunu:
i installed it via cd not from windows installer .. i have no clue what i am doing wrong here !
[Android] McJesus15:
thanks for the great guide. My computer is dual core but it only has 2GB of actual ram with an additional 5.5GB of Swap memory and when syncing the AOKP repo I used the command

repo sync -j14

and my sync has taken a while because my internet is slow as a turtle providing dl speeds of around 140kb/s when running nicely but my computer has yet to slow down and I've had no errors. Is that normal? I'm not complaining, I just thought my computer would be unusable for the time it was doing this.
[Android] franklinlucas:
Thanks a lot for your tutorial, it worked perfectly. I have just built RasBeanJelly for my maguro, pure success, thanks again.

The only thing I had to do that wasn't present in your tutorial was to config the user information on git before running repo init (or repo sync, I don't remember). Other than that, this tutorial is a guide by hand, so easy...
[Android] kilometers4:
Install them one - three at a time, I know it's tedious, but it works :)
[Android] pantmunu:
still getting unable to locate on lib32ncurses5-dev andd ia32-libs :confused:
[Android] kilometers4:
I don't think they will stop you from being able to build. I would continue with the guide.
[Android] pantmunu:
well then my good sir .. i will do so .. if it doesnt work .. i will try it on a different distro .. hope that will help !

and thank u

well .. permission denied wheninitializing the repo :(
[Android] McJesus15:
Did you try to using sudo?
[Android] pantmunu:
I get this with sudo
[Android] pantmunu:
And this without sudo
[Android] espmartin:
You do not run "sudo apt-get install" along with "repo init -u git://github.com/AOKP/platform_manifest.git -b jb" - Once you've installed and configured your build environment, then you simply run (from your working directory):

repo init -u git://github.com/AOKP/platform_manifest.git -b jb
[Android] pantmunu:
it says permission denied .. may be i shud start from scratch !
[Android] espmartin:
So at a terminal prompt, when you run that repo init command, it gives a permission error?

Please cut/paste your exact line and error from terminal please
[Android] jjhiza:
Windows installer is fairly unreliable as far as I know. I'd suggest creating a completely separate partition for Ubuntu, and dual booting through the BIOS menu. Hasn't failed me yet. :D
[Android] pantmunu:
darkstone@darkstone:~$ cd ~/android

darkstone@darkstone:~/android$ repo init -u git://github.com/AOKP/platform_manifest.git -b jb

bash: /home/darkstone/bin/repo: Permission denied

darkstone@darkstone:~/android$ ^C

darkstone@darkstone:~/android$

---------- Post added at 10:45 PM ---------- Previous post was at 10:44 PM ----------

i installed ubuntu from cd and cpmpletley removed windows . i didnt use any windows installer to install ubuntu
[Android] jjhiza:
^Ok, fair enough. I just looked back at your issue, and I think I may have a solution... Use the git-core flex-bison command from 12.10. I don't have my personal guide with me at the moment, but I'll post the steps I use when I get home (about 20 minutes), and hopefully they'll help you out.
[Android] pantmunu:
Will be greatly appreciated sir . I'm doing it on another laptop . It's downloading now .. hut it's not working on mine . Just pm me when ubpost ur guide good sir .

Keeps saying unable to locate package lib blah blah ..

And I did one by one .. few of them got installed and few didn't .

On my laptop permissions get denied but on another laptop it's downloading .

:confused::confused:
[Android] espmartin:
Verify permissions on the repo file in "/home/darkstone/bin/repo" - if your PC is not shared with anyone, you can simply give full permissions to it. Also, did you run "chmod a+x ~/bin/repo"?
[Android] pantmunu:
I think I got it . It's syncing now . Will be back when it's done :D:p
[Android] ThePresence:
Help me somone.....after syncing repo what to do next???I don't have official support for my phone.
[Android] jjhiza:
I hate to say this, but there's not much to do now it would seem, besides blow up that repo and sync with CM. If your device isn't supported, you have to have some additional know-how to port a build to your device...in any case, you'd still need bits and pieces from CM in order for it to work.

That's why it's always recommended that you read, reread, and read again, the instructions in the OP. It states that the tutorial is for setting up 13.04, and building AOKP from source...and it assumes that you have a device that is supported. You can use the same instructions to build AOSP, and (I'd assume) CM, but you need to have a supported device. If you're new to development, and don't have the skills to port a ROM to an unsupported device (I can't do it either, so please don't think I'm yelling at you), you'd be better off building from a source that officially supports your device. :o
[Android] 其实我也不懂:
不错，这个教程很有用！

Yes, this tutorial useful!

Mod Edit: 4. Use the English language.
[Android] TheMrcool212:
Thanks for this post. It helps me a lot. But now i faced a problem, i think it is java related. I successfully built PA 3.56 for my tablet few days ago. So now when i trying to make a fresh build (using make clean command) after 40 minutes it gives me an error. I used jdk1.6.0_37:

target Executable: app_process (/home/mrcool/android/SourcePA/out/target/product/tf101/obj/EXECUTABLES/app_process_intermediates/LINKED/app_process)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/home/mrcool/android/SourcePA/out/target/product/tf101/obj/SHARED_LIBRARIES/libRS_intermediates/LINKED/libRS.so] Error 1
make: *** Waiting for unfinished jobs....

Seems like it is lib file error. Any help?
[Android] carltonhimself:
Awesome. That worked perfectly. Thanks dude!
[Android] sylentprofet:
It's a lib file, but it might be something to do with the PA source, especially if you've successfully compiled before. I'd try the following:

1) Do a fresh repo sync. You know the code for this.

2) Completely delete the "out" directory from the base Android folder (where you repo sync). This is a sure fire make clean.

3) This from the command line:

source build/ensetup.sh
brunch YOURDEVICENAMEHERE

Let me know.
[Android] TheMrcool212:
Thanks for trying to help me, i repo synced and "make cleaned" the out file. However before the error occured it was compiling the linaro toolchain. I trying to get the gcc-multilib package for linaro 4.6. So i searched in Synaptic Package Manager for it. Seems like it is not installed yet. Right now i installed the package and see hope it works.

EDIT: I still got the same error :crying:
[Android] raymond26170:
Awesome amount of help here. Thank you!!

http://HighOnAndroid.com/contest/?id=9148
[Android] ManthanRB:
I have a problem with following code

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

I get this error in terminal

Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'lib32z1-dev' instead of 'lib32z-dev'
bzip2 is already the newest version.
gnupg is already the newest version.
libbz2-1.0 is already the newest version.
libc6-dev is already the newest version.
libreadline6 is already the newest version.
python is already the newest version.
readline-common is already the newest version.
zip is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
ia32-libs : Depends: ia32-libs-multiarch
E: Unable to correct problems, you have held broken packages.

I'm using ubuntu 12.10 x64
[Android] sylentprofet:
Give this a shot:

sudo apt-get install gcc-4.7-multilib
[Android] ManthanRB:
ok
[Android] Snypercell:
Awesomeness

Thanks for taking the time to compile this guide! It took me two weeks to piece together a working build environment on Ubuntu 12.04. You're the only person to address these issues of outdated information, and that whole JDK mess.... I've compiled one cm10.1 ROM in my environment, and it runs great, so far. I've been working to customize it to my liking over the last week or so, but I think I'm going to try this out this weekend. I'll let you know how it goes. Thanks again, and best of luck to everyone out there trying to build!! Don't give up!!! Keep the spirit of open source alive!!!!
[Android] Chromium:
Thanks for the guide. All packages installed perfectly and I managed to compile cm10.1 without any build errors. Only problem is it's hanging on the boot animation. I didn't make any changes to the source. I literally just synced it and compiled. Is this normal? I purposely chose a supported device (d2tmo) thinking everything would work OK but apparently that's not the case.
[Android] kilometers4:
Did you do a wipe data/factory reset when you installed it?
[Android] drazgo:
thank you very much!
[Android] Snypercell:
Well, I used this guide all the way through, installed the sdk bundle, came back and installed the CM repository, repo sync'd, and the build went off without a hitch. The problem: After wiping data and both caches, I flashed the ROM, and everything looked fine. The install completed, I flashed GApps, and rebooted. It gets stuck, immediately after the CM boot animation, on a blank screen. Any ideas?
[Android] Chromium:
Consider yourself lucky. I compiled it perfectly, with no issues, however it wont boot. It just gets stuck on the boot animation.

And yes, my tester did a full wipe. Any suggestions?
[Android] Snypercell:
Well, mine is basically doing the same thing. I just see the CM boot animation come and go first.

I did have a working build on Ubuntu 12.04, and I got a good ROM out of it, which I'm running on my phone now, but I was feeling froggy, and decided to try to do this on 13.04, and here we are.... We'll get it, though. I have faith!! lol. Just keep at it.
[Android] Chromium:
This is the first time ive actually successfully compiled a rom :p

Ive been trying for months in 10.04, and 12.10 but i was getting too many build errors, and i was gaining absolutely nothing so i gave up.

The problem was that when i followed those guides some of the packages would always fail to install, and im guessing that the build errors were related to that. With this guide everything installed fine, and on my first attempt to compile cm it worked!

Because of that i dont think the build environment is the issue.
[Android] Snypercell:
Well I wouldn't say that just yet, because I've gotten a good build environment on my machine, and I'm getting the same error as you with this one. It took me about two weeks of playing with it to finally get a build that worked. If I can't get this working, I'm going to start from scratch again soon with 12.04. I'll try to make a step by step guide as I go, and put it on my website when I'm finished.
[Android] trevd:
Proprietary Vendor Binaries are probably missing. Have you run extract-files.sh ( or something like that ) which can normally be found in the device specific directory

Also starting from scratch is a bit excessive, I would suggest now you've had a successful build that you learn the next step of Android Development and figure out how to properly bring up a device learn how to read the boot logs. It's probably a better investment of your time.
[Android] Chromium:
Is this still necessary to do even if we have already downloaded the device specific source from cm's repo?
[Android] Snypercell:
Thanks, very much, for the excellent advise. I will definitely take that into consideration, and start looking around for material to read. I kind of figured that it missed something when pulling the files from my phone. I did run the extract-files.sh, but it just seems like it didn't get everything, or something happened. Anywho.. I'll try to pull them again, and see what happens. I'm at work now, so it will be later this evening before I can do anything. Thanks again, and good luck everyone.

---------- Post added at 09:21 AM ---------- Previous post was at 09:17 AM ----------

Yep. These are different files. Someone that knows more about it, off the top of their head, can give you a little more in-depth explanation, but yes, you do have to do this, along with dl'ing the device specific source code.
[Android] trevd:
Not a problem, the Android PDK ( Platform Development Kit ) is a nice place to start http://www.kandroid.org/online-pdk/guide/index.html that has a section on device bring up but the full thing is worth a read if your getting into it.

I'd offer that explanation but It's a lot of legal nonsense about how binary re-distribution licencing works and doesn't change the end result that it's still necessary. Even when building a pure AOSP device like the Nexus 7 you still need proprietary files https://developers.google.com/android/nexus/drivers. . You can read the licenses in those files if you want to understand fully. :rolleyes: Have Fun!
[Android] Chromium:
So does this mean that you cant build for a device without physically having access to it?

Edit: I found this repo. Could i just clone this into the appropriate location, rather than having to run the extract-files.sh script with the physical device?
[Android] sylentprofet:
I have a guide for Ubuntu 12 all versions on my website in my signature and reproduced here on xda in the same forum. Check it out everyone! Good luck
[Android] parka_79:
Thanks for the guide worked a treat, repo sync took awhile but is worth the wait.
[Android] Chromium:
Anyone?
[Android] trevd:
The cm extract-files script usually makes the assumption that you're pulling the files from an existing CM rom. Check the cm wiki page for the device you're targeting. They do normally have full instruction for building from source.

With that in mind and what I've done in the past is download the Latest CM Rom for the device your targeting then look at the extract-files script and pull the files out of the zip. I've also pulled the files from stock roms in the past.

Saying that TheMuppets ones should be alright from what I recall ..... :good:
[Android] Chromium:
Thanks. I was going to read the extract-files.sh and manually pull the files out of the downloaded cm rom, but the script was a bit more complicated and I couldn't really understand which files to extract.I guess I'll just try TheMuppets repo.
[Android] Snypercell:
Another try

I rebuilt this thing, and just ran the brunch cmd. It's building right now, so we'll see in about an hour.
[Android] joeboo28:
Can anyone tell me if this is the code used to get AOSP instead of the AOKP refered to in this guide?

$ repo init -u https://android.googlesource.com/platform/manifest

Thanks for this guide by the way, as a noob to development making things this simple is refreshing!
[Android] CNexus:
If you are building for a Nexus device, then yes.
[Android] joeboo28:
I have the sph-d710, what can i use for that? Thanks for the help, and sorry for the noob question.
[Android] CNexus:
E4GT? You need to go on github (Cyanogenmod's) and find your device and kernel trees

I don't know about your kernel, but device and vendor should be

android_device_samsung_d710

proprietary_vendor_samsung (on TheMuppets github)
[Android] joeboo28:
Yeah i have the E4gt for sprint, and i was looking to build an AOSP ROM if possible.
[Android] dwxvi:
I'm new to this, and I'm really wanting to learn about developing Android ROMs. I've set up everything, but I'm wanting to build for JellyBeer (CM 10.1 based) for Nexus 7.

In the line:

repo init -u git://github.com/AOKP/platform_manifest.git -b jb

What would I substitute to use BeerGang's github repo? Simply swapping "AOKP" with "BeerGang" did not work, my terminal would read

Get git://github.com/beergang/platform_manifest.git
fatal: remote error:
Repository not found.

Thanks in advance!
[Android] Chromium:
This:

repo init -u git://github.com/BeerGang/android.git -b cm-10.1
[Android] espmartin:
What you need to do is decide which version of BeerGang rom you'd like to build, as they are building the M series as well.

https://github.com/BeerGang/android/blob/cm-10.1/default.xml
https://github.com/BeerGang/android/blob/cm-10.1/cm-10.1-M3.xml
etc...

So for example, to build the 1st version, you'd do:

repo init -u git://github.com/BeerGang/android.git -b cm-10.1

HTH!
[Android] dwxvi:
Awesome! Now I can go eat dinner and work a bit while the repo syncs. :)

---------- Post added at 04:35 PM ---------- Previous post was at 04:32 PM ----------

Also saw Benjamin Goodwin (JellyBeer dev)'s README file, and it cleared a little more of that up for me, thanks guys!
[Android] kenzolo:
Hi guys,

someone can help me to solve this issue when I try to compile the rom:

https://dl.dropboxusercontent.com/u/30754456/Nuovo documento.txt

Thanks in advance
[Android] _thrasher_x:
ACTION_NEW_OUTGOING_SMS

(Classes full debug .jar) means missing source. Double check your source to see what's missing and either add, or revert some things.
[Android] kenzolo:
Ok thanks but I'm nubby...How can I check if missing something in the source? "repo sync" not solve the issue
[Android] kenzolo:
ok thanks but now I've another problem...

ERROR: couldn't find <type 'property'> in build.prop

make: *** [/home/kenzolo/android/system/out/target/product/jfltexx/cm_jfltexx-ota-eng.kenzolo.zip] Error 1
[Android] thelangosta:
Anyone try to do this on Mint 15 yet? I keep getting the "you may have held broken packages" error when I try to install the "guts" part of the OP. I did some searching but none of the fixes seem to help. Please help...:(

Edit: Sorry didn't mean to quote the guy above me. Not the same problem as him.
[Android] ridobe:
I have successfully compiled from aosp source using olivia. When I switched from Ubuntu I started over from scratch and followed the op.

I was able to compile and flash 4.2.2_r1.2 for mako but cannot for manta. For some reason the file is only 115mb and just wont flash. I have cleaned out the directory and started over. I have updated all code involved. I'd like to get this sorted out before 4.3 hits. There aren't any errors to speak of. Does anyone have any ideas or had this happen?
[Android] Ghostman:
Im using Ubuntu 13.04. I did everything step by step and did the repo sync late at night and along the way in the downloads i noticed several curl errors about not fetching the URL for the clone bundle I assume so I left it alone and let the sync continue and I went to sleep. When I woke up I noticed that it was finished, so I gave it a test run and put commands like below and no result. I wanted to learn how build a rom for my Nexus 4 so what am I doing wrong? :confused:

amm@tonycomp:~$ . build/envsetup.shbrunch

bash: build/envsetup.shbrunch: No such file or directory

amm@tonycomp:~$ . build/envsetup.shtime brunch aokp_mako-userdebug

bash: build/envsetup.shtime: No such file or directory

amm@tonycomp:~$ lunch

No such file: /home/amm/.lunchrc

amm@tonycomp:~$ . build/envsetup.shbrunch

bash: build/envsetup.shbrunch: No such file or directory

amm@tonycomp:~$
[Android] ridobe:
First, are you in the source directory? Second, you need to run . build and lunch as two different commands. Either run them separately or add "&&" between them.
[Android] Ghostman:
If you're talking about the home directory then yes. I tried the . build command and this shows up

amm@tonycomp:~$ . build

bash: build: No such file or directory
[Android] ridobe:
No, I mean the directory you have downloaded your source. Also, you need to check out this guide for basic help on compiling and running. http://source.android.com/source/building-running.html
[Android] Ghostman:
Can you give me an example of a directory because im a beginner of ubuntu.
[Android] ridobe:
Lol. What folder were you in when you did a repo sync?
[Android] Ghostman:
\home

---------- Post added at 04:34 PM ---------- Previous post was at 04:32 PM ----------

android folder
[Android] ridobe:
Well, then you're in the right spot though it's a little messy. Just follow the previous link for building instructions.
[Android] Ghostman:
Do i have to put the source link along with "build/envsetup.sh"?
[Android] trevd:
[MENTION=5146586]NexiBoi[/MENTION] As Your last "Question" doesn't make any sense I advise getting to know the basic's of bash first at least sitting through a video or something other wise you're just setting yourself up for a bad experience.

Unless your just trolling in which case I'd offer the same advice ;)

Thanks
[Android] Ghostman:
Im looking over it and im not trolling lol