http://www.annedawson.net/Android_Installation.txt Last updated: Sunday 20th October 2013, 21:00 PT [Note added by AD on Tuesday 3rd December 2013, 6:59 PT: This documentation comes with no guarantees that the method will work on any other computer system. Read it carefully before attempting the installation yourself. I had to backtrack sometimes in order to get a working Android installation. Everything I did has been documented here. These notes were intended as personal notes to help me reinstall the Android system to a similar machine if I had to. Please let me know if they work for you: anne.dawson@gmail.com, www.annedawson.net, AD4.ca] Android development tools installation http://www.vogella.com/articles/AndroidInstallation/article.html [Other relevant tutorials: http://www.vogella.com/tutorials.html] Installing to hardware: Dell Inspiron 15R, 64 bit, Memory 7.5GiB, Intel Core i7-4500U CPU @ 1.80 GHz x 4. Intel Haswell Mobile Graphics, OS Ubuntu 13.10 64 bit, 976.2 GB root@Inspiron-15R:~# apt-get install ia32-libs Reading package lists... Done Building dependency tree Reading state information... Done Package ia32-libs is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However, the following packages replace it: lib32z1 lib32ncurses5 lib32bz2-1.0 E: Package 'ia32-libs' has no installation candidate See above. When I tried apt-get install ia32-libs it said the package was not available but was replaced by the named 3 others. So I installed those three: root@Inspiron-15R:~# apt-get install lib32z1 Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libpkcs11-helper1 openvpn Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libc6-i386 The following NEW packages will be installed: lib32z1 libc6-i386 0 upgraded, 2 newly installed, 0 to remove and 9 not upgraded. Need to get 4,197 kB of archives. After this operation, 10.0 MB of additional disk space will be used. Do you want to continue [Y/n]? Y Get:1 http://ca.archive.ubuntu.com/ubuntu/ saucy/main libc6-i386 amd64 2.17-93ubuntu4 [4,140 kB] Get:2 http://ca.archive.ubuntu.com/ubuntu/ saucy/main lib32z1 amd64 1:1.2.8.dfsg-1ubuntu1 [57.5 kB] Fetched 4,197 kB in 16s (260 kB/s) Selecting previously unselected package libc6-i386. (Reading database ... 171846 files and directories currently installed.) Unpacking libc6-i386 (from .../libc6-i386_2.17-93ubuntu4_amd64.deb) ... Replaced by files in installed package libc6:i386 ... Selecting previously unselected package lib32z1. Unpacking lib32z1 (from .../lib32z1_1%3a1.2.8.dfsg-1ubuntu1_amd64.deb) ... Setting up libc6-i386 (2.17-93ubuntu4) ... Setting up lib32z1 (1:1.2.8.dfsg-1ubuntu1) ... Processing triggers for libc-bin ... root@Inspiron-15R:~# apt-get install lib32ncurses5 Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libpkcs11-helper1 openvpn Use 'apt-get autoremove' to remove them. The following extra packages will be installed: lib32tinfo5 The following NEW packages will be installed: lib32ncurses5 lib32tinfo5 0 upgraded, 2 newly installed, 0 to remove and 9 not upgraded. Need to get 203 kB of archives. After this operation, 718 kB of additional disk space will be used. Do you want to continue [Y/n]? Y Get:1 http://ca.archive.ubuntu.com/ubuntu/ saucy/main lib32tinfo5 amd64 5.9+20130608-1ubuntu1 [90.6 kB] Get:2 http://ca.archive.ubuntu.com/ubuntu/ saucy/main lib32ncurses5 amd64 5.9+20130608-1ubuntu1 [113 kB] Fetched 203 kB in 2s (100 kB/s) Selecting previously unselected package lib32tinfo5. (Reading database ... 172158 files and directories currently installed.) Unpacking lib32tinfo5 (from .../lib32tinfo5_5.9+20130608-1ubuntu1_amd64.deb) ... Selecting previously unselected package lib32ncurses5. Unpacking lib32ncurses5 (from .../lib32ncurses5_5.9+20130608-1ubuntu1_amd64.deb) ... Setting up lib32tinfo5 (5.9+20130608-1ubuntu1) ... Setting up lib32ncurses5 (5.9+20130608-1ubuntu1) ... Processing triggers for libc-bin ... root@Inspiron-15R:~# apt-get install lib32bz2-1.0 Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libpkcs11-helper1 openvpn Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: lib32bz2-1.0 0 upgraded, 1 newly installed, 0 to remove and 9 not upgraded. Need to get 33.1 kB of archives. After this operation, 105 kB of additional disk space will be used. Get:1 http://ca.archive.ubuntu.com/ubuntu/ saucy/main lib32bz2-1.0 amd64 1.0.6-4 [33.1 kB] Fetched 33.1 kB in 0s (45.2 kB/s) Selecting previously unselected package lib32bz2-1.0. (Reading database ... 172174 files and directories currently installed.) Unpacking lib32bz2-1.0 (from .../lib32bz2-1.0_1.0.6-4_amd64.deb) ... Setting up lib32bz2-1.0 (1.0.6-4) ... Processing triggers for libc-bin ... root@Inspiron-15R:~# So it appears they installed OK. Now going to Step 3 on this page: http://www.vogella.com/articles/AndroidInstallation/article.html#installoverview which directs you here: http://developer.android.com/sdk/index.html Looking at the System Requirements, The OS part is covered, Eclipse will be included in the ADT bundle, but Java SDK is required and the Android Development Tools plugin is recommended. It looks like I add the ADT plugin after Eclipse has been installed, and install the Java SDK before installing the ADT bundle. This page under System Requirements: http://developer.android.com/sdk/index.html links to here for JDK 6, but JDK 7 is the current version at the date of installation: Sun 20 Oct 2013 http://www.oracle.com/technetwork/java/javase/downloads/index.html From the JDK 7 download link, I selected: Linux x64 131.7 MB jdk-7u45-linux-x64.tar.gz I downloaded the file jdk-7u45-linux-x64.tar.gz to /home/anne/Desktop From here: http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-jdk.html#install-64 Installation of the 64-bit JDK on Linux Platforms ------------------------------------------------- This procedure installs the Java Development Kit (JDK) for 64-bit Linux, using an archive binary file (.tar.gz). These instructions use the following file: jdk-7u-linux-x64.tar.gz 1. Download the file. Before the file can be downloaded, you must accept the license agreement. The archive binary can be installed by anyone (not only root users), in any location that you can write to. However, only the root user can install the JDK into the system location. 2. Change directory to the location where you would like the JDK to be installed. Move the .tar.gz archive binary to the current directory. 3. Unpack the tarball and install the JDK. % tar zxvf jdk-7u-linux-x64.tar.gz The Java Development Kit files are installed in a directory called jdk1.7.0_ in the current directory. 4. Delete the .tar.gz file if you want to save disk space. ------------------------------------------------------------------- General Installation Notes Root Access Installing the software automatically creates a directory called jdk1.7.0_. Note that if you choose to install the Java SE Runtime Environment into system-wide location such as /usr/jdk, you must first become root to gain the necessary permissions. If you do not have root access, simply install the Java SE Runtime Environment into your home directory, or a subdirectory that you have permission to write to. ------------------------------------------------------------------- root@Inspiron-15R:~# pwd /home/anne root@Inspiron-15R:~# mkdir android root@Inspiron-15R:~# cd android root@Inspiron-15R:~/android# cp /home/anne/Desktop/*.tar.gz . root@Inspiron-15R:~/android# ls jdk-7u45-linux-x64.tar.gz root@Inspiron-15R:~/android# ls jdk-7u45-linux-x64.tar.gz root@Inspiron-15R:~/android# pwd /home/anne/android root@Inspiron-15R:~/android# root@Inspiron-15R:~/android# tar zxvf jdk-7u45-linux-x64.tar.gz results in many lines ending in: jdk1.7.0_45/man/man1/javadoc.1 jdk1.7.0_45/THIRDPARTYLICENSEREADME.txt jdk1.7.0_45/COPYRIGHT root@Inspiron-15R:~/android# "The Java Development Kit files are installed in a directory called jdk1.7.0_ in the current directory." root@Inspiron-15R:~/android# ls jdk1.7.0_45 jdk-7u45-linux-x64.tar.gz root@Inspiron-15R:~/android# root@Inspiron-15R:~/android# rm *.gz root@Inspiron-15R:~/android# ls jdk1.7.0_45 root@Inspiron-15R:~/android# root@Inspiron-15R:~/android# pwd /home/anne/android root@Inspiron-15R:~/android# Java is now installed Installation of the ADT bundle ------------------------------ From here: http://developer.android.com/sdk/index.html Click on DOWNLOAD FOR OTHER PLATFORMS then select ADT bundle: Linux 64-bit adt-bundle-linux-x86_64-20130917.zip adt-bundle-linux-x86_64-20130917.zip is downloaded to /home/anne/Desktop Setting up the ADT bundle ------------------------- http://developer.android.com/sdk/installing/bundle.html "Setting Up the ADT Bundle The ADT Bundle provides everything you need to start developing apps, including a version of the Eclipse IDE with built-in ADT (Android Developer Tools) to streamline your Android app development. If you haven't already, go download the Android ADT Bundle. (If you downloaded the SDK Tools only, for use with an existing IDE, you should instead read Setting Up an Existing IDE.) Install the SDK and Eclipse IDE Unpack the ZIP file (named adt-bundle-.zip) and save it to an appropriate location, such as a "Development" directory in your home directory. Open the adt-bundle-/eclipse/ directory and launch eclipse. That's it! The IDE is already loaded with the Android Developer Tools plugin and the SDK is ready to go. To start developing, read Building Your First App. Caution: Do not move any of the files or directories from the adt-bundle- directory. If you move the eclipse or sdk directory, ADT will not be able to locate the SDK and you'll need to manually update the ADT preferences. Additional information As you continue developing apps, you may need to install additional versions of Android for the emulator and other packages such as the library for Google Play In-app Billing. To install more packages, use the SDK Manager. Everything you need to develop Android apps is on this web site, including design guidelines, developer training, API reference, and information about how you can distribute your app. For additional resources about developing and distributing your app, see the Developer Support Resources. " ---------------------------------------------------------------- root@Inspiron-15R:~/android# cp /home/anne/Desktop/*.zip . root@Inspiron-15R:~/android# unzip adt-bundle-linux-x86_64-20130917.zip lists many lines ending in: inflating: adt-bundle-linux-x86_64-20130917/sdk/extras/android/support/source.properties inflating: adt-bundle-linux-x86_64-20130917/sdk/extras/android/support/README.txt root@Inspiron-15R:~/android# ls adt-bundle-linux-x86_64-20130917 jdk1.7.0_45 adt-bundle-linux-x86_64-20130917.zip (Note: adt-bundle-linux-x86_64-20130917 jdk1.7.0_45 are directories and the .zip file can now be deleted) ----------------------------------------------------------------- root@Inspiron-15R:~/android/adt-bundle-linux-x86_64-20130917# ls eclipse sdk root@Inspiron-15R:~/android/adt-bundle-linux-x86_64-20130917# So now Java, Eclipse and the Android sdk are installed. ----------------------------------------------------------------- ----------------------------------------------------------------- To run eclipse, the FULL PATH to the executable is needed: root@Inspiron-15R:~/android/adt-bundle-linux-x86_64-20130917/eclipse# /home/anne/android/adt-bundle-linux-x86_64-20130917/eclipse/eclipse ----------------------------------------------------------------- ----------------------------------------------------------------- Got this message in an Eclipse pop up window: A JRE or JDK must be available in order to run Eclipse. No Jave Virtual Machine was found after searching the following locations /home/anne/android/adt-bundle-linux-x86_64-20130917/eclipse/jre/bin/java java in your current PATH This means Eclipse can't find java - so I need to set the java path in Eclipse reading this file: readme_eclipse.html... root@Inspiron-15R:~/android/adt-bundle-linux-x86_64-20130917/eclipse# ls about_files artifacts.xml dropins eclipse.ini features libcairo-swt.so p2 readme about.html configuration eclipse epl-v10.html icon.xpm notice.html plugins root@Inspiron-15R:~/android/adt-bundle-linux-x86_64-20130917/eclipse# cd readme root@Inspiron-15R:~/android/adt-bundle-linux-x86_64-20130917/eclipse/readme# ls readme_eclipse.html root@Inspiron-15R:~/android/adt-bundle-linux-x86_64-20130917/eclipse/readme# Under "Running Eclipse" and "Specifying the Java virtual machine" this is the execution command: "Here is a typical Eclipse command line: eclipse -vm c:\jdk6u22\jre\bin\javaw" My installation does not have a bin\javaw but does have a bin\java_vm So try: # /home/anne/android/adt-bundle-linux-x86_64-20130917/eclipse/eclipse -vm /home/anne/android/jdk1.7.0_45/jre/bin/java_vm root@Inspiron-15R:~/android/jdk1.7.0_45/jre/bin# /home/anne/android/adt-bundle-linux-x86_64-20130917/eclipse/eclipse -vm /home/anne/android/jdk1.7.0_45/jre/bin/java_vm java_vm process: You need to set both JAVA_HOME and PLUGIN_HOME THE ERROR MESSAGE SAYS IT REQUIRES JAVA 1.6, so I will install that : Goto: https://help.ubuntu.com/community/Java "SDK (Software Development Kit) In Java parlance the Java Development Kit (JDK) is sometimes used for SDK. (More about that here.) Install the openjdk-6-jdk package using any installation method. " I did this: # apt-get install openjdk-6-jdk lots of lines ending in: update-alternatives: using /usr/lib/jvm/java-6-openjdk-amd64/bin/wsimport to provide /usr/bin/wsimport (wsimport) in auto mode update-alternatives: using /usr/lib/jvm/java-6-openjdk-amd64/bin/xjc to provide /usr/bin/xjc (xjc) in auto mode Setting up openjdk-6-jre-lib (6b27-1.12.6-1ubuntu2) ... Setting up libatk-wrapper-java-jni:amd64 (0.30.4-0ubuntu4) ... Processing triggers for ca-certificates ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d.... done. done. Processing triggers for libc-bin ... root@Inspiron-15R:~# pwd /home/anne root@Inspiron-15R:~# ls android Documents examples.desktop Pictures Templates tv3.txt tv.txt Videos Desktop Downloads Music Public tv2.txt tv4.txt Ubuntu One root@Inspiron-15R:~# that worked still complaining no JRE so try: apt-get install openjdk-6-jre says already installed This time I try running eclipse without the virtual machine flag... root@Inspiron-15R:~# /home/anne/android/adt-bundle-linux-x86_64-20130917/eclipse/eclipse THIS STARTED ECLIPSE NORMALLY, but with this message: (ADT:11803): IBUS-WARNING **: The owner of /home/anne/.config/ibus/bus is not root! root@Inspiron-15R:~# So get out of root, and run again: /home/anne/android/adt-bundle-linux-x86_64-20130917/eclipse/eclipse then it reports I don't have permission. So, I thnk because I did the installations as root, but installed to /home/anne/android it's warning me maybe that I can't write to /home/anne as I don't own it, but when eclipse starts up it suggests the following directory for the workspace: /root/workspace so I keep that, and everything seemed to work good as I followed these instuctions which appear from eclipse: http://developer.android.com/training/basics/firstapp/index.html I created my first app, following the instructions,attached my laptop to my Nexus 10 by usb cable (the cable that came with the nexus 10 for power) and the app was automatically installed to the tablet, and shows in the list of apps. From: http://developer.android.com/training/basics/firstapp/running-app.html#RealDevice --------------------------------------------------------------------------------- Run on a Real Device If you have a real Android-powered device, here's how you can install and run your app: Plug in your device to your development machine with a USB cable. If you're developing on Windows, you might need to install the appropriate USB driver for your device. For help installing drivers, see the OEM USB Drivers document. Enable USB debugging on your device. On most devices running Android 3.2 or older, you can find the option under Settings > Applications > Development. On Android 4.0 and newer, it's in Settings > Developer options. Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options. To run the app from Eclipse: Open one of your project's files and click Run from the toolbar. In the Run as window that appears, select Android Application and click OK. Eclipse installs the app on your connected device and starts it. -----------------------------------------------------------------------------------