Building AOSP - Android Q&A, Help & Troubleshooting

I am trying to build AOSP. I have followed some instructions and the best are the instructions of Sony. But when I come to the point to clone the local_manifests, I need to have another file because I am trying to build it for the OnePlus One. I have found the AOSP-bacon repo on github where is a local_manifests to clone. So I have done that but when I try to sync the repo with the command 'repo sync' it gives this back:
[email protected]:~/android$ repo sync
fatal: remove-project element specifies non-existent project: platform/build
I have searched but could not find the answer what to do now. Can someone help me or say what I need to do to build AOSP?

You're cluttering your roomservice.xml with too much stuff. You only really need 3 things, device tree, vendor and kernel sources. You don't need to define the github tag since it should already have been defined in your default.xml located in .repo/manifests.

Related

How to use cyanogen's device trees in clean aosp

Hi, i have a problem with android device trees. I want to flash aosp from source to my zte blade 3. Kernel and source code is ready. Also i find a device tree but it is based on cyanogenmod. I copied tree under
HTML:
aosp/device/zte/atlas40
.
with
HTML:
source build/envsetup.sh
i can see device name. But when i call
HTML:
lunch
There is a huge error like this
HTML:
build/core/product_config.mk:222: *** Can not locate config makefile for product "cm_atlas40". Stop.
** Don't have a product spec for: 'cm_atlas40'
** Do you have the right repo manifest?
Can anyone help, how can i import a device tree from cyanogen to aosp.
thank you.

Help me Compiling CyanogenMod 13 on Ubuntu 16.04

Hi developers. I am very much newbie to whole android development and trying to learn how android works and compiling a rom for myself. Can somebody make a tutorial about compiling CyanogenMod 13 in Ubuntu 16.04 with open jdk 8 ? There are many written tutorials in internet and different guides have me different command instructions. And the android official porting guide is confusing to me. I have no prior knowledge in Java and not much in Linux commands. I am stucked at Initializing my build environment. I have downloaded the compressed source code of CM 13 from this http://forum.xda-developers.com/android/software/sources-android-sources-highly-t3231109 and extracted to a working directory naming "android"
Now after extraction, this folder contains a .repo folder containing 12GB of source code.
(whats the actual size ?)
Then followed this tutorial https://nathanpfry.com/how-to-setup-ubuntu-16-04-lts-xenial-xerus-to-compile-android-roms/
then at android dir, which is my working directory, typing these commands gave me errors attached below.
proceeded to bashrc steps without any problem, then when I typed repo init -u https://github.com/CyanogenMod/android.git -b cm-13.0 to initialize the repo, got an error message attached below. (5th attachment)
Well. As I already have those source codes in .repo, and extracted inside my working directory 'android' so I run repo sync commands which gives me an output attached below. (2nd attachment)
Then after typed these commands
cd .repo/manifests
git fetch origin
git reset --hard origin/cm-13.0
repo sync
And it started to download few things again and
gives me another result with an error (Attached below 3rd attachment).
Then typed cd vendor/cm/
it gives me a shock by no such file or directory exists. See vendor error.png attachment and I am stucked. (4th attachment)
no commands taking properly after that.. prebuilts commands stated as invalid, no device specific code downloaded (I am using a Micromax Bolt Q370 device), no breakfast command taking.. nothing. I am stucked. Whats wrong I am doing ?
I have downloaded 12 GB of data.
(Mobile Data is so expensive)
P.S. I am also uploading some snapshots of my Ubuntu home and working directory so that you can understand what's wrong with no such file or directory error. I dont want to download the whole source code again, and point me out if I am acting like a noob. Your guides will be appreciated and grateful. Have a good day.
I haven't compiled a Rom before? But none of the guides you linked are from source.android.com. Best to do a "make clean" and follow the offical guide provded by Google and adapt as needed. Also for a functioning Rom you'll probably need the proprietary binary blobs for your phone.
Best thing about the android/Google guide is that they are using ubuntu, and assume that you are to, so the guide is specifically aimed for ubuntu, making your life easier.
https://source.android.com/source/index.html
The android source guide is bit complicated for me as I am new to both git and repository things.
A video for CM 13 with a step to step guide will be appreciated at current time. I think it won't be a problem who already has repository installed and built CM 13 before.
Dont use openjdk 8, use 7 as of now 8 is still experimental.
You can try build without sync it first. Just use whatever comes from extracted tar.xz. add your device, kernel, vendor tree. Do source build/envsetup.sh , add_lunch_combo , lunch and then make otapackage.
Please check CyanogenMod build wiki.
Terminal is not taking build/env command. Well buddy, do you have cm 13 repo ?
Check out my attachments. The directories. Are they missing anything ?
The Wiki and Android Source page guides are confusing to me. Sorry I am a beginner but determined to learn
Sorry, I based my previous comment for non-repo archive. For .repo folder you should try to extract the source first and then proceed with build/envsetup.sh, etc, etc
.repo is aleady extracted to my working directory 'android', contains 13GB of source code.
Now if i give envsetup command, my linux terminal doesn't understand it and responses an invalid command error.
vikoadi said:
Dont use openjdk 8, use 7 as of now 8 is still experimental.
You can try build without sync it first. Just use whatever comes from extracted tar.xz. add your device, kernel, vendor tree. Do source build/envsetup.sh , add_lunch_combo , lunch and then make otapackage.
Please check CyanogenMod build wiki.
Click to expand...
Click to collapse
Somebody said me that openjdk 7 is incompatible for CM 13
I am done with repo sync but there are many questions in my mind and things to learn. I made a separate post of these question here http://forum.xda-developers.com/android/help/questions-compiling-cyanogenmod-13-t3496186/page1

Which Project Contains unpackbootimg?

I am only compiling a recovery so I don't want to do a full clone of all project required for a ROM.
One of the first steps is to use the mkvendor.sh file from the android_build project to generate an outline to get you started.
However, this is a CyanogenMod script and is not included in the OmniROM source code when you use the minimal manifest for TWRP.
I can get the project like this and it is only about 3MB:
Code:
git clone --depth 1 --single-branch --branch cm-12.1 [email protected]:LineageOS/android_build.git
However, I still need unpackbootimg.
If I had full sources I could do
Code:
mka otatools;find -name "unpackbootimg"
but it doesn't work with the minimal manifest as the project is probably missing.
Which project gets compiled when I do mka otatools on full source?
Once I know that I can just clone the project by itself and save a lot of bandwidth.

Need Help with 'git Cherry-Pick' use and how it is affected on 'Repo Sync'

Hello,
I have an android repo that is init and synced to the 7.0 branch, and I have cherry picked fixes for a few projects.
My question is: if I invoke 'repo sync' does it sync back to the original init 7.0 branch without the cherry-picks for the projects? Everytime I run 'repo sync' to update my manifest, I seem to lose the cherry picked projects.
If so, how do I make my repo remember the changes I have made?
I tried 'repo start'
Code:
repo start 'my-local' --all
But that just seemed to change my original init branch to the "master" android branch, and then proceed to place the projects in to the 'my-local' branch.
https://github.com/NeoBeum/XpeRicoverE5823/tree/suzuran-7.0
Thanks
Yes, every time you execute repo sync it will sync back to original source. To keep your changes you have to fork manifest and push it to your git account. Than you have to init repo from your git fork of manifest. After that you should fork module you want to modify and charry pick commit. Push changes to your repo. Than modify manifest to download modified module from your repo instead from AOSP etc. You have to specify you remote in manifest and than repo sync. Propably you will have to force sync that particular module.
Look here, there are 3 parts: http://blog.udinic.com/2014/05/24/aosp-part-1-get-the-code-using-the-manifest-and-repo
I found a lot of useful things in that blog.
Thanks, yeah, I also got a reply from GitKraken and read how to use submodules. I also found that if you get disconnected, from the internet when doing anything git, sometimes messes up the objects.
I also realised now the reason repo has all projects, so you can make a full production build, and why it breaks when certain projects are removed... Only took 200GB of trial and error

Building AOSP using CM device files

Hello
I'm trying to build AOSP 6.0.1 using your CM device files (CM13 has been successfully built for my device, Huawei P8). I'm not too experienced with this so some help is appreciated. Right now I have synced the google repo
repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r80
cd .repo
git clone https://github.com/CM-Huawei-P8-Development/local_manifests_gra_l09
cd local_manifests_gra_l09
cd ../..
repo sync
This is where I'm now. The confusion is about am I supposed to also download or sync the device files from https://github.com/CM-Huawei-P8-Development/device_gra_l09 (the device tree)
Also is this https://github.com/CM-Huawei-P8-Development/kernel needed to be downloaded separately? I see in the hwgra-l09-dev.xml file that the repos are indeed listed but will it also work for AOSP?
I'm following a guide for Sony device and it says that next I'm supposed to
source build/envsetup.sh && lunch <--- here something device specific maybe?
and
make –j 8
What am I missing ?

Categories

Resources