[Q] sun-java6-jdk Ubuntu 11.10 - Android Q&A, Help & Troubleshooting

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

Related

[Tutorial] Install Sun Java JDK 6 on Ubuntu 12.04 LTS

{
"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"
}
Installing Java JDK 6​
Code:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
trevd said:
For good measure we can also install the oracle-java7-jdk using the apt-repository provide by www.webupd8.org
Code:
sudo add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main"
sudo apt-get update
sudo apt-get install sun-java5-jdk sun-java6-jdk oracle-java7-installer
Click to expand...
Click to collapse
Test Java: [highlight]java -version[/highlight]
Credits to:
Google
Android Source
trevd
Thx but it dosent work T^T
htchoi5609 said:
Thx but it dosent work T^T
Click to expand...
Click to collapse
I Think this was covered back in may with this [GUIDE] Simple Java6 installation on Precise/Mint-Maya/Ubuntu 12.04 LTS
Nothing against the OP, Credits for attempting the spread the knowledge but that ubuntu help page is just plain doing it wrong when it comes to oracle! :laugh: Unfortunately the entire internet ( yes, I searched it all ) seems to use it as a reference so there's well over 9000 guides that seem to use that script retrieval method. It's simply not required
Just use the google way and pull both jdk-5 and jdk-6 from ubuntu's own archived apt-repos, it's never let me down yet! For good measure we can also install the oracle-java7-jdk using the apt-repository provide by www.webupd8.org
Code:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main"
sudo apt-get update
sudo apt-get install sun-java5-jdk sun-java6-jdk oracle-java7-installer
all the java under the sun ( microsystems ) and 1 under oracle
I'm getting this error when trying to update...
Code:
[email protected]:~$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
[email protected]:~$ sudo apt-get update
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
[email protected]:~$
can anyone help please. thanks in advance.
Looks like you've got another program thats locking the access to the sources. this normally you normally get this error if you forget to add sudo. Are you running automatic background updates or have you got a package manager open or the sources dialog?
Might be worth giving it the old "switch it on and off" again routine then try again
Sent from my Nexus 7 using xda premium
jonah1234 said:
I'm getting this error when trying to update...
Code:
[email protected]:~$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
[email protected]:~$ sudo apt-get update
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
[email protected]:~$
can anyone help please. thanks in advance.
Click to expand...
Click to collapse
Try these commands:
Code:
sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update
Ok now the sudo apt-get update worked but i'm getting another error...
Code:
[email protected]:~$ sudo apt-get install sun-java6-jdkReading package lists... Done
Building dependency tree
Reading state information... Done
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
[email protected]:~$
jonah1234 said:
Ok now the sudo apt-get update worked but i'm getting another error...
Code:
[email protected]:~$ sudo apt-get install sun-java6-jdkReading package lists... Done
Building dependency tree
Reading state information... Done
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
[email protected]:~$
Click to expand...
Click to collapse
Have you added the repos?
Peteragent5 said:
Have you added the repos?
Click to expand...
Click to collapse
Yessir. It works up until it's time to install.
Sent from my Sense 5 Droid DNA
i think this code doesnt work and we dont need, because this is for ubuntu hardy and lucid, not for precise pangolin.
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
another tutorial,open terminal and type :
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
:good:
flowish said:
i think this code doesnt work and we dont need, because this is for ubuntu hardy and lucid, not for precise pangolin.
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
:good:
Click to expand...
Click to collapse
Nah, Apt doesn't work like that, and using these archive repositories works on any version and any ubuntu based distro, well anywhere you've got apt installed really. although some distro don't come with add-apt-repository which is a python helper script, in which case you can manually add following the lines to /etc/apt/sources.list.
Code:
deb http://old-releases.ubuntu.com/ubuntu hardy main multiverse
deb-src http://old-releases.ubuntu.com/ubuntu hardy main multiverse
deb http://old-releases.ubuntu.com/ubuntu hardy-updates main multiverse
deb-src http://old-releases.ubuntu.com/ubuntu hardy-updates main multiverse
deb http://archive.canonical.com/ lucid partner
deb-src http://archive.canonical.com/ lucid partner
The "version" labels are irrelevant to the installation and are used to help apt resolve the directory on the web server where the Packages list is located, hardy's multiverse one is here http://archive.ubuntu.com/ubuntu/ubuntu/dists/hardy/multiverse/binary-amd64/ for example. this is what "apt-get update" is doing
The reason for all three repository being needed is, java6 in the lucid repository has a dependency on a package found in the hardy repos, the upshot of adding all three is the option of installing java5 as well, just in case you get an urge to build any version of android that is pre gingerbread
All that being said using webupd8team ppa repository is fine. anything beats messing around with some daft installation script and an overly complicated multi-step process which seems to have been a previously banded about as the installation method.
Here's a console dump for both Ubuntu 12.04 and lubuntu 12.10. This is what you should be seeing if everything is working correctly.
Thanks
OMG Thank you SOOO Much!!! I have been searching and searching for something like this! My thanks are given to you!
Thank you so much Peteragent5 and trevd! I spent ages banging my head against the wall with this! Now I can hopefully get on with some fun stuff instead of wasting time setting up my environment.
Well, I always do it manually. In case you want to know:
Go to http://www.oracle.com/technetwork/j...ownloads-javase6-419409.html#jdk-6u45-oth-JPR anddownload the x64 bin file. You need to login to oracle for this.
Once that is done follow the steps:
Code:
chmod a+x jdk-6u45-linux-x64.bin
sudo mkdir /usr/lib/jvm
sudo mv jdk-6u45-linux-x64.bin /usr/lib/jvm/
cd /usr/lib/jvm
sudo ./jdk-6u37-linux-i586.bin
sudo update-alternatives --config java
sudo update-alternatives --config javac
java -version
This usually works. But in case you don't see your version while running
java -version
Just set path in your .bashrc
change archive.ubuntu.com to old-releases.ubuntu.com
jonah1234 said:
Ok now the sudo apt-get update worked but i'm getting another error...
Code:
[email protected]:~$ sudo apt-get install sun-java6-jdkReading package lists... Done
Building dependency tree
Reading state information... Done
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
[email protected]:~$
Click to expand...
Click to collapse
Hi,
Hardy does not exist anymore into archive.ubuntu.com
replace archive.ubuntu.com by old-releases.ubuntu.com
sorry I can paste the code, i have no right at this moment
To prevent spam on the XDA forums, ALL new users prevented from posting outside links in their messages. After approximately 10 posts, you will be able to post outside links. Thank you for understanding!
Click to expand...
Click to collapse
fish83

Problem installing SDK

I've put about 8 hours into this now.
I'm trying to install the Ubuntu Touch SDK as per instructions on this page. http://developer.ubuntu.com/get-started/gomobile/ I'm at step 2, and I'm trying to do the "Create a currency converter phone app. But I don't have the "applications" selection in Qt's new project. What am I missing?
Here's what I did.
Code:
sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update
sudo apt-get install ubuntu-sdk notepad-qml
But QTcreator wouldn't start properly. I found out that i needed to also install libbotan* by reading some forums.
Code:
sudo apt-get install libbotan*
So now QTcreator starts and I'm ready to create a new project, but I'm missing the ability to create a new "application> Qt Quick UI" because I don't have the "application" option.
This is a fresh install of 64 bit Ubuntu 12.10 with just my video editing, and java development software added.
AdamOutler said:
I'm trying to install the Ubuntu Touch SDK as per instructions on this page. http://developer.ubuntu.com/get-started/gomobile/ I'm at step 2, and I'm trying to do the "Create a currency converter phone app. But I don't have the "applications" selection in Qt's new project. What am I missing?
Here's what I did.
Code:
sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update
sudo apt-get install ubuntu-sdk notepad-qml
But QTcreator wouldn't start properly. I found out that i needed to also install libbotan* by reading some forums.
Code:
sudo apt-get install libbotan*
So now QTcreator starts and I'm ready to create a new project, but I'm missing the ability to create a new "application> Qt Quick UI" because I don't have the "application" option.
This is a fresh install of 64 bit Ubuntu 12.10 with just my video editing, and java development software added.
Click to expand...
Click to collapse
dim319 in this thread
http://forum.xda-developers.com/showthread.php?t=2161369&page=2
figured out how to build c++ programs and posted a link to his tutorial here
https://www.googledrive.com/host/0B5kDhuHYYcvwWDZpS0puZXhnZkk/ubuntu-sdk-dev-en.html
Maybe that will help?
That's not helpful or relevant. I'm trying to set up the SDK properly, not compile an app. That comes way later... I have to BUILD the app first and the options are not showing up to even create a new app properly.
Fixed with
Code:
sudo apt-get remove qtcreator
sudo apt-get purge qtcreator
sudo apt-get install qtcreator
Was having the same problem. Thanks Adam.
Sent from my Galaxy Nexus using Tapatalk 2
AdamOutler said:
Fixed with
Code:
sudo apt-get purge qtcreator
Click to expand...
Click to collapse
Thanks for this Adam... Good info sir...

[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.

[Q] Installing Whosthere

I've tried to install Whosthere through ADB by adding the following PPA's to my device:
Code:
sudo apt-add-repository ppa:m-gehre:ppa
sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update
Then I run: sudo apt-get install whosthere. But I still says the package can't be found. I know the project is discontinued but I should still be able to download it right?
Sources:
https://launchpad.net/whosthere
https://github.com/mgehre/whosthere
EDIT: Do I know to build the packages myself and push them through QTCreator?
Zenety said:
I've tried to install Whosthere through ADB by adding the following PPA's to my device:
Code:
sudo apt-add-repository ppa:m-gehre:ppa
sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update
Then I run: sudo apt-get install whosthere. But I still says the package can't be found. I know the project is discontinued but I should still be able to download it right?
Sources:
https://launchpad.net/whosthere
https://github.com/mgehre/whosthere
EDIT: Do I know to build the packages myself and push them through QTCreator?
Click to expand...
Click to collapse
I hope we can see improvements soon in this app, really needed!
Zenety said:
I've tried to install Whosthere through ADB by adding the following PPA's to my device:
Code:
sudo apt-add-repository ppa:m-gehre:ppa
sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update
Then I run: sudo apt-get install whosthere. But I still says the package can't be found. I know the project is discontinued but I should still be able to download it right?
Sources:
https://launchpad.net/whosthere
https://github.com/mgehre/whosthere
EDIT: Do I know to build the packages myself and push them through QTCreator?
Click to expand...
Click to collapse
It looks like the developer has only created packages for Precise, Quantal and Raring. The latest Ubuntu Touch images are using Saucy. You can either 1) manually download and install the Raring .deb files, 2) change "saucy" to "raring" in the add-apt-repository added to /etc/apt/sources.list.d/, or 3) ask the developer to copy the packages in the PPA to Saucy.
I have the same problem installing on Ubuntu Desktop. What can I do?
GuiltMachine said:
I have the same problem installing on Ubuntu Desktop. What can I do?
Click to expand...
Click to collapse
The last time I spoke to the developer, whosthere wasn't working due to changes in WhatsApp's authentication protocol/token/something-or-other, and he wasn't actively developing it anymore. The best thing you can do is to contact WhatsApp yourself and let them know how much you'd like to see an Ubuntu Touch client.
mhall119 said:
The last time I spoke to the developer, whosthere wasn't working due to changes in WhatsApp's authentication protocol/token/something-or-other, and he wasn't actively developing it anymore. The best thing you can do is to contact WhatsApp yourself and let them know how much you'd like to see an Ubuntu Touch client.
Click to expand...
Click to collapse
Wow, that would be really hard to get it. I mean, Ubuntu is still in "alpha", you cant show all Ubuntu Touch experiencie to Whataspp people. I supposed that till Ubuntu Touch is not fully completed they dont answer witch an afirmative decision.

[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