Setting up ADB/fastboot with Sabayon [android]

Issues Related to Hardware (Sound, Video, Printers, Scanners, Webcams, Touchpads, Keyboards, Sensors, Drives, GRUB, etc.)

Moderator: Moderators

Setting up ADB/fastboot with Sabayon [android]

Postby liam.lah » Tue Dec 20, 2011 6:10

I used to have ADB and fastboot set up on my Ubuntu install, i was able to also get it working on Sabayon, so here is the method if anyone needs it. Note, i have ONLY tested this with a HTC Nexus one and a HTC Mytouch 3g Slide on a 32bit system

(ADB (Android Debug Bridge) allows communication between computer and android device via a Terminal, it is required for development and interacting with rooted devices.

Fastboot is available on most android devices, it allows the 'flashing' of filesystems to the device.

Getting started


Before any of this can work, you first need to tick the "USB debugging" option on your device, by going to "Settings > Applications > Development > USB debugging"


1. Install the SDK http://developer.android.com/sdk/index.html
Download the android SDK, extract it and move it to your /home/ folder

Enter the /home/android-sdk-linux/tools folder and run the "android" script, this will open "Android SDK Manager"

2. From here, install the Android SDK Platform-tools

You will now have a new folder in your /android-sdk-linux/ called "platform-tools".

3. In your platform-tools folder you will find "fastboot" and "adb" right-click to properties, and make sure these are set to "allow executing file as a program"


Now you need to edit your .bashsrc and UDEV so it can recognise your device.

1. Navigate to your .bashsrc file. This will be found in /home/user/ As it is hidden you will need to CTRL+H to find it.

2. Open this up in Gedit or your text editor of choice.

3. Add the following code to the file

Code: Select all
#AndroidDev PATH
export PATH=${PATH}:/home/android-sdk-linux/platform-tools

(Double check to make sure the above matches the path to the platform-tools folder mentioned earlier.)


Now we need to set up UDEV to recognise the device

1. Open up a terminal and type:
Code: Select all
gksudo gedit /etc/udev/rules.d/51-android.rules


2. This will bring up a blank file. You need to add the following lines depending on your device manufacturer

HTC
Code: Select all
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"


SAMSUNG
Code: Select all
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"


MOTOROLA
Code: Select all
SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8", MODE="0666"


LG
Code: Select all
SUBSYSTEM=="usb", SYSFS{idVendor}=="61b4", MODE="0666"


3. Click save, and close the file

4. now type
Code: Select all
sudo /etc/init.d/udev restart



5. Restart your system and it should work

You can make sure it is set up correctly by connecting your device to your computer and typing in a terminal
Code: Select all
adb devices
If you have done this correctly you will see an output similar to this

Code: Select all
* daemon started successfully *
List of devices attached
HT9CPP807263   device


Fastboot can be checked by booting your phone into fastboot mode and typing, you guessed it...

Code: Select all
fastboot devices



Hope this works.



Thanks to wddglr from XDA for getting my ubuntu system working with ADB initially.
liam.lah
Baby Hen
 
Posts: 15
Joined: Wed Dec 07, 2011 11:00

Re: Setting up ADB/fastboot with Sabayon [android]

Postby Fitzcarraldo » Tue Dec 20, 2011 10:53

Nice to see you are posting some helpful information, liam.lah, but it would be better if you used the SL Wiki for these 'how to' threads and then just posted a link to your SL Wiki article in the SL Forums. That way your 'how to' articles will not get lost in the mists of time as new forum threads get added and your threads move down.

The method of posting articles in the SL Wiki is explained in: How to create a new article in the Sabayon Linux Wiki.

Thanks.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7978
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom


Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest