Related
Hi all I have been trying to compile a pure stock from for my phone using someone elces kernel, device, and vendor directories. I synced the master branch of aosp repo and symlinked my sepreatly downloaded device directories to the proper directories. When I go to build, I use the command
Code:
. /build envsetup.sh && brunch ancora_tmo[Code]
I get
[Code]Including devices/samsung/ancora_tmo/vendorsetup.sh
No command 'brunch' found
[Code]
as well as 4 other aosp devices.
I added ancora tmo by symlinking the sources to my system tree.
I tried building with the command lunch and I get
[Code] don't have product specs for: full_ancora_tmo
Do you have right report manifest[Code]
where am I going wrong on building
I followed some custom build instructions and haven't modified much source yet but am simply trying to build pure stock for my phone what am I doing wrong?
Sent from my Galaxy Exhibit running Jocala's CM9
Try these:
Make sure you run the "PATH" command that it says to in SDK setup:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
Also, if you are making a new device, try to use the mkvendor.sh script in build/tools/device
WhiteHatHacker said:
Try these:
Make sure you run the "PATH" command that it says to in SDK setup:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
Also, if you are making a new device, try to use the mkvendor.sh script in build/tools/device
Click to expand...
Click to collapse
I did I setup the sdk and edited The .bashrc (or something similar) file
and added the sdk path
Sent from my Galaxy Exhibit running Jocala's CM9
Maybe the '-eng' part was missing
try:
Code:
brunch full_ancora_tmo-eng
or do everything:
Code:
brunch full-eng
WhiteHatHacker said:
Maybe the '-eng' part was missing
try:
Code:
brunch full_ancora_tmo-eng
or do everything:
Code:
brunch full-eng
Click to expand...
Click to collapse
Nope, still says brunch isn't found.
possible the report sync didn't complete right
Sent from my Galaxy Exhibit running Jocala's CM9
Who's kernel are you using?
You did:
Code:
source build/envsetup.sh
correct?
WhiteHatHacker said:
Whose kernel are you using?
Click to expand...
Click to collapse
jocala's custom rooted kernel
Sent from my Galaxy Exhibit running Jocala's CM9
WhiteHatHacker said:
Who's kernel are you using?
You did:
Code:
source build/envsetup.sh
correct?
Click to expand...
Click to collapse
Yes correct
I get this error when I try and build from the lunch menu
Don't have product specs for full_ancora_tmo
Do you have right report manifests.
Sent from my Galaxy Exhibit running Jocala's CM9
Its hard for me to help without browsing your directories, but try this.
Grab your boot.img
do:
Code:
build/tools/device/mkvendor.sh device_manufacturer_name device_name /your/path/to/the/boot.img
once that finishes, do:
Code:
lunch full_device_name-eng
then if you go to devices/product/something or other to your device, you should be able to try and replace your stock kernel with his.
I'm shooting from the hip here, so if i'm f***ed up please let me know, we're all learning ;-)
WhiteHatHacker said:
Its hard for me to help without browsing your directories, but try this.
Grab your boot.img
do:
Code:
build/tools/device/mkvendor.sh device_manufacturer_name device_name /your/path/to/the/boot.img
once that finishes, do:
Code:
lunch full_device_name-eng
[CODE]
then if you go to devices/product/something or other to your device, you should be able to try and replace your stock kernel with his.
I'm shooting from the hip here, so if i'm f***ed up please let me know, we're all learning ;-)[/QUOTE]
Huh? I think my repo sync didn't complete there is no device directory in build/ tools.
my directory is only 5.4gb in size that may be my whole problem
Sent from my Galaxy Exhibit running Jocala's CM9
Click to expand...
Click to collapse
Hmmm, then I'm tapped out.
But, at least this thread has been kept bumped
Whereas mine is back down near the bottom of the page :-(
WhiteHatHacker said:
Hmmm, then I'm tapped out.
But, at least this thread has been kept bumped
Whereas mine is back down near the bottom of the page :-(
Click to expand...
Click to collapse
Yep I think my source tree is jacked up I'll resyncing everything and see how that goes
thanks for helping
Sent from my Galaxy Exhibit running Jocala's CM9
No problem, best I could do was try.
Im trying to sync cm12's source code fro git hub
im using virtualbox on host windows 8.1
the virtual machine is ubuntu 14.xx
this porbably the 20th time i did a
Code:
repo sync
it always used to get stuck (it got interupted one way or another :c )
anyways ...later I finally made it till here
HTML:
Fetching projects: 100% (546/546), done.
Traceback (most recent call last):
File "/home/bass_face/.repo/repo/main.py", line 506, in <module>
_Main(sys.argv[1:])
File "/home/bass_face/.repo/repo/main.py", line 482, in _Main
result = repo._Run(argv) or 0
File "/home/bass_face/.repo/repo/main.py", line 161, in _Run
result = cmd.Execute(copts, cargs)
File "/home/bass_face/.repo/repo/subcmds/sync.py", line 681, in Execute
project.Sync_LocalHalf(syncbuf)
File "/home/bass_face/.repo/repo/project.py", line 1230, in Sync_LocalHalf
lost = self._revlist(not_rev(revid), HEAD)
File "/home/bass_face/.repo/repo/project.py", line 2309, in _revlist
return self.work_git.rev_list(*a, **kw)
File "/home/bass_face/.repo/repo/project.py", line 2503, in rev_list
p.stderr))
error.GitError: CyanogenMod/android rev-list ('^ddc4820db2658b6779caf9946e787098d6007967', 'HEAD', '--'): fatal: bad object HEAD
and i got this error can someone please guide me...and i did search for many possible solutions...nothing seems to be related to this porblem or is left unanswered, please help or atleast direct me to a proper solution
many thanks ^_^
Bass_Face said:
Im trying to sync cm12's source code fro git hub
im using virtualbox on host windows 8.1
the virtual machine is ubuntu 14.xx
this porbably the 20th time i did a
Code:
repo sync
it always used to get stuck (it got interupted one way or another :c )
anyways ...later I finally made it till here
HTML:
Fetching projects: 100% (546/546), done.
Traceback (most recent call last):
File "/home/bass_face/.repo/repo/main.py", line 506, in <module>
_Main(sys.argv[1:])
File "/home/bass_face/.repo/repo/main.py", line 482, in _Main
result = repo._Run(argv) or 0
File "/home/bass_face/.repo/repo/main.py", line 161, in _Run
result = cmd.Execute(copts, cargs)
File "/home/bass_face/.repo/repo/subcmds/sync.py", line 681, in Execute
project.Sync_LocalHalf(syncbuf)
File "/home/bass_face/.repo/repo/project.py", line 1230, in Sync_LocalHalf
lost = self._revlist(not_rev(revid), HEAD)
File "/home/bass_face/.repo/repo/project.py", line 2309, in _revlist
return self.work_git.rev_list(*a, **kw)
File "/home/bass_face/.repo/repo/project.py", line 2503, in rev_list
p.stderr))
error.GitError: CyanogenMod/android rev-list ('^ddc4820db2658b6779caf9946e787098d6007967', 'HEAD', '--'): fatal: bad object HEAD
and i got this error can someone please guide me...and i did search for many possible solutions...nothing seems to be related to this porblem or is left unanswered, please help or atleast direct me to a proper solution
many thanks ^_^
Click to expand...
Click to collapse
Did You try This Command
repo sync -f
Then find out whats the issue will causing
repo sync -l
mohamed786 said:
Did You try This Command
repo sync -f
Then find out whats the issue will causing
repo sync -l
Click to expand...
Click to collapse
yes i did try repo synnc -f and i even tried repo sync -f -j with various different values like 1,2,4,16,32
all with the same results...i even tried doing a smart sync i face this error
Code:
error: cannot smart sync: no manifest server defined in manifest
Bass_Face said:
yes i did try repo synnc -f and i even tried repo sync -f -j with various different values like 1,2,4,16,32
all with the same results...i even tried doing a smart sync i face this error
Code:
error: cannot smart sync: no manifest server defined in manifest
Click to expand...
Click to collapse
Just use this command repo sync -l to findout the issue
mohamed786 said:
Just use this command repo sync -l to findout the issue
Click to expand...
Click to collapse
I formatted my virtual HDD and set up everything from scratch following this guide -
https://github.com/PAC-man/android_vendor_pac/blob/pac-5.1/docs/PrepareForBuildLinux.md
As this was the official one run into some problem but I guess I solved it is running fine now.. But please keep an eye on this thread just in case if u could help me get through a problem.
Thanks a ton for replying
Will report the outcomes.
Bass_Face said:
I formatted my virtual HDD and set up everything from scratch following this guide -
https://github.com/PAC-man/android_vendor_pac/blob/pac-5.1/docs/PrepareForBuildLinux.md
As this was the official one run into some problem but I guess I solved it is running fine now.. But please keep an eye on this thread just in case if u could help me get through a problem.
Thanks a ton for replying
Will report the outcomes.
Click to expand...
Click to collapse
Most helpful commands during repo syncing
repo sync -j1 (-j# no of jobs )
repo sync -l (to find issues)
repo sync -c -d -j8
Dont let me post thanks on thread let hit thanks button for all in xda
mohamed786 said:
Most helpful commands during repo syncing
repo sync -j1 (-j# no of jobs )
repo sync -l (to find issues)
repo sync -c -d -j8
Dont let me post thanks on thread let hit thanks button for all in xda
Click to expand...
Click to collapse
this time many things synced properly but
HTML:
Syncing work tree: 61% (310/507) error: in `sync -f`: revision refs/heads/pac-5.1 in android_frameworks_base not found
Bass_Face said:
this time many things synced properly but
HTML:
Syncing work tree: 61% (310/507) error: in `sync -f`: revision refs/heads/pac-5.1 in android_frameworks_base not found
Click to expand...
Click to collapse
Ok.. use this command repo sync -j1 and leave for 6 to 8 hours base frame work base having lots of Gb to download
so be patient.....
Download time will depends on your internet connection.
Oki...and
1. Is there any ways to know when the downloads complete.. I mean a command that will check if everything is in place
2. Will files already downloaded delete itself and redownload.?
mohamed786 said:
Ok.. use this command repo sync -j1 and leave for 6 to 8 hours base frame work base having lots of Gb to download
so be patient.....
Download time will depends on your internet connection.
Click to expand...
Click to collapse
now this happened
Code:
Fetching project android_frameworks_base
error: RPC failed; result=56, HTTP code = 200
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
edit : notice that its just stuck there.? i mean the username doesnt show up (the $ doesnt show up)
edit 2 : i get this at the end then
Checking out files: 100% (3190/3190), done.
Checking out files: 100% (4197/4197), done.
Checking out files: 100% (244/244), done.
Checking out files: 100% (924/924), done.ng out files: 8% (81/924)
Checking out files: 100% (72151/72151), done.
Checking out files: 100% (35/35), done.king out files: 42% (15/35)
Checking out files: 100% (1021/1021), done.
Checking out files: 100% (2459/2459), done.
Syncing work tree: 100% (507/507), done.
[email protected]:~/pac-rom$
am i done.? *_* is this the end.?
Bass_Face said:
now this happened
Code:
Fetching project android_frameworks_base
error: RPC failed; result=56, HTTP code = 200
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
edit : notice that its just stuck there.? i mean the username doesnt show up (the $ doesnt show up)
edit 2 : i get this at the end then
Checking out files: 100% (3190/3190), done.
Checking out files: 100% (4197/4197), done.
Checking out files: 100% (244/244), done.
Checking out files: 100% (924/924), done.ng out files: 8% (81/924)
Checking out files: 100% (72151/72151), done.
Checking out files: 100% (35/35), done.king out files: 42% (15/35)
Checking out files: 100% (1021/1021), done.
Checking out files: 100% (2459/2459), done.
Syncing work tree: 100% (507/507), done.
[email protected]:~/pac-rom$
am i done.? *_* is this the end.?
Click to expand...
Click to collapse
cool
You have complete the source code download
wohoooo
mohamed786 said:
cool
You have complete the source code download
Click to expand...
Click to collapse
Thanks a ton for helping me out will never forget and...
for future reference (cause im not a irresponsible person who leaves a thread after finding the soltuion)
heres what i did:
for anyone whos setting up ubuntu and building lollipop just follow this guide, this is the most basic and mos efficient, you dont have to download a **** load of software if youre running the lates ubuntu version (except for the ones mentioned in the guide) -
HTML:
https://github.com/PAC-man/android_vendor_pac/blob/pac-5.1/docs/PrepareForBuildLinux.md
and most importantely and essential thing to do if youre running ubuntu/mac os x on a virtual box DISABLE ALL THE ANTIVIRUSES,FIREWALLS,ANTIMALWARE SOFTWARES (esspecially the ones dealing with netowrking
and if youve already set up everything and still having errors i suggest updating all and every packages essential [java,python,android sdk,android tools (download all the tools,extras,and the files for the rom your building (version) ]
if youre still having porplems go to the directory where the sources are being downloaded, hit ctrl+h (ubuntu-shows hidden files)
delete everything except .repo except .repo (orelse you will have to redownload all the sources) and initiate repo sync again
if it still doesnt work i suggest formatting everything and starting from scratch or atleast the sources or research till your tired of doing it
and never forget disable firewall or such things they were the culprits in my experience
i almost downloaded 70gb+ data in this process but learnt alot
the thread will most likely be closed now
Bass_Face said:
Thanks a ton for helping me out will never forget and...
for future reference (cause im not a irresponsible person who leaves a thread after finding the soltuion)
heres what i did:
for anyone whos setting up ubuntu and building lollipop just follow this guide, this is the most basic and mos efficient, you dont have to download a **** load of software if youre running the lates ubuntu version (except for the ones mentioned in the guide) -
HTML:
https://github.com/PAC-man/android_vendor_pac/blob/pac-5.1/docs/PrepareForBuildLinux.md
and most importantely and essential thing to do if youre running ubuntu/mac os x on a virtual box DISABLE ALL THE ANTIVIRUSES,FIREWALLS,ANTIMALWARE SOFTWARES (esspecially the ones dealing with netowrking
and if youve already set up everything and still having errors i suggest updating all and every packages essential [java,python,android sdk,android tools (download all the tools,extras,and the files for the rom your building (version) ]
if youre still having porplems go to the directory where the sources are being downloaded, hit ctrl+h (ubuntu-shows hidden files)
delete everything except .repo except .repo (orelse you will have to redownload all the sources) and initiate repo sync again
if it still doesnt work i suggest formatting everything and starting from scratch or atleast the sources or research till your tired of doing it
and never forget disable firewall or such things they were the culprits in my experience
i almost downloaded 70gb+ data in this process but learnt alot
the thread will most likely be closed now
Click to expand...
Click to collapse
MY pleasure
Happy Building In Advance
Thread closed at OP's request.
Due to the apparent lack in proper documentation on building the Snapdragon browser CAF (Code Aurora Forums) has developed, I've decided to take it upon myself to try and build it. You can find out more about it on the Code Aurora Forums Wiki. This guide only builds for m46. To build for m42, repeat the process but with the .gclient configuration provided on the CAF Wiki.
Requirements:
- At least 50GB of free space (to be safe)
- A stable Internet connection (fast one preferred)
- Ubuntu 14.04 x64 ISO
1. First, you'll need to install Ubuntu 14.04 (64-bit) on your system. You can grab the ISO image on Ubuntu's website.
2. When Ubuntu boots, connect to the Internet and open the Terminal. Run the following commands:
Code:
sudo apt-get install git-core
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH="$PATH":~/depot_tools
* - Note: If you are doing it on a daily machine you may cd into another directory for your convenience, and change '~/depot_tools' to where depot_tools is installed.
* - If you wish too you can add the export line to your ~/.bashrc for convenience too.
3. Create a file called .gclient and enter the following into the text editor:
Code:
solutions = [
{ "name" : "src",
"url" : "git://codeaurora.org/quic/chrome4sdp/chromium/[email protected]/remotes/origin/m46",
"deps_file" : "DEPS",
"managed" : True,
"safesync_url": "",
},
]
target_os = ["android"]
* - You can always type 'nano .gclient' into the terminal to launch possibly the world's best text editor, just type CTRL + X, Y, then ENTER when you're done to save.
4. Now here comes the part which will take up a load of disk space (and Internet bandwidth). First run the following command:
Code:
gclient sync -n --no-nag-max
This will download the Android build dependencies and sources.
* - Make sure you do not disconnect from the Internet in the process.
* - You may see nothing change for a long time, just let the process run.
* - This personally took me 12 hours to finish due to my slow Internet connection.
(Optional) Then open src/build/install-build-deps-android.sh and remove the following lines:
Code:
DownloadFromBucket() {
bin=$1
path=$2
gs_url=$3
known_hash=$4
tmpfile=${bin}_$(/bin/date +%s)
if [ ! -x ${path}/${bin} ]; then
/b/build/scripts/slave/gsutil cp ${gs_url} ${tmpfile}
md5=$(md5sum ${tmpfile} | cut -d' ' -f 1)
if [[ $known_hash == $md5 ]]; then
/usr/bin/sudo /bin/mv ${tmpfile} ${path}/${bin}
/usr/bin/sudo /bin/chmod a+x ${path}/${bin}
/usr/bin/sudo /bin/chown root:root ${path}/${bin}
else
echo 'ERROR: Bad md5sum. Not installing' ${bin}
exit 1
fi
fi
}
DownloadFromBucket apktool /usr/local/bin \
'gs://chromium-apktool-bucket/apktool_1_5_2/apktool' \
89d099df9f8b12c043dc74f6f1368f36
DownloadFromBucket apktool.jar /usr/local/bin \
'gs://chromium-apktool-bucket/apktool_1_5_2/apktool.jar' \
2d616934a8eaa37c4501868f05c62871
* - These lines were supposed to be removed but CAF did not update their sources.
* - They are near the bottom of the file.
Afterwards, run the command:
Code:
cd src
. build/install-build-deps-android.sh
5. When all the dependencies are done installing, enter the following commands to build:
Code:
GYP_DEFINES="$GYP_DEFINES clang=0 OS=android" gclient runhooks -v
ninja -C out/Release swe_browser_apk
Have fun! Let me know in the comments below if there are any problems and I'll try my best to reply.
Credits:
hisname - for troubleshooting
enricoros.com - for providing the m46 .gclient file
Screenshots in attachments below. (m42 and m46)
Waiting for the APK.. Will love to try this out.
Sent from my Nexus 6 using Tapatalk
suku_patel_22 said:
Waiting for the APK.. Will love to try this out.
Sent from my Nexus 6 using Tapatalk
Click to expand...
Click to collapse
APK is up!
This thing is fast. Sunspider scores on my N6 are
Chrome stable : 1131
Snappy Chromium : 607
Sent from my Nexus 6 using Tapatalk
this is malicious :|
tornido067 said:
this is malicious :|
Click to expand...
Click to collapse
Malicious?
Sent from my Nexus 6 using Tapatalk
Started to build couple weeks back from m46 branch and never needed to deleted the lines you are deleting / never run the build deeps. Don't get it why you need to run this and over mine don't need.
Chaosdroid is building m46 already using Jenkins: http://chaosdroid.com/jenkins/job/chrome4sdp-beta/
kurtextrem said:
Chaosdroid is building m46 already using Jenkins: http://chaosdroid.com/jenkins/job/chrome4sdp-beta/
Click to expand...
Click to collapse
I'll put that in the OP, thanks!
Nitpicking a bit here, but you can't edit install-build-deps-android.sh until you gclient sync because you have nothing to alter also you have to cd src before building. Maybe this will clear things up for some noobs.
And don't forget you need also play services before runhooks
G4 Man2 said:
Nitpicking a bit here, but you can't edit install-build-deps-android.sh until you gclient sync because you have nothing to alter also you have to cd src before building. Maybe this will clear things up for some noobs.
Click to expand...
Click to collapse
Edited OP, thanks!
danieldmm said:
And don't forget you need also play services before runhooks
Click to expand...
Click to collapse
install-build-deps-android.sh should install that. It did that for me.
Just installed it from XDA Labs.
Question: how can I login to my Google account and get sync?
EMK2000 said:
Just installed it from XDA Labs.
Question: how can I login to my Google account and get sync?
Click to expand...
Click to collapse
The official version of SWE from the CAF repository has removed Google account sign-in. You'll need to go to accounts.google.com and sign-in again.
I didn't add it because I wanted the build to be completely original and synced with the CAF repo. If you want Google sign-in I believe you can try JSwarts's browser, it's also on XDA Labs.
Hey been using the browser for a couple days but i run into a problem where if the browser sits idle for a bit and I go to use it, I cant click the address bar and type so I end up having to kill the app to get it to work again. I'm on nexus 6 btw
gatorz77 said:
Hey been using the browser for a couple days but i run into a problem where if the browser sits idle for a bit and I go to use it, I cant click the address bar and type so I end up having to kill the app to get it to work again. I'm on nexus 6 btw
Click to expand...
Click to collapse
I don't get that problem though, is there a specific website that experiences this problem?
BachMinuetInG said:
I don't get that problem though, is there a specific website that experiences this problem?
Click to expand...
Click to collapse
No just through regular use of the browser.
gatorz77 said:
No just through regular use of the browser.
Click to expand...
Click to collapse
Unfortunately I can't recreate the problem... Maybe you'll want to contact CAF about this?
how do I compile chaos' build? I'm a newbee
I'm trying to compile CM13 for the OPO, and I keep coming with an error, I've tried to compile 3 times, and each time getting the same error. I wiped ccache and tried make clean and still have had the same results, any ideas?
http://pastebin.com/CvJT8RKZ
These could be the culprit :
Code:
expr: syntax error
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
[...]
/Volumes/CM/android/system/kernel/oneplus/msm8974/scripts/xz_wrap.sh: line 23: exec: xz: not found
The second error could be fixed by properly setting up xz binary (either by installing it or exporting it to the current terminal window). Can you also mention what operating system you're using to compile the ROM ?
F4uzan said:
These could be the culprit :
Code:
expr: syntax error
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
[...]
/Volumes/CM/android/system/kernel/oneplus/msm8974/scripts/xz_wrap.sh: line 23: exec: xz: not found
The second error could be fixed by properly setting up xz binary (either by installing it or exporting it to the current terminal window). Can you also mention what operating system you're using to compile the ROM ?
Click to expand...
Click to collapse
I'm using OS X 10.11.4, and this is my first-ish time creating a ROM (well from source anyway) so I have no idea what that means, any chance you could walk me through it (I'm reasonably competent, just need some general direction).
Vekhez said:
I'm using OS X 10.11.4, and this is my first-ish time creating a ROM (well from source anyway) so I have no idea what that means, any chance you could walk me through it (I'm reasonably competent, just need some general direction).
Click to expand...
Click to collapse
Are you trying to build on OS X, or are you running a Linux VM? Either way, I think you might be missing some packages like the above poster mentioned. Here's a guide I found for setting up your OS X environment: http://forum.xda-developers.com/showthread.php?t=2510898, make sure you grab the required packages for compiling android. Good luck!
ryanmat said:
Are you trying to build on OS X, or are you running a Linux VM? Either way, I think you might be missing some packages like the above poster mentioned. Here's a guide I found for setting up your OS X environment: http://forum.xda-developers.com/showthread.php?t=2510898, make sure you grab the required packages for compiling android. Good luck!
Click to expand...
Click to collapse
Following all those instructions everything has already been done, all the brew things have been installed, everything is up to date etc. So I'm assuming the error will be the same?
Vekhez said:
Following all those instructions everything has already been done, all the brew things have been installed, everything is up to date etc. So I'm assuming the error will be the same?
Click to expand...
Click to collapse
You can always sync the repo again and retry the build. If it doesn't work you can always ask in the thread I linked. The other place to check out is here: https://source.android.com/source/initializing.html
Here's a link to the xz package for Mac you seem to be missing: http://macpkg.sourceforge.net/
Introduction
Hello everyone, this is a guide to get you up and running with your own build of Pure Nexus for the Nexus 5X. In this thread, you will learn how to get your computer set up to build and the commands you will need to run. Please read the entire guide and the FAQ. Additionally, this is a developer's thread, there should be no off topic discussion.
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 as that is what I use (Mint 18 is also good) but this should work with any version of Linux; 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 n
repo sync --force-sync
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 n
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 bullhead
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 bullhead
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 bullhead
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!
this wont work on Windows, right?
RonnellTapawan said:
this wont work on Windows, right?
Click to expand...
Click to collapse
I have heard people try to use Bash for Windows but I don't think it will work. Linux or bust.
nathanchance said:
I have heard people try to use Bash for Windows but I don't think it will work. Linux or bust.
Click to expand...
Click to collapse
I tried on bash for windows but it can't build android roms
Dude you should seriously get a XDA medallion or some sort of metal for all you do all over XDA. I see you everywhere. Thanks for building for us and also for this write up. :good: @ nathan
SM210 said:
Dude you should seriously get a XDA medallion or some sort of metal for all you do all over XDA. I see you everywhere. Thanks for building for us and also for this write up. :good: @ nathan
Click to expand...
Click to collapse
Talk to my superiors :silly: thanks for the kind words
Edited.......
Sent from my Nexus 5X using Tapatalk
myawan said:
Anybody wanna share home made build?
Sent from my Nexus 5X using Tapatalk
Click to expand...
Click to collapse
If you read at the end of the OP, it says:
"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!"
Reason being, because if we start compiling these and handing it out like it's no ones business, we're going to run Pure Nexus into the ground and people will start uploading them on AFH and it'll be one big mess. My guess is, this is just a courtesy by the original poster to those of us who can't wait.
My two cents.:laugh::highfive:
i'm on it!!!!! thank you very much!!! download is taking forever ugh
Building it right now! Thanks
I think this would work in Cygwin. I used to compile stuff for the PS3 way back. I'd have a lot of reading to do if I wanted to build this for my phone.
Which gapps to use with this?
Open Gapps micro are working fine.
Gesendet von meinem Nexus 5X mit Tapatalk
So WE can't share our build either? Or what, i didn't get it.
CreasingMass Dev said:
So WE can't share our build either? Or what, i didn't get it.
Click to expand...
Click to collapse
Don't distribute personal builds. Flash them yourself and that is it.
4 hours of download :crying:
OOH MAN!!!!!! no more space in my device!!! how can i resume that???
Code:
Checking out files: 100% (1717/1717), done.
error: unable to write file current/platforms/android-21/arch-x86_64/usr/lib/libz.a
error: unable to write file current/platforms/android-21/arch-x86_64/usr/lib/libz.so
fatal: cannot create directory at 'current/platforms/android-21/arch-x86_64/usr/lib64': Spazio esaurito sul device
Traceback (most recent call last):
File "/home/matteo/Scaricati/PureNexus/.repo/repo/main.py", line 531, in <module>
_Main(sys.argv[1:])
File "/home/matteo/Scaricati/PureNexus/.repo/repo/main.py", line 507, in _Main
result = repo._Run(argv) or 0
File "/home/matteo/Scaricati/PureNexus/.repo/repo/main.py", line 180, in _Run
result = cmd.Execute(copts, cargs)
File "/home/matteo/Scaricati/PureNexus/.repo/repo/subcmds/sync.py", line 769, in Execute
project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
File "/home/matteo/Scaricati/PureNexus/.repo/repo/project.py", line 1325, in Sync_LocalHalf
self._InitWorkTree(force_sync=force_sync)
File "/home/matteo/Scaricati/PureNexus/.repo/repo/project.py", line 2482, in _InitWorkTree
raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree
can i move the PureNexus folder in an external drive and resume??? please
MatteXperiaU said:
4 hours of download :crying:
OOH MAN!!!!!! no more space in my device!!! how can i resume that???
can i move the PureNexus folder in an external drive and resume??? please
Click to expand...
Click to collapse
You can try. Your build times will be much slower though.
Sent from my Nexus 6P using XDA Labs
nathanchance said:
You can try. Your build times will be much slower though.
Sent from my Nexus 6P using XDA Labs
Click to expand...
Click to collapse
i have another partition in the same HD (300GB).. i can use that :fingers-crossed:
which command i need to resume?
sorry for the questions man, you're too kind
TPMJB said:
I think this would work in Cygwin. I used to compile stuff for the PS3 way back. I'd have a lot of reading to do if I wanted to build this for my phone.
Click to expand...
Click to collapse
No promises...
http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/
Out of curiosity, realistically how much disk space would be required to download everything and compile with a 50GB cache? I got everything downloaded and the compile ran but threw some warnings (most of which may have been benign). When the compile terminated with an error, I had about 40MB left on my Linux Mint 18 partition so I assume it ran out of space I started with about 70GB free space
I deleted everything and decided to try again if and when I have a larger partition to play with..... I am currently dual booting on a Windows machine and didn't think to allocate that much space to Mint.
Paul