How to setup the Android SDK globally - Printable Version +- Linux Lite Forums (https://www.freecinema2022.gq/forums) +-- Forum: Software - Support (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=5) +--- Forum: Tutorials (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=21) +--- Thread: How to setup the Android SDK globally (/showthread.php?tid=430) |
How to setup the Android SDK globally - AndyOpie150 - 06-08-2014 This is not my work really, but a compilation of all the info I had to find by browsing and asking in forums. After you have installed the Android SDK with the tools and platform tools folder added then you will need to do all this (here is a link to a mini SDK that will work with most anything: http://androidforums.com/faqs/443072-adb-guide-updated-2013-05-21-a.html#post5389081 ): Install jdk (if not already installed on your machine): Code: sudo apt-get install openjdk-6-jdk http://www.webupd8.org/2012/11/oracle-sun-java-6-installer-available.html For actuall Java6 jdk instead of the openjdk-6. After installing the Oracle java6, while in that same terminal, type in: Code: sudo apt-get install oracle-java6-set-default Install gedit: Go to software center and type in "gedit" into search box. If Linux distro is a 64bit distro then you need to open a terminal and type in this: Code: sudo apt-get install ia32-libs Put the Linux_SDK folder in your home folder. Change name to just sdk. Make sure all .exe's have the box checked in the permissions window. Now plug in your phone into a usb port, open up a command line interface (terminal) and type in: Code: lsusb On that same line, there is an ID number in this format...xxxx:xxxx. Write that number down for reference. Go to /etc/udev/rules.d and look to see which file is the android.rules file. Should be the 51-android.rules file, if not, try looking in 99-android.rules. Then open up a terminal and type in: Code: sudo gedit /etc/udev/rules.d/51-android.rules (or whatever the exact name of the android.rules file) When the rules open, go to the end and copy/paste the following: Code: Code: ago. Then save and exit. Note: For even more info on the 51-android.rules file go here: http://www.joescat.com/linux/android_rules.html Another command: Code: sudo service udev restart Now check to see if you're good: cd SDK/platform-tools Code: ./adb devices Should get the device s/n now. If not, exit, restart machine then open up terminal and retry the above 2 commands. If all is well and you want to be able to adb/fastboot globally, you'll need to edit the bashrc like this: Code: sudo gedit ~/.bashrc and exit. Code: # Android tools Double check by going to home folder and hitting Ctrl + h. If the .bashrc is locked then you will need to open up a terminal and type in this: Code: sudo chown -R (user name):(user name) .bashrc In some linux distro's this is not enough. If all that didn't work then go to the ~/sdk/platform-tools folder and make a link to the adb.exe by using the right click option (this will probably name it "link to adb"). Move it to the ~/ folder and rename to just adb. Now open up a terminal and type in: Code: sudo mv ~/adb /usr/bin Note: The same needs to be done with fastboot. Now unplug phone, restart machine. Once fired back up, plug phone back in and from any location run: Code: adb devices If all went well, it'll output your s/n as before but without the ./ prefix. You can now fire up a terminal anywhere and give your phone fastboot commands and use the Android Debug Bridge a little easier. For more info on ADB and Fastboot commands go here: http://forum.xda-developers.com/showthread.php?t=2225405 For way more info on Fastboot commands go here: http://forum.xda-developers.com/showthread.php?t=2277112 Updated 06/09/2014 at 4:00pm Eastern Time Zone Re: How to setup the Android SDK globally - itsmix - 09-20-2014 "If Linux distro is a 64bit distro then you need to open a terminal and type in this: Code: [Select] sudo apt-get install ia32-libs If not, adb wil not work." what about the line for a non 64 bit system? Re: How to setup the Android SDK globally - N4RPS - 09-26-2014 Hello! UIAM, the ia32-libs library is used to make some of the 32-bit-only Linux programs to work properly on the 64-bit OS, so just disregard the ia32-libs part... 73 DE N4RPS Rob |