[solved/info] - adb with ubuntu

Search This thread

tswmin85

New member
Jun 7, 2009
3
0
51-Android.rules.

I have a question the file in my rules.d folder is it supposed to be

51-android.rules. or 51-android.rules

Also, I added:

SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"

to 51-android.rules. and I'm still not picking up my device.

Anyone got any ideas?

I'm on Ubuntu 9.04...

EDIT: I REMOVED THE "." AT THE END OF 51-android.rules. and it picked up the device. AWESOME!

Thanks for all the information on this thread.

Any need help PM me, I'd be glad to assist.
 
Last edited:

glock30

Senior Member
Feb 3, 2009
135
4
So Cal
It was mentioned here already, but I just wanted to add that copying and pasting the quotation marks into the terminal is not a good idea. I tried copying and pasting, then had to go back and edit the file manually. now it is working though. Thanks.:D
 

addohm

Member
Sep 13, 2009
35
0
Using the various guides to gain root on my phone, which is also not registered, I seem to get blocked one place or another. It took about 4 hours to finally get ADB to work properly, but now any root commands that I do try and execute gives me "permission denied".

Code:
$ mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount: Operation not permitted

The phone was originally registered to my wife's sim card, but is no longer, and it wouldn't be possible to get her sim card. The guides I've been using are...

To switch to Cyanogen
http://forum.xda-developers.com/showthread.php?t=563679

To do at most, a wifi reg
http://forum.xda-developers.com/showthread.php?t=452316

Nevermind, got Wifi access by running

Code:
am start -a android.intent.action.MAIN -n com.android.settings/.Settings

while in an ADB shell. It brings your "settings" screen to the front, and allows you to set up a wifi connection. You can then put in your google info.
 
Last edited:

addohm

Member
Sep 13, 2009
35
0
Okay so I got the Wifi turned on, and am logged in to the network at work. I still can't get past the google login, the connection still times out. Is there another way around the registration screen?
 

JGeZau

Senior Member
Jan 10, 2010
233
6
Trying to get ADB running in Karmic Koala. Anyone have any idea?

Yes, I running Karmic Koala.

It's basically the same as here http://developer.android.com/guide/developing/device.html#setting-up but instead of "50-android.rules" you use "70-android.rules"

1. Login as root and create this file: /etc/udev/rules.d/70-android.rules

For Karmic Koala, edit the file to read:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"

2. Now execute:
chmod a+rx /etc/udev/rules.d/70-android.rules

3. reboot

It worked for me. Good luck
 

blackknightavalon

Senior Member
Feb 1, 2009
3,217
529
Somewhere in NYC
Yes, I running Karmic Koala.

It's basically the same as here http://developer.android.com/guide/developing/device.html#setting-up but instead of "50-android.rules" you use "70-android.rules"

1. Login as root and create this file: /etc/udev/rules.d/70-android.rules

For Karmic Koala, edit the file to read:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"

2. Now execute:
chmod a+rx /etc/udev/rules.d/70-android.rules

3. reboot

It worked for me. Good luck

"error: device not found"
 

timothydonohue

Senior Member
Oct 2, 2007
1,583
128
Portland, Maine
so, i finally am getting a device identification, at least, and what i've done is mostly the same as above.

run the command "lsusb" with the device not plugged it.
plug in the nexus one
run "lsusb", and note the output. this will give you the identifier for the device (it's the one that will show up that didn't when you didn't have it plugged in. mine comes up as
Bus 001 Device 004: ID 18d1:4e12

the last part is the important part. make your rules file. mine is

sudo gedit /etc/udev/rules.d/51-android.rules

i put in the line
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4e12", MODE="0666"
and saved it. so, replace the idvendor tag with the first part of the lsusb thing, and the second part in idproduct.

now, when i go to androidsdk/tools and run ddms, at least it sees the device now. it didn't before.
 

carz12

Senior Member
Jan 25, 2010
687
167
Grande Prairie
Ok, I just went through all this, for the newest ubuntu release there is already a file called 70-persistent-net.rules , edit this file.

In terminal,

Code:
cd /etc/udev/rules.d
sudo gedit 70-persistent-net.rules

Now at the end add your device

SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666" (this is the HTC id for all HTC devices)

I also put it under the heading # HTC DREAM so...

# HTC DREAM
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"


save file

Code:
sudo /etc/init.d/udev restart

plug in your phone or unplug and plug back in.

Code:
adb devices

you should see your phone now

(this is assuming 70-persistent.rules is on your machine, I'm on 9.10)
 

dudecicle

New member
Mar 21, 2010
1
1
to make it easier copy the adb executable to /usr/bin and you can execute from any directory withoud using cd /directory
Code:
sudo cp /androidsdk/tools/adb /usr/bin
sudo chmod +x /usr/bin/adb

that's how i use mine on my 8.10 and 9.04

This helped me out a lot. Thank you. Even though the Android SDK readme file gives instructions, you reiterated it in a much more simple way. Thanks.
 
  • Like
Reactions: 1619415

ScottRedX

New member
Jun 28, 2010
3
0
Sync mode required on EVO

On the HTC EVO, I had to select "HTC Sync" mode before adb would recognize the device. Even though I'm using Ubuntu, thus there is no HTC Sync on my PC, the other USB modes don't seem to interact with adb.
 

sudhirkhanger

Senior Member
Jun 29, 2010
909
48
to make it easier copy the adb executable to /usr/bin and you can execute from any directory withoud using cd /directory
Code:
sudo cp /androidsdk/tools/adb /usr/bin
sudo chmod +x /usr/bin/adb

that's how i use mine on my 8.10 and 9.04

I have deleted the sdk folder and bashrc from my system and moved adb to usr/bin. adb is still running. Do i actually need the whole folder in my home directory.
 

robi052

Member
Dec 15, 2010
11
0
Pula
www.robertobilic.com
Hi,

Use Ubuntu 11.04 x64

copy adb to /usrb/bin and chmod +x
adb start-server is OK
adb device see my SE X8 (rooted)

But when try "sh /sdcard/apps2sd.sh" see error "sh: Can't open /sdcard/apps2sd.sh"

In adb shell with ls see directory sdcard but cannot run "ls sdcard" (error opendir failed, Permission denied)

What I do wrong?

Resolved: When connect phone must select charge phone (no connect to transfer files) :)
 
Last edited:

hackergnome

Senior Member
Apr 21, 2011
2,610
869
Mumbai
Hey im using ubuntu 10.10 but cant find my moto Defy :(

Added the file 51;android.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", ATTRS{idProduct}==4287, MODE="0666" to it
Reboot
adb devices
nthn...
plz help pllzzzz
 

1619415

Senior Member
Mar 16, 2014
2,029
1,273
20
This helped me out a lot. Thank you. Even though the Android SDK readme file gives instructions, you reiterated it in a much more simple way. Thanks.

Even though this post is really old it helped a LOT thanks for posting it. I can finally run adb and fastboot commands.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    to make it easier copy the adb executable to /usr/bin and you can execute from any directory withoud using cd /directory
    Code:
    sudo cp /androidsdk/tools/adb /usr/bin
    sudo chmod +x /usr/bin/adb

    that's how i use mine on my 8.10 and 9.04
    1
    Okay it works now. This is what I get
    Code:
    [email protected]:~$ adb start-server
    * daemon not running. starting it now *
    * daemon started successfully *
    [email protected]:~$ adb devices
    List of devices attached 
    HT845GZ28769	device
    
    [email protected]:~$ adb shell
    # ls
    cache                 init.goldfish.rc      sbin
    data                  init.rc               sdcard
    default.prop          init.trout.rc         sqlite_stmt_journals
    dev                   proc                  sys
    etc                   root                  system
    init                  runme.sh
    #



    THIS IS WHAT I DID:

    created 2 files on my desktop named:

    50-android.rules
    51-android.rules

    Then I edited both files to read:

    SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"


    Then I opened terminal and did this

    Code:
    [email protected]:~$sudo mv /home/chris/desktop/50-android.rules /etc/udev/rules.d
    [email protected]:~$sudo mv /home/chris/desktop/51-android.rules /etc/udev/rules.d

    Then I rebooted and It all worked. I am runnung ubuntu 9.04 jaunty jakelope(sp?)

    Thanks for everyones help. Hope this helps someone else.
    1
    to make it easier copy the adb executable to /usr/bin and you can execute from any directory withoud using cd /directory
    Code:
    sudo cp /androidsdk/tools/adb /usr/bin
    sudo chmod +x /usr/bin/adb

    that's how i use mine on my 8.10 and 9.04

    This helped me out a lot. Thank you. Even though the Android SDK readme file gives instructions, you reiterated it in a much more simple way. Thanks.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone