How to get shell on your Android phone in Ubuntu – SDK Tools r8 and fastboot update

If you used my previous tutorial on how to get shell on your Android phone from Ubuntu, you might have noticed that starting with SDK version 8, the adb tool is no longer in the tools directory of your SDK. Worse, it’s not even shipped in the archive!

Here is the reason why (quoting from the Android SDK tools notes):

Upgrading from SDK Tools r7:

If you are upgrading to SDK Tools r8 from an earlier version, note that the the default installed location for the adb tool has changed from <SDK>/tools/adb to <SDK>/platform-tools/adb. This means that you should add the new location to your PATH and modify any custom build scripts to reference the new location. Copying the adb executable from the new location to the old is not recommended, since subsequent updates to the SDK Tools will delete the file.

So this is issue number one – we need to install a SDK Addon (the Platform-tools) in order to get adb.

The second issue is that, when following different Android hacking/customization tips and tutorials, you sometimes need a tool called fastboot. Fastboot is a command line tool used to directly flash the filesystem in Android devices from a host via USB. I used it to flash a custom bootsplash (I’ll show you how in a future blog post), but you can do much more cool stuff with it.

Fastboot is not shipped with the Android SDK, it is an open source program that is available in the Android sources repository. Fortunately, you can download it pre-compiled from different sources, including HTC (which is the one I will use).

Step 1: Get the Android SDK (latest version is available on this page).

$ cd /some/dir
$ wget http://dl.google.com/android/android-sdk_r08-linux_86.tgz
$ tar xvzf android-sdk_r08-linux_86.tgz

Step 2: Add Platform-tools. This the step that will install adb, and is Step 4 from the Installing page for the SDK.

$ cd android-sdk-linux_x86/tools
$ ./android

A GUI interface should start, and you should do the following:

  • click Available packages
  • expand Android Repository
  • tick Android SDK Platform-tools, revision 1
  • click Install Selected
  • accept and click Install
  • click restart ADB
  • click Close
  • exit SDK and ABD Manager

After this step, the adb program will be located in the platform-tools subdirectory in your Android SDK directory. Since I’m used to it being in the tools directory, I also created this symlink:

$ cd /path/to/android-sdk-linux_x86/tools
$ ln -s ../platform-tools/adb .

Running ADB should produce something like this:

$ ./adb
Android Debug Bridge version 1.0.26
[...]

Step 2. Install fastboot. I preffer to get my binaries from trusted sources, so I used HTC’s fastboot, but it can be found already compiled in other locations too.

If you want to HTC binary, you should go to this page and search for the table that contains “Fastboot binary, Linux” and download fastboot.zip for Linux. You should then unpack it to your tools directory:

$ cd /path/to/android-sdk-linux_x86/tools
$ unzip /path/to/fastboot.zip
$ chmod +x fastboot

Running fastboot should produce something like this:

$ ./fastboot
usage: fastboot [ <option> ] <command>
[...]

And that’s it! You can now jump back to the original article on how to get shell on your Android phone from Ubuntu and follow steps 2 to 6.

Enjoy! ;)

Image credit: laihiuyeung ryanne.

TwitterFacebookLinkedInGoogle ReaderYahoo MessengerEmailGoogle GmailYahoo MailPrintShare

Related posts:

  1. How to get shell on your Android phone from Ubuntu
  2. Am lansat un nou proiect: Freedom 4 Android (F4A)
  3. Cum faci dintr-un sistem deschis, unul închis: Android
  4. Cum îți “eliberezi” telefonul cu Android

4 comments

  1. [...] updates… Ultimele comentariiHow to get shell on your Android phone in Ubuntu – SDK Tools r8 and fastboot update | Ovidiu&#… on How to get shell on your Android phone from UbuntuConcert “Sus la ‘nălțatul [...]

  2. [...] You can read my previous post about installing fastboot. F4A already has fastboot [...]

  3. [...] installed and working. See here how to install fastboot and adb on your computer. Or use the one shipped with Freedom 4 [...]

  4. [...] working fastboot setup. See here how to install fastboot and adb on your computer. Or use the one shipped with Freedom 4 [...]

Leave a Reply

Your email address will not be published. Required fields are marked *

*


+ four = 11

CommentLuv badge