compile aokp on galaxy ace - Android

Hi guys, I'm new on deving and this is the first time I try to compile a rom...
I'm a sensation user, but I want to make an aokp build for my friend that has a galaxy ace with a good working cm9 rom...
now, can someone help me to understand which source use, which git sync, I am pretty confused...
I have the aokp source here https://github.com/aokp
and maclaw source (fixing things on cm9) here https://github.com/MaclawStudios
I followed a classic guide to compile aokp/cm9 fron source and I already installed all the necessary stuff (sdk, jdk ecc) to compile.
now I'm confused about how proceed with source and git...maybe if someone tells me what I have to type on the terminal and the reason why I am typing it would be great
thanks for your time

throcker said:
Hi guys, I'm new on deving and this is the first time I try to compile a rom...
I'm a sensation user, but I want to make an aokp build for my friend that has a galaxy ace with a good working cm9 rom...
now, can someone help me to understand which source use, which git sync, I am pretty confused...
I have the aokp source here https://github.com/aokp
and maclaw source (fixing things on cm9) here https://github.com/MaclawStudios
I followed a classic guide to compile aokp/cm9 fron source and I already installed all the necessary stuff (sdk, jdk ecc) to compile.
now I'm confused about how proceed with source and git...maybe if someone tells me what I have to type on the terminal and the reason why I am typing it would be great
thanks for your time
Click to expand...
Click to collapse
https://github.com/AOKP/platform_manifest/tree/ics
Read the read me there,then add your device and kernel tress then.add the proprietary files (vendor tree)
Then you should be able to compile...keyword should...
Sent from my HTC PH39100 using Tapatalk 2

ok! exactly, but I'm a bit confused about device trees, proprietary files....I don't know exactly what they are and what commands I should use to add them!...
example: ok I add the aokp repo
$ repo init -u https://github.com/AOKP/platform_manifest.git -b ics
$ repo sync
temporary fix to build:
$ install -d prebuilt/android-arm/kernel
curl -o prebuilt/android-arm/kernel/LINUX_KERNEL_COPYING -O
now? what sould I take from here https://github.com/MaclawStudios and how do I add on the source? with what commands I mean...
and I don't know which of them are the device tree and vendor tree...(but at least I understood which one is the kernel tree XD)
thanks a lot for your help

I found this command to clone git from a cm9 source
$ git clone https://code.google.com/p/cooper-cyanogen/
here https://code.google.com/p/cooper-cyanogen/source/checkout
and what if I sync the aokp repo, than clone this git?
if is possible to do, when should I add it?

Related

[Q] Getting CyanogenMod source

Hi Guys,
I've never used repo before but I am trying to get hold of a copy of the cyanogenmod sources (jellybean). I followed the instructions on this page (grr no links!) wiki.cyanogenmod.com/wiki/Galaxy_Nexus_(GSM):_Compile_CyanogenMod_9_(Linux) down to this section:
Code:
repo init -u git:// github.com/CyanogenMod/android.git -b ics
Now I changed "ics" at the end to "jellybean" as I assumed that was the latest branch for CM10. Then I've run:
Code:
repo sync -j4
Now I'm just wondering (as my sync has been going for hours) is this syncing all of the cyanogenmod sources? I've seen quite a lot of references scroll across the screen that relates to previous versions of android. Or is this actually just download the jellybean code?
Thanks
Oh well, scratch that. It finished about 10 minutes after asking! Sods law eh?!

[Q] can i download multiple android sources??

hey guys just as the title says,, i want to compile jelly bean and ics for my devices,, is there a way i can download both sources at once??
winxuser said:
hey guys just as the title says,, i want to compile jelly bean and ics for my devices,, is there a way i can download both sources at once??
Click to expand...
Click to collapse
In my experience compiling AOSP from source and working with the source code you have to specify which branch of Android you want to download (Can't specfiy multiple banches to download at once) for example to download the latest version of Jelly Bean you would run the command "repo init -u https://android.googlesource.com/platform/manifest -b android-4.3.1_r1". I would recommend creating two different directories to hold your ICS source code and your Jelly Bean source code, an example might look something like the following:
Code:
mkdir ~/android/jellybean
cd ~/android/jellybean
repo init -u https://android.googlesource.com/platform/manifest -b android-4.3.1_r1
repo sync
mkdir ~/android/ics
cd ~/android/ics
repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.4_r2.1
repo sync
Let me know if you still have questions.
ok cheers, so i cant sync both at the same time into different folder?
edit: well thats a bit of a b**** then
also one other thing,, what changes to a CM device tree would i need to make to build a aosp rom
winxuser said:
hey guys just as the title says,, i want to compile jelly bean and ics for my devices,, is there a way i can download both sources at once??
Click to expand...
Click to collapse
Xda university has a nice page with some repo tricks.
Shows
Code:
repo init --reference=~/android/cm -u git://github.com/AOKP/platform_manifest.git -b jb
for syncing files faster in the same android version but different sources.
But I don't think that's what you're looking for.
Btw, if you just want to simultaneously download both sources, why don't you just open another terminal window
winxuser said:
also one other thing,, what changes to a CM device tree would i need to make to build a aosp rom
Click to expand...
Click to collapse
I have only a little experience working with modifying device tree's but you shouldn't have really make any changes to the device tree to build AOSP. All you should have to do is download the Cyanogenmod device tree and use that as your device tree for compiling AOSP, what device are you compiling for?
im gonna be compiling for a couple devices,, galaxy s3 lte and huawei sonic u8650

[Q] Help porting AOSP roms using source ?

Hi all..
I want to learn how to port an AOSP rom to my Sony Xperia S..
I followed this guide: http://xda-university.com/as-a-developer/porting-aosp-roms-using-source-code
But I'm stuck at this:
Now once that’s done go to the github page of the AOSP rom that is being ported and also fork their vendor setup repo so we can add the device to the setup so it can be called later on when we run the . build/envsetup or source build/envsetup.sh command this allows us to compile the rom after when we have selected our target device.
Click to expand...
Click to collapse
How can I find an AOSP source in github ?
Yes I found this but I don't know how to deal with it.
Maybe it's a noob question for you but really need help..
Thanks.
Downloading the Source | Android Open Source Project
source.android.com
repo init -u https://android.googlesource.com/platform/manifest -b YOUR_BRANCH

How to compile stuff against the official AOSP source repo?

Sorry if this has been asked/answered before, but the search terms i can think of are too vague, and come up with results on how to compile the repo itself, or a kernel, etc etc.
After setting up my build environment for android, and pulling the repo with 'repo sync', and building it, how would one compile, say, GNU binutils or busybox for android? More specifically, how do i tell the armv7 cross-compiler/linker to link against libs found in the repo tree? (preferably using command line tools, and not "all-in-one" IDE's or graphical front-ends)
Thanks for any help!

[GUIDE] Building Pure Nexus

Introduction
Alright guys, there was a lot of talk about building Pure Nexus in the main thread, which was a little irritating for some so now we get our own thread! In this post, I will be giving you some resources to go over in order to help you with compilation. If you have any questions, just ask!
If you compile successfully, feel free to share your accomplishment and your computer specs
Compilation Guide
This is available on my Github, where it may be a little more up to date.
0. Getting started
In this guide, I will go over how to build Pure Nexus on your Linux machine. This particular tutorial will focus on Ubuntu 16.04 (Mint 18 is also good) since that is what Google recommends but this should work with any version of Linux (here are steps for setup with Arch Linux, which will cover step 1); it does need to be 64-bit however. I will leave the installation of that up to you, Google is a wonderful resource. If you don't have a good computer but still want to build, check out this thread on XDA: http://forum.xda-developers.com/chef-central/android/guide-how-to-build-rom-google-cloud-t3360430
1. Set up your environment
1. Automatically
Code:
sudo apt-get install git-core
git clone https://github.com/akhilnarang/scripts
cd scripts
ls
bash <script-name>
<script-name> should be one of the scripts in the folder for your particular architecture.
2. Manually
1. Install Java 8
Code:
sudo apt-get update
sudo apt-get install openjdk-8-jdk
sudo apt-get install openjdk-8-jre
2. Install other build tools
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip
2. Configure repo and git
If you have any problems with the below commands, try running as root:
Code:
sudo -s
Git is an open source version control system which is incredibly robust for tracking changes across repositories. Repo is Google's tool for working with Git in the context of Android. More reading if you are interested: https://source.android.com/source/developing.html
Run these commands to get repo working (only do this if you did the manual set up method above:
Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Run these commands to get git working:
Code:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
3. Download the source
First, before downloading the source, create a folder for the source and move into it.
Code:
mkdir ~/<foldername> (eg. mkdir ~/PN or ~/PureNexus)
cd ~/<foldername>
Then, we need to grab the manifest and sync down the repositories. Here are the commands to do this for Pure Nexus for Nougat (make sure you are in the source folder you made above):
Code:
repo init -u https://github.com/PureNexusProject/manifest.git -b android-7.1
repo sync --force-sync
NOTE: The value for the -b flag, "android-7.1", may change; you will need to go to the manifest's page and see what the branch currently is.
Here is the process generally for other ROMs:
When you go to build a ROM, you must download its source. All, if not most, ROMs will have their source code available on Github. To properly download the source, follow these steps:
Go to your ROM's Github (e.g. http://github.com/PureNexusProject)
Search for a manifest (usually called manifest or android_manifest).
Go into the repo and make sure you are in the right branch (located right under the Commits tab).
Go into the README and search for a repo init command. If one exists, copy and paste it into the terminal and hit enter.
If one does not exist, you can make one with this formula:
Code:
repo init -u <url_of_manifest_repo>.git -b <branch_you_want_to_build>
For example:
Code:
repo init -u http://github.com/PureNexusProject/manifest.git -b android-7.1
After the repo has been initialized, run this command to download the source:
Code:
repo sync --force-sync
This process can take a while depending on your internet connection.
4. Build it!
At this point, it'd be a good idea to set up ccache. ccache is a compiler cache, it stores previously compiled files in a directory and pulls from that instead of recompiling if nothing has changed. This speeds up compilation a LOT. If you want to use it, follow the below steps:
Open up your .bashrc file in your home directory using a text editor or nano and append this to the end of it:
Code:
export USE_CCACHE=1
Then type:
Code:
source ~/.bashrc
After that, run one of the below command (replacing the # with how many GBs of ccache you want, 50 is recommended)
Use this one if you used the manual method of set up in section 1:
Code:
prebuilts/misc/linux-x86/ccache/ccache -M #G
Use this one if you used the automatic method of set up in section 1:
Code:
ccache -M #G
After that, it's time to build!
Code:
. build/envsetup.sh
breakfast angler
mka bacon
After that, your computer will build the flashable zip file and if you see something that says make completed, you've done it!
Any time that you want to rebuild, type the following commands:
Code:
repo sync --force-sync
. build/envsetup.sh
breakfast angler
mka clobber
mka bacon
I also have a script to do this on my Github here
Frequently Asked Questions
1.1 Q: I got an error, what do I do??
1.1 A: Well to start, if it is anything with Ninja, I would go ahead and disable it. You can add this to your .bashrc file:
Code:
export USE_NINJA=false
Then type this
Code:
source ~/.bashrc
. build/envsetup.sh
breakfast angler
mka clobber
mka bacon
If it is saying you ran out of memory, follow this post.
If it isn't Ninja related, check out @AzraelsKiss's post here, where he has documented a few common issues. If none of those apply, post here with a detailed list of what you have done and we will do our best to help you.
1.2 Q: Can you guys share your personal builds?
1.2 A: No, personal builds are just that: personal. Beans releases whenever he feels that the release is ready for the masses and if a bunch of personal builds are floating around, that tarnishes the Pure Nexus name. We are more than happy to help get you up and running but we will not be sharing our builds. Thanks for understanding!
MOD EDIT - THIS IS A DEVELOPER DISCUSSION. NOT FOR ORDINARY USERS. There is No Rom for you to Flash. Nor will there be any support for you. Any ETA or other NON-DEVELOPMENT posts here will be removed without warning!
XDA:DevDB Information
A Guide to Building Pure Nexus for Nougat, ROM for the Huawei Nexus 6P
Contributors
nathanchance, BeansTown106
Source Code: https://github.com/PureNexusProject
ROM OS Version: 7.x Nougat
ROM Kernel: Linux 3.10.x
Based On: AOSP
Version Information
Status: Stable
Created 2016-09-15
Last Updated 2017-01-15
Building PureNexus Nougat
RESERVED
Building PureNexus Nougat
Ubuntu is what Google recommend for Android AOSP development. See you http://source.android.com/source/requirements.html
Sent from my Nexus 6P using XDA-Developers mobile app
XDA:DevDB Information
Building Pure Experience Nougat, ROM for the Huawei Nexus 6P
Contributors
Fralund
ROM OS Version: 2.3.x Gingerbread
Version Information
Status: Testing
Created 2016-09-15
Last Updated 2016-09-15
Fralund said:
Ubuntu is what Google recommend for Android AOSP development. See you http://source.android.com/source/requirements.html
Sent from my Nexus 6P using XDA-Developers mobile app
Click to expand...
Click to collapse
But you can actually use most any flavor you wish... You just have to figure out the speedbumps yourself. You can even build using OSX, but that's a whole nutter ball of worms...
Have a good one!
AzraelsKiss said:
I'm a little late, but better late that never... Brand new build with the brand new vendor and blobs... It runs so pretty...
Have a good one!
Click to expand...
Click to collapse
Link?
iSilverBullet said:
Link?
Click to expand...
Click to collapse
It's a personal build, so no link.
iSilverBullet said:
Link?
Click to expand...
Click to collapse
As nathanchance has already said... Personal builds shouldn't be passed around. It's disrespectful to the devs...
Have a good one!
nathanchance said:
Code:
export USE_NINJA=false
mka clobber
breakfast angler
mka bacon
Does that work?
Click to expand...
Click to collapse
Worked very well for me
For those of you that are building PN Nougat, are some minor customizations implemented yet? I ask since I am compiling a copy for myself right now.
laxattack said:
For those of you that are building PN Nougat, are some minor customizations implemented yet? I ask since I am compiling a copy for myself right now.
Click to expand...
Click to collapse
https://plus.google.com/+NathanBenis/posts/21sRasA8Abj
From the sound of Nate's post... He's just got the ROM to the point that he's ready to start on customization. We do have a power menu though.
Have a good one!
laxattack said:
For those of you that are building PN Nougat, are some minor customizations implemented yet? I ask since I am compiling a copy for myself right now.
Click to expand...
Click to collapse
Advanced reboot menu, ADB over network, and stock nav bar tuner and night mode re-enabled are the major ones right now.
Somehow haven't been able to get my virtual machine to compile PN over the weekend (really need to convert my old laptop into a Linux only machine, that's for another day).
So since I want my first N rom to be PN on my N6P and am waiting patiently for it, that means that my Samsung Tab S 8.4 is running Nougat first
Go figure!
GO PN
laxattack said:
For those of you that are building PN Nougat, are some minor customizations implemented yet? I ask since I am compiling a copy for myself right now.
Click to expand...
Click to collapse
nathanchance said:
Advanced reboot menu, ADB over network, and stock nav bar tuner and night mode re-enabled are the major ones right now.
Click to expand...
Click to collapse
What @nathanchance said. But I was surprised to find that after restoring all my previous apps, it works very well and very fast. Definitely faster than 6 builds. Too early to tell
Substratum works with no issues.
Could not get some apps to work like gmd gestures, etc . Not the roms fault but the apps have to be updated for nougat support.
kipue said:
Somehow haven't been able to get my virtual machine to compile PN over the weekend (really need to convert my old laptop into a Linux only machine, that's for another day).
So since I want my first N rom to be PN on my N6P and am waiting patiently for it, that means that my Samsung Tab S 8.4 is running Nougat first
Go figure!
GO PN
Click to expand...
Click to collapse
With some support from this thread, I had no issues compiling... ( I am a super newbie )
aalupatti said:
What @nathanchance said. [...]
With some support from this thread, I had no issues compiling... ( I am a super newbie )
Click to expand...
Click to collapse
Yeah something is wrong with my environnement, the repo sync does not even complete.
I suspect is that I need to give my VM more room to breeze RAM wise.
Anyhow, will see that on my side, that's probably quite OP already.
Thanks ^^
Hey, @nathanchance I'm pretty certain you are running Ubuntu on a VM, right? If so can you share how much memory and storage you have allocated to the VM? I didn't allocate enough space I don't think. Thanks!
I'm attempting to repo sync and it had failed a few times. Could this be due to lack of room on partition? I followed your guide.
Sent from my Nexus 6P using Tapatalk
jmtjr278 said:
Hey, @nathanchance I'm pretty certain you are running Ubuntu on a VM, right? If so can you share how much memory and storage you have allocated to the VM? I didn't allocate enough space I don't think. Thanks!
Click to expand...
Click to collapse
No I have a server I build on but I would say you should allocate half of your computer's memory at a minimum.
Sent from my Nexus 6P using XDA Labs
nathanchance said:
No I have a server I build on but I would say you should allocate half of your computer's memory at a minimum.
Sent from my Nexus 6P using XDA Labs
Click to expand...
Click to collapse
Thanks. I edited my post with another question. Could you have a peek for me please?
Sent from my Nexus 6P using Tapatalk
jmtjr278 said:
Hey, @nathanchance I'm pretty certain you are running Ubuntu on a VM, right? If so can you share how much memory and storage you have allocated to the VM? I didn't allocate enough space I don't think. Thanks!
I'm attempting to repo sync and it had failed a few times. Could this be due to lack of room on partition? I followed your guide.
Sent from my Nexus 6P using Tapatalk
Click to expand...
Click to collapse
I haven't been running Linux under VM for more then a year now but back then 8 GB memory allocated to VM was needed to build (I know some say 4 GB should do the trick but it never worded fine for me).
Disk space I would suggest at least 100-150 GB, If you have the space allocated 200-250GB, that will give you space for ccache and a custom kernel if you like.
jmtjr278 said:
Thanks. I edited my post with another question. Could you have a peek for me please?
Click to expand...
Click to collapse
Depends on what they are. If they are fetch errors, use this: https://android.googlesource.com/new-password
Sent from my Nexus 6P using XDA Labs
kantjer said:
I haven't been running Linux under VM for more then a year now but back then 8 GB memory allocated to VM was needed to build (I know some say 4 GB should do the trick but it never worded fine for me).
Disk space I would suggest at least 100-150 GB, If you have the space allocated 200-250GB, that will give you space for ccache and a custom kernel if you like.
Click to expand...
Click to collapse
Thanks @kantjer I have reallocated the space to 250gb and the memory to 4gb. That's the most I can use and run the VM. I will attempt repo sync again. I appreciate there help! Have been here a while and never attempted this. Wish me luck!
Sent from my Nexus 6P using Tapatalk

Categories

Resources