• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [HOWTO] Linux ADB, fastboot, mass storage

sado1

Well-Known Member
Thanks to screaminbug for clue about udev rules.
On Android 2.x modified adb file may be no longer needed, 1.x probably does still need it though - try without changing adb file first.

1. Download and unpack somewhere Linux SDK: Android SDK | Android Developers and install Platform Tools with SDK Manager that you can run in terminal with
Code:
tools/android
(there should be some way to install them in console with that tool, can't check it out now since I'm not on Linux at the moment... try 'tools/android help')

2.Download fastboot for Linux: HTC - Developer Center and adb: http://floe.butterbrot.org/external/adb.gz. Copy adb&fastboot to the sdk/platform-tools folder; cd to that folder in terminal and add necessary permissions:
Code:
chmod +x adb
chmod +x fastboot
3. In folder /etc/udev/rules.d/ create files(don't forget to replace user with your username!):
50-android.rules
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666", OWNER="user"
90-android.rules
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666", OWNER="user"
4. Refresh udev rules:
Code:
reload udev
5. In file /home/user/.bashrc (replace user with your username) add line:
Code:
export PATH=${PATH}:/home/user/android-sdk-linux_x86/tools:/home/user/android-sdk-linux_x86/platform-tools
Replace /home/user/android-sdk-linux_x86 with your sdk directory path.
6. Log out&in to the terminal/start new terminal window if in X. Everything should work now.
Code:
sado@sado-pc ~/ $ adb devices
List of devices attached 
I7500T9UxvXGy9F    device

sado@asdf-pc:~$ fastboot devices
????????????    fastboot
 
I keep getting command not found and when i go to the tools dir and run ./adb i get bash: ./adb: No such file or directory

Not sure whats going on thanks for any ideas
 
In my attempt to figure it out i did change a few things in the rules files such as: usb 1-6: New USB device found, idVendor=0bb4, idProduct=0c01

so i changed the idVendor and idProduct to match what was connected
 
:~/android-sdk-linux_86/tools$ chmod 755 adb
:~/android-sdk-linux_86/tools$ chmod 755 fastboot
:~/android-sdk-linux_86/tools$ ./adb
bash: ./adb: No such file or directory
 
root@Elite:~/android-sdk-linux_86# cd tools/
root:~/android-sdk-linux_86/tools# chmod 755 adb
root:~/android-sdk-linux_86/tools# chmod 755 fastboot
root:~/android-sdk-linux_86/tools# ./adb
bash: ./adb: No such file or directory


this might be a dumb question but i am running a 64bit OS. i have multilib support so it shouldn't matter
 
It's possible, someone somewhere posted exact commands to untar the odin files directly.

Where? When? How? :)
OK. Ignore second and third one. Was it on this forum? Can you remember? Maybe you have it in your browser history somewhere? I was searching the web, but couldn't find it anywhere. I've searched entire Internet. :)

If this is possible it would be great to know how.
 
Agreed. I spent a good chunk of time today looking as well, and could not find anything.

Ended up finally taking a flash drive in to a windows machine at work to upgrade to IK5, but it would really be nice to be able to do this from home.
 
If this doesn't work for you for fastboot (wasn't working for me), try putting this in 50-android.rules:
Code:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="d00d", MODE="0666", OWNER="owner"

Where owner is your username.

And reload your udev rules:
Code:
reload udev
 
I finally got around to playing with this. I have adb working (I think), but I can't get the recovery.img to flash.

Code:
./adb devices
identifies my phone, however
Code:
./fastboot flash recovery recovery.img
hangs on < waiting for device >, although my phone boots into fastboot mode without problem.

I have successfully gotten this to work on xp machines before. Currently using Ubuntu 9.10. Any ideas?


edit: I can successfully push/pull files as well.
 
Back
Top Bottom