[Tutorial] Building CyanogenMod for G2x - T-Mobile LG G2x

My other tutorial for building CM for Nexus One
Last tested on 8/8/2011
This tutorial is basically my Nexus One tutorial altered to support the G2x. This tutorial requires a basic to intermediate knowledge of linux terminal commands. First you will need to be running the latest CM nightly. Then you will need to install Ubuntu 11.04. This tutorial will work for if you are running Ubuntu in a virtual machine and if you installed it to your hard drive. I have tested this by installing it to my hard drive and in a virtual machine, but I have not tried it in Wubi but it should work. You need 11.04 64 bit.
How to install Ubuntu: https://help.ubuntu.com/community/Installation
After you have installed Ububtu, make sure that your OS is up to date. You can do that by running the Update Manager from the System>Administration menu. Once that is completed, go to Applications>Accessories and open Terminal.
Now you will be setting up your build environment.
Next lets open a terminal. Copy and paste the following into terminal.
(Copy from this tutorial with control+c and paste in terminal with control+shift+v)
Code:
sudo apt-get update && sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev gitg qt3-dev-tools libqt3-mt-dev eclipse valgrind pngcrush schedtool
Code:
sudo add-apt-repository ppa:ferramroberto/java && sudo apt-get update && sudo apt-get install sun-java6-jdk && sudo update-java-alternatives -s java-6-sun
Now you will be installing ADB
Download the sdk from the android website (use the Linux download) http://developer.android.com/sdk/index.html
extract the sdk to your ~/ directory (home directory). So you should be able to go to a terminal and cd ~/AndroidSDK/platform-tools to access your platform-tools folder in your sdk. After that, update your android sdk by opening terminal and run:
Code:
~/AndroidSDK/tools/./android
Open the terminal, and type gedit .bashrc and at the top of the file, paste this (replacing user with your username)
Code:
#AndroidDev PATH
export PATH=${PATH}:/home/user/AndroidSDK/platform-tools
export PATH=${PATH}:/home/user/AndroidSDK/tools
This will make ADB, Fastboot and DDMS available from the terminal on next login.
Now, to make the device available to normal users, open a terminal and type
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
Then paste
Code:
SUBSYSTEMS == "usb", ATTRS {idVendor} == "18d1", ATTRS {idProduct} == "4E11", MODE = "0666"
SUBSYSTEMS == "usb", ATTRS {idVendor} == "18d1", ATTRS {idProduct} == "4e12", MODE = "0666"
SUBSYSTEMS == "usb", ATTRS {idVendor} == "0bb4", ATTRS {idProduct} == "0FFF", MODE = "0666"
SUBSYSTEM=="usb",ATTRS(idVendor)=="18d1",SYMLINK+="android_adb",MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"
Save and exit.
Ensure that the rules are executable:
Code:
sudo chmod a+rx /etc/udev/rules.d/*
Then type
Code:
sudo restart udev
You should restart your computer (or virtual machine) right now to ensure that everything is running properly.
Note: idVendor may vary. Use lsusb from the terminal, look for your Android device and replace “0bb4″ with the first 4 characters after “ID”.
If ADB is still not working, read http://forum.xda-developers.com/showthread.php?t=533 and http://alan.lamielle.net/2010/01/22/nexus-one-usb-in-ubuntu-9-10
You should now have a fully working android build environment.
Now before you begin getting and building the source, make sure that you are on the latest CM7 nightly and have the latest gapps from Rom Manager.
Now to setup the CyanogenMod build environment and to build it
Enter the following lines in terminal:
Code:
cd ~/
mkdir -p ~/bin
mkdir -p ~/cm7
cd ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
cd ~/
chmod a+x ~/bin/repo
PATH="$HOME/bin:$PATH"
PATH="$HOME/AndroidSDK/platform-tools:$PATH"
PATH="$HOME/AndroidSDK/tools:$PATH"
cd ~/cm7
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
Press enter and enter the information it asks for.
The next command will download all of the CM source. It will take at least a few hours or more depending on your internet speed.
Code:
repo sync -j16
After the sync, plug your phone in, and run adb devices and if your phone is listed, continue. Otherwise, go back and make sure you have properly installed adb and the drivers.
Plug your phone in, copy the following commands into terminal, and press enter.
Code:
cd ~/cm7/device/lge/p999/
./extract-files.sh
cd ~/cm7/vendor/cyanogen/
./get-rommanager
./get-google-files
now you your CM build environment is complete.
Warning: Building CM pushes your computer to the max your cpu can handle. Make sure that your computer can handle compiling CM. If It cannot, DO NOT DO THIS.
To build, just run(use this command every time you want to build CM):
**** Here is a new updated command to build CM****
Code:
cd ~/cm7 && make clean && repo sync -j6 && . build/envsetup.sh && brunch p999
If you come across any problems while syncing use repo sync -f -j6 -d and it will force sync and override any changes made to the source on your computer.
and it will make an update.zip in ~/cm7/out/target/product/p999/update-cm-7.1.0-RC1-G2x-signed.zip (or whatever the latest RC is)
Congratulations you have just compiled CyanogenMod for the G2x!
Possible causes if the build fails:
1. Make sure you followed the directions precisely.
2. Try all three of the build commands.
3. If you changed any of the code, make sure it has no errors. Open it up in eclipse and check for errors.
4. Search Google and XDA.
**If you are getting a problem with getting the gapps, it it because of the CM gapps mirror system.
1. download and install the latest gapps
2. plug your phone in and run:
Code:
~/cm7/vendor/cyanogen/./extract-google-files
Sources:
http://developer.android.com/sdk/index.html
http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_passion
http://www.lineardroid.co.uk/2010/07/configure-build-environment/
http://www.lineardroid.co.uk/2010/04/how-to-set-up-adb-in-ubuntu/
http://forum.xda-developers.com/showthread.php?t=533090
http://alan.lamielle.net/2010/01/22/nexus-one-usb-in-ubuntu-9-10
http://forum.xda-developers.com/showthread.php?t=704561
Be sure to thank if this was helpful!

reserved...

reserved...

that's good. Thank you

Nice... Ive been always wondering how to do that... Time to start tonight
Any news if there is some kind of an online kitchen for the g2x that is not cm7 based?

Very nice. Thanks for updating your guide for the G2x.

OSError: [Errno 2] No such file or directory
Hey there. I'm going through your how to here and I came into an error pasted below. I'm very new to all this but am very eager learn. Can you shed some light on what is happening? Thanks a ton!
[email protected]:~/cm7$ repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
Traceback (most recent call last):
File "/home/dubntz/bin/repo", line 603, in <module>
main(sys.argv[1:])
File "/home/dubntz/bin/repo", line 570, in main
_Init(args)
File "/home/dubntz/bin/repo", line 184, in _Init
_CheckGitVersion()
File "/home/dubntz/bin/repo", line 213, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 672, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1213, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
[email protected]:~/cm7$

Install git.

I followed all of your steps but am getting the adb not found or whatever error when trying to run adb devices, or any adb command for that matter. I tried as root, and as a normal user and nothing worked.
Anyone else have this issue?

*black*silva* said:
I followed all of your steps but am getting the adb not found or whatever error when trying to run adb devices, or any adb command for that matter. I tried as root, and as a normal user and nothing worked.
Anyone else have this issue?
Click to expand...
Click to collapse
First, make sure that you did downloaded and extracted the Linux version of the Android SDK. Second, verify that the path to the directory where the adb command is correct. Third, check if the adb command is indeed present in that directory. If it's not in platform-tools directory then you need to run the ./android command and update the SDK.
Sent from my LG-P999 using XDA App

joackie27 said:
First, make sure that you did downloaded and extracted the Linux version of the Android SDK. Second, verify that the path to the directory where the adb command is correct. Third, check if the adb command is indeed present in that directory. If it's not in platform-tools directory then you need to run the ./android command and update the SDK.
Sent from my LG-P999 using XDA App
Click to expand...
Click to collapse
I downloaded and extracted my SDK to my home folder, and when i checked to see if the adb command was there it was not, so i am now getting everything i think i need from running the android command. Could it be because im on 32 bit? And it says you need 64? Or is that only to compile? I'd like to compile but i really just want ADB working.

*black*silva* said:
I downloaded and extracted my SDK to my home folder, and when i checked to see if the adb command was there it was not, so i am now getting everything i think i need from running the android command. Could it be because im on 32 bit? And it says you need 64? Or is that only to compile? I'd like to compile but i really just want ADB working.
Click to expand...
Click to collapse
I don't think it had to do with you being on a 32 bit. I think it had to do with the archive file not really having the adb command. You have to update the SDK first to get it. I may be wrong but if you want, you can inspect the contents of the archive file that you've downloaded to verify if it's really there. I've experienced the same thing that's why I was able to addressed your issues earlier.
If you want to compile then you need the 64 bit version as stated by the OP.
Sent from my LG-P999 using XDA App

i updated and installed all the things i needed and now ADB works perfect. Now i might try compiling. Thanks joackie27 for the help.

*black*silva* said:
i updated and installed all the things i needed and now ADB works perfect. Now i might try compiling. Thanks joackie27 for the help.
Click to expand...
Click to collapse
You're welcome! That's what the XDA community (help one another) is all about.
I wouldn't even try compiling not unless you've got the 64 bit version. I think it became a requirement with Gingerbread.
Sent from my LG-P999 using XDA App

joackie27 said:
You're welcome! That's what the XDA community (help one another) is all about.
I wouldn't even try compiling not unless you've got the 64 bit version. I think it became a requirement with Gingerbread.
Sent from my LG-P999 using XDA App
Click to expand...
Click to collapse
alright. thanks. i have already ran everything and all i have let to do is run the last code to compile it, so im going to and just gunna see what happens. if it works great. if not, i will always have chris to do it for me lol.
O and BTW for the code,
Code:
cd ~/cm7/device/htc/p999/
you will need to change it to
Code:
cd ~/cm7/device/lge/p999/
because HTC did not make the p999, LG did. but other than that everything has gone smooth.

*black*silva* said:
alright. thanks. i have already ran everything and all i have let to do is run the last code to compile it, so im going to and just gunna see what happens. if it works great. if not, i will always have chris to do it for me lol.
O and BTW for the code,
Code:
cd ~/cm7/device/htc/p999/
you will need to change it to
Code:
cd ~/cm7/device/lge/p999/
because HTC did not make the p999, LG did. but other than that everything has gone smooth.
Click to expand...
Click to collapse
Yeah I caught that one too. And after cloning the git repository for CM7, you can definitely see that there's no p999 directory under htc. And lastly, as you've pointed out p999 was from lge (LG Electronics).

joackie27 said:
Yeah I caught that one too. And after cloning the git repository for CM7, you can definitely see that there's no p999 directory under htc. And lastly, as you've pointed out p999 was from lge (LG Electronics).
Click to expand...
Click to collapse
yeah that how i got it to. And i dont really recommend using 32 bit because the guide says to use 64 but i already had 32 installed and didnt want to wipe that partition and reinstall 64 bit so i tried compiling on 32 bit and it worked fine. had no problems at all with compiling it or flashing it. But im just giving that information out for anyone who wants to compile and already has 32.

*black*silva* said:
yeah that how i got it to. And i dont really recommend using 32 bit because the guide says to use 64 but i already had 32 installed and didnt want to wipe that partition and reinstall 64 bit so i tried compiling on 32 bit and it worked fine. had no problems at all with compiling it or flashing it. But im just giving that information out for anyone who wants to compile and already has 32.
Click to expand...
Click to collapse
It worked fine on 32 bit for you? When i was getting all the files for the build environment it couldn't find some of the files while I was using 32bit like lib32ncursers or whatever, there were 4 of them.

brian6685 said:
It worked fine on 32 bit for you? When i was getting all the files for the build environment it couldn't find some of the files while I was using 32bit like lib32ncursers or whatever, there were 4 of them.
Click to expand...
Click to collapse
yup. everything worked perfectly fine for me. Although when i got my build environment i got them here...
http://forum.xda-developers.com/showthread.php?t=915435
I did not get any errors. And my ROM is running great!

*black*silva* said:
alright. thanks. i have already ran everything and all i have let to do is run the last code to compile it, so im going to and just gunna see what happens. if it works great. if not, i will always have chris to do it for me lol.
O and BTW for the code,
Code:
cd ~/cm7/device/htc/p999/
you will need to change it to
Code:
cd ~/cm7/device/lge/p999/
because HTC did not make the p999, LG did. but other than that everything has gone smooth.
Click to expand...
Click to collapse
Thanks. Changed it.

Related

[GUIDE] Get Android 2.2 source for n00bs

I did this in Ubuntu 10.4 linux that i installed on a 14gig partition of my laptop.
You can do this in VMware or make a partition of your HDD and download wubi.exe to install linux on your partition... its easier than installing windows. You can use this to help develop if you know anything, or as i have done, used it to get the uncompiled .9.png's to edit for themeing, bypassing the draw9patch step cause the guides are already there ready to go through eclipse IDE.
INSTALL ALL LINUX UPDATES THAT WILL POPUP WITH AUTO-UPDATER BEFORE GETTING SOURCE.
on to the good stuff.... open up the terminal and run the following commands
Code:
sudo nano /etc/apt/sources.list
Then add the following to the bottom by scrolling down with your arrow keys and pasting by right clicking, CTRL-V WONT WORK.

Code:
deb http://cz.archive.ubuntu.com/ubuntu jaunty-updates main multiverse
Hit CTRL O and ENTER to save and CTRL X to return to the command line. Now lets get the repo packages cached onto your box using the following command.
Code:
sudo apt-get update
install Java 5 SDK and all the other little packages needed to build Android with this command.
32-bit x86
Code:
sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind
64-bit x86
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl sun-java5-jdk zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
Code:
sudo update-java-alternatives -s java-1.5.0-sun
Code:
sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so
moving on
INSTALLING REPO
You can install repo tool any place in your path. We choose a bin directory in our home folder:
Code:
$cd ~
$mkdir bin
$export PATH=$PATH:~/bin
$curl https://android.git.kernel.org/repo >~/bin/repo
$chmod a+x ~/bin/repo
DOWNLOADING ANDROID SOURCE CODE:
Create an empty directory to hold your working files:
Code:
$mkdir mydroid
$cd mydroid
# Run repo init to bring down the latest version of Android with all its most recent bug fixes. You must specify a URL for the manifest:
Code:
$repo init -u git://android.git.kernel.org/platform/manifest.git
NOTE: using -b option we can choose which android version to install:
Code:
$repo init -u git://android.git.kernel.org/platform/manifest.git -b froyo
To pull down files to your working directory from the repositories as specified in the default manifest, run
Code:
$repo sync
NOTE: mydroid directory size grows up to 3.6G.
BUILDING ANDROID
Simply on top of your android directory execute make command:
Code:
$cd mydroid
$make
After some time it will finish.
We get the installed file list in this file:
out/target/product/generic/installed-files.txt
Also some images are created in the same directory: (system.img userdata.img ramdisk.img)
mydroid$ ls out/target/product/generic/
android-info.txt data obj ramdisk.img symbols system.img
clean_steps.mk installed-files.txt previous_build_config.mk root system userdata.img
We have built android source code but now we want to test it:
run the Android Emulator, which comes within the Android SDK
http://developer.android.com/guide/developing/tools/emulator.html
Download Android SDK
http://developer.android.com/sdk/index.html
Install Android SDK
http://developer.android.com/sdk/installing.html
ill post the location of the framework-res.apk drawables and stock app apks to edit for those of you interested in theming.
I appreciate the effort but isn't this almost the same from android central by gbhil?
Sent from my HERO200
Wouldnt know. Die hard xda member. Im sure im not the only one that checks this site only. Im just trying to do my part. We need devs and themers with creative ideas. This is the one of the first few steps toward those interested in learning.
Sent from my Hero CDMA using XDA App
Thank You!!!!!!!
WELL DONE SIR!!!!! Thank you for posting a good repo link for froyo!!!!!
riggsandroid said:
I appreciate the effort but isn't this almost the same from android central by gbhil?
Sent from my HERO200
Click to expand...
Click to collapse
Isn't android central a different website?
myth_mn said:
Isn't android central a different website?
Click to expand...
Click to collapse
Yes, I was thinking if he took it from there to give credit. But the effort is appreciated and not trying to start a problem.
Sent from my HERO200
Made this because of all the errors i ran into and gathered all my sources of research of linux commands like changing your $PATH and installing java after my machine wouldnt find it in the repository, or not being able to get repo installed. Im just trying to help. I would have sourced gbhil if i took it from there. And this isnt a college essay, work cited pages arent necessary, its a courtesy out of respect. Besides... my sources where from blogs and most didnt have anything to do with android. Just throwin that out there. ©
epitaphromance said:
Made this because of all the errors i ran into and gathered all my sources of research of linux commands like changing your $PATH and installing java after my machine wouldnt find it in the repository, or not being able to get repo installed. Im just trying to help. I would have sourced gbhil if i took it from there. And this isnt a college essay, work cited pages arent necessary, its a courtesy out of respect. Besides... my sources where from blogs and most didnt have anything to do with android. Just throwin that out there. ©
Click to expand...
Click to collapse
no problem. i appreciate the work, I'm gonna give it a shot at some piont when I get some time to install ubuntu.
not doubting you didn't do the work, it was only fresh in my mind because i literally looked at it yesterday. thanks again for the info gathering.
Welcome
Sent from my Hero CDMA using XDA App
Just hope your patient between builds... or at least the first build unless you have a real killer machine. Tried it on my laptop (1.8ghz dual core amd)... 2hrs and had to ctrl+c cause I had to go to bed...
Just wanted to say that this also works on linux mint kde 8 (also known as user friendly linux) it is taking forever though as posted good write-up. oh by the f ubuntu. just saying
Hello,
Not sure if you follow this thread or not anymore but I get an error I was hoping someone could help me with? When I run the last "make" commange I get this error:
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.
Your version is: java version "1.6.0_20".
The correct version is: 1.5.
Please follow the machine setup instructions at
http://source.android.com/download
************************************************************
build/core/main.mk:117: *** stop. Stop.
Any ideas?
Thanks
jschill31 said:
Hello,
Not sure if you follow this thread or not anymore but I get an error I was hoping someone could help me with? When I run the last "make" commange I get this error:
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.
Your version is: java version "1.6.0_20".
The correct version is: 1.5.
Please follow the machine setup instructions at
http://source.android.com/download
************************************************************
build/core/main.mk:117: *** stop. Stop.
Any ideas?
Thanks
Click to expand...
Click to collapse
Assuming you've installed an openjdk-6-jdk package, you can override the normal build restriction of Java 5 by editing the file build/core/main.mk and changing the Java version test to match against "1.6" instead of "1.5". You'll need to do it in two places, once for java and once for javac. I never had to do this to build Cyanogenmod, but you may need to for AOSP.
Decad3nce said:
Assuming you've installed an openjdk-6-jdk package, you can override the normal build restriction of Java 5 by editing the file build/core/main.mk and changing the Java version test to match against "1.6" instead of "1.5". You'll need to do it in two places, once for java and once for javac. I never had to do this to build Cyanogenmod, but you may need to for AOSP.
Click to expand...
Click to collapse
Decad3nce, thanks for posting so fast. The funny thing is I figured it out within 5 minutes of posting but got sucked in to finalizing my source code that I am now just getting back to the post. There are several here in this forum that really help out and you are one of them. I am just now getting brave enough to start cooking but catch on fast. Can't wait to see what you, nfinite and beezy do to the wildfire port!

[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

[Recovery] CWM Recovery 4.0.0.8 for Compaq Airlife 100

Hi all,
Note: I'm still testing these files and they are not final. I'm not responsible if you brick your device with these files. Use it at your own risk and only if you know what you are doing!
If you want to make sure that you don't loose anything use romdump to perform a backup for your device.
Files
Boot: boot-insid3r-0.1.img
Recovery: recovery-insid3r-0.1.img
How to prepare your PC
===== On Windows (I tried on Windows 7): =====
1)Download the latest Android SDK from here.It's the installer_r12-windows.exe file.
2)Run the installer. It will start a download all the files needed. Note:You must have Java JDK installed.
3)Boot your Compaq Airlife 100 to Fastboot Mode (BACK + POWER). It will show a black(empty) screen thats normal!
4)Connect your Compaq Airlife 100 through the USB Cable to your PC
5)Open Windows Start Menu and type: cmd.exe
6)Navigate to your Android SDK folder like this:
cd /
cd "Program Files\Android\android-sdk\tools"
7)Run fastboot:
fastboot.exe devices
(it will show only an '?', its normal)
8) Jump to "How to Use"
===== On Ubuntu (I tried on Ubuntu 11.04): =====
1)Download the latest Android SDK from here. It's android-sdk_r12-linux_x86.tgz file.
2)Unpack it.
3)Open terminal and navigate to <android-sdk-linux_x86>/tools and execute "android" script. This will start the download of the needed files.
4)Navigate to your Android SDK folder like this:
cd android-sdk-linux_x86/platform-tools/
5)Run fastboot:
./fastboot devices
(it will show only an '???????', its normal)
6) Jump to "How to Use"
How to use
1)Root your device, using an app like Universal Androot
2)boot your device into fastboot mode (BACK+POWER)
3)flash both images on Ubuntu:
Code:
./fastboot flash boot boot-insid3r-0.1.img
./fastboot flash recovery recovery-insid3r-0.1.img
or on Windows
Code:
fastboot.exe flash boot boot-insid3r-0.1.img
fastboot.exe flash recovery recovery-insid3r-0.1.img
4)boot your device into recovery mode (HOME+POWER)
Demo
ClockworkMod Recovery for Compaq Airlife 100: http://www.youtube.com/watch?v=rh8DhuDt0FY
Images
ClockworkMod Info
This recovery was compiled with the 4.0.0.8 source code, and it still under tests before final github submission for aproval.
Any question, just ask.
If you are familiar with Cyanogen porting please send me a PM.
Best Regards
Hey INSID3R great work!!!!
I come from CHW forum.
I`ll try this now!
Hi,
I noticed that people already downloaded the files. Can you provide some feedback?
Note: adb is now working but only over wi-fi.
Better chance for newer Android ?
Hi,
I just got an idea which are the capabilities of ClockworkMod. Using this tool I am able to install a better Android than 1.6.
But is any newer Android for this device out there?
Regards
Svgt99
svgt99 said:
Hi,
I just got an idea which are the capabilities of ClockworkMod. Using this tool I am able to install a better Android than 1.6.
But is any newer Android for this device out there?
Regards
Svgt
Click to expand...
Click to collapse
I'm working on that too. It will take some time to have a ROM ready since I'm not working full-time on this.
Cheers
How do I enter commands paar after this in FastBoot?? how I do this in Windows? Please put clearer instructions in order to offer a feedback
cesargdmi said:
How do I enter commands paar after this in FastBoot?? how I do this in Windows? Please put clearer instructions in order to offer a feedback
Click to expand...
Click to collapse
hi cesargdmi,
Just updated the first post with more instructions on how to prepare your PC.
If you still have questions feel free to ask.
Best Regards
Up and running now, I'm trying to create a ROM for this device but I never did, so I'll have to read much to make, I am not relying on these links.
http://forum.xda-developers.com/showthread.php?t=633246
http://theunlockr.com/2010/03/26/ho...om-for-android-part-1-setting-up-the-kitchen/
but apparently, it is not easy, you've made ​​some progress in creating the ROM? to please me feedback.
cesargdmi said:
Up and running now, I'm trying to create a ROM for this device but I never did, so I'll have to read much to make, I am not relying on these links.
http://forum.xda-developers.com/showthread.php?t=633246
http://theunlockr.com/2010/03/26/ho...om-for-android-part-1-setting-up-the-kitchen/
but apparently, it is not easy, you've made ​​some progress in creating the ROM? to please me feedback.
Click to expand...
Click to collapse
In the next few days I'll give an update on my developments. But I'm still on an early stage, I still don't have a bootable ROM .
I'm trying to build a custom ROM from Cyanogen code. This is how to prepare the Cyanogen code for your PC:
Install the Build Packages
1)Install using the package manager of your choice:
For 32-bit & 64-bit systems:
Code:
sudo apt-get install 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:
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
NOTE: gcc-4.3-multilib g++-4.3-multilib is no longer available for Ubuntu 11.04 64-bit, but should still build without issue.
NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:
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 [url]http://android.git.kernel.org/repo[/url] > ~/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/CyanogenMod/android.git -b gingerbread
repo sync -j16
This will take about two hours.
With this tutorial you will have the Cyanogen Android OS 2.3.5 code on your system.
To start a ROM for Compaq Airlife 100 you will need to create these under the device/ directory:
Code:
mkdir compaq
cd compaq
mkdir airlife
cd airlife
And paste these files there.
This is only a basic start, we will need to learn by your own from here. Try to see the other directories inside the device/ folder and learn from other devices settings.
hehe
I'm just installing Ubuntu 9.10 to start doing the procedure, although I was reading says that is only valid for HTC but do not lose anything by trying.
if you run into any progress let me know
Adb
Hi Insid3r can you try to modify this file "default.prop" in the root folder? Inside this is a command with this name "persist.service.adb.enable=0", try to put a 1.. My english is bad sorry.!
I'll post that later, already did that to make the ADB work via Wi-Fi. Even with that option enabled the ADB doesn't work via USB.
Best Regards.
Ok, I did not know, but at least I tried. I also managed to install Flash Player 10.1, but can not get it to work with the native browser and others like opera and dolphinn either. Could you help me?
Best regards
Pleace, I'll go creazy thinking about how to install flash player plugin.
The file I used is on various internet sites is called "flash for 21" and I change and put in the AndroidManifest.xml "minsdk = 4" to install in the airlife.! Can you help me with this?
Thank you!!!!
Greetings.
@insid3r
Hi! I'm going to try this... have you stoped trying to port it? Or is any limitation? Is the bootloader unlocked? I don't undertand if the reason that there's NO roms is that it's blocked somehow, or is it for there's not many poeopl souporting this kidn of projects =/
I WANT to follow with this, please contact me through PM
Greetings from Argentina.
Insid3r, thanks ever answer but I need ask you something about update the compaq airlife 100, after you make the fastboot (back+power) and connect the netbook to the USB computer.
What driver you'd use? because in my Hardware Administrator not show the device, just says Android 1.0 (and its unrecognized) and in cmd when call the function fastboot devices (in the help command says must show a list of devices and not appear the compaq)
Best and thanks for your time.

[GUIDE] Setting up ADB and fastboot on ChromeOS using Crouton

**I TAKE NO RESPONSIBILITY FOR WHATEVER HAPPENS TO YOUR CHROMEBOOK.**
Follow this guide at your own risk
First, I would like to say that I have no built anything myself. All the work shown here has been compiled from the internet.
Second, I am no expert at this kind of thing but I have tried out everything myself and this is what has worked for me with Acer C7. ADB and fastboot work without any problems on my computer.
Third, this can actually go beyond just ADB and fastboot. You can develop with minimal restraints, but I will only be covering how to install ADB and fastboot.
Finally, I would appreciate if someone familiar with all of this would tell me what I can cut out/add as this was done by a trial and error process so I’m not entirely too sure what is necessary and what is not, or if there is an easier way of going about things.
This is a guide for anyone who wants to be able to run ADB and fastboot on their chromebook. Just note that it may take a lot of memory (it took around 4-5 GB for me), so you may want to install it on an SD card.
WARNING!
In order to run crouton and install Ubuntu you will have to go into developer mode which will wipe your device.
Instructions can be found here: http://www.chromium.org/chromium-os/poking-around-your-chrome-os-device
You can work with virtual terminal 2 or crosh shell. I recommend using a crosh shell because it’d be easier to look back here for info.
Files you’ll need (Choose according to 32 or 64 bit)
Crouton- http://goo.gl/fd3zc (Official site: https://github.com/dnschneid/crouton)
Android SDK- http://dl.google.com/android/adt/adt-bundle-linux-x86-20131030.zip OR http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20131030.zip (Official Site: https://developer.android.com/sdk/index.html?hl=sk )
JDK- http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-i586.tar.gz or http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz
I will not go over the actual installation of crouton as that can be found here: https://github.com/dnschneid/crouton
I used precise and xfce:
Code:
-e ~/Downloads/crouton -t xfce
Okay now that you have crouton installed and running, let’s get to work. First comes the installation of JDK. Download the version of JDK for your bit version and extract it. Go over to Ubuntu (using the command:
Code:
sudo startxfce4
) and using terminal emulator move it over to /usr/lib/jvm with the code
Code:
sudo mv jdk1.7.0_51 /usr/lib/jvm/
Using the file manager go to /home/<USERNAME> and open the .bashrc file using gedit text editor and add this code at the end, DO NOT OVERWRITE ANYTHING
Code:
PATH=${PATH}:/usr/lib/jvm/jdk1.7.0_51/bin
JAVA_HOME=/usr/lib/jvm/jdk1.7.0_51
Wit that, you are done with installing JDK.
Moving onto the actual Android SDK, first download it.
Extract it and move the SDK into /local/usr
Assuming that the file is in your Downloads directory, use the commands:
Code:
sudo mv adt-bundle-linux-x86-20130219 /usr/local/
Next you’ll make a symlink to make typing commands easier:
Code:
sudo ln -s /usr/local/adt-bundle-linux-x86-20130219/ /usr/local/adt
Then go back to the bashrc file and add this code at the end once again, DO NOT OVERWRITE ANYTHING:
Code:
PATH=/usr/local/adt/sdk/platform-tools:/usr/local/adt/sdk/tools:/usr/lib/jvm/jdk1.7.0_15/bin:/usr/local/gradle-1.4/bin:$PATH
ANDROID_HOME=/usr/local/adt/sdk
Save and close the file, and run the command “. ~/.profile” in terminal.
Run the code and answer with y:
Code:
sudo apt-get install ubuntu-standard
sudo apt-get install ubuntu-desktop
sudo apt-get install synaptic
sudo apt-get install ia32-libs
sudo apt-get update
This might take some time and when that finishes type in
android
If you get permission denied run the command:
Code:
chmod u+x android
This should launch the Android SDK Manager. Check the tools section and install. When this is done, you should have ADB up and running.
Check using the command:
Code:
adb version
or just by typing adb
if you get list of commands you can run, congratulations ADB has been installed successfully!
Now check fastboot by typing fastboot. Once again if you get a list of commands for fastboot, congratulations you're done!
You now have ADB and fastboot on your Chromebook!
You can PM me and I will try to help if you have questions, or reply to this post.
Enjoy! :good:
Excellent post. One quick question however. When I attempt to install ia32-libs I get this:
Code:
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32z1 lib32ncurses5 lib32bz2-1.0
E: Package 'ia32-libs' has no installation candidate
My question is: Should I install all 3 replacement packages (lib32z1 lib32ncurses5 lib32bz2-1.0)? One of them?
This dude here says I can repackage it manually. Should I do that?
You rock for taking the time to post this!
Tanks so much!
I would install everything as it is replacement
This guide is a bit long and tedious so if you want here is an installer made by HeadFox that worked for me on Trusty Unity.
http://forum.xda-developers.com/showthread.php?t=2431956
cheers!
when i get to entering ~/.profile, I get a permission denied message. the only thing different that I know I did was use the android SDk from the Android studio currently available and not the zip you provided a link to and obviouslyh change the file paths accordingly. any thoughts
08BajaBoy said:
when i get to entering ~/.profile, I get a permission denied message. the only thing different that I know I did was use the android SDk from the Android studio currently available and not the zip you provided a link to and obviouslyh change the file paths accordingly. any thoughts
Click to expand...
Click to collapse
You basically want to run .profile again, which is run once you spawn your linux chroot/crouton. I think the easiest way is to just logout of your linux session and then run crouton again.
Yeah, that's sorta like a "just reboot it" fix but not actually a full reboot.
vanillaflavor said:
**I TAKE NO RESPONSIBILITY FOR WHATEVER HAPPENS TO YOUR CHROMEBOOK.**
Follow this guide at your own risk
First, I would like to say that I have no built anything myself. All the work shown here has been compiled from the internet.
Second, I am no expert at this kind of thing but I have tried out everything myself and this is what has worked for me with Acer C7. ADB and fastboot work without any problems on my computer.
Third, this can actually go beyond just ADB and fastboot. You can develop with minimal restraints, but I will only be covering how to install ADB and fastboot.
Finally, I would appreciate if someone familiar with all of this would tell me what I can cut out/add as this was done by a trial and error process so I’m not entirely too sure what is necessary and what is not, or if there is an easier way of going about things.
This is a guide for anyone who wants to be able to run ADB and fastboot on their chromebook. Just note that it may take a lot of memory (it took around 4-5 GB for me), so you may want to install it on an SD card.
WARNING!
In order to run crouton and install Ubuntu you will have to go into developer mode which will wipe your device.
Instructions can be found here: http://www.chromium.org/chromium-os/poking-around-your-chrome-os-device
You can work with virtual terminal 2 or crosh shell. I recommend using a crosh shell because it’d be easier to look back here for info.
Files you’ll need (Choose according to 32 or 64 bit)
Crouton- http://goo.gl/fd3zc (Official site: https://github.com/dnschneid/crouton)
Android SDK- http://dl.google.com/android/adt/adt-bundle-linux-x86-20131030.zip OR http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20131030.zip (Official Site: https://developer.android.com/sdk/index.html?hl=sk )
JDK- http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-i586.tar.gz or http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz
I will not go over the actual installation of crouton as that can be found here: https://github.com/dnschneid/crouton
I used precise and xfce:
Code:
-e ~/Downloads/crouton -t xfce
Okay now that you have crouton installed and running, let’s get to work. First comes the installation of JDK. Download the version of JDK for your bit version and extract it. Go over to Ubuntu (using the command:
Code:
sudo startxfce4
) and using terminal emulator move it over to /usr/lib/jvm with the code
Code:
sudo mv jdk1.7.0_51 /usr/lib/jvm/
Using the file manager go to /home/<USERNAME> and open the .bashrc file using gedit text editor and add this code at the end, DO NOT OVERWRITE ANYTHING
Code:
PATH=${PATH}:/usr/lib/jvm/jdk1.7.0_51/bin
JAVA_HOME=/usr/lib/jvm/jdk1.7.0_51
Wit that, you are done with installing JDK.
Moving onto the actual Android SDK, first download it.
Extract it and move the SDK into /local/usr
Assuming that the file is in your Downloads directory, use the commands:
Code:
sudo mv adt-bundle-linux-x86-20130219 /usr/local/
Next you’ll make a symlink to make typing commands easier:
Code:
sudo ln -s /usr/local/adt-bundle-linux-x86-20130219/ /usr/local/adt
Then go back to the bashrc file and add this code at the end once again, DO NOT OVERWRITE ANYTHING:
Code:
PATH=/usr/local/adt/sdk/platform-tools:/usr/local/adt/sdk/tools:/usr/lib/jvm/jdk1.7.0_15/bin:/usr/local/gradle-1.4/bin:$PATH
ANDROID_HOME=/usr/local/adt/sdk
Save and close the file, and run the command “. ~/.profile” in terminal.
Run the code and answer with y:
Code:
sudo apt-get install ubuntu-standard
sudo apt-get install ubuntu-desktop
sudo apt-get install synaptic
sudo apt-get install ia32-libs
sudo apt-get update
This might take some time and when that finishes type in
android
If you get permission denied run the command:
Code:
chmod u+x android
This should launch the Android SDK Manager. Check the tools section and install. When this is done, you should have ADB up and running.
Check using the command:
Code:
adb version
or just by typing adb
if you get list of commands you can run, congratulations ADB has been installed successfully!
Now check fastboot by typing fastboot. Once again if you get a list of commands for fastboot, congratulations you're done!
You now have ADB and fastboot on your Chromebook!
You can PM me and I will try to help if you have questions, or reply to this post.
Enjoy! :good:
Click to expand...
Click to collapse
Welldone mate!!

[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