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