[TOOL][ChromeOS][Cruton][ADB/Fastboot] - Nexus 5 Android Development

ChromeOS: Cruton ADB/Fastboot
Make sure that your chromebook is in Developer mode before continuing.
1. Boot into linux distro and fasten your cruton.
2. Open up terminal and type sudo apt-get install curl
3. Then sudo apt-get install bash
With the help of @corbin052198 and his thread: http://forum.xda-developers.com/showthread.php?t=2564453
, I have successfully just flashed back to my L preview via fastboot.
Thank you for sharing your work.
4. Type this in terminal cd ~ && curl -s -o ./install.sh "http://github.com/corbindavenport/nexus-tools/raw/master/install.sh" -LOk && chmod +x ./install.sh && ./install.sh && rm ./install.sh
5. Last command via terminal sudo apt-get install lib32ncurses5 lib32stdc++6
6. Run sudo apt-get update if you need to.
Type in “adb ” or “fasboot devices” and you are good to go.

Related

[Tutorial] Building CyanogenMod for Nexus One

My other tutorial for building CM for G2x
Last tested on 6/2/2011
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/htc/passion/
./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 passion
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/passion/update-cm-7.1.0-RC1-N1-signed.zip (or whatever the latest RC is)
Congratulations you have just compiled CyanogenMod for the Nexus One!
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!
Building on a Mac
Building on a Mac may not work.
Install MacPorts
Install MacPorts using the instructions at MacPorts.org
Install the Developer Tools
Install the Mac OS X Developer Tools from your Mac OS X DVD or from the Apple developer site.
Install the Java Developer Package
Install the Java Developer Package from Apple's site — you'll need a free developer account from Apple. The installer you are looking for will be "Java for Mac OS X 10.6 Update 3 Developer Package" (Update 3 is the latest as of this writing).
Install the Android SDK using the instructions from the first post
Create a Case-Sensitive Workspace
While normal Macintosh volumes are case insensitive, the CyanogenMod/Android source contains files with the same name but in different cases. To solve this issue, you'll have to create and then work out of a case-sensitive disk image.
1. Open the Disk Utility (/Applications/Utilities/Disk Utility.app).
2. Click on New Image.
3. Save as "CyanogenModWorkspace.sparseimage" and set the following parameters as followed:
Name: "CyanogenModWorkspace"
Size: 15 GB is minimum recommended (A sparseimage will save unused space)
Format: Mac OS Extended (CASE-SENSITIVE, Journaled)
Encryption: none, Partition- Single Apple Partition Map
Image Format: Sparse Disk Image (this will save you disk space)
4. Save this wherever you like, and then double-click the sparseimage file to mount.
5. Your workspace will be:
/Volumes/CyanogenModWorkspace/
Install Required Ports
Now you need to install some stuff from macports:
Code:
sudo port selfupdate
POSIXLY_CORRECT=1 sudo port install gmake libsdl git-core gnupg e2fsprogs gsed curl libiptcdata xorg-libX* pngcrush findutils
sudo ln -s /opt/local/bin/gsed /opt/local/bin/sed
sudo ln -s /opt/local/libexec/gnubin/find /opt/local/bin/find
Now you need to downgrade gmake to 3.81 because 3.82 breaks the build.
Here's how to downgrade to 3.81:
1. Visit http://trac.macports.org/log/trunk/dports/devel/gmake
2. Click the link that says "@50980" - although it doesn't explicitly say 3.81, this is it
3. Click the link that says "Portfile"
4. Scroll to the bottom and just below "Download in other formats:" click "Original Format"
5. This is subtle but important: If your browser e.g. Chrome renamed it to Portfile.txt, you need to rename it to simply "Portfile"
6. cd to the location of Portfile and
Code:
sudo port install
This should install and configure gmake 3.81, after which:
Code:
sudo port installed gmake
will print out:
The following ports are currently installed:
gmake @3.81_0 (active)
gmake @3.82_0
Set up the Workspace
Now to setup the CyanogenMod build environment and to build it
copy each line individually into a terminal and press enter:
(This entire process could take hours, depending on your computer and your Internet speed.)
(And make sure your Nexus One is plugged in for the commands after repo sync.)
(Also, you should be running the latest CM nightly (which is CM7) and you should have clockwork recovery and rom manager)
Code:
cd /Volumes/CyanogenModWorkspace/
mkdir -p /Volumes/CyanogenModWorkspace/bin
mkdir -p /Volumes/CyanogenModWorkspace/android-cm7
curl http://android.git.kernel.org/repo > /Volumes/CyanogenModWorkspace/bin/repo
chmod a+x /Volumes/CyanogenModWorkspace/bin/repo
PATH=${PATH}:/Volumes/CyanogenModWorkspace/bin:
echo "PATH=\${PATH}:/Volumes/CyanogenModWorkspace/bin:" >> ~/.profile
cd /Developer/SDKs
sudo ln -s MacOSX10.6.sdk/ MacOSX10.4u.sdk
cd /Volumes/CyanogenModWorkspace/android-cm7
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync
cd /Volumes/CyanogenModWorkspace/android-cm7/device/htc/passion/
./extract-files.sh
cd /Volumes/CyanogenModWorkspace/android-cm7/vendor/cyanogen/
./get-rommanager
./get-google-files
./extract-google-files
now you your CM build environment is complete.
Build CyanogenMod
open a terminal and type:
Code:
touch ~/Desktop/build.sh
chmod u+x ~/Desktop/build.sh
open -e ~/Desktop/build.sh
paste the following into TextEdit and save:
Code:
#!/bin/bash
echo "cd to android-cm7";
cd /Volumes/CyanogenModWorkspace/android-cm7
echo "Make clean";
make clean
make installclean
echo "Syncing";
repo sync
echo "Copying the make file";
cp ./vendor/cyanogen/products/cyanogen_passion.mk ./buildspec.mk
echo "Setting up build env\n";
. build/envsetup.sh
echo "Setting up lunch";
lunch cyanogen_passion-eng
cd /Volumes/CyanogenModWorkspace/android-cm7
echo "Using the make command";
make -j`sysctl -an hw.logicalcpu` bacon
save and quit TextEdit.
Run the following command in terminal every time you want to build CM.
Code:
~/Desktop/./build.sh
If you get an error saying:
Code:
ASSERTION FAILURE external/elfcopy/elfcopy.c:932: [ranges[i].start >= last_end]
You need to open /Volumes/CyanogenModWorkspace/external/elfcopy/elfcopy.c and comment line 932 (Add // in front of the line). This should fix the problem and allow you to successfully build CM.
Congratulations you have just compiled CyanogenMod for the Nexus One on a Mac!
Sources:
Most of this tutorial came from the CM wiki and the first post.
http://wiki.cyanogenmod.com/index.p...for_Passion_(Mac)#Install_the_Developer_Tools
http://forum.xda-developers.com/showthread.php?t=899674
..........
I love you
Sent from my Nexus One using XDA App
How much hdd disk space is required?
Last time I tried with a 8 GB disk image on virtual box and run out of space while syncing repo!
Sent from my Nexus One using XDA App
lhurtado said:
How much hdd disk space is required?
Last time I tried with a 8 GB disk image on virtual box and run out of space while syncing repo!
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
A lot is required. I haven't built it in a while but I suspect it close to 8GB.
Thanks for this man. Last time I tried this with Virtual Box I could never get my phone detected in ADB. Going to give this a whirl today.
thanks dude for the tutorial! luv it!
Hi, just a couple corrections:
To set PATH, you wrote gedit .basrc, should be gedit .bashrc
To set repo, you wrote mkdir -p ~/bin/repo, should be mkdir -p ~/bin
btw, thanks for this tutorial!
lhurtado said:
How much hdd disk space is required?
Last time I tried with a 8 GB disk image on virtual box and run out of space while syncing repo!
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
My cyan-froyo source have 6.1GB now without any modification.
It's huge! Now I'm syncing repo, this time I made a bigger disk on virtual box .
Now I have to check how to build just an app...
Sent from my Nexus One using XDA App
i only had an 8gb partition so i'm just using an nfs share to store the source.
syncing repo now. Thanks a lot lhurtado for those two fixes. I was stuck trying to get repo to work.
mikroN1 said:
syncing repo now. Thanks a lot lhurtado for those two fixes. I was stuck trying to get repo to work.
Click to expand...
Click to collapse
you're welcome!
There's no need to add Jaunty repos to your Lucid/Maverick install, just enable the partner repository in System > Administration > Software Sources > Other Software
I think I'm stuck where I was before. Can't get my phone detected in ADB.
./extract-files.sh: 54: adb: not found
Any ideas?
edit: doing ./adb devices show's nothing connected.
lhurtado said:
Hi, just a couple corrections:
To set PATH, you wrote gedit .basrc, should be gedit .bashrc
To set repo, you wrote mkdir -p ~/bin/repo, should be mkdir -p ~/bin
btw, thanks for this tutorial!
Click to expand...
Click to collapse
thanks, editing now
mikroN1 said:
I think I'm stuck where I was before. Can't get my phone detected in ADB.
./extract-files.sh: 54: adb: not found
Any ideas?
edit: doing ./adb devices show's nothing connected.
Click to expand...
Click to collapse
first, make sure that your phone is connected, and if you are using a virtual machine, mounted with the program and make sure that you restarted your computer. If that doesn't fix it, then your problem is with the rules. Try reading the other two links I wrote to read.
awesome guide
thanks alot for the guide. big help. although the line "make -j`grep 'processor' /proc/cpuinfo | wc -l` CYANOGEN_WITH_GOOGLE=true otapackage" # Not working right now. It says that on the cyanogen wiki. also how do you go about adding your own stuff to the builds you make?
samir5421 said:
first, make sure that your phone is connected, and if you are using a virtual machine, mounted with the program and make sure that you restarted your computer. If that doesn't fix it, then your problem is with the rules. Try reading the other two links I wrote to read.
Click to expand...
Click to collapse
Phone is connected and shows up under USB Devices in VirtualBox. Also the two links you supplied for the ADB section both don't work. I tried changing my idVendor but still can't get it to detect my phone.
Edit:
Added my phone as a usb filter in VirtualBox. Still not working. I'm getting this pop up trying to click on my phone.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

[Q] sun-java6-jdk Ubuntu 11.10

It appears sun-java6-jdk has been removed from the Canonical repository. I added "http://archive.canonical.com/ lucid partner" to my sources, but the package is not there. Are there any alternative ways to install it?
There are quite plenty of ways actually:
1. Install from some ppa:
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin
2. Download bin package from oracle site, but that's not ubuntu-way.
3. This one i like the most: create your own packages
http://www.techytalk.info/latest-oracle-sun-java-jdk-and-jre-6-on-ubuntu-operating-systems/
and in any case, don't forget to
Code:
sudo update-alternatives --config java
inflim said:
There are quite plenty of ways actually:
1. Install from some ppa:
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin
2. Download bin package from oracle site, but that's not ubuntu-way.
3. This one i like the most: create your own packages
http://www.techytalk.info/latest-oracle-sun-java-jdk-and-jre-6-on-ubuntu-operating-systems/
and in any case, don't forget to
Code:
sudo update-alternatives --config java
Click to expand...
Click to collapse
It worked, Thank You!
No problem! Google rules

[TIP] How to restore Ubuntu after python uninstall

Hello, I would like to share with you my little experience.
I had wrong python version for compiling android from source so I decided to reinstall it.
But I was such an idiot that I typed: sudo apt-get remove python
And it removed the part of my ubuntu, it was unuseable.
So here are my 3 golden advices:
1. Don't type that command: sudo apt-get remove python
2. If you want to update python just type sudo apt-get install python2.7 (v3 is not recommended for android compiling)
3. If you removed python but still you have access to terminal type those commands:
$ sudo apt-get install python
$ sudo apt-get install ubuntu-desktop
$ sudo reboot
Click to expand...
Click to collapse
It should restore your missing part of system (That's how I restored my Ubuntu 11.10) , you can loose some settings or small things but everything should be as before.

[guide]how to mount your android sd card on linux

Instructions :-
1.Open terminal
2.type below code one by one and update
Code:
sudo add-apt-repository ppa:webupd8team/unstable
Code:
sudo apt-get update
Code:
sudo apt-get install go-mtpfs
3.Now to also install the custom Unity Launcher for Go-mtpfs
type below code
Code:
sudo apt-get install go-mtpfs-unity
4.how to mount
type
Code:
go-mtpfs /media/MyAndroid
5.how to unmount
type
Code:
fusermount -u /media/MyAndroid
And If you don't wanna manually mount by typing the command then in search type "go-mtpfs" and drag the icon into the launcher ,then right click it to unmount and mount your android device.

[GUIDE] How to configure Ubuntu 14.04 Trusty Tahr daily builds for compiling ROMs

In the last few days I started to try the Ubuntu 14.04 daily builds on my computer and I tried to configure it to compile android roms and managed to get a working configuration :laugh:
This guide is meant for Ubuntu 14.04 Trusty Tahr 64 bit. 32 Bit won't work.
If you want to use another ubuntu version, some things might be a little different. Just search on xda and you will find all the instructions that you need to complete the setup.
DISCLAMER
Although the procedures in this guide were tested on my pc/phone and produced a working build for my Galaxy Nexus, I take no responsibility for any consequences derived from their use.
1) SET UP THE BUILD ENVIRONMENT
Remove openJDK and install Java 6 jdk. Open a terminal and type:
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
This will uninstall openJDK.
Code:
sudo add-apt-repository ppa:webupd8team/java
Adds a PPA to your system, needed to download java.
Code:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Download and installs java!
To make sure the correct version of Java is activated, run the following at the Terminal prompt:
Code:
java -version
You should see something like that:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
Now type:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python lzop
This will install the needed packages.
When done, do this:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Now, install the repo binary:
Code:
mkdir ~/bin && curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo && chmod a+x ~/bin/repo
Edit .bashrc:
Code:
sudo nano ~/.bashrc
At the bottom of the file, add the following line:
Code:
export PATH=~/bin:$PATH
Save it (In nano type Ctrl-O and then Enter, then Ctrl-X to exit back to a prompt).
Restart bash:
Code:
source ~/.bashrc
Now you can download the sources of the rom that you want to compile, I make an examble for cm10.2:
2) DOWNLOAD THE SOURCES:
Code:
mkdir ~/cyanogenmod
cd ~/cyanogenmod
This creates a folder named "cyanogenmod" and opens it.
Initialize the repo:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
Download time!
Code:
repo sync
It will download about 10gb of data, so be patient!
Then get your device files and binaries and compile!
For a guide on how compile a ROM from source, just search on xda or look in my signature, there's also a guide for compiling roms.
Reserved
Updated the op with instructions for beta release
elia222 said:
Updated the op with instructions for beta release
Click to expand...
Click to collapse
I just installed Ubuntu 13.10 (fresh install in seprate HDD ) and i got error in step 1
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
ShoaibAhmed said:
I just installed Ubuntu 13.10 (fresh install in seprate HDD ) and i got error in step 1
Click to expand...
Click to collapse
This: http://askubuntu.com/questions/15433/how-do-i-fix-a-could-not-get-lock-var-lib-dpkg-lock-problem may help you.
Updated the op with instructions for 14.04 daily releases
This is crazy, I didnt even know ubuntu 14.04 was out till now, it just released a couple days ago! Great work dude:good:
noob
shoot me if i ask stupid questions but im new to this:
i wanna start with building a cm KOT49E rom for maguro: where do i get the files i need? like ´device tree' and things like that,i know there on github but then what? how do you ´ćherry pick' things?
firebird11 said:
shoot me if i ask stupid questions but im new to this:
i wanna start with building a cm KOT49E rom for maguro: where do i get the files i need? like ´device tree' and things like that,i know there on github but then what? how do you ´ćherry pick' things?
Click to expand...
Click to collapse
You can get device and kernel tree from cyanogenmod github (android_device_samsung_tuna, android_device_samsung_maguro, kernel_Samsung_tuna).
There's a good guide on xda called "how to use github" that explains cherry-picking and some other useful stuff.
error
self._write_file(output_dir, generator(), file_name)
gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
File "scripts/make_css_value_keywords.py", line 172, in generate_implementation
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
raise child_exception
errread, errwrite)
OSError: [Errno 2] No such file or directory
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
make: *** [/home/firebird11/android/system/out/target/product/maguro/obj/GYP/shared_intermediates/blink/CSSPropertyNames.cpp] Error 1
make: *** Waiting for unfinished jobs....
make: *** [/home/firebird11/android/system/out/target/product/maguro/obj/GYP/shared_intermediates/blink/CSSValueKeywords.cpp] Error 1
[email protected]:~/android/system$
Click to expand...
Click to collapse
iḿ getting this error all the time and looked for it on google but canẗ find the right answer,, do you know what is wrong here?
ok, error solved, got something to do with sdk,
1 question: how do i merge a fork ,letś say "halo" in my build?
i downloaded it but dont know what to do? can i just simply put it in the build directory?
I am having trouble setting up JDK 6 via the method in the OP. Did it setup just fine for everyone else? I could use a little help setting up JDK 6 please.
elia222 said:
In the last few days I started to try the Ubuntu 14.04 daily builds on my computer and I tried to configure it to compile android roms and managed to get a working configuration :laugh:
This guide is meant for Ubuntu 14.04 Trusty Tahr 64 bit. 32 Bit won't work.
If you want to use another ubuntu version, some things might be a little different. Just search on xda and you will find all the instructions that you need to complete the setup.
DISCLAMER
Although the procedures in this guide were tested on my pc/phone and produced a working build for my Galaxy Nexus, I take no responsibility for any consequences derived from their use.
1) SET UP THE BUILD ENVIRONMENT
Remove openJDK and install Java 6 jdk. Open a terminal and type:
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
This will uninstall openJDK.
Code:
sudo add-apt-repository ppa:webupd8team/java
Adds a PPA to your system, needed to download java.
Code:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Download and installs java!
To make sure the correct version of Java is activated, run the following at the Terminal prompt:
Code:
java -version
You should see something like that:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
Now type:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python lzop
This will install the needed packages.
When done, do this:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Now, install the repo binary:
Code:
mkdir ~/bin && curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo && chmod a+x ~/bin/repo
Edit .bashrc:
Code:
sudo nano ~/.bashrc
At the bottom of the file, add the following line:
Code:
export PATH=~/bin:$PATH
Save it (In nano type Ctrl-O and then Enter, then Ctrl-X to exit back to a prompt).
Restart bash:
Code:
source ~/.bashrc
Now you can download the sources of the rom that you want to compile, I make an examble for cm10.2:
2) DOWNLOAD THE SOURCES:
Code:
mkdir ~/cyanogenmod
cd ~/cyanogenmod
This creates a folder named "cyanogenmod" and opens it.
Initialize the repo:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
Download time!
Code:
repo sync
It will download about 10gb of data, so be patient!
Then get your device files and binaries and compile!
For a guide on how compile a ROM from source, just search on xda or look in my signature, there's also a guide for compiling roms.
Click to expand...
Click to collapse
E: Unable to locate package oracle-java6-installer
??? i added the ppa and updated
Edit: there is no java6 intsaller for trusty, only 7 and 8, you have to intsall it manually
Also then repo bin thing should be: mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Aaahh said:
E: Unable to locate package oracle-java6-installer
??? i added the ppa and updated
Edit: there is no java6 intsaller for trusty, only 7 and 8, you have to intsall it manually
Also then repo bin thing should be: mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Click to expand...
Click to collapse
Yeah. This is not an accurate guide. I had trouble getting java 6 installed too. There is a link at the bottom of this post and it will show you how I did it. Had to install it manually. Everything else should work properly I think. Anyways, if you have any questions about setting it up, feel free to PM me.
install java - http://askubuntu.com/questions/67909/how-do-i-install-oracle-jdk-6
install gksu - http://askubuntu.com/questions/290810/how-to-add-gksudo-or-what-to-use-instead-in-ubuntu-13-04
That should get you going on the java part.
to get Java JDK 6 do following (for install to a system without graphical Interface and above workaround not work):
1. Download the jdk-6u38-linux-x64.bin from the Oracle/Sun Java Download Area
Code:
wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u38-b05/jdk-6u38-linux-x64.bin"
2. Make the bin file executable:
Code:
chmod +x jdk-6u38-linux-x64.bin
3. Extract the bin file:
Code:
./jdk-6u38-linux-x64.bin
4. Move the extracted folder to this this location:
Code:
sudo mv jdk1.6.0_38 /usr/lib/jvm/./jdk-6u38-linux-x64.bin
5. Install the new Java source in system:
Code:
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javac 1
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/java 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javaws 1
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javadoc 1
sudo update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javah 1
sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javap 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/jar 1
6. Select the default Java version for your system:
Code:
sudo update-alternatives --config javac
sudo update-alternatives --config java
sudo update-alternatives --config javaws
sudo update-alternatives --config javadoc
sudo update-alternatives --config javah
sudo update-alternatives --config javap
sudo update-alternatives --config jar
7. Check Java version:
Code:
java -version
8. Verify the symlinks. Javac, Java, Javaws, Javadoc, Javah, Javap and Jar should all point to the new Java location and version:
Code:
ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
MetaIIica said:
to get Java JDK 6 do following (for install to a system without graphical Interface and above workaround not work):
1. Download the jdk-6u38-linux-x64.bin from the Oracle/Sun Java Download Area
Code:
wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u38-b05/jdk-6u38-linux-x64.bin"
2. Make the bin file executable:
Code:
chmod +x jdk-6u38-linux-x64.bin
3. Extract the bin file:
Code:
./jdk-6u38-linux-x64.bin
4. Move the extracted folder to this this location:
Code:
sudo mv jdk1.6.0_38 /usr/lib/jvm/./jdk-6u38-linux-x64.bin
5. Install the new Java source in system:
Code:
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javac 1
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/java 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javaws 1
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javadoc 1
sudo update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javah 1
sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javap 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/jar 1
6. Select the default Java version for your system:
Code:
sudo update-alternatives --config javac
sudo update-alternatives --config java
sudo update-alternatives --config javaws
sudo update-alternatives --config javadoc
sudo update-alternatives --config javah
sudo update-alternatives --config javap
sudo update-alternatives --config jar
7. Check Java version:
Code:
java -version
8. Verify the symlinks. Javac, Java, Javaws, Javadoc, Javah, Javap and Jar should all point to the new Java location and version:
Code:
ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
Click to expand...
Click to collapse
ALSO add to path and thats 38 not 45... doesn't really matter but still.
Its a sample and you can replace 6u38 with 6u45
work fine too
This work better, faster and install every time the last JDK 6
Needed if have apt-apt-repository Command not found
Code:
sudo apt-get install -y python-software-properties
Then
Code:
sudo add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main"
sudo apt-get update
sudo apt-get install -y oracle-java6-installer
java -version
ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
I was able to install oracle jdk 6 without any problem, using elia222's method
These instructions worked perfectly on 14.04 (update from 13.10 using update-manager -d)! :good:

Categories

Resources