Downloading and getting started with the source code in Ubuntu 10.04

78 views
Skip to first unread message

Shawn Strickland

unread,
May 20, 2010, 2:20:05 PM5/20/10
to android-platform
I have been following the directions online through source.android.com
http://source.android.com/source/download.html
I go along and Ubuntu is unable to complete actions, some site
addresses no longer exist, and it seems that the Java SDK is
uninstallable (the Java 5 version).

Have others installed the source code on Ubuntu 10.04?

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

Mike Lockwood

unread,
May 20, 2010, 5:04:58 PM5/20/10
to android-...@googlegroups.com
Hi Shawn,

The trick to installing Java 1.5 on more Ubuntu 9.10 and 10.04 is to
add the following to /etc/sources.list:

deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse

Then do:

sudo apt-get update
sudo apt-get install sun-java5-jdk

You might also need to do:

sudo update-java-alternatives -sjava-1.5.0-sun

to switch from Java 1.6 to 1.5 if it doesn't happen automatically.

Mike
--
Mike Lockwood
Google android team

Patrick Jacques

unread,
May 20, 2010, 4:52:36 PM5/20/10
to android-...@googlegroups.com
Enable the apt partner repo and install sun-java6-jdk.

Naren Bhat

unread,
May 20, 2010, 4:44:51 PM5/20/10
to android-...@googlegroups.com
I have heard of issues with 10.04, not sure what they are. So we have been using 9.10 (Karmic) release and have not had problems building android.
 
Naren

On Thu, May 20, 2010 at 11:20 AM, Shawn Strickland <sstrick...@gmail.com> wrote:

dappula prashanth

unread,
May 20, 2010, 4:55:47 PM5/20/10
to android-...@googlegroups.com
Hi Shawn , I was able to get the source code on Ubuntu 10.04 recently without any issues. Can you please explain the error you encountered?
 
Regards
Prashanth D

On Thu, May 20, 2010 at 2:20 PM, Shawn Strickland <sstrick...@gmail.com> wrote:



--
Regards
Prashanth Dappula| Wipro Technologies| Mobile : +1-647-684-3873
E-mail: prashant...@wipro.com

Shawn Strickland

unread,
May 21, 2010, 1:08:55 AM5/21/10
to android-platform
I will try a few gotcha's I think I'm running into, and will post the
process I go through to install Repo and Git to get to the source
code.

Right now I'm just trying to follow the directions at
http://source.android.com/source/download.html

Shawn Strickland

unread,
May 21, 2010, 1:29:35 AM5/21/10
to android-platform
I can't install Repo, when I do, I get this error in the terminal for
a page that doesn't exist:

shawn@ubuntu:~$ sudo apt-get install git-core gnupg sun-java5-jdk flex
bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip
curl libncurses5-dev zlib1g-dev
[sudo] password for shawn:
Reading package lists... Done
Building dependency tree
Reading state information... Done
gnupg is already the newest version.
E: Couldn't find package sun-java5-jdk
shawn@ubuntu:~$ cd ~
shawn@ubuntu:~$ mkdir bin
shawn@ubuntu:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/
games
shawn@ubuntu:~$ curl http://android.git.kernel.org/repo~/bin/repo
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /repo~/bin/repo was not found on this server.</p>
</body></html>
shawn@ubuntu:~$


Also, having problems getting Java 5 on the 10.04 machine.

Trent Shea

unread,
May 21, 2010, 2:59:54 AM5/21/10
to android-...@googlegroups.com
On Thursday 20 May 2010 23:29:35 Shawn Strickland wrote:
> shawn@ubuntu:~$ curl http://android.git.kernel.org/repo~/bin/repo
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

curl http://android.git.kernel.org/repo > ~/bin/repo

For Java, I downloaded it from oracle and added it to my path.
/bin/sh jdk-1_5_0_22-linux-i586.bin && export PATH=$PATH:$PWD/jdk1.5.0_22/bin


--
Regards,
Trent.

dappula prashanth

unread,
May 21, 2010, 11:40:16 AM5/21/10
to android-...@googlegroups.com
Hi Shawn, did you follow Mike's reponse on editing /etc/apt/sorces.list file for getting sun-java5-jdk? Below are the steps which are already mentioned  by Mike:
 
1. $ sudo gedit /etc/apt/sources.list
2. (Add this line at the end of sources.lst file) deb http://us.archive.ubuntu.com/ubuntu/  jaunty-updates main multiverse
3. Save and close the file
4. $ sudo aptitude update
5. $ sudo aptitude install sun-java5-jdk
6. $ sudo update-java-alternatives -sjava-1.5.0-sun
--
Regards
Prashanth D

Shawn Strickland

unread,
May 21, 2010, 1:19:57 PM5/21/10
to android-platform
I am following directions right now to install via dappula.

Was able to get git to work, and download what seems like individual
program sources from the website http://android.git.kernel.org/

Thanks all for the help, I'll let you know when I get stuck again.

Shawn Strickland

unread,
May 21, 2010, 1:43:10 PM5/21/10
to android-platform
Thanks all for the help. I still cannot install Repo, it seems to be
the only thing holding me back. I don't have much experience in
Ubuntu or Java either, so that definitely doesn't help, but as the
title implies, I just wanted to poke around the source code.

Maybe, you all can help me with my final question for the topic:
(unless I mess more with the installation instructions, and get
further down the instructions page at source.android...)

I can git clone a specific app I want to look at, for example the
Calculator. I can open it up in gedit and see the source (which is
what I wanted to do anyway)
How can I go about building this and running this in an Android
emulator such as what I can do with Android apps in Windows in
Eclipse?

Also, if I can find a way to do this, I can also send it to my Android
device (just a stock HTC Hero) and use the app natively (as I've found
possible before), but how can I replace native applications in Android
(like Calculator, or home, or...) to use my own version of... is this
possible, and as easy as building and running on the device/emulator?
Or is it much more intensive than that? If so, I'll keep playing
around with it, but it'll take some time to fully understand what's
going on.

Any reference materials or preferably books on working with the
Android Source Code? (And not just building applications... or does
it go hand-in-hand?)

Scott Kennedy

unread,
May 22, 2010, 1:09:20 AM5/22/10
to android-platform
Why are you all using 1.5? It builds fine with 1.6.

On May 21, 11:40 am, dappula prashanth <dappulaprasha...@gmail.com>
wrote:
> Hi Shawn, did you follow Mike's reponse on editing /etc/apt/sorces.list file
> for getting sun-java5-jdk? Below are the steps which are already mentioned
> by Mike:
>
> 1. $ sudo gedit /etc/apt/sources.list
> 2. (Add this line at the end of sources.lst file) debhttp://us.archive.ubuntu.com/ubuntu/ jaunty-updates main multiverse
> 3. Save and close the file
> 4. $ sudo aptitude update
> 5. $ sudo aptitude install sun-java5-jdk
> 6. $ sudo update-java-alternatives -sjava-1.5.0-sun
>
> On Fri, May 21, 2010 at 1:29 AM, Shawn Strickland
> <sstrickland...@gmail.com>wrote:
>
>
>
>
>
> > I can't install Repo, when I do, I get this error in the terminal for
> > a page that doesn't exist:
>
> > shawn@ubuntu:~$ sudo apt-get install git-core gnupg sun-java5-jdk flex
> > bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip
> > curl libncurses5-dev zlib1g-dev
> > [sudo] password for shawn:
> > Reading package lists... Done
> > Building dependency tree
> > Reading state information... Done
> > gnupg is already the newest version.
> > E: Couldn't find package sun-java5-jdk
> > shawn@ubuntu:~$ cd ~
> > shawn@ubuntu:~$ mkdir bin
> > shawn@ubuntu:~$ echo $PATH
> > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/
> > games
> > shawn@ubuntu:~$ curlhttp://android.git.kernel.org/repo~/bin/repo
> > <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> > <html><head>
> > <title>404 Not Found</title>
> > </head><body>
> > <h1>Not Found</h1>
> > <p>The requested URL /repo~/bin/repo was not found on this server.</p>
> > </body></html>
> > shawn@ubuntu:~$
>
> > Also, having problems getting Java 5 on the 10.04 machine.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-platform" group.
> > To post to this group, send email to android-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > android-platfo...@googlegroups.com<android-platform%2Bunsubscrib e...@googlegroups.com>
> > .

Karthik

unread,
May 24, 2010, 12:47:24 AM5/24/10
to android-...@googlegroups.com
I have built both 1.6 and 2.1 on Ubuntu 10.04.

Regards,
Karthik

Das

unread,
May 25, 2010, 9:47:14 AM5/25/10
to android-platform
Hi All,

I am new to Android-platform. I tried following the procedure
mentioned by Mike. I am seeing the following error when I run the
command
curl http://android.git.kernel.org/repo ~/bin/repo

main = my_main

ver_str = '.'.join(map(lambda x: str(x), VERSION))
me = [main,
'--repo-dir=%s' % dir,
'--wrapper-version=%s' % ver_str,
'--wrapper-path=%s' % wrapper_path,
'--']
me.extend(orig_args)
me.extend(extra_args)
try:
os.execv(main, me)
except OSError, e:
print >>sys.stderr, "fatal: unable to start %s" % main
print >>sys.stderr, "fatal: %s" % e
sys.exit(148)


if __name__ == '__main__':
main(sys.argv[1:])

curl: (3) <url> malformed

And when I try to run the following commands

vkdasan@vkdasan-laptop:~$ sudo apt-get install sun-java5-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
sun-java5-jdk: Depends: sun-java5-demo (= 1.5.0-19-0ubuntu0.9.04)
but it is not going to be installed
sun-java5-jre: Depends: sun-java5-bin (= 1.5.0-19-0ubuntu0.9.04) but
it is not going to be installed or
ia32-sun-java5-bin (=
1.5.0-19-0ubuntu0.9.04) but it is not installable
Recommends: gsfonts-x11 but it is not going to be
installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or
specify a solution).

I am unable to proceed further. Please kindly let me know how can I
get rid of the above errors.

Thanks,
Kannadasan

On May 24, 5:47 am, Karthik <karthikshanmu...@gmail.com> wrote:
> I have built both 1.6 and 2.1 on Ubuntu 10.04.
>
> Regards,
> Karthik
>
>
>
> On Sat, May 22, 2010 at 10:39 AM, Scott Kennedy <skenned...@gmail.com> wrote:
> > Why are you all using 1.5?  It builds fine with 1.6.
>
> > On May 21, 11:40 am, dappula prashanth <dappulaprasha...@gmail.com>
> > wrote:
> >> Hi Shawn, did you follow Mike's reponse on editing /etc/apt/sorces.list file
> >> for getting sun-java5-jdk? Below are the steps which are already mentioned
> >> by Mike:
>
> >> 1. $ sudo gedit /etc/apt/sources.list
> >> 2. (Add this line at the end of sources.lst file) debhttp://us.archive.ubuntu.com/ubuntu/ jaunty-updates main multiverse
> >> 3. Save and close the file
> >> 4. $ sudo aptitude update
> >> 5. $ sudo aptitude install sun-java5-jdk
> >> 6. $ sudo update-java-alternatives -sjava-1.5.0-sun
>
> >> On Fri, May 21, 2010 at 1:29 AM, Shawn Strickland
> >> <sstrickland...@gmail.com>wrote:
>
> >> > I can't installRepo, when I do, I get this error in the terminal for
> >> > a page that doesn't exist:
>
> >> > shawn@ubuntu:~$ sudo apt-get install git-core gnupg sun-java5-jdk flex
> >> > bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip
> >> > curl libncurses5-dev zlib1g-dev
> >> > [sudo] password for shawn:
> >> > Reading package lists... Done
> >> > Building dependency tree
> >> > Reading state information... Done
> >> > gnupg is already the newest version.
> >> > E: Couldn't find package sun-java5-jdk
> >> > shawn@ubuntu:~$ cd ~
> >> > shawn@ubuntu:~$ mkdir bin
> >> > shawn@ubuntu:~$ echo $PATH
> >> > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/
> >> > games
> >> > shawn@ubuntu:~$ curlhttp://android.git.kernel.org/repo~/bin/repo
> >> > <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> >> > <html><head>
> >> > <title>404 Not Found</title>
> >> > </head><body>
> >> > <h1>Not Found</h1>
> >> > <p>The requested URL /repo~/bin/repowas not found on this server.</p>

rk

unread,
May 26, 2010, 8:53:10 AM5/26/10
to android-platform
Please use the following command to install repo.

$curl http://android.git.kernel.org/repo > ~/bin/repo

If some one from Android team reading this post, you can check this in
source.android.com, in the old site this command was fine, but now I
feel there is a small mistake.

Thanks
rk

> > >> > "android-platform" group.> >> > To post to this group, send email toandroid...@googlegroups.com.
> > >> > To unsubscribe from this group, send email to> >> >android-platfo...@googlegroups.com<android-platform%2Bunsu...@googlegroups.com>


> > >> > .
> > >> > For more options, visit this group at
> > >> >http://groups.google.com/group/android-platform?hl=en.
>
> > >> --
> > >> Regards
> > >> Prashanth D
>
> > >> --

> > >> You received this message because you are subscribed to the Google Groups "android-platform" group.> >> To post to this group, send email toandroid...@googlegroups.com.> >> To unsubscribe from this group, send email toandroid-platf...@googlegroups.com.


> > >> For more options, visit this group athttp://groups.google.com/group/android-platform?hl=en.
>
> > > --

> > > You received this message because you are subscribed to the Google Groups "android-platform" group.> > To post to this group, send email toandroid...@googlegroups.com.> > To unsubscribe from this group, send email toandroid-platf...@googlegroups.com.


> > > For more options, visit this group athttp://groups.google.com/group/android-platform?hl=en.
>
> > --

> > You received this message because you are subscribed to the Google Groups "android-platform" group.> To post to this group, send email toandroid...@googlegroups.com.> To unsubscribe from this group, send email toandroid-platf...@googlegroups.com.


> > For more options, visit this group athttp://groups.google.com/group/android-platform?hl=en.
>
> --

> You received this message because you are subscribed to the Google Groups "android-platform" group.To post to this group, send email toandroid...@googlegroups.com.To unsubscribe from this group, send email toandroid-platf...@googlegroups.com.

kanna dasan

unread,
May 26, 2010, 11:19:03 AM5/26/10
to android-...@googlegroups.com
Thanks rk,

I was successful in checking out the database. I still have problems getting Java5. Please suggest me how I can proceed further. I am getting the following error while executing the following commands.

vkdasan@vkdasan-laptop:~$ sudo apt-get install sun-java5-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
 sun-java5-jdk: Depends: sun-java5-demo (= 1.5.0-19-0ubuntu0.9.04)
but it is not going to be installed
 sun-java5-jre: Depends: sun-java5-bin (= 1.5.0-19-0ubuntu0.9.04) but
it is not going to be installed or
                         ia32-sun-java5-bin (=
1.5.0-19-0ubuntu0.9.04) but it is not installable
                Recommends: gsfonts-x11 but it is not going to be
installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or
specify a solution).
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.

rk

unread,
May 26, 2010, 1:10:10 PM5/26/10
to android-platform
Hi,

Download the Java5 JDK for Linux from http://java.sun.com/javase/downloads/5u21/jdk

This is a binary file that you should save to the location where you
want to install the java,

make it executable my using the following command,

$ chmod 777 jdk-1_5_0_21-linux-i586.bin

and run it using the following command

$ ./jdk-1_5_0_21-linux-i586.bin

This will install the jdk to the current directory.

before building the android set jdk bin path to PATH variable.

$ export PATH=~/tools/jdk1.5.0_21/bin:$PATH


hope this helps you to get Java 1.5

Thanks
rk

On May 26, 11:19 am, kanna dasan <vkda...@gmail.com> wrote:
> Thanks rk,
>
> I was successful in checking out the database. I still have problems getting
> Java5. Please suggest me how I can proceed further. I am getting the
> following error while executing the following commands.
>
> vkdasan@vkdasan-laptop:~$ sudo apt-get install sun-java5-jdk
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> You might want to run 'apt-get -f install' to correct these:
> The following packages have unmet dependencies.
>  sun-java5-jdk: Depends: sun-java5-demo (= 1.5.0-19-0ubuntu0.9.04)
> but it is not going to be installed
>  sun-java5-jre: Depends: sun-java5-bin (= 1.5.0-19-0ubuntu0.9.04) but
> it is not going to be installed or
>                          ia32-sun-java5-bin (=
> 1.5.0-19-0ubuntu0.9.04) but it is not installable
>                 Recommends: gsfonts-x11 but it is not going to be
> installed
> E: Unmet dependencies. Try 'apt-get -f install' with no packages (or
> specify a solution).
>

> On Wed, May 26, 2010 at 1:53 PM, rk <raj.10...@gmail.com> wrote:
> > Please use the following command to install repo.
>

> > $curlhttp://android.git.kernel.org/repo> ~/bin/repo

> > us.archive.ubuntu.com/ubuntu/ jaunty-updates main multiverse

> > <android-platform%2Bunsu...@googlegroups.com<android-platform%252Buns...@googlegroups.com>


>
> > > > >> > .
> > > > >> > For more options, visit this group at
> > > > >> >http://groups.google.com/group/android-platform?hl=en.
>
> > > > >> --
> > > > >> Regards
> > > > >> Prashanth D
>
> > > > >> --
> > > > >> You received this message because you are subscribed to the Google
> > Groups "android-platform" group.> >> To post to this group, send email
> > toandroid...@googlegroups.com.> >> To unsubscribe from this group,

> > send email toandroid-platf...@googlegroups.com<toandroid-platform%2Bunsu...@googlegroups.com>


> > .
> > > > >> For more options, visit this group athttp://
> > groups.google.com/group/android-platform?hl=en.
>

> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > Groups "android-platform" group.> > To post to this group, send email
> > toandroid...@googlegroups.com.> > To unsubscribe from this group,

> > send email toandroid-platf...@googlegroups.com<toandroid-platform%2Bunsu...@googlegroups.com>


> > .
> > > > > For more options, visit this group athttp://
> > groups.google.com/group/android-platform?hl=en.
>

> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups "android-platform" group.> To post to this group, send email
> > toandroid...@googlegroups.com.> To unsubscribe from this group, send

> > email toandroid-platf...@googlegroups.com<toandroid-platform%2Bunsu...@googlegroups.com>


> > .
> > > > For more options, visit this group athttp://
> > groups.google.com/group/android-platform?hl=en.
>

> > > --
> > > You received this message because you are subscribed to the Google Groups
> > "android-platform" group.To post to this group, send email

> > toandroid-platf...@googlegroups.com.To unsubscribe from this group, send
> > email toandroid-platf...@googlegroups.com<toandroid-platform%2Bunsu...@googlegroups.com>


> > .
> > > For more options, visit this group athttp://
> > groups.google.com/group/android-platform?hl=en.
>

> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-platform" group.
> > To post to this group, send email to android-...@googlegroups.com.
> > To unsubscribe from this group, send email to

Shawn Strickland

unread,
May 27, 2010, 12:09:47 AM5/27/10
to android-platform
I get an error trying to install repo, it's probably me not fully
understanding what I'm doing, but I'd like to see if anyone might
notice anything:

This is my terminal:

shawn@ubuntu:~$ curl http://android.git.kernel.org/repo > ~/bin/repo
% Total % Received % Xferd Average Speed Time Time
Time Current
Dload Upload Total Spent
Left Speed
100 17211 0 17211 0 0 4892 0 --:--:-- 0:00:03
--:--:-- 33225
shawn@ubuntu:~$ chmod a+x ~/bin/repo
shawn@ubuntu:~$ mkdir working-directory-name
shawn@ubuntu:~$ cd working-directory-name
shawn@ubuntu:~/working-directory-name$ repo init-u
git://android.git.kernel.org/platform/manifest.git
No command 'repo' found, did you mean:
Command 'rep' from package 'rep' (universe)
Command 'repl' from package 'nmh' (universe)
Command 'repl' from package 'mailutils-mh' (universe)
repo: command not found

I am not sure what to use as a name for working-directory-name

rk

unread,
May 27, 2010, 1:33:51 AM5/27/10
to android-platform
it looks like you don't have your home/bin path in the PATH variable.

Please add your ~/bin to PATH variable, so that you can run the
command from anywhere.

or

~/bin/repo init-u

Thanks
rk

On May 27, 9:09 am, Shawn Strickland <sstrickland...@gmail.com> wrote:
> I get an error trying to install repo, it's probably me not fully
> understanding what I'm doing, but I'd like to see if anyone might
> notice anything:
>
> This is my terminal:
>

> shawn@ubuntu:~$ curlhttp://android.git.kernel.org/repo> ~/bin/repo

Reply all
Reply to author
Forward
0 new messages