# [REQ] Setting Up Ubuntu



## BrttWrd

Can somebody make a tutorial thread for setting up ubuntu 10.04/11.10 for android development please. It should include/cover:
-Java
-Android SDK
-Git
-Eclipse
-Retrieving Android source code

thanks! it'll help a lot of people


----------



## imnuts

Most of that info is already outlined on the AOSP page dealing with source. It may be a good idea to start there, as the biggest thing anyone could add would be screenshots. Start here then just follow through the pages listed on the left side, starting at the top and going down.


----------



## BrttWrd

imnuts said:


> Most of that info is already outlined on the AOSP page dealing with source. It may be a good idea to start there, as the biggest thing anyone could add would be screenshots. Start here then just follow through the pages listed on the left side, starting at the top and going down.


and yet, errors have still come up with ubuntu 11.10, thats why ive requested for a community specific tutorial thats broken down to not assume anything


----------



## imnuts

BrttWrd said:


> and yet, errors have still come up with ubuntu 11.10, thats why ive requested for a community specific tutorial thats broken down to not assume anything


When do the errors show up? When building the source, or at some other point. There are some fixes that need to be made to get ICS to build on newer versions of Ubuntu. If you post where you're running into issues, maybe someone can help fix it.


----------



## jellybellys

This thread might help you.
http://rootzwiki.com...urce-on-ubuntu/


----------



## BrttWrd

imnuts said:


> When do the errors show up? When building the source, or at some other point. There are some fixes that need to be made to get ICS to build on newer versions of Ubuntu. If you post where you're running into issues, maybe someone can help fix it.


much earlier than that, like installing git, and java


----------



## mwaters33

I fought with getting a setup that would work using a lot of different distros, but the easiest way is Ubuntu 10.04 and follow the instructions on aosp building from source. Simple as could be.


----------



## MR H3LLMAN

imnuts said:


> much earlier than that, like installing git, and java


I actually was encountering many of the same issues. Per imnut's recommendation I'll be switching to a fresh install of 10.04 or 10.10. I had a hell of a time getting git installed, SDK kept aborting the installation of updates, and repo just said no to my machine. I'm obviously not as knowledgable as others but I am realizing rather quickly that 10.04/10.10 is a better way to go. Most walkthroughs/guides are using 10.04 as well and that says something to me.

Also, are you guys running 32 or 64 bit?


----------



## mwaters33

I'm running 64 bit 10.04 and just setup SSH so I can build with my desktop by using my laptop. Going with 10.04 made it a lot easier for sho


----------



## xoomdev

I was using 10.04 then 10.10 now 11.10 and setting up git/repo/setting up the build environment was generally the same.

There is a slight difference in downloading java as you will need to use a ppa for that in 11.10.

And there is a slight difference in two packages. One of which is listen on the android source page the other is libreadline5-dev needs to be replaced by 6. Or the gpl version of 5 which it tells you is the new package name anyways when you try the old name.

After that..all I have seen is identical. What errors exactly are you seeing. As far as building the source like Imnuts said there are specific commits you need in frameworks/base and frameworks/compile/slang to compile using gcc4.6 ( in Ubuntu 11.10)

If you are relatively new to Ubuntu / compiling android from source I would HIGHLY recommend using 10.04/10.10 since you can just follow the instructions to a T and be building in very short time with little to no frustration other than the time it takes to download/compile the source.

Sent from my Galaxy Nexus using RootzWiki


----------



## BrttWrd

yea, i gotta get another fresh install anyway, since i messed up in my quest to make unity a little less retarded. But the 2 flash drives i have are now broke because i tried erasing them... the filesystems are mega borked. sigh. I love linux, but theres a lot of heartbreak involved


----------



## MR H3LLMAN

I happily stand corrected. The errors were solely from my lack of knowledge on Linux command. I have had better luck setting up from the aosp guide than the official Google one. Worth a try.

Sent from my Galaxy Nexus using RootzWiki


----------



## adlx

It's maybe off topic, but ArchLinux works great to build Android also.


----------



## BrttWrd

[email protected]:~$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
> zip curl zliblg-dev libc6-dev lib32ncurses5-dev ia32-libs \
> x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
> libg11-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
> libxm12-utils xsltproc
Reading package lists... Done
Building dependency tree 
Reading state information... Done
Note, selecting 'lib32z1-dev' instead of 'lib32z-dev'
Package lib32readline5-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32readline-gplv2-dev

E: Unable to locate package zliblg-dev
E: Package 'lib32readline5-dev' has no installation candidate
E: Unable to locate package libg11-mesa-dev
E: Unable to locate package libxm12-utils
[email protected]:~$

somebody could explain that?


----------



## xoomdev

BrttWrd said:


> [email protected]:~$ sudo apt-get install git-core gnupg flex bison gperf build-essential
> > zip curl zliblg-dev libc6-dev lib32ncurses5-dev ia32-libs
> > x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
> > libg11-mesa-dev g++-multilib mingw32 tofrodos python-markdown
> > libxm12-utils xsltproc
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Note, selecting 'lib32z1-dev' instead of 'lib32z-dev'
> Package lib32readline5-dev is not available, but is referred to by another package.
> This may mean that the package is missing, has been obsoleted, or
> is only available from another source
> However the following packages replace it:
> lib32readline-gplv2-dev
> 
> E: Unable to locate package zliblg-dev
> E: Package 'lib32readline5-dev' has no installation candidate
> E: Unable to locate package libg11-mesa-dev
> E: Unable to locate package libxm12-utils
> [email protected]:~$
> 
> somebody could explain that?


Ya...they are all typos.

zlib1g-dev.


----------



## xoomdev

Hrm where did the rest of my reply go to silly tapatalk.

Sent from my Galaxy Nexus using RootzWiki


----------



## xoomdev

Anyways, they are all typos.

E: Unable to locate package zliblg-dev
E: Package 'lib32readline5-dev' has no installation candidate
E: Unable to locate package libg11-mesa-dev
E: Unable to locate package libxm12-utils

zliblg-dev should be zlib1g-dev <= number one not L as ing ZLIB1G-DEV
libg11-mesa-dev should be libgl1-mesa-dev <= now other way around 1 should be an L as in LIBGL1-MESA-DEV
libxm12-utils should be libxml2-utils <= another one where a 1 should be an L as in LIBXML2-UTILS
lib32readline5-dev is telling you what to do. Either install lib32readline-gplv2-dev or lib32readline6-dev


----------



## BrttWrd

@xoomdev haha thanks, ill try the fix when i dont have a physics lab later this week... google should fix their code fonts on the aosp site. readability is a big part of copying down terminal commands.


----------



## xoomdev

BrttWrd said:


> @xoomdev haha thanks, ill try the fix when i dont have a physics lab later this week... google should fix their code fonts on the aosp site. readability is a big part of copying down terminal commands.


Hmmph copy/paste is usually a big part of copying down terminal commands..









Sent from my Galaxy Nexus using RootzWiki


----------



## BrttWrd

xoomdev said:


> Hmmph copy/paste is usually a big part of copying down terminal commands..
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Sent from my Galaxy Nexus using RootzWiki


you actually learn commands when you type em


----------



## doug piston

You do when you copy/pasta a million times as well


----------



## kendon

also there is not much use in typing package names, why would you want to learn arbitrary package names...


----------



## BrttWrd

kendon said:


> also there is not much use in typing package names, why would you want to learn arbitrary package names...


If only you knew how many distros i have on my laptop and how often i replace them with new ones...


----------



## rascarlo

I would really appreciate a post about adding su and busy box to aosp in order to have a pre rooted aosp. I followed some directions I've found in a different post bit no luck.


----------



## doug piston

http://rootzwiki.com/topic/14293-aosp-build-with-no-baseband-cdma-galaxy-nexus/page__view__findpost__p__366440


----------



## BrttWrd

rascarlo said:


> I would really appreciate a post about adding su and busy box to aosp in order to have a pre rooted aosp. I followed some directions I've found in a different post bit no luck.


root isnt normally lost when flashing a rom, so unless you are planning on using a rom for one of those few isntances when root needs to be applied at flashing, i wouldnt worry about it


----------



## rascarlo

doug piston said:


> http://rootzwiki.com...post__p__366440


thanks but i get this: http://rootzwiki.com/topic/14293-aosp-build-with-no-baseband-cdma-galaxy-nexus/page__view__findpost__p__477740

can you help?


----------



## doug piston

I am not sure if it matters but I would not call PRODUCT_PACKAGES twice like you have



Code:


<br />
PRODUCT_PACKAGES<br />
    Camera \<br />
    Superuser<br />

Is how I would do it. I would also re-sync Superuser's git and make sure it is in /packages/apps. I don't know if that will fix the error but I'd try it.


----------



## xoomdev

One question is if superuser.apk is being built and included in your build.if it is then that part of your makefile isn't the problem. You can actually use a new product packages tag for each (it can get messy if you have a bunch though) and if you have just one you can.just put.it on the same line without the back slash then. Check do make sure you are building the right su for root however and that it is being called somewhere to be included.

Sent from my Galaxy Nexus using RootzWiki


----------



## rascarlo

doug piston said:


> I am not sure if it matters but I would not call PRODUCT_PACKAGES twice like you have
> 
> 
> 
> Code:
> 
> 
> <br />
> PRODUCT_PACKAGES<br />
> Camera \<br />
> Superuser<br />
> 
> Is how I would do it. I would also re-sync Superuser's git and make sure it is in /packages/apps. I don't know if that will fix the error but I'd try it.


thanks tried that but no luck.


----------



## rascarlo

xoomdev said:


> One question is if superuser.apk is being built and included in your build.if it is then that part of your makefile isn't the problem. You can actually use a new product packages tag for each (it can get messy if you have a bunch though) and if you have just one you can.just put.it on the same line without the back slash then. Check do make sure you are building the right su for root however and that it is being called somewhere to be included.
> 
> Sent from my Galaxy Nexus using RootzWiki


thanks. I like to use a new call for each package to keep it clean and easily understandable. 
What do you mean when you say "Check do make sure you are building the right su for root"?

I git cloned the apk and the binary.
Thanks


----------

