Related
I compiled this tonight and just have some info if others are interested in it.
Link to ROM thread: http://forum.xda-developers.com/showthread.php?p=12437432#post12437432
Dev machine: newest CentOS x64 on VMWare Workstation 7, about a day old
I already had Git installed, but if you're new to this you'll need it (and some dependencies):
Code:
yum install gettext-devel expat-devel curl-devel zlib-devel openssl-devel
wget http://kernel.org/pub/software/scm/git/git-1.7.4.2.tar.bz2
tar xvfj git-1.7.4.2.tar.bz2
cd git-1.7.4.2
make prefix=/usr/local all
make prefix=/usr/local install
Repo was a new tool to me, so it wasn't installed... If you don't have repo, download/install it using this set of commands:
Code:
curl http://android.git.kernel.org/repo > /usr/bin/repo
chmod a+x /usr/bin/repo
Now that you have repo you can download everything. Make a folder somewhere and cd there (mine is /phone/aosp), then:
Code:
repo init -u git://github.com/jt1134/platform_manifest.git -b froyo
This sets up the folder, but you need to download everything:
Code:
repo sync
Jt1134 had -j40 as a parameter, but this caused a Python error for me and does not appear necessary. This downloads an incredible amount of projects and takes quite a while (over an hour at ~500K/s). It's exciting, how much is involved.
The next two lines are very quick, but I had to install Bison ('yum install bison') first:
Code:
source build/envsetup.sh
lunch full_fascinate-eng
Then the final line to actually build the whole package:
Code:
make -j$(grep processor /proc/cpuinfo | wc -l) bacon && fixzip
From this point forward I'm walking through the errors I encountered and how I fixed them to get to completion:
It failed on first run and I had to install glibc-devel because a 32 bit header file stubs-32.h was missing ('yum install glibc-devel').
It failed on the second run because I did not have 'flex' installed. ('yum install flex').
Third time looked good, compiled a ton of stuff, then bombed because 'libsecril-client.so' was missing. Exact error:
Code:
/phone/aosp/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/../lib/gcc/arm-eabi/4.4.0/../../../../arm-eabi/bin/ld:
warning: libsecril-client.so, needed by out/target/product/fascinate/obj/lib/libsecgps.so, not found (try using -rpath or -rpath-link)
It was however found in two places:
Code:
/phone/aosp/vendor/samsung/vzwtab/proprietary/lib/libsecril-client.so
/phone/aosp/vendor/samsung/fascinate/proprietary/lib/libsecril-client.so
So what I did is copy it to the output folder (not the optimal solution I'm sure, but it worked):
Code:
cp vendor/samsung/fascinate/proprietary/lib/libsecril-client.so out/target/product/fascinate/obj/lib/
Fourth time through it continued on an compiled a ton of projects, and then... 'gperf' command not found. ('yum install gperf')
Fifth time, I actually went to sleep during this one , woke up to this error:
Code:
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1
I fixed this with 'yum install ncurses-devel' and let the process continue, and shortly afterwards got another error:
Code:
In file included from external/qemu/android/skin/window.c:19:
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:55:22: error: X11/Xlib.h: No such file or directory
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:56:23: error: X11/Xatom.h: No such file or directory
I fixed this with 'yum install libX11-devel' and off we go again... a new error!:
Code:
/usr/bin/ld: cannot find -lhistory
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/sqlite3_intermediates/sqlite3] Error 1
This was fixed by running 'yum install readline-devel' and we're back to a lot more compiling...
Success!! full_fascinate.zip is in the root folder, ready to be moved to the phone.
Hope someone might find this helpful or interesting... let me know if there's anything I can do to make it better!
What dev environment do you guys use to edit these files?
Do you just keep recompiling them and running the rom using the SDK virtual phone?
I'm an experienced developer but I am only familiar with windows development but want to get into some apps development soon.
Eclipse is rather popular.
Sent from my SCH-I500 using XDA App
I'm using Eclipse, run them on the phone for testing, and haven't done much yet.
Would other developers be willing to chime in with their advice/preferences on the whole process? Thanks!
-j40 is only to parallelize the tasks (up to 40 threads I believe) so it's not strictly necessary.
By the way, all the dependencies to build android should be on here: http://source.android.com/source/download.html
And @SmokeyDP, you don't need to build your own version of the OS to write apps, so these instructions aren't really relevant for that if that's all you want to do. Eclipse is probably the most common IDE for Android app development because that's what Google supports directly, but I've heard that IntelliJ IDEA also has nice Android support and just lacks a GUI builder. I've recently switched to IDEA for other Java development and it's a lot faster and more refined than eclipse, so I would suggest trying that if you're going to start learning because you won't be used to either eclipse or IDEA and can choose which one seems the best to you.
I realize you don't need to rebuild the OS to develop an app, but I was asking about developing both since I imagine it's the same IDE and I was curious. Thanks for the info.
SmokeyDP said:
I realize you don't need to rebuild the OS to develop an app, but I was asking about developing both since I imagine it's the same IDE and I was curious. Thanks for the info.
Click to expand...
Click to collapse
Unless you're going to be using the NDK to write apps, you're not going to be using C, which is what the Linux Kernel is written in... and Eclipse's support for C is a lot poorer than its support for Java (honestly, I can't stand its support for either, its interface is quite the unorganized mess, IMO). I, personally, use a different set of tools for each language/toolkit I use, as each have their pros and cons.
When I tried to install g++ by synaptic, error occurred:
E: /var/cache/apt/archives/libc6-dev_2.9-4ubuntu6_armel.deb: trying to overwrite `/usr/lib/libc.so', which is also in package rootfs
It seemed that there is something wrong with "libstdc++6-4.3", it cannot be installed correctly.
Any idea?
how are you installing it? Did you try:
sudo apt-get build-essential
I did that yesterday and was able to build a sample "helloworld.c" program (actually, I had to install one other library via synaptic, but I don't remember which one...if you compile, it will tell you).
troycarpenter said:
how are you installing it? Did you try:
sudo apt-get build-essential
I did that yesterday and was able to build a sample "helloworld.c" program (actually, I had to install one other library via synaptic, but I don't remember which one...if you compile, it will tell you).
Click to expand...
Click to collapse
I search g++ in synaptic and choose to install it.
I have tried "sudo apt-get install build-essential",
it also said
"E: /var/cache/apt/archives/libc6-dev_2.9-4ubuntu6_armel.deb: trying to overwrite `/usr/lib/libc.so'"
Maybe the g++ version is too high(4.3), which version are you using?
troycarpenter said:
how are you installing it? Did you try:
sudo apt-get build-essential
I did that yesterday and was able to build a sample "helloworld.c" program (actually, I had to install one other library via synaptic, but I don't remember which one...if you compile, it will tell you).
Click to expand...
Click to collapse
I search g++ in synaptic and choose to install it.
I have tried "sudo apt-get install build-essential",
it also said
"E: /var/cache/apt/archives/libc6-dev_2.9-4ubuntu6_armel.deb: trying to overwrite `/usr/lib/libc.so'"
Maybe the g++ version is too high(4.3), which version are you using?
Here's what I got. It's 4.3.3:
Code:
[email protected]:/etc$ g++ -v
Using built-in specs.
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-libssp --disable-sjlj-exceptions --with-arch=armv5t --with-tune=cortex-a8 --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi
Thread model: posix
gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
I make the baseline assumption that you've run the webtop2SD and webtopscripts to have a working webtop environment. I have installed a few other things like OpenOffice also, but that shouldn't interfere. Last night I was able to install build-essential and compile a sample program after another library install (see http://forum.xda-developers.com/showthread.php?t=1425968). Also, if you haven't compiled in debian/ubuntu before, don't forget you will also need to install many of the -dev packages which include the headers needed to compile. You will basically find out about those as you compile different packages (although that's not your current problem).
wasp_neal said:
I search g++ in synaptic and choose to install it.
I have tried "sudo apt-get install build-essential",
it also said
"E: /var/cache/apt/archives/libc6-dev_2.9-4ubuntu6_armel.deb: trying to overwrite `/usr/lib/libc.so'"
Maybe the g++ version is too high(4.3), which version are you using?
Click to expand...
Click to collapse
Try this:
http://forum.xda-developers.com/showthread.php?p=20494551
Ok new method you have to be running Ubuntu. I made an All in one script to do everything for you I'm really tired so for now figure it out your self i couldn't have made it any easier to use. It even downloads my tree and cm9/10/aokp
Instructions
1. Open Terminal
2. Copy and paste this
Code:
cd ~/ && git clone git://github.com/Sportsstar89/scripts.git && cd ~/scripts
3. Then run the script
Code:
./cm_script
### Below this is outdated ###
Code:
Ok I am writing this tutorial to encourage people to learn and to help develop CM9 as more people = more ideas
First you need to be running linux i recommend ubuntu
For 32-bit & 64-bit systems:
1.[code]sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
NOTE: On Ubuntu 11.10, and variants, you need to enable the parter repository to install sun-java6-jdk:
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
2.
Code:
mkdir -p ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
export PATH=~/bin:$PATH
3.
Code:
mkdir -p ~/android
cd android
4.
Code:
repo init -u git://github.com/Sportsstar89/android.git -b ics
repo sync -j4
5.
Code:
. build/envsetup.sh
6.
Code:
brunch ruby -j#
#= How ever man cores you have ex. if you have a quad core it would be "brunch ruby -j4"
7. Wait for the build to complete and it will be in the out/target/product/ruby/
Ok so i think i have everything if you run in to any issues let me know[/CODE]
Default.xml fixed
Sent from my HTC_Amaze_4G using xda premium
Does that tutorial also work for devices like the Incredible s that don't have CM9 by now?
Does Compile from source mean that I can compile CM9 for my device even if it isn't a supoprted device by cyanogenmod?
Really nice idea to write this tutorial!
OHowever you wrote the same dependencies for both architectures I think The 32 bits one definitely seems to be wrong with all these lib32-*
Sent from my HTC Amaze 4G using XDA
00hero00 said:
Does that tutorial also work for devices like the Incredible s that don't have CM9 by now?
Does Compile from source mean that I can compile CM9 for my device even if it isn't a supoprted device by cyanogenmod?
Click to expand...
Click to collapse
You would have to use the incredible's device tree and edit in to the vendor setup.sh in vendor/cm 'add_lunch_combo cm_inc-userdebug' or what ever your device's codename is and then brunch inc
johnride said:
Really nice idea to write this tutorial!
OHowever you wrote the same dependencies for both architectures I think The 32 bits one definitely seems to be wrong with all these lib32-*
Sent from my HTC Amaze 4G using XDA
Click to expand...
Click to collapse
Yea ubuntu changed their name they still download they just give you a bunch of warnings
Thank you so much for this write up.
After the repo sync -j4 command my computer has been running the sync for about 5 hours.
My question is, for future updates I'd need to run this command again, correct? Next time I run it, it shouldn't take nearly as long, right? Just thought I'd ask.
Sent from my HTC_Amaze_4G using Tapatalk 2
Nshih422 said:
Thank you so much for this write up.
After the repo sync -j4 command my computer has been running the sync for about 5 hours.
My question is, for future updates I'd need to run this command again, correct? Next time I run it, it shouldn't take nearly as long, right? Just thought I'd ask.
Sent from my HTC_Amaze_4G using Tapatalk 2
Click to expand...
Click to collapse
No it won't take as long because it will only get the new files and get rid of the new ones. (Usually takes about 30 seconds for me on 50mbps internet)
Sent from my HTC_Amaze_4G using Tapatalk 2
Ok, sorry for the questions but im a noob in linux. Im running ubuntu 12.04 LTS
so the java install gave me this
Code:
Package sun-java6-jdk 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
E: Package 'sun-java6-jdk' has no installation candidate
So I installed java using this tutorial HERE.
Also I got this error:
Code:
Package lib32readline5-dev 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:
lib32readline-gplv2-dev
E: Package 'lib32readline5-dev' has no installation candidate
So i installed that package instead.
Im guessing one of these problems is leading me to this error when I brunch ruby -j4
Code:
make: *** [out/host/common/obj/JAVA_LIBRARIES/dumpkey_intermediates/javalib.jar] Error 127
make: *** Waiting for unfinished jobs....
In file included from external/srec/tools/grxmlcompile/sub_grph.h:26:0,
from external/srec/tools/grxmlcompile/sub_supp.cpp:26:
external/srec/tools/grxmlcompile/vocab.h:72:54: warning: ‘typedef’ was ignored in this declaration [enabled by default]
external/srec/tools/grxmlcompile/sub_supp.cpp: In member function ‘void SubGraph::ClearDuplicateArcs()’:
external/srec/tools/grxmlcompile/sub_supp.cpp:366:12: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses]
In the out/target/product/ruby folder I have
Code:
obj (folder)
root (folder)
system (folder)
clean_steps.mk
previous_build_config.mk
Ruby folder is:
Contents: 2,885 items, totalling 24.0 MB
Any help on where to go from here? Thanks in advance.
Nshih422 said:
Ok, sorry for the questions but im a noob in linux. Im running ubuntu 12.04 LTS
so the java install gave me this
Code:
Package sun-java6-jdk 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
E: Package 'sun-java6-jdk' has no installation candidate
So I installed java using this tutorial HERE.
Also I got this error:
Code:
Package lib32readline5-dev 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:
lib32readline-gplv2-dev
E: Package 'lib32readline5-dev' has no installation candidate
So i installed that package instead.
Im guessing one of these problems is leading me to this error when I brunch ruby -j4
Code:
make: *** [out/host/common/obj/JAVA_LIBRARIES/dumpkey_intermediates/javalib.jar] Error 127
make: *** Waiting for unfinished jobs....
In file included from external/srec/tools/grxmlcompile/sub_grph.h:26:0,
from external/srec/tools/grxmlcompile/sub_supp.cpp:26:
external/srec/tools/grxmlcompile/vocab.h:72:54: warning: ‘typedef’ was ignored in this declaration [enabled by default]
external/srec/tools/grxmlcompile/sub_supp.cpp: In member function ‘void SubGraph::ClearDuplicateArcs()’:
external/srec/tools/grxmlcompile/sub_supp.cpp:366:12: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses]
In the out/target/product/ruby folder I have
Code:
obj (folder)
root (folder)
system (folder)
clean_steps.mk
previous_build_config.mk
Ruby folder is:
Contents: 2,885 items, totalling 24.0 MB
Any help on where to go from here? Thanks in advance.
Click to expand...
Click to collapse
Dis you set JAVA_HOME correctly for the jdk
Sent from my HTC_Amaze_4G using xda premium
OK! First compile ever thanks to your guide! THANKS Sportsstar89!
Originally I was running it on my SSD and for some reason it wasnt working well. Download took 5 hours and compile was running for 3 hours before I ran out of space. So I swapped hard drives and finished the whole process in a little under 3 hours. I guess my SSD is either going bad or needs to be set up somehow to work properly with linux.
Compile took 1 hour 11 minutes
I recommend anyone who wants to try this out to at least give yourself 30GB for the Ubuntu Install.
So apparently, There are two zips in the ruby folder after its done compiling. I flashed the "cm-9-20120625-UNOFFICIAL-ruby" one first then flashed the "cm_ruby-ota-eng.a.zip" am I doing it right?
I keep getting SystemUI error and it wont stop. Not trying to report issues just want to know if I'm on the right track.
Thanks again for all your hard work. Cant wait till this is done!
EDIT:
I figured out that the one that had ota in the title is what is used to make the unofficial. For some reason though the ota seems to function a little better.
Nshih422 said:
OK! First compile ever thanks to your guide! THANKS Sportsstar89!
Originally I was running it on my SSD and for some reason it wasnt working well. Download took 5 hours and compile was running for 3 hours before I ran out of space. So I swapped hard drives and finished the whole process in a little under 3 hours. I guess my SSD is either going bad or needs to be set up somehow to work properly with linux.
Compile took 1 hour 11 minutes
I recommend anyone who wants to try this out to at least give yourself 30GB for the Ubuntu Install.
So apparently, There are two zips in the ruby folder after its done compiling. I flashed the "cm-9-20120625-UNOFFICIAL-ruby" one first then flashed the "cm_ruby-ota-eng.a.zip" am I doing it right?
I keep getting SystemUI error and it wont stop. Not trying to report issues just want to know if I'm on the right track.
Thanks again for all your hard work. Cant wait till this is done!
EDIT:
I figured out that the one that had ota in the title is what is used to make the unofficial. For some reason though the ota seems to function a little better.
Click to expand...
Click to collapse
The cm_ota is the not zipaligned version that you would get from doing
Code:
. build/envsetup.sh
lunch cm_ruby
make otapackage -j#
but by using the brunch command it zipaligns it for you and produces the cm-date-unofficial.zip
Nshih422 said:
OK! First compile ever thanks to your guide! THANKS Sportsstar89!
Originally I was running it on my SSD and for some reason it wasnt working well. Download took 5 hours and compile was running for 3 hours before I ran out of space. So I swapped hard drives and finished the whole process in a little under 3 hours. I guess my SSD is either going bad or needs to be set up somehow to work properly with linux.
Compile took 1 hour 11 minutes
I recommend anyone who wants to try this out to at least give yourself 30GB for the Ubuntu Install.
So apparently, There are two zips in the ruby folder after its done compiling. I flashed the "cm-9-20120625-UNOFFICIAL-ruby" one first then flashed the "cm_ruby-ota-eng.a.zip" am I doing it right?
I keep getting SystemUI error and it wont stop. Not trying to report issues just want to know if I'm on the right track.
Thanks again for all your hard work. Cant wait till this is done!
EDIT:
I figured out that the one that had ota in the title is what is used to make the unofficial. For some reason though the ota seems to function a little better.
Click to expand...
Click to collapse
I'm getting the SystemUI error too. I haven't tried the cm_ruby-ota-eng.a.zip yet to see if that helps. Anyone else getting this problem? Does anyone know why it's doing that?
Sent from my HTC_Amaze_4G using XDA
derekalan18 said:
I'm getting the SystemUI error too. I haven't tried the cm_ruby-ota-eng.a.zip yet to see if that helps. Anyone else getting this problem? Does anyone know why it's doing that?
Sent from my HTC_Amaze_4G using XDA
Click to expand...
Click to collapse
It's a bug from using the stock kernel it'll be fixed soon
Sent from my HTC_Amaze_4G using xda premium
sportsstar89 said:
It's a bug from using the stock kernel it'll be fixed soon
Sent from my HTC_Amaze_4G using xda premium
Click to expand...
Click to collapse
Oh ok. I thought I did something wrong.
Sent from my HTC_Amaze_4G using XDA
derekalan18 said:
Oh ok. I thought I did something wrong.
Sent from my HTC_Amaze_4G using XDA
Click to expand...
Click to collapse
I thought I did something wrong too. So I deleted my "bin" and "android" folders and started from scratch and now it wont compile. I keep getting error 1, or error 2. Ill update with an exact error when i get a chance.
EDIT: sorry I forgot to update. I think my problem was not making repo, in bin folder executable. Like the suggestion below, when I repeated the process step by step it compiled again.
Nshih422 said:
I thought I did something wrong too. So I deleted my "bin" and "android" folders and started from scratch and now it wont compile. I keep getting error 1, or error 2. Ill update with an exact error when i get a chance.
Click to expand...
Click to collapse
If you deleted bin, you'll have to add repo back in and make it executable. Glad you got it working. I love compiling android.
I am syncing the git right now on my ArchLinux and I have had to modify a little bit the repo and main.py scripts to get them working. The python command on ArchLinux is actually python 3.2 so there are multiple syntax errors popping. To fix it I just installed python2 and changed "python" for "python2" at the begining of those scripts.
Just posting this to help anybody.
By the way this git repo is HUGE! 1.9 GB and still downloading... I wonder why I see so much cm7 stuff in the syncing output? We need all cm7 sources to compile cm9 on the Amaze?
Edit: 11.1GB ? WTF? My 74GB home disk is now almost full. Why is it so big?
johnride said:
I am syncing the git right now on my ArchLinux and I have had to modify a little bit the repo and main.py scripts to get them working. The python command on ArchLinux is actually python 3.2 so there are multiple syntax errors popping. To fix it I just installed python2 and changed "python" for "python2" at the begining of those scripts.
Just posting this to help anybody.
By the way this git repo is HUGE! 1.9 GB and still downloading... I wonder why I see so much cm7 stuff in the syncing output? We need all cm7 sources to compile cm9 on the Amaze?
Edit: 11.1GB ? WTF? My 74GB home disk is now almost full. Why is it so big?
Click to expand...
Click to collapse
That's how big source code for android is a full build will take about 50gb to complete
New!!! Now a script! Easy to use and you no longer have to wait for me to build
Kick-ass. Since I'm running Mint Maya, I'll give this a go and see how it craps out.
Hi, my name's Stefano I'm from Italy, and sorry for my poor english. This is the guide to build your own the KitKat (or whatever branch you want) for your International HOX+. We'll start, obviously, setting up your client (PC), and here we'll use ubuntu x64. Is possible to use almost any linux distribution (also MacOSX) but I prefer to stay on what is much supported and known (for me!). This guide is taken from internet and reading forums/blogs. I didn't invent anything, you can found a lot of guides like this. Just this is updated with last changes. For the setup part I read and paste a lot from here (thanks to sylentprofet).
Regard the hardware side you'll need at least of:
a Dual Core processor
4 Gb of RAM
80 Gb of hard disk for each repository (Better if SSD but don't required)
The Graphics Card don't care, we don't use to compile
A good internet connection, you have to download up to 40 Gb of stuff
A lot of patience, if you aren't go to download a ready ROM, it's better!
Time, time, time, time and again time!
How to Configure Ubuntu for Properly Compiling Android ROMs
This guide applies to Ubuntu 13.04 Raring Ringtail 64 bit (but also down to 12.04 LTS which is the version that I prefer). Do not use the 32 Bit version. Also, PAY CLOSE ATTENTION when to use “sudo” and when to not. It can make things funky if you do something as root that you shouldn’t. During normal build you don't have absolutely need to use "sudo", just during the PC setup.
Much thanks goes out to Google, ProTekk, Canonical, and everyone else that I read a random paragraph here and snippet there.
First, let’s set up the correct JDK.
Many of you probably have some kind of wrong Java installed. Sad cupcake.Let’s get rid of that. Copy and paste this into a Terminal window:
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Back to the Terminal. Copypasta the following:
Code:
sudo add-apt-repository ppa:webupd8team/java
This will add the correct PPA to your system for updated builds of Java 6 JDK that are compatible with 13.04 (or less). No more unrecognized Java version errors! Yay! And it’s self updating, so you don’t have to redownload binaries everytime they release a new version.
Next, we actually need to install the package. More copypasta:
Code:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Follow the onscreen instructions. You have to Accept the Licensing Agreement or whatever. Hopefully no human centipede clauses. Once that is completed successfully, you will have to restart any open browsers with Java content for it to display correctly.
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 the following:
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)
Ok, back to a fresh Terminal prompt. Time for installing the guts to build stuff in Ubuntu. Because (K)Ubuntu no longer carries ia32-libs-multiarch and ia32-libs (from Saucy onwards), it is necessary to install from precise repos:
Code:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse"
sudo apt-get update
sudo apt-get install ia32-libs-multiarch
once is installed, you can remove repository:
Code:
sudo add-apt-repository --remove "deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse"
sudo apt-get update
Before start, install:
Code:
sudo apt-get install dpkg-dev
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
And we wait. Don’t worry, this isn’t the crazy downloading part just yet.
When that is done, do this:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Now it's time to download and setup SDK Tools. First of all download Android SDK Tools for Linux x64. Extract the folder “sdk”, inside package, into your "Downloads" folder and rename it to "AndroidSDK" e.g..
Then come to your terminal and type:
Code:
cd ~/Downloads/AndroidSDK/tools
and after:
Code:
./android sdk
You can now see the GUI that propose all installable packages. Install Platform tools and Tools for most recent Android (4.4), with the most higher API (19+) version. Flag "accept" and install.
Once is complete, you have you need the binary for repo that will let you talk to git servers and download all that precious source code:
Code:
mkdir ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Open "~/.bashrc" to add a line:
Code:
sudo nano ~/.bashrc
At the very bottom, add the following line:
Code:
export PATH=~/bin:$PATH
Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Type to restart bash:
Code:
source ~/.bashrc
Now you have all need to work (or play) with your ubuntu and it's time to give the sources (repositories) from your preferred Team (who share the source code for their rom). The most known host service for sources and projects is GitHub. E.g. https://github.com/CyanogenMod/
The point of start of any repo is its "manifest" (default.xml) where the team list all it's projects (here an example), only the necessary to the building process.
Until last year was necessary to compile (before begin and looking to platform manifest) an own local manifest where we exclude from download all the devices/kernel/vendor parts unnecessary for our device. This saves up to some Gigabytes of download.
Fortunately now the repositories will download itself the necessary devices/kernel/vendor parts when we'll choose ("lunch") the device to build ("make"). With the exception of AOKP who wanna know, before initialize your local repo, for which device/s you'd like build.
Unfortunately, for the HOX+, if not Cyanogenmod or any platform who support directly your enrc2b, is necessary to create a local manifest, to import the device/kernel/vendor parts need to build a rom for your enrc2b. This part will insert to the end and befor your "lunch".
A device merged into a ROM source and its frameworks has always:
A device part specifical for its own (typically located into /device/"vendor"/"devicename")
A possible device part specifical for its processor (typically located into /device/"vendor"/"processor class/name")
A kernel part specifical for its device (typically located into /kernel/"vendor"/"device name")
A vendor blobs part generical with inside all or part of vendor devices (typically located into /vendor/"vendor"/"device name")
The (1) if specifical for the rom (Carbon is slightly different from CM, from AOKP or Slim).
The (2) maybe the same for alls.
The (3) maybe the same for alls.
The (4) maybe the same for alls.
I saw "maybe the same" for (2), (3) and (4), because often the teams make choice on every part to optimize the use and functionality of its rom.
In the specific (for the HOX+) we give this four parts from CM (that fortunately supports enrc2b) to insert them into another platform. Because our device isn't supported.
The (1) part will be modified in a number of make files, the (2), (3) and (4) instead will be the same.
Now I'll write a section for each Team/ROM you want to initialize, that's for me has sense. How take a sense to put each "platform/project" in a different folder (e.g. CarbonDev in a folder and Cyanogenmod in another, both sons of your Home folder).
In the waiting to read next part, better familiarize a little with terms like "breakfast, brunch, lunch, make" into Android contest.
Building Cyanogenmod
In the terminal, now we'll make a folder where to store the Android source code. Typically will make it in your home folder, within a folder called like your projected ROM, to identify from other stuff, open your terminal and type:
Code:
mkdir –p ~/Cyanogenmod
cd ~/Cyanogenmod
Now we are going to initialize your local repository, with the "branch" cm-11.0 (KitKat), in your terminal:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
And now, the most long part of the story: you’re going to get the source. We have to download around 10-15 Gbytes. First of begin the process, you must to know that you can accelerate the process related to your processor and, obviously, to your internet band. You can choose the number of simultaneous processes to start. They depends from the "#" in the "-j" parameter. E.g. the option -j6 is related to a “normal” processor. If you have a performant processor and/or internet connection, try to increment putting –j10 or more. On terminal:
Code:
repo sync -j6
From time to time, check the situation on output, maybe occurs a pair of hours or a whole night. But when all will be done, you’re ready to build Android!
Once you finish your repo sync, you’ll ready to build. In your terminal, into your working folder type (pay attention at the initial “dot”):
Code:
. build/envsetup.sh
The commands are loaded, now you can build (tune your -j# parameter as you want):
Code:
breakfast enrc2b && make -j6 bacon
At the end of all, your fresh ROM to flash will be in Cyanogenmod/out/target/product/enrc2b. Happy flash!
Thanks @Lloir for supervision.
IMPORTANT: to flash a KK rom on enrc2b you'll need the Lloir's CWM recovery, available here.
Building AOKP
Reserved 2
Building Carbon
In the terminal, now we'll make a folder where to store the Android source code. Typically will make it in your home folder, within a folder called like your projected ROM, to identify from other stuff, open your terminal and type:
Code:
mkdir –p ~/CarbonDev
cd ~/CarbonDev
Now we are going to initialize your local repository, with the "branch" kk (KitKat), in your terminal:
Code:
repo init -u https://github.com/CarbonDev/android.git -b kk
After, using your file browser, go to your Home, CarbonDev (enable "show hidden files") folder and enter into ".repo" folder too. Create a new folder named "local_manifests" and create a new file named e.g. "MyRoomService.xml", edit it with GEdit (disable, into preference, "always make a backup copy...") and paste the follow content into:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="github"
fetch="https://github.com/"
sync-j="4" />
<project name="STELIX/android_device_htc_enrc2b_CarbonDev" revision="kitkat" path="device/htc/enrc2b" remote="github" />
<project name="STELIX/android_device_htc_tegra3-common" revision="cm-11.0" path="device/htc/tegra3-common" remote="github" />
<project name="STELIX/android_kernel_htc_enrc2b_CM" revision="cm-11.0" path="kernel/htc/enrc2b" remote="github" />
<project name="TheMuppets/proprietary_vendor_htc" revision="cm-11.0" path="vendor/htc" remote="github" />
</manifest>
You have just create a local manifest, to add certain projects that this platform haven't yet. It git clone my sources, which are simply CM sources modified for the CarbonDev frameworks needs.
And now, the most long part of the story: you’re going to get the source. We have to download around 10-15 Gbytes. First of begin the process, you must to know that you can accelerate the process related to your processor and, obviously, to your internet band. You can choose the number of simultaneous processes to start. They depends from the "#" in the "-j" parameter. E.g. the option -j6 is related to a “normal” processor. If you have a performant processor and/or internet connection, try to increment putting –j10 or more. On terminal:
Code:
repo sync -j6
From time to time, check the situation on output, maybe occurs a pair of hours or a whole night. But when all will be done, you’re ready to build Android!
Once you finish your repo sync, you’ll ready to build. In your terminal, into your working folder type (pay attention at the initial “dot”):
Code:
. build/envsetup.sh
The commands are loaded, now you can lunch:
Code:
lunch
Choose the number corresponding to your "carbon_enrc2b-userdebug" (and press ENTER on your keyboard!)
When the prompt come back you're ready to "make carbon":
Code:
make carbon -j6
Tuning your -j# parameter as you want...
At the end of all, your fresh ROM to flash will be in CarbonDev/out/target/product/enrc2b. And Happy flash!
Thanks @Lloir for supervision.
IMPORTANT: to flash a KK rom on enrc2b you'll need the Lloir's CWM recovery, available here.
Reserved 4
Reserved 5
Reserved 6
I'm using mint 16. What should I do different?
Sent from my hammerhead
Cuzz1369 said:
I'm using mint 16. What should I do different?
Sent from my hammerhead
Click to expand...
Click to collapse
Usually is recommended Ubuntu or Mint... I think there is no difference. Make attention if during packages installation it report any error.
PippoX3 said:
Usually is recommended Ubuntu or Mint... I think there is no difference. Make attention if during packages installation it report any error.
Click to expand...
Click to collapse
Awesome. Maybe you could add a guide on how to cherry pick commits next?
It tells me I have java version 1.5.0
java version "1.5.0"
gij (GNU libgcj) version 4.8.1
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Installed 1.6 and get this error
You are attempting to build with an unsupported JDK.
You use OpenJDK but only Sun/Oracle JDK is supported.
Please follow the machine setup instructions at
https://source.android.com/source/download.html
need some help here.
Edit: Figured it out, building now. Thanks
Cuzz1369 said:
It tells me I have java version 1.5.0
java version "1.5.0"
gij (GNU libgcj) version 4.8.1
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Installed 1.6 and get this error
You are attempting to build with an unsupported JDK.
You use OpenJDK but only Sun/Oracle JDK is supported.
Please follow the machine setup instructions at
https://source.android.com/source/download.html
need some help here.
Edit: Figured it out, building now. Thanks
Click to expand...
Click to collapse
Good. Hope you remove your open java. The first terminal remove any not supported java. Follow the guide step after step.
The cherry-pick is so simple to apply. Will see after. Thanks.
you can use OJDK with ALL the sources.
it will just come up with that "warning" and then will carry on building perfectly fine
thanks for the guide
can i use knoppix/debian instead of ubuntu ??
MasalaMan said:
thanks for the guide
can i use knoppix/debian instead of ubuntu ??
Click to expand...
Click to collapse
Yes, I use Arch. The instructions for Debian are essentially the same as Ubuntu
Sent from my Nexus 5 using Tapatalk
Lloir said:
Yes, I use Arch. The instructions for Debian are essentially the same as Ubuntu
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Thanks mate. I haven't all this experience on different distributions. If I have a little of time, today I will add another slice to the pie...
Thank you so much for this guide @PippoX3 I am about to have the most fun of my life now. Thanks again my friend
Sent from my Nexus 5 using XDA Premium 4 mobile app
skulldreamz said:
Thank you so much for this guide @PippoX3 I am about to have the most fun of my life now. Thanks again my friend
Sent from my Nexus 5 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
You're welcome mate. To share should serve to make more people happy!
In this thread it say you need proprietary files from the device. I don't see that step on your guide. So which is the right way?
http://forum.xda-developers.com/showthread.php?t=2060017
COMPILE From Source For Any Phone On Linux Distros [BUILD ENVIRONMENT TO COMPILE]
Sent from my hammerhead
Github.com/themuppets/htc all the prop files are uploaded there
Sent from my Nexus 5 using Tapatalk
— If you would rather use a ready-to-go Virtual Machine based on these instructions, check out this post!—
Copied with permission from nathanpfry.com
With a new version of Ubuntu comes an update to my world-famous guide for setting up a build environment to compile Android ROMs. The aim of this is to simplify the configuration process for you.
Follow the directions step-by-step. All you have to do is copy and paste the code in order and it will be up and running in no time!
This guide applies to all variations of Ubuntu 15.04 Vivid Vervet 64 bit. Do not use the 32 Bit version.
Also, PAY CLOSE ATTENTION when to use “sudo” and when to not. It can make things funky if you do something as root that you shouldn’t.
Much thanks goes out to Google, ProTekk, Canonical, and everyone else that I read a random paragraph here and snippet there.
Ready to begin? Ok.
1) Unless it’s a completely fresh Ubuntu installation, many of you have the wrong version of Java installed. Let’s fix that first.
The command below makes sure you’re starting with a clean slate. Copy and paste it into a terminal (command prompt) window:
Code:
sudo apt-get remove openjdk-* icedtea-* icedtea6-*
If necessary, follow the on-screen instructions to remove any stray Java versions. Otherwise, move on to the next step.
2) Install the main build tools with this command:
Code:
sudo apt-get install openjdk-7-jdk git ccache automake lzop bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 g++-multilib python-networkx libxml2-utils bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools pngcrush schedtool dpkg-dev liblz4-tool make optipng
That’s it on the package side of things.
3) A program called “repo” lets you communicate with git servers and download all that precious source code. The next command will install it:
Code:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
4) Use your favorite text editor to open ~/.bashrc – I like nano:
Code:
sudo nano ~/.bashrc
5) At the very bottom (use the Page Down key) paste this code to a new line:
Code:
export PATH=~/bin:$PATH
export USE_CCACHE=1
6) Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash:
Code:
source ~/.bashrc
7) In the terminal, navigate to where you would like to download the Android source code. The commands below will make it in your home folder, but if you have limited space you may want to create it somewhere else. Faster is better, i.e. SSD would be best, USB external (even 3.0) will be comparatively slow. Here we go:
Code:
mkdir ~/android
cd ~/android
8) Now you’re going to initialize the repo. This is where you decide the flavor of Android you want to build, i.e. AOKP, CyanogenMod, AOSP etc.
For the purposes of the tutorial, here’s the command for SimpleAOSP Lollipop:
Code:
repo init -u https://github.com/SimpleAOSP-Lollipop/platform_manifest.git -b L
9) Last step. Time to get the source. Prepare yourself, many gigabytes of downloading await.
Don’t worry, it’s automated.
Hey everyone, it’s the final terminal command!
Code:
repo sync
Check back periodically every hour or so. It all depends on how fast your connection is.
That should be everything. Now you’re ready to build Android. Good luck!
If this guide helped you out, feel free to click the thanks button!
For those of you that want to build Gingerbread thru KitKat, here's the easiest way to update your system:
First add the PPA for older Java 1.6 builds.
Code:
sudo add-apt-repository ppa:webupd8team/java
Then install:
Code:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Once that completes, you simply need to tell Linux to use the older version of Java and Java Compiler to render content.
Run the following two commands separately, making the correct selection for Oracle JDK 1.6 both times when prompted. Again in the terminal:
Code:
sudo update-alternatives --config java
sudo update-alternatives --config javac
That should do the trick!
Going to replace 14.04 with this, keep having javac crashes and whatever it is is not isolated to this version.
Update:
mingw32, lib32bz2-1.0, lib32bz2-dev not found.
Code:
============================================
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.
Your version is: Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar java version "1.7.0_79" OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu1) OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode).
The required version is: "1.7.x/1.8.x"
Please follow the machine setup instructions at
https://source.android.com/source/initializing.html
************************************************************
build/core/main.mk:174: *** stop. Stop.
#### make failed to build some targets (2 seconds) ####
Still getting this error
aapav01 said:
Code:
============================================
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.
Your version is: Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar java version "1.7.0_79" OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu1) OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode).
The required version is: "1.7.x/1.8.x"
Please follow the machine setup instructions at
https://source.android.com/source/initializing.html
************************************************************
build/core/main.mk:174: *** stop. Stop.
#### make failed to build some targets (2 seconds) ####
Still getting this error
Click to expand...
Click to collapse
same error here. still trying to figure it out. you can remove the lines of code that check for java on main.mk to build, nonetheless.
---------- Post added at 08:32 ---------- Previous post was at 08:30 ----------
and BTW, you only need these packages to build on 14.04 and upwards:
Code:
sudo apt-get install bison g++-multilib git gperf libxml2-utils make zlib1g-dev:i386 zip
in:
https://source.android.com/source/initializing.html
infected_ said:
same error here. still trying to figure it out. you can remove the lines of code that check for java on main.mk to build, nonetheless.
---------- Post added at 08:32 ---------- Previous post was at 08:30 ----------
and BTW, you only need these packages to build on 14.04 and upwards:
Code:
sudo apt-get install bison g++-multilib git gperf libxml2-utils make zlib1g-dev:i386 zip
in:
https://source.android.com/source/initializing.html
Click to expand...
Click to collapse
did u find the way to solve it..
fix no.. kind of a hack.
edit "main.mk" and remove the lines that check for java version.
infected_ said:
fix no.. kind of a hack.
edit "main.mk" and remove the lines that check for java version.
Click to expand...
Click to collapse
bro but it will not stop that repo sync thingie
infected_ said:
fix no.. kind of a hack.
edit "main.mk" and remove the lines that check for java version.
Click to expand...
Click to collapse
BRO i found the fix just need to do this
Copy and paste the following into the terminal:
Code:
sudo apt-get install openjdk-7-jre openjdk-7-jdk
IF i help plz don't forget to press the thanks
---------- Post added at 11:26 PM ---------- Previous post was at 11:23 PM ----------
sylentprofet said:
If necessary, follow the on-screen instructions to remove any stray Java versions. Otherwise, move on to the next step.
2) Copy and paste the following into the terminal:
Code:
sudo apt-get install openjdk-7-jdk
[/B]
Click to expand...
Click to collapse
i think u change the 2nd to this
Code:
sudo apt-get install openjdk-7-jre openjdk-7-jdk
infected_ said:
same error here. still trying to figure it out. you can remove the lines of code that check for java on main.mk to build, nonetheless.
Click to expand...
Click to collapse
For those of you that want to build Gingerbread thru KitKat (which requires Oracle JDK 1.6) but already have your system configured for Lollipop (JDK 1.7), here's the easiest way to update your system:
First add the PPA for updated Java builds.
Code:
sudo add-apt-repository ppa:webupd8team/java
Then install:
Code:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Once that completes, you simply need to tell Linux to use the older version of Java and Java Compiler to render content.
Run the following two commands separately, making the correct selection for Oracle JDK 1.6 both times when prompted. Again in the terminal:
Code:
sudo update-alternatives --config java
sudo update-alternatives --config javac
That should do the trick! I'll add this to the main thread.
infected_ said:
and BTW, you only need these packages to build on 14.04 and upwards:
Click to expand...
Click to collapse
That may be true for vanilla Google Android, but if you attempt to build for another flavor (ie Cyanogenmod), additional packages are required (image optimizers etc)
This guide is designed to help new users prepare their systems as comprehensively as possible. If you don't know what you're talking about, please don't confuse people with misinformation or poorly crafted "hacks". I've been publishing this guide for 3 years now, ask a question and be patient, try reading Google results for a couple of hours - I'll do everything I can to help out.
garwynn said:
Going to replace 14.04 with this, keep having javac crashes and whatever it is is not isolated to this version.
Update:
mingw32, lib32bz2-1.0, lib32bz2-dev not found.
Click to expand...
Click to collapse
Thanks for the heads up. Don't know how those snuck in there, I think I accidentally copied the string from one of my older guides.
OP updated.
sylentprofet said:
That may be true for vanilla Google Android, but if you attempt to build for another flavor (ie Cyanogenmod), additional packages are required (image optimizers etc)
This guide is designed to help new users prepare their systems as comprehensively as possible. If you don't know what you're talking about, please don't confuse people with misinformation or poorly crafted "hacks". I've been publishing this guide for 3 years now, ask a question and be patient, try reading Google results for a couple of hours - I'll do everything I can to help out.
Click to expand...
Click to collapse
you are a bit full of yourself, no? i was trying to help. and i really dont care you've been doing this for 3y... anyone can google for tutorials and make one. you made even worse, just adapted one from 14.10 or 14.04, which gave you those 3 not found packages. you made the tutorial and forget to test it?
got it to build CM in 15.04 with the packages i mentioned, only lzop was missing.
and if you see another way to build, without the jayatana error, when checking for java version, without hacking main.mk to remove java version check, please be my guest and do so.
meanwhile heres a commit i pushed to temporarily build, until a proper fix gets merged on CM repos.
https://github.com/infected-lp/android_build/commit/eb88ff447df814f8c7a57e807e4b0bb4ede7c7dd
regards!
infected_ said:
you are a bit full of yourself, no? i was trying to help. and i really dont care you've been doing this for 3y... anyone can google for tutorials and make one. you made even worse, just adapted one from 14.10 or 14.04, which gave you those 3 not found packages. you made the tutorial and forget to test it?
Click to expand...
Click to collapse
Not really full of myself, no, I just know what I'm talking about.
Yeah I was a bit lazy and published without testing first, oh well. It's updated now. And I thanked the person that pointed it out.
The point is you weren't helping. Your "hack" will run into an error anytime you attempt to repo sync.
Either way I'm not here to argue about it. Have fun working on your projects!
sylentprofet said:
The point is you weren't helping. Your "hack" will run into an error anytime you attempt to repo sync.
Click to expand...
Click to collapse
lol.. explain that to me like i am a 6y old and been doing this since yesterday...
in which way will a cherry-pick commit on the build repo interfere with syncing? you dont build much, do you?
ill leave it here before you embarass yourself even more
regards.
infected_ said:
lol.. explain that to me like i am a 6y old and been doing this since yesterday...
in which way will a cherry-pick commit on the build repo interfere with syncing? you dont build much, do you?
ill leave it here before you embarass yourself even more
regards.
Click to expand...
Click to collapse
Most people starting to learn Android have no idea how to use git at that level. They would likely edit the file locally on their computer and then start running into problems. But hey what do I know?
*shrug* I'm over it already.
hi i am sorry
java err
cm12.1 buid...
install openjdk7 ..
============================================
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.
Your version is: Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar java version "1.7.0_79" OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu1) OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode).
The required version is: "1.7.x"
Please follow the machine setup instructions at
https://source.android.com/source/initializing.html
************************************************************
java -version ok
[email protected]:~$ java -version
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
[email protected]:~$
java -err
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
??
windows8k said:
java err
Click to expand...
Click to collapse
Hi, can you please try the following two commands separately and reply with copy-paste output?
Code:
sudo update-alternatives --config java
Code:
sudo update-alternatives --config javac
If it prompts you to make a selection, make sure to choose OpenJDK 1.7 both times.
Thanks!
windows8k said:
hi i am sorry
java err
cm12.1 buid...
install openjdk7 ..
============================================
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.
Your version is: Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar java version "1.7.0_79" OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu1) OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode).
The required version is: "1.7.x"
Please follow the machine setup instructions at
https://source.android.com/source/initializing.html
************************************************************
java -version ok
[email protected]:~$ java -version
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
[email protected]:~$
java -err
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
??
Click to expand...
Click to collapse
Hi,
the problem is due to JAVA_TOOL_OPTIONS line, appearing also launching
java -version
in order to avoid it you can uninstall jayatana and reboot the system:
sudo apt-get remove jayatana
[Restart the PC]
sylentprofet said:
Hi, can you please try the following two commands separately and reply with copy-paste output?
Code:
sudo update-alternatives --config java
Code:
sudo update-alternatives --config javac
If it prompts you to make a selection, make sure to choose OpenJDK 1.7 both times.
Thanks!
Click to expand...
Click to collapse
Thanks openjdk7 change sudo apt-get remove jayatana.
---------- Post added at 12:42 PM ---------- Previous post was at 12:42 PM ----------
aapav01 said:
Hi,
the problem is due to JAVA_TOOL_OPTIONS line, appearing also launching
java -version
in order to avoid it you can uninstall jayatana and reboot the system:
sudo apt-get remove jayatana
[Restart the PC]
Click to expand...
Click to collapse
Thanks openjdk7 change sudo apt-get remove jayatana. Reboot
windows8k said:
hi i am sorry
java err
cm12.1 buid...
install openjdk7 ..
============================================
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.
Your version is: Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar java version "1.7.0_79" OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu1) OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode).
The required version is: "1.7.x"
Please follow the machine setup instructions at
https://source.android.com/source/initializing.html
************************************************************
java -version ok
[email protected]:~$ java -version
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
[email protected]:~$
java -err
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
??
Click to expand...
Click to collapse
simply enter the dir /build inside your android build environment and copy & paste this and press enter:
git fetch https://github.com/infected-lp/android_build infected && git cherry-pick eb88ff447df814f8c7a57e807e4b0bb4ede7c7dd
then get back to the root of the build environment, like "cd .." or "croot" in case you've done ". build/envsetup.sh" already.
sylentprofet said:
Hi, can you please try the following two commands separately and reply with copy-paste output?
Code:
sudo update-alternatives --config java
Code:
sudo update-alternatives --config javac
If it prompts you to make a selection, make sure to choose OpenJDK 1.7 both times.
Thanks!
Click to expand...
Click to collapse
wont work, ive tried that.
aapav01 said:
Hi,
the problem is due to JAVA_TOOL_OPTIONS line, appearing also launching
java -version
in order to avoid it you can uninstall jayatana and reboot the system:
sudo apt-get remove jayatana
[Restart the PC]
Click to expand...
Click to collapse
removing jayatana also wont work ... it will still give error on the useragent, and update-alternatives wont help....
solution for now is what i say:
simply enter the dir /build inside your android build environment and copy & paste this and press enter:
git fetch https://github.com/infected-lp/android_build infected && git cherry-pick eb88ff447df814f8c7a57e807e4b0bb4ede7c7dd
then get back to the root of the build environment, like "cd .." or "croot" in case you've done ". build/envsetup.sh" already.
Click to expand...
Click to collapse
regards....
infected_ said:
simply enter the dir /build inside your android build environment and copy & paste this
git fetch https://github.com/infected-lp/android_build infected && git cherry-pick eb88ff447df814f8c7a57e807e4b0bb4ede7c7dd
Click to expand...
Click to collapse
Thank you for the solution! Build started, I hope it will be successful