Building From from AOSP Source help - General Questions and Answers

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.

Related

[HOWTO] Create your own AOSP 100% stock

EDIT: Just updated post 2 you probably want to read both this post and that post before trying to build.
you can skip the part of getting the official source and the cyanogen source by just doing
Code:
repo init -u git://github.com/CyanogenMod/android.git -b froyo
First some prereqs You must be using linux and building for an evo 4G aka htc_supersonic
Install the android SDK as instructed here: http://developer.android.com/sdk/installing.html
You will need JDK most linux distros have this in the respositorys.
Then just follow step 2 and make sure that you can run adb from any directory in terminal.
Now to the good stuff.
You will now need to open a terminal window and run the following as root
Code:
cd /usr/bin/; curl http://android.git.kernel.org/repo > repo; chmod a+x /usr/bin/repo
now as user do the following
Code:
mkdir ~/android
cd ~/andoid
repo init -u git://android.git.kernel.org/platform/manifest.git
repo sync
This can take FOREVER like 4-5 hours so you might want to let it go when you go to sleep.
Depending on how fast your computer is the following step can take a long time too
Code:
cd ~/andoid
make
This will build the source code for a generic device it should build everything correctly if you have all of the compilers and what not. If it fails just install the app that it is complaining about.
Now for the EVO specific stuff
Code:
cd ~/android/device/htc
git clone http://github.com/CyanogenMod/android_device_htc_supersonic.git supersonic
That will get the build files however you are going to have to edit them to get it to work.
~/android/device/htc/supersonic/BoardConfig.mk needs to be edited
Code:
TARGET_RECOVERY_UI_LIB := librecovery_ui_supersonic librecovery_ui_htc
TARGET_RECOVERY_UPDATER_LIBS += librecovery_updater_htc
should be
Code:
#TARGET_RECOVERY_UI_LIB := librecovery_ui_supersonic librecovery_ui_htc
#TARGET_RECOVERY_UPDATER_LIBS += librecovery_updater_htc
Some other files may have to be edited to your liking. Personaly I changed ADWLauncher to launcher2 and removed all of the cyanogen stuff.
Now to setup the build enviroment.
Code:
cd ~/android
cp ./vendor/cyanogen/products/cyanogen_supersonic.mk ./buildspec.mk
. build/envsetup.sh
lunch cyanogen_supersonic-eng
Now to do the building.
Code:
make CYANOGEN_WITH_GOOGLE=true otapackage ## if you want google apps (market etc.)
make otapackage ## 100% Open Source only!
By the way for some reason you have to inclued the otapackage even if you just want the .img files because otherwise it crashes at least for me.
Let me know if you encounter any problems and I will try to help.
UPDATES
Copy your ~android folder somewhere and replace ~/android in this tutorial with the directory that you copied it to. This will allow you to update the overlay when needed.
To add google files you will need to do this
Code:
cd ~/android/vendor/cyanogen
./get-google-files
This gets the htc files and I think taht it might be required.
Code:
cd ~/android/device/htc/supersonic
./extract-files.sh
To make a clean rom like mine do the following:
Edit the file ~/android/vendor/cyanogen/products/common.mk to your liking. I just changed the build name and rom version.
I added the files sysrw and sysro ad you can see in the file just put them in a directory and tell it where they are and where you want them. Also I commented out rommanager.apk as I don't like or use it. Also I use RA recovery so it wont work for me anyway.
Also edit the file ~/android/vendor/cyanogen/products/cyanogen_supersonic.mk
I chaged teh build number to the latest spring and removed the boot animation as I like the stock android one better (and it is faster).
YOU NEED TO do this if you want a keyboard...
edit ~/android/vendor/cyanogen/Android.mk and remove LatinIME!
Now we delete some files.
go to ~/android/packages/apps
delete any application that you don't want. You can optionally add program source code that you do want.
I deleted CM* and Protips
I also edited some code in Settings to remove Cyanogen stuff. Actually I took the stock android stuff an edited that with one little fix but I forgot what it was. Just try to build and it will tell you in an error message.
another reserved post
Really cool
Awesome! Thanks so much for posting this.
thanks dude!!
Thanks man.
question...
im having an issue with this step
Code:
cd ~/adnroid
cp ./vendor/cyanogen/products/cyanogen_supersonic.mk ./buildspec.mk
. build/envsetup.sh
lunch cyanogen_supersonic-eng
specifically (lets ignore the type in the instructions
Code:
$ cp ./vendor/cyanogen/products/cyanogen_supersonic.mk ./buildspec.mk
cp: cannot stat `./vendor/cyanogen/products/cyanogen_supersonic.mk': No such file or directory
$ find ~/android -name "cyanogen_supersonic.mk"
$ echo $?
0
anyone else having this issue?
So what is the difference between this and running CM6?
Will this avoid the market issues with CM6?
Once it's built, how do you get it installed on the phone?
Here is the link to cyanogens wiki how too......
http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Supersonic
Anyway to do this on Windows 7? Another question, would this still work if I just ran Ubuntu from disk?
Thanks, will def.ly give this a try soon...
Sent from my PC36100 using Tapatalk
onicrom said:
question...
im having an issue with this step
Code:
cd ~/adnroid
cp ./vendor/cyanogen/products/cyanogen_supersonic.mk ./buildspec.mk
. build/envsetup.sh
lunch cyanogen_supersonic-eng
specifically (lets ignore the type in the instructions
Code:
$ cp ./vendor/cyanogen/products/cyanogen_supersonic.mk ./buildspec.mk
cp: cannot stat `./vendor/cyanogen/products/cyanogen_supersonic.mk': No such file or directory
$ find ~/android -name "cyanogen_supersonic.mk"
$ echo $?
0
anyone else having this issue?
Click to expand...
Click to collapse
there was a typo in my code I edited the post and it should work now.
cteneyck said:
Here is the link to cyanogens wiki how too......
http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Supersonic
Click to expand...
Click to collapse
So really, this is just CM6 built on your own Linux box?
Sent from my PC36100 using Tapatalk
Can this be done from ubuntu on a virtual machine?
And what's the difference between this and cm6 ?.....
how do you replace the adw launcher ?
how can you add additional applications?
onicrom said:
how do you replace the adw launcher ?
how can you add additional applications?
Click to expand...
Click to collapse
in vendor/cyanogen/products
replace this
Code:
#PRODUCT_PACKAGES += ADWLauncher
PRODUCT_PACKAGES += Launcher2
also all of the people asking what the differnece between this and cm is nothing unless you change the source files or add remove packages. they can be found in the packages directory.
Igotsanevo4g said:
Can this be done from ubuntu on a virtual machine?
And what's the difference between this and cm6 ?.....
Click to expand...
Click to collapse
yes you can do this in VM but i don;t know the exact steps to set that up just once you get into your linux VM follow the tutorial.
nice tut. thanks for this...sure it will help MANY
l33tlinuxh4x0r said:
in vendor/cyanogen/products
replace this
Code:
#PRODUCT_PACKAGES += ADWLauncher
PRODUCT_PACKAGES += Launcher2
also all of the people asking what the differnece between this and cm is nothing unless you change the source files or add remove packages. they can be found in the packages directory.
Click to expand...
Click to collapse
Thanks much

[DEV GUIDE] Build CM7 from source in its current state. Updated: 2011/05/16-23:52

PLEASE READ THIS BEFORE CONTINUING:
We are changing to a new build system which will result in an updated but VERY different ROM underneath the hood. There is a HIGH POSSIBILITY that building in the current state could BRICK your device, potentially PERMANENTLY. PLEASE DO NOT FLASH unless you are HIGHLY confident you know what you're doing.
For kernel building, see post #2.
For known issues and changelog, see post #3.
Kanged from the CM-Wiki. Yes it's a wiki, yes I could have created an epic page, but we aren't official yet.
Install ADB
Install the Android SDK.
Install the Build Packages
Install using the package manager of your choice:
For 32-bit & 64-bit systems:
Code:
git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
For 64-bit only systems:
Code:
g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:
Code:
add-apt-repository "deb http://archive.canonical.com/ maverick partner"
Create the Directories
You will need to set up some directories in your build environment.
To create them:
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
Install the Repository
Enter the following to download make executable the "repo" binary:
Code:
curl http://android.git.kernel.org/repo > ~/bin/repo
chmod a+x ~/bin/repo
NOTE: You may need to reboot for these changes to take effect.
Now enter the following to initialize the repository:
Code:
cd ~/android/system/
repo init -u git://github.com/EpicCM/android.git -b teamhacksung-merge
repo sync -j16
Download RomManager and Google Files
NOTE: This only needs to be done when an update to RomManager or GoogleApps is released. If you are up-to-date, you may skip to Building CyanogenMod.
Code:
cd ~/android/system/
./build.sh prepare
Building CyanogenMod
First, check for updates in the source:
Code:
cd ~/android/system/
repo sync
Configure Build & Compile
Now, the environment must be configured to build and the ROM compiled, from code, for the epic.
Code:
cd ~/android/system/
. build/envsetup.sh
./build.sh epic
Build failed? Check post #3 for common problems and solutions.
Install
1. The build system should create a flashable zipfile. Place it on the root of your sdcard.
Optional: Download Google Apps for CyanogenMod 7 and place it on the root of the SD card.
2. Boot into a custom recovery like ClockworkMod Recovery and flash the CM7 update.zip. Then flash google apps if you like.
Please don't flash yet, unless you want an expensive doorstop.
This section of the guide will inform you on how to build a CM7-compatible kernel using our github sources.
Download the Code
Due to the way the new build system works, you'll need the entire CM source to build a proper kernel. (Sorry)
Follow the steps in post #1 to initialize and download our entire CM source repository.
Keeping your code up-to-date:
Code:
cd ~/android/system
repo sync
Toolchain setup
The new build system automatically utilizes the toolchain included in CM7 source.
Prepare to build
The kernel build script requires a few environment vars be set by the CM build system.
Code:
cd ~/android/system/
. build/envsetup.sh
lunch cyanogen_epic-eng
Compile the kernel
Code:
cd ~/android/system/kernel/samsung/2.6.35/
./build.sh epic
cd ~/android/system/releasetools/
./kernel.sh epic
You should now have a flashable zip in out/target/product/epic/
Please don't flash yet, unless you want an expensive doorstop.
This is also incompatible with stock roms, and unless you're amazing, never will be compatible.
KNOWN BUILD-TIME ISSUES
WARNING: These fixes may cause your repo to become out-of-sync from the official repo. Make sure you know how to revert these changes so repo sync doesn't fail.
Error: New build does not boot.
Fix: Working on it
KNOWN RUN-TIME ISSUES
Will update this when it runs.
GUIDE CHANGELOG:
20110516-2352: New build system from teamhacksung.
20110506-1842: Switched to our forks of teamhacksung work.
CODE CHANGELOG:
Available at each of our repositories:
https://github.com/EpicCM
Love seeing these types of posts; makes a pathway for new developers to learn =)
XtaC318 said:
Love seeing these types of posts; makes a pathway for new developers to learn =)
Click to expand...
Click to collapse
I agree! Time to start playing!
Cool guide, makes it easy for the new guys.
Sent from my SPH-D700 using Tapatalk
getting same error. edited make file and tried to remove the samsung/device/crespo device.mk overlap but still a no-go
Code:
build/core/base_rules.mk:479: warning: overriding commands for target `out/target/product/epic/recovery/root/sbin/tune2fs'
bootable/recovery/Android.mk:87: warning: ignoring old commands for target `out/target/product/epic/recovery/root/sbin/tune2fs'
build/core/base_rules.mk:162: *** device/samsung/epic/libs3cjpeg: MODULE.TARGET.SHARED_LIBRARIES.libs3cjpeg already defined by device/samsung/crespo/libs3cjpeg. Stop.
smeyerhuky said:
getting same error. edited make file and tried to remove the samsung/device/crespo device.mk overlap but still a no-go
Code:
build/core/base_rules.mk:479: warning: overriding commands for target `out/target/product/epic/recovery/root/sbin/tune2fs'
bootable/recovery/Android.mk:87: warning: ignoring old commands for target `out/target/product/epic/recovery/root/sbin/tune2fs'
build/core/base_rules.mk:162: *** device/samsung/epic/libs3cjpeg: MODULE.TARGET.SHARED_LIBRARIES.libs3cjpeg already defined by device/samsung/crespo/libs3cjpeg. Stop.
Click to expand...
Click to collapse
yes, that's something that we can't easily fix in our own device repo. you could always remove the crespo folder as a temporary fix, but we need to push a patch upstream that fixes crespo makefiles. I will be adding this to known issues shortly.
So my windows seven crashed on me and I'm gonna go with Ubuntu 10.10 for now
I can play with this on that Linux install, correct?
sent by an Epic4g through the cosmos
raiderep said:
So my windows seven crashed on me and I'm gonna go with Ubuntu 10.10 for now
I can play with this on that Linux install, correct?
Click to expand...
Click to collapse
Yes, it's mentioned in the instructions.
Alternatively, you can use VMWare to do compiling from Windows. That's how I'd set up my old development system. There are tons of free Ubuntu 10.10 vm images.
Updated. Sorry for the mistake in Copy Proprietary Files. That should fix a compile error related to libcamera.
Any clue what causes a build to fail due to unable to dopen system/lib/egl/libandroid_servers.so. When I build with boardconfig has generic audio I'm fine, when I set has galaxys audio it fails
Sent from my SPH-D700 using Tapatalk
dreamsforgotten said:
Any clue what causes a build to fail due to unable to dopen system/lib/egl/libandroid_servers.so. When I build with boardconfig has generic audio I'm fine, when I set has galaxys audio it fails
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
Audio in and out works if you leave it at default values.
If you absolutely want to compile with galaxys audio, it looks like ./extract-files.sh might not be pulling that file? Check ~/android/system/vendor/samsung/epic/proprietary/lib/egl/ for that file.
Thanks for the heads up, no the fileisn't in egl and from what I can tell its not supposed to be.
Sent from my SPH-D700 using Tapatalk
Fix: Open up Context.java, find the three chunks of WimaxManager JAVADOC in comments. Delete JUST the commented stuff that's related to WiMax.
Click to expand...
Click to collapse
Can anyone please elaborate, I don't understand wat exactly to be done. Even though I deleted commented lines I still receive errors
Thanks
THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!
So for kernel compilation I received and error
fs/binfmt_aout.c: In function 'load_aout_binary':
fs/binfmt_aout.c:271: error: 'SEGMENT_SIZE' undeclared (first use in this function)
Click to expand...
Click to collapse
And I had to update a line in Makefile
from
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
Click to expand...
Click to collapse
to
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) -Dlinux
Click to expand...
Click to collapse
Still nearly at the end of compile I receive
samsung-kernel-epic/scripts/mksysmap: line 44: arm-none-eabi-nm: No such file or directory
Click to expand...
Click to collapse
I'll see if I can cream system.map from vmlinux and report again
The kernel compilation issue was discussed here: http://forum.xda-developers.com/showthread.php?t=825611
I needed to do
make update-api
Click to expand...
Click to collapse
After removing those comments
it went ahead now the next place I'm stuck is
CameraService.cpp:1478: error: undefined reference to 'openCameraHardware'
Click to expand...
Click to collapse
Any ideas?
Thanks
\m/ I got cm7 compiled
So here are nullghosts instructions:
open android/system/device/samsung/epic/full_epic.mk for editing and
replace any instance of SPH-D700 to epic
Click to expand...
Click to collapse
Then open extract-files.sh for editing and make sure Copy Files (from mid to bottom) list is same as files list (at top)
add these 2 lines to
FILES="
Click to expand...
Click to collapse
section of extract-files.sh
bin/netcfg
lib/libQmageDecoder
Click to expand...
Click to collapse
If you have any other file missing read below:
head -197 extract-files.sh > files may come in handy to compare 2 files
vendor/samsung/__DEVICE__/proprietary/bin/netcfg:system/bin/netcfg
vendor/samsung/__DEVICE__/proprietary/lib/libQmageDecoder.so:system/lib/libQmageDecoder.so
Click to expand...
Click to collapse
are the 2 lines in copy files which did not have corresponding files
Now need to zip it and see if I can get kernel compiled
Can anyone that has it compiled post a zip? I dont wanna download lile 10gb of stuff.
Sent from my SPH-D700 using XDA App

[Guide] How to build CM10.1 (Android 4.2.1) for the Galaxy R I9103

Note:
1. This is extension to the Karthik's Guide with Adam's Repo's...
2. Based on my experience i have created this Guide, I have successfully compiled the Build and sharing this with you so some one can try it...
Preparing the system:
Follow this Link until step 4.4 (i.e. 4.4 - Initialize Repository & Sync)
Start with sources:
Code:
cd ~/android/system/
Initialize Repo for Android CM10.1 (Android 4.2.1):
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
and enter your credentials if needed.
Download the sources:
Code:
$ repo sync -j4
Wait until it's finished (takes a lot of time!).
If the process hangs use Ctrl+C to break out of it and resume the download with another
Code:
$ repo sync -j4
Initialize the environment
NOTE: If you have trouble syncing due to connection issues, try repo sync -j1. It's slower but some ISPs have issues with -j4/16
Want to make sure you didn't get any connection errors and have the complete repository? Just run the repo sync command again. It can't give you ANY errors.
Wait until it's finished (takes a lot of time!).
VERY IMPORTANT: Now, Lets add the device specific tree..
1) Open your File Browser,
2) Press Ctrl+H (to show hidden files/directories)
3) Navigate to android/system/.repo/manifest.xml
(Right Click & open the XML file in text editor)
4) Add
Code:
<project path="device/samsung/galaxyr" name="Adam77Root/android_device_samsung_galaxyr" remote="github" revision="jellybean"/>
BEFORE the manifest closing tags (</manifest>).
5) Save & Close the File.
Run another
Code:
$ repo sync
Get Device Specific Repos:
Code:
. build/envsetup.sh
Extract files from phone:
NOTE: You need to have cm10 installed on the phone.
Code:
cd ~/android/system/device/samsung/galaxyr/
./extract-files.sh
Code:
~/android/system/vendor/cm/get-prebuilts
Important Things to be taken care before Building ROM:
1. Add these line in Boarconfig.mk
Code:
TARGET_ARCH := arm
BOARD_EGL_NEEDS_LEGACY_FB := true
2. Change the below line.
Code:
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 5242880
to
Code:
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 7242880
3. Delete Overlay folder.
4. Go to build/tools/releasetools and open file "ota_from_target_files" and replace the whole code with this code from this link.
Ok, You are done Now...
Building the ROM:
Code:
brunch cm_galaxyr-eng
it will take around 2 - 3 Hours....
Congrats you are done
Now Go to ~/android/system/out/target/product/galaxyr/cm-10.1-XXXXXXXXX-UNOFFICIAL-galaxyr.zip copy it to mobile and flash it on your mobile..
*********************************************************************************​
Updating the Build:
Code:
cd android/system
repo sync -j1
make installclean
brunch cm_galaxyr-eng
Big Thanks to Adam for his Efforts and Device tree..
Friends if i've missed some things please correct me ...
Gr8 mj! It will be better if u post ur error and how u solved.. By that it help others...
Sent from my GT-I9103 using xda app-developers app
Waiting for cm10.1 ROM now. Using Cm 10 and it is great
Sent from my GT-I9103 using xda app-developers app
I will start building 10.1 today.
Edit: This is my 500th post.
Sent from my CM10-powered GT-I9103
Adam77Root said:
I will start building 10.1 today.
Edit: This is my 500th post.
Sent from my CM10-powered GT-I9103
Click to expand...
Click to collapse
wow that's cool buddy...
Adam77Root said:
I will start building 10.1 today.
Edit: This is my 500th post.
Sent from my CM10-powered GT-I9103
Click to expand...
Click to collapse
adam wat abt cm10 ?? will u abonden it ??
Sent from my GT-I9103 using Tapatalk 2
vipul12389mehta said:
adam wat abt cm10 ?? will u abonden it ??
Sent from my GT-I9103 using Tapatalk 2
Click to expand...
Click to collapse
Not yet. The first builds will be only previews. If 10.1 gets as stable as 10 now is, I'll change to it. But there is work to be done on 10 as well and better to do it on a working build first. But I'm also very excited to see 10.1, so will definitely work on it.
Mj, before running the get-prebuilts command, should I run extract-files.sh first to get the vendor/cm directory as mentioned in karthick's tut for CM10 ?
I'm studying through your's, karthick's, and PA's compiling guides to get to know about compiling roms and trying to understand every step.
sarun_biotech said:
Mj, before running the get-prebuilts command, should I run extract-files.sh first to get the vendor/cm directory as mentioned in karthick's tut for CM10 ?
I'm studying through your's, karthick's, and PA's compiling guides to get to know about compiling roms and trying to understand every step.
Click to expand...
Click to collapse
Yes buddy you need to run it...
Friends updated the Guide with all the details and problems i have faced, so now you can simply follow the steps and build CM 10.1...
Ran in to trouble right in the beginning. My process does not support virtualization (not a n option in BIOS too) and so cannot install 64 bit Ubuntu on VM player.
Do you guys have any alternate suggestions or is it possible to use 32 bit Ubuntu to compile ?
I used wubi... dual boot...
sarun_biotech said:
Ran in to trouble right in the beginning. My process does not support virtualization (not a n option in BIOS too) and so cannot install 64 bit Ubuntu on VM player.
Do you guys have any alternate suggestions or is it possible to use 32 bit Ubuntu to compile ?
Click to expand...
Click to collapse
Even i also faced this problem, so i need to install the Ubuntu through the CD in different partition so that i have both Windows 7 and Ubuntu 12.10 64 Bit...
If you have any problem just PM me...
Cm10 official
Is there a official CM10 for galaxy r. If yes plz snd the link.
akirockstarr said:
Is there a official CM10 for galaxy r. If yes plz snd the link.
Click to expand...
Click to collapse
CM 10 & 10.1 are official for Galaxy R users and Unofficial from CM Team point of view...
1. CM 10 Thread.
2. CM 10.1 Thread.
Guys Check out xda-university.com An answer to all our development questions. :thumbup:
Everything at a single place.
I am trying to build CM 10.1 by your instructions and while extracting files from phone (cm10.1 beta 2.2) few "not found" & chmod errors occur. Logs (only error lines) following. Sorry I could'nt attach as file.Is it fine?
Code:
[email protected]:~/mydev/cm10.1/device/samsung/galaxyr$ ./extract-files.sh
remote object '/system/etc/wifi/bcm4330_mfg.bin' does not exist
remote object '/system/etc/wifi/nvram_mfg.txt' does not exist
remote object '/system/bin/wlandutservice' does not exist
remote object '/system/bin/macloader' does not exist
remote object '/system/bin/mfgloader' does not exist
remote object '/system/bin/nv_hciattach' does not exist
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/wlandutservice': No such file or directory
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/macloader': No such file or directory
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/mfgloader': No such file or directory
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/nv_hciattach': No such file or directory
remote object '/system/bin/brcm_patchram_plus' does not exist
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/brcm_patchram_plus': No such file or directory
remote object '/system/bin/drexe' does not exist
remote object '/system/bin/npsmobex' does not exist
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/drexe': No such file or directory
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/npsmobex': No such file or directory
Why are we extracting files from phone? The device tree should be holding them right?
kishoreinme said:
I am trying to build CM 10.1 by your instructions and while extracting files from phone (cm10.1 beta 2.2) few "not found" & chmod errors occur. Logs (only error lines) following. Sorry I could'nt attach as file.Is it fine?
Click to expand...
Click to collapse
Not an issue you can proceed with next command, it will take care of these files.....

Kernel Building Help

Wondering if anyone can give me a hand. I am trying to build the kernel from source and am running into a problem. What am I doing wrong?
First I obtain the kernel binary git log
git clone https://android.googlesource.com/device/lge/hammerhead
cd hammerhead
git log --max-count=1
I then made note of the commit message received
Then I downloaded kernel sources
git clone https://android.googlesource.com/kernel/msm.git
Then I downloaded prebuilt GCC
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
Then I went to build
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
git checkout (with the commit message from earlier)
make hammerhead_deconfig
Then I get this error message
make: *** No rule to make target `hammerhead_deconfig'. Stop.
Not sure what I did wrong or how to resolve. Any suggestions? Thanks.
Dude, its hammerhead_defconfig not hammerhead_deconfig.
Check my SCRIPT
Gnome said:
Dude, its hammerhead_defconfig not hammerhead_deconfig.
Check my SCRIPT
Click to expand...
Click to collapse
I'll give that a go and should I perform that command in the hammerhead path or msm path?
Sent from my Nexus 5 using XDA Free mobile app
Chochiwpg said:
I'll give that a go and should I perform that command in the hammerhead path or msm path?
Sent from my Nexus 5 using XDA Free mobile app
Click to expand...
Click to collapse
Do that in kernel patch itself..
Based on your post the Kernel Path is msm, so:
Code:
cd msm
then run the commands, dont forget to checkout the right branch, I think it's android-hammerhead-kk-mr2
Code:
git checkout android-hammerhead-kk-mr2
Gnome said:
Dude, its hammerhead_defconfig not hammerhead_deconfig.
Check my SCRIPT
Click to expand...
Click to collapse
Hey bud,
tried defconfig as well and got the exact same error message. Sigh

[GUIDE] Building Pure Nexus

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

Categories

Resources