I am following the below steps to download repo for building an android marshmellow image .
cd ~
$ mkdir myandroid
$ mkdir bin
$ cd myandroid
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ ~/bin/repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r22
$ ~/bin/repo sync
after last step it has already download 18 GB and still going on
is there anyway to find the size of this repo before downloading it.
I have searched the following link
See the size of a github repo before cloning it?
but above method gives output of message : unknown file
how to find it ?
Related
I'm trying to build an AVD image with custom kernel for android emulator, following instructions at
https://source.android.com/devices/automotive/start/avd/android_virtual_device
The problem is that the emulator only displays black screen when using self-built kernel. When I copy the kernel from prebuilts folder or use a kernel from a downloaded AVD image, it works.
I have built the avd image with following steps:
ANDROID_BRANCH="android11-qpr2-release"
REPO_URL="https://android.googlesource.com/platform/manifest"
mkdir $ANDROID_BRANCH && cd $ANDROID_BRANCH && repo init -u $REPO_URL -b $ANDROID_BRANCH --partial-clone && repo sync -c -j8
. build/envsetup.sh && lunch avd_car-userdebug && m -j8
m emu_img_zip
Then I built the kernel with following steps:
mkdir goldfish-kernel-54
cd goldfish-kernel-54
repo init -u https://android.googlesource.com/kernel/manifest -b
common-android11-5.4
repo sync
BUILD_CONFIG=common/build.config.gki.x86_64 build/build.sh
BUILD_CONFIG=common-modules/virtual-device/build.config.goldfish.x86_64
build/build.sh
ls -l ./out/android11-5.4/dist/
Then I unzipped sdk-repo-linux-system-images-eng.username.zip to system-images folder, copied bzImage to that folder and renamed bzImage to kernel-ranchu-64.
I'm trying to run the following git repo command
repo init -u git://codeaurora.org/quic/le/le/manifest.git -b release -m [manifest xml] --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable
but I keep seeing the following gpg error:
gpg: Can't check signature: No public key
fatal: cloning the git-repo repository failed, will remove '.repo/repo'
I tried to follow the steps as stated here to no avail
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
I ran into this and found out you need to have the right gpg key in the ~/.repoconfig folder
Similar to https://stackoverflow.com/a/63125058
But put the key in right place.
mkdir -p ~/.repoconfig/gnupg/
GNUPGHOME=~/.repoconfig/gnupg/ gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 692B382C
If you dont want to locate the CAF key and download it; the following should work.
Install repo from -> https://source.android.com/setup/develop#installing-repo
Drop the --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable from your repo init command.
This below solution worked for me.
First delete the repo u installed with the bin directory.
rm -rf ~/bin
Then delete config file with the below commands.
rm -rf .repoconfig/ rm -rf .gnupg/ (if available)
Then install the repo with the below commands.
sudo apt-get install repo
Then to install the signature run the below commands.
repo init
This will download the required signatures.
That's it, Run the repo init -u <manifest url> -b <release> -m <manifest file>...
repo sync it will start the sync.
Experimented on Ubuntu version: 18.04
I'm trying to download the Android sources as described here: http://source.android.com/source/downloading.html#getting-the-files
wutze#wutze-pc ~
$ cd bin
wutze#wutze-pc ~/bin
$ ls
wutze#wutze-pc ~/bin
$ cd ..
wutze#wutze-pc ~
$ PATH=~/bin:$PATH
wutze#wutze-pc ~
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 26223 100 26223 0 0 107k 0 --:--:-- --:--:-- --:--:-- 110k
wutze#wutze-pc ~
$ chmod a+x ~/bin/repo
wutze#wutze-pc ~
$ mkdir WORKING_DIRECTORY
wutze#wutze-pc ~
$ cd WORKING_DIRECTORY
wutze#wutze-pc ~/WORKING_DIRECTORY
$ repo init -u https://android.googlesource.com/platform/manifest
Get https://gerrit.googlesource.com/git-repo/clone.bundle
wutze#wutze-pc ~/WORKING_DIRECTORY
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
Get https://gerrit.googlesource.com/git-repo/clone.bundle
wutze#wutze-pc ~/WORKING_DIRECTORY
$
but I'm not getting asked for credentials, and repo sync won't work either:
wutze#wutze-pc ~/WORKING_DIRECTORY
$ repo sync
error: command 'sync' requires repo to be installed first.
Use "repo init" to install it here.
wutze#wutze-pc ~/WORKING_DIRECTORY
and I don't get any error message
Try installing Git for Cygwin. Its under the 'devel' category within Cygwin setup.
The only way you can add these is by re-running the setup again.
Linux and programming noob here...
I'm following the instructions # http://source.android.com/source/downloading.html
I run into trouble when I run the following line:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
I get:
bash: /home/dev/bin/repo: Permission denied
And yes I've tried to sudo it.
Thank you! :)
==================================================================================
EDIT:
I downloaded the script manually in a browser, popped-it into the home/dev/bin/ directory, and I am still unable to progress. Here is what my terminal window is giving me:
dev#Android-Dev:~$ sudo chmod a+x ~/bin/repo
[sudo] password for dev:
dev#Android-Dev:~$ cd /home/dev/bin/
dev#Android-Dev:~/bin$ sudo mkdir wip
dev#Android-Dev:~/bin$ cd wip
dev#Android-Dev:~/bin/wip$ repo init -u **<This is where the URL goes>**
fatal: cannot make .repo directory: Permission denied
dev#Android-Dev:~/bin/wip$ sudo repo init -u **<This is where the URL goes>**
sudo: repo: command not found
dev#Android-Dev:~/bin/wip$ cd bin
bash: cd: bin: No such file or directory
dev#Android-Dev:~/bin/wip$ cd ..
dev#Android-Dev:~/bin$ sudo repo init -u **<This is where the URL goes>**
sudo: repo: command not found
I ran into the same problem. changing the ownership helped me. When I try to curl https..://myrepo...u...r...l../repo > ./repo into my /opt/android dir it gives me this error.
I do sudo chown -R shraddha /opt/android that works
In CYGWIN you can do below.
edit .bash_profile and uncomment these fields. (any text editor will do)
# Set PATH so it includes user's private bin if it exists
# if [ -d "${HOME}/bin" ] ; then
# PATH="${HOME}/bin:${PATH}"
# fi
Restart CYGWIN.
Under BASH, enter:
$ export PATH=$PATH:~/bin
Or add as follows to your .bashrc file:
$ echo 'export PATH=$PATH:~/bin' >> ~/.bashrc
If you are using CSH / TCSH, enter:
$ echo 'set PATH = ($PATH ~/bin /scripts/admin)' >> ~/.cshrc
To display path settings, enter:
$ echo $PATH
Maybe you're behind a proxy? Try to download repo tool manually (just put this link into your browser). (I guess that maybe this resource can be prohibited for you). And then put it into this folder and assign permissions to it. I do not see any wrong steps in what you've described so far.
you can try this:
wget http://git-repo.googlecode.com/files/repo-1.14
After that,
you can see the repo-1.14, and you can mv it to anywhere or change the name,such as :
sudo mv repo-1.14 ~/bin/repo
The repo file is not executable. Run chmod a+x ~/bin/repo to turn it into an executable file and this should fix your problem.
I downloaded Android 2.2 source code a long time ago but it didn't have the kernel source code. I looked online and it seems like there is a separate Android kernel source I should download.
Someone gave me this address
git clone https://android.googlesource.com/kernel/common
but I think I should specify the version and branch.
So what is the full command to download Android 2.2 froyo kernel source code?
For other kernels you could use any of these:
git clone https://android.googlesource.com/kernel/common.git
git clone https://android.googlesource.com/kernel/goldfish.git
git clone https://android.googlesource.com/kernel/msm.git
git clone https://android.googlesource.com/kernel/omap.git
git clone https://android.googlesource.com/kernel/samsung.git
git clone https://android.googlesource.com/kernel/tegra.git
git clone https://android.googlesource.com/kernel/common.git is not enough !
cd common
List all the branches:
git branch -a
Checkout one of them:
git checkout android-2.6.39
Get tools:
$ 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
Get repo tool:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Get source code:
$ repo init -u https://android.googlesource.com/platform/manifest
OR
$ repo init -u https://android.googlesource.com/platform/manifest -b release-1.0
OR
$ repo init -u https://android.googlesource.com/platform/manifest -b android-sdk-1.5_r2
$ repo sync`
Sync single project:
$ repo sync {project_name}
Get common kernel:
$ git clone https://android.googlesource.com/kernel/common
To add to #Aloongs answer ->
Get the source using Git:
git checkout -b android-2.6.35 origin/android-2.6.35
where -b = branch name and start point is android-2.6.35
To list the remote branches use the following command:
git branch -r