account arrowhead-down arrowhead-up mobile-menu search sm-bold-x x-skinny-rounded x-skinny arrowhead-right social-facebook social-googleplus social-instagram social-linkedin social-pinterest social-qzone social-renren social-tencent social-twitter social-vkontakt social-weibo social-youku social-youtube

Please help us improve our website

Take our customer survey to evaluate your visit.

It should only take a few minutes to answer five quick questions. Just click the Launch survey button at the end of your visit to begin.

cancel
Showing results for 
Search instead for 
Did you mean: 
Welcome to the Open Devices community!

This is where we discuss open source and development related questions on our Open Devices initiative.

Problem with Step 4 building Android source

Learner
Message 1 of 7
2,294 Views
Message 1 of 7

Problem with Step 4 building Android source

Whenever I enter into the terminal, this is what happens

 

sam@ubuntu:~/android$ repo init -u https://android.googlesource.com/platform/manifest -b OPR5.170623.014
/usr/bin/env: ‘python’: No such file or directory

Steps 1-3 have gone smoothly:

https://developer.sony.com/develop/open-devices/guides/aosp-build-instructions/build-aosp-oreo-8-0-k...

 

I know I have to be doing something wrong Thinking Face

6 REPLIES 6
Learner
Message 2 of 7
2,273 Views
Message 2 of 7

Re: Problem with Step 4 building Android source

Try installing python repository. It works for me

One time poster
Message 3 of 7
2,268 Views
Message 3 of 7

Re: Problem with Step 4 building Android source


@borolrwrote:

Try installing python repository. It works for me


is python repository the same as python?

 

it tells me python 3.7 is already installed

Developer World
Message 4 of 7
2,241 Views
Message 4 of 7

Re: Problem with Step 4 building Android source

Hi ,

the command in your case should be

 

repo init -u https://android.googlesource.com/platform/manifest -b android-8.0.0_r30

Regards

Alin

 

Learner
Message 5 of 7
2,216 Views
Message 5 of 7

Re: Problem with Step 4 building Android source

I tried that:

sam@ubuntu:~$ repo init -u https://android.googlesource.com/platform/manifest -b android-8.0.0_r30
/usr/bin/env: ‘python’: No such file or directory

I'm not sure what I'm doing wrong here. Steps 1-3 seem to have executed perfectly. It just keeps telling me no such file directory

 

EDIT: I have fixed this by running the command:

sudo apt-get install build-essential libssl-dev libffi-dev python-dev

 However now, I have this output:

epo init -u https://android.googlesource.com/platform/manifest -b android-8.0.0_r30
gpg: keybox '/home/sam/.repoconfig/gnupg/pubring.kbx' created
gpg: /home/sam/.repoconfig/gnupg/trustdb.gpg: trustdb created
gpg: key 16530D5E920F5C65: public key "Repo Maintainer <repo@android.kernel.org>" imported
gpg: key 67B7E448692B382C: public key "Conley Owens <cco3@android.com>" imported
gpg: Total number processed: 2
gpg:               imported: 2

Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get https://gerrit.googlesource.com/git-repo
remote: Finding sources: 100% (6/6)
remote: Total 6 (delta 0), reused 6 (delta 0)
Unpacking objects: 100% (6/6), done.
From https://gerrit.googlesource.com/git-repo
   0f2e45a..8d4b106  master     -> origin/master
Get https://android.googlesource.com/platform/manifest
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
Server does not provide clone.bundle; ignoring.
remote: Sending approximately 10.64 MiB ...        
remote: Counting objects: 653, done        
remote: Finding sources: 100% (6/6)           
remote: Total 8319 (delta 2298), reused 8319 (delta 2298)        
Receiving objects: 100% (8319/8319), 10.59 MiB | 10.89 MiB/s, done.
Resolving deltas: 100% (2298/2298), done.
From https://android.googlesource.com/platform/manifest
 *
 * [new branch]      android-cts-8.0_r1          -> origin/android-cts-8.0_r1
 * [new branch]      android-cts-8.0_r2          -> origin/android-cts-8.0_r2
 * [new branch]      android-cts-8.0_r3          -> origin/android-cts-8.0_r3
 * [new branch]      android-cts-8.0_r4          -> origin/android-cts-8.0_r4
 * [new branch]      android-cts-8.0_r5          -> origin/android-cts-8.0_r5
 * [new branch]      android-cts-8.0_r6          -> origin/android-cts-8.0_r6
 * [new branch]      android-cts-8.0_r7          -> origin/android-cts-8.0_r7
 * [new branch]      android-cts-8.0_r8          -> origin/android-cts-8.0_r8
 * [new branch]      android-cts-8.1_r1          -> origin/android-cts-8.1_r1
 * [new branch]      android-cts-8.1_r2          -> origin/android-cts-8.1_r2
 * [new branch]      android-cts-8.1_r3          -> origin/android-cts-8.1_r3
 * [new branch]      android-cts-8.1_r4          -> origin/android-cts-8.1_r4
Traceback (most recent call last):
File "/home/sam/.repo/repo/main.py", line 531, in <module>
_Main(sys.argv[1:])
File "/home/sam/.repo/repo/main.py", line 507, in _Main
result = repo._Run(argv) or 0
File "/home/sam/.repo/repo/main.py", line 180, in _Run
result = cmd.Execute(copts, cargs)
File "/home/sam/.repo/repo/subcmds/init.py", line 404, in Execute
self._ConfigureUser()
File "/home/sam/.repo/repo/subcmds/init.py", line 298, in _ConfigureUser
name = self._Prompt('Your Name', mp.UserName)
File "/home/sam/.repo/repo/project.py", line 784, in UserName
self._LoadUserIdentity()
File "/home/sam/.repo/repo/project.py", line 797, in _LoadUserIdentity
u = self.bare_git.var('GIT_COMMITTER_IDENT')
File "/home/sam/.repo/repo/project.py", line 2747, in runner
(self._project.name, name, p.stderr))
error.GitError: manifests var:
*** Please tell me who you are.

Run

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

Highlighted
Adviser
Message 6 of 7
2,187 Views
Message 6 of 7

Re: Problem with Step 4 building Android source

You need python2 to build AOSP

 

Not just the repo script, a tons of scripts in AOSP use python and most of them are python2 only.

 

So make sure that /usr/bin/python is a symlink to python2

Learner
Message 7 of 7
2,180 Views
Message 7 of 7

Re: Problem with Step 4 building Android source

Please be sure that you have a working python2 installed. I have both python2 and 3 and the following configuration works for me:

 

$ ls -al /usr/bin/python*
lrwxrwxrwx 1 root root       9 Apr 16 16:31 /usr/bin/python -> python2.7
lrwxrwxrwx 1 root root       9 Apr 16 16:31 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 3633560 Apr 15 23:51 /usr/bin/python2.7
lrwxrwxrwx 1 root root       9 Apr 30 11:11 /usr/bin/python3 -> python3.6
-rwxr-xr-x 2 root root 4576440 Apr  1 07:46 /usr/bin/python3.6
-rwxr-xr-x 2 root root 4576440 Apr  1 07:46 /usr/bin/python3.6m
lrwxrwxrwx 1 root root      10 Apr 30 11:11 /usr/bin/python3m -> python3.6m