[HOWTO] Linux ADB, fastboot, mass storage


Last Updated:

  1. sado1

    sado1 Well-Known Member This Topic's Starter

    Joined:
    Nov 6, 2009
    Messages:
    103
    Likes Received:
    14
    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 (Text):
    1. 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 (Text):
    1. chmod +x adb
    2. 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 (Text):
    1.  
    2. SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666", OWNER="user"
    90-android.rules
    Code (Text):
    1. SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666", OWNER="user"
    4. Refresh udev rules:
    Code (Text):
    1. reload udev
    5. In file /home/user/.bashrc (replace user with your username) add line:
    Code (Text):
    1. 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 (Text):
    1. sado@sado-pc ~/ $ adb devices
    2. List of devices attached
    3. I7500T9UxvXGy9F    device
    4.  
    5. sado@asdf-pc:~$ fastboot devices
    6. ????????????    fastboot
     

    Advertisement
    edin1 and timmydog like this.
  2. Rastaman-FB

    Rastaman-FB Well-Known Member

    Joined:
    Sep 11, 2009
    Messages:
    6,113
    Likes Received:
    1,010
    cool, ill link this in the stickies
    nice work
     
  3. turkievicz

    turkievicz Well-Known Member

    Joined:
    Dec 13, 2009
    Messages:
    53
    Likes Received:
    1
    Congratulation....Very good, finaly I WIN....hehehehe
     
  4. Mr.DNA

    Mr.DNA Well-Known Member

    Joined:
    Jul 29, 2009
    Messages:
    124
    Likes Received:
    3
    Does this mean it is possible to update the firmware via Linux?
     
  5. Andronix

    Andronix Well-Known Member

    Joined:
    Aug 31, 2009
    Messages:
    676
    Likes Received:
    16
    It's possible, someone somewhere posted exact commands to untar the odin files directly.
     
  6. o2cool

    o2cool Member

    Joined:
    Jan 11, 2010
    Messages:
    7
    Likes Received:
    0
    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
     
  7. turkievicz

    turkievicz Well-Known Member

    Joined:
    Dec 13, 2009
    Messages:
    53
    Likes Received:
    1
    The adb are in the sdk/tools dir ?
    Did you make: chmod +x adb ?
     
  8. o2cool

    o2cool Member

    Joined:
    Jan 11, 2010
    Messages:
    7
    Likes Received:
    0
    Yes as per directions above even tried 666 all permissions
     
  9. turkievicz

    turkievicz Well-Known Member

    Joined:
    Dec 13, 2009
    Messages:
    53
    Likes Received:
    1
    Take a look:

    Code (Text):
    1. [root@p185191 tools]# chmod 666 adb
    2. [root@p185191 tools]# ./adb
    3. bash: ./adb: Permiss
     
  10. o2cool

    o2cool Member

    Joined:
    Jan 11, 2010
    Messages:
    7
    Likes Received:
    0
    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
     
  11. o2cool

    o2cool Member

    Joined:
    Jan 11, 2010
    Messages:
    7
    Likes Received:
    0
    :~/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
     
  12. turkievicz

    turkievicz Well-Known Member

    Joined:
    Dec 13, 2009
    Messages:
    53
    Likes Received:
    1
    Did you try as root ?
     
  13. o2cool

    o2cool Member

    Joined:
    Jan 11, 2010
    Messages:
    7
    Likes Received:
    0
    root:~/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
     
  14. o2cool

    o2cool Member

    Joined:
    Jan 11, 2010
    Messages:
    7
    Likes Received:
    0

    this might be a dumb question but i am running a 64bit OS. i have multilib support so it shouldn't matter
     
  15. turkievicz

    turkievicz Well-Known Member

    Joined:
    Dec 13, 2009
    Messages:
    53
    Likes Received:
    1
    I'm using too, a Fedora fc12.x86_64.
     
  16. sado1

    sado1 Well-Known Member This Topic's Starter

    Joined:
    Nov 6, 2009
    Messages:
    103
    Likes Received:
    14
    Something is wrong. Can you post 'ls' output from tools folder just to clarify?
     
  17. o2cool

    o2cool Member

    Joined:
    Jan 11, 2010
    Messages:
    7
    Likes Received:
    0
    And fixed, sorry for freaking out guys, works great. Thank you everyone for the help!
     
  18. Rastaman-FB

    Rastaman-FB Well-Known Member

    Joined:
    Sep 11, 2009
    Messages:
    6,113
    Likes Received:
    1,010
    added to Guides

    thanks
     
  19. screaminbug

    screaminbug Well-Known Member

    Joined:
    Nov 4, 2009
    Messages:
    102
    Likes Received:
    2
    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.
     
  20. Mr.DNA

    Mr.DNA Well-Known Member

    Joined:
    Jul 29, 2009
    Messages:
    124
    Likes Received:
    3
    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.
     
  21. Rastaman-FB

    Rastaman-FB Well-Known Member

    Joined:
    Sep 11, 2009
    Messages:
    6,113
    Likes Received:
    1,010
  22. screaminbug

    screaminbug Well-Known Member

    Joined:
    Nov 4, 2009
    Messages:
    102
    Likes Received:
    2
  23. screaminbug

    screaminbug Well-Known Member

    Joined:
    Nov 4, 2009
    Messages:
    102
    Likes Received:
    2
    If this doesn't work for you for fastboot (wasn't working for me), try putting this in 50-android.rules:
    Code (Text):
    1. SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="d00d", MODE="0666", OWNER="owner"
    Where owner is your username.

    And reload your udev rules:
    Code (Text):
    1. reload udev
     
  24. Mr.DNA

    Mr.DNA Well-Known Member

    Joined:
    Jul 29, 2009
    Messages:
    124
    Likes Received:
    3
    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 (Text):
    1. ./adb devices
    identifies my phone, however
    Code (Text):
    1. ./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.
     
  25. Mr.DNA

    Mr.DNA Well-Known Member

    Joined:
    Jul 29, 2009
    Messages:
    124
    Likes Received:
    3
    doh! this worked:

    Code (Text):
    1. sudo ./fastboot flash recovery recovery.img
    I am new at this. :eek:
     

Share This Page

Loading...