[solved/info] - adb with ubuntu

Search This thread

CBowley

Senior Member
Feb 7, 2009
405
7
0
I am running ubuntu 9.04. I have eclipse and the Android s.d.k. set up and running perfectly. But I cannot figure out how to setup a.d.b.


I apologize for the new post, but I promise I have searched for hours on this forum and Google. All I found was info on installing on Windows, and fixing a.d.b that used to work but won't work now after updating to 9.04. Anybody have a tutorial or a fix that I might have missed? Thanks in advance.
 
Last edited:

Freedomcaller

Senior Member
Jan 24, 2009
239
4
0
there is nothing to set up just make shure it has execute permissions, thats what had me stumped LOL
#chmod +x adb

then just plug in the g1 (no drivers required) and
#adb whatever you want

but i was using arch :O
 

tubaking182

Senior Member
Mar 28, 2008
1,088
15
0
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
 
  • Like
Reactions: nasif619

CBowley

Senior Member
Feb 7, 2009
405
7
0
Here is me trying all kinds of stuff

Code:
[email protected]:~$ adb start-server
[email protected]:~$ adb devices
List of devices attached 

[email protected]:~$ adb kill-server
[email protected]:~$ adb
Android Debug Bridge version 1.0.20

 -d                            - directs command to the only connected USB device
                                 returns an error if more than one USB device is present.
 -e                            - directs command to the only running emulator.
                                 returns an error if more than one emulator is running.
 -s <serial number>            - directs command to the USB device or emulator with
                                 the given serial number
 -p <product name or path>     - simple product name like 'sooner', or
                                 a relative/absolute path to a product
                                 out directory like 'out/target/product/sooner'.
                                 If -p is not specified, the ANDROID_PRODUCT_OUT
                                 environment variable is used, which must
                                 be an absolute path.
 devices                       - list all connected devices

device commands:
  adb push <local> <remote>    - copy file/dir to device
  adb pull <remote> <local>    - copy file/dir from device
  adb sync [ <directory> ]     - copy host->device only if changed
                                 (see 'adb help all')
  adb shell                    - run remote shell interactively
  adb shell <command>          - run remote shell command
  adb emu <command>            - run emulator console command
  adb logcat [ <filter-spec> ] - View device log
  adb forward <local> <remote> - forward socket connections
                                 forward specs are one of: 
                                   tcp:<port>
                                   localabstract:<unix domain socket name>
                                   localreserved:<unix domain socket name>
                                   localfilesystem:<unix domain socket name>
                                   dev:<character device name>
                                   jdwp:<process pid> (remote only)
  adb jdwp                     - list PIDs of processes hosting a JDWP transport
  adb install [-l] [-r] <file> - push this package file to the device and install it
                                 ('-l' means forward-lock the app)
                                 ('-r' means reinstall the app, keeping its data)
  adb uninstall [-k] <package> - remove this app package from the device
                                 ('-k' means keep the data and cache directories)
  adb bugreport                - return all information from the device
                                 that should be included in a bug report.

  adb help                     - show this help message
  adb version                  - show version num

DATAOPTS:
 (no option)                   - don't touch the data partition
  -w                           - wipe the data partition
  -d                           - flash the data partition

scripting:
  adb wait-for-device          - block until device is online
  adb start-server             - ensure that there is a server running
  adb kill-server              - kill the server if it is running
  adb get-state                - prints: offline | bootloader | device
  adb get-serialno             - prints: <serial-number>
  adb status-window            - continuously print device status for a specified device
  adb remount                  - remounts the /system partition on the device read-write
  adb root                     - restarts adb with root permissions

networking:
  adb ppp <tty> [parameters]   - Run PPP over USB.
 Note: you should not automatically start a PDP connection.
 <tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
 [parameters] - Eg. defaultroute debug dump local notty usepeerdns

adb sync notes: adb sync [ <directory> ]
  <localdir> can be interpreted in several ways:

  - If <directory> is not specified, both /system and /data partitions will be updated.

  - If it is "system" or "data", only the corresponding partition
    is updated.
[email protected]:~$ adb get-state
* daemon not running. starting it now *
* daemon started successfully *
unknown
[email protected]:~$ devices
bash: devices: command not found
[email protected]:~$ adb devices
List of devices attached 

[email protected]:~$ adb remount
error: device not found
[email protected]:~$ adb start-server
[email protected]:~$ adb remount
error: device not found
[email protected]:~$ adb get-serialno
unknown
[email protected]:~$
 

CBowley

Senior Member
Feb 7, 2009
405
7
0
tried another usb cable, different usb port. Same stuff

Code:
[email protected]:~$ adb shell
error: device not found
[email protected]:~$ adb start-server
[email protected]:~$ adb shell
error: device not found
[email protected]:~$ ls
adb                           examples.desktop       Templates
android-sdk-linux_x86-1.5_r2  Firefox_wallpaper.png  Videos
Desktop                       Music                  workspace
Documents                     Pictures               World of Warcraft Trial
eclipse                       Public
[email protected]:~$ cd /
[email protected]:/$ ls
bin    dev   initrd.img  media  proc  selinux  tmp  vmlinuz
boot   etc   lib         mnt    root  srv      usr
cdrom  home  lost+found  opt    sbin  sys      var
[email protected]:/$ adb shell
error: device not found
[email protected]:/$ adb start-server
[email protected]:/$ adb shell
error: device not found
[email protected]:/$ ls
bin    dev   initrd.img  media  proc  selinux  tmp  vmlinuz
boot   etc   lib         mnt    root  srv      usr
cdrom  home  lost+found  opt    sbin  sys      var
[email protected]:/$ adb start-server
[email protected]:/$ adb shell
error: device not found
[email protected]:/$ adb kill-server
[email protected]:/$ adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached 

[email protected]:/$ adb shell
error: device not found
[email protected]:/$


Any ideas?
 

mer6

Senior Member
May 3, 2009
139
0
0
Towson, MD, USA
flavors.me
I am using the Rogers v3 Rom with jf1.42 bootloader and the 2005 s.p.l

Would any of that matter.

Doubtful. I too am looking to get ADB running on my Ubuntu laptop, as it would save a bunch of time for me being able to use it instead of my slow windows computer (ADB is corrupted driver-wise on my main rig).

Anyone have any reasonable tutorials for lower-level linux users on Ubuntu 9.04 32-bit?
 

Moons7

Member
May 26, 2009
12
0
0
I have Ubuntu + SDK and I don't have any issue.
Are you sure you installed your SDk the correct way == you followed exaclty the android.com howto ?
 

knaries2000

Senior Member
Apr 13, 2009
172
12
0
it should work with ubuntu 9.04. Just follow this instructions to setup connection to your phone. mainly create rule for you device in udev.

http://developer.android.com/guide/developing/device.html


If you're developing on Ubuntu Linux, you need to add a rules file:

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

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

For Dapper, edit the file to read:
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"
2. Now execute:
chmod a+rx /etc/udev/rules.d/50-android.rules



reboot, then if you are still having problem after this, one more thing to try to start server swith sudo.

adb kill-server
sudo adb start-server
 

CBowley

Senior Member
Feb 7, 2009
405
7
0
it should work with ubuntu 9.04. Just follow this instructions to setup connection to your phone. mainly create rule for you device in udev.

http://developer.android.com/guide/developing/device.html


If you're developing on Ubuntu Linux, you need to add a rules file:

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

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

For Dapper, edit the file to read:
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"
2. Now execute:
chmod a+rx /etc/udev/rules.d/50-android.rules



reboot, then if you are still having problem after this, one more thing to try to start server swith sudo.

adb kill-server
sudo adb start-server

I think I did this part, I will double check. I did try sudo adb start-server, that didn't work. I will double check the rest. Thank you.
 

CBowley

Senior Member
Feb 7, 2009
405
7
0
Oh that's why I never did it, I cannot find a rule for jaunty, only hardy, dapper, and gutsy.. I'll do more searching. Thanks for the idea.
 

CBowley

Senior Member
Feb 7, 2009
405
7
0
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.
 
  • Like
Reactions: siak0r

cedricberger

Senior Member
May 28, 2009
69
1
0
Yes it has to be rule 51, not 50 with Jaunty. Google doc is not up to date yet.

see this thread :
http://groups.google.com/group/andr...read/thread/ab6e89c4b51cd905/a05c2a749cd55b88

> this was in /etc/udev/rules.d/50-android.rules
> But it seems to also work like this : (method for Ubuntu 9.04 :
> http://www.frandroid.com/2371/ubuntu-904-et-android/ )
> -> in /etc/udev/rules.d/51-android.rules :
> SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4", MODE=”0666"


Ubuntu 9.04 already has a rules/50-something file so you need to make
sure that the android rule is > 50. Otherwise whatever you define gets
reset. We should update the doc to just state rule/51-android.rules
which will work right now till the base configuration changes once
again :)
> Also take care if you copy/paste this rule : looks like double quotes
> (") may be wrongly copied from html page, and then it did not work for
> me before I retyped them.

Hmm thanks for the info. That's a new one.
 

pixel-painter

Senior Member
Jan 9, 2009
238
26
28
Seattle
Edit
Ok sorry a little OT, but I responded to this because I did not see an answer posted. I Seem to be having problems with posts showing up when I am logged in... but not when I am logged out... really weird. After I logged out at least another dozen posts showed up in this thread.
 
Last edited:

marpoz

New member
May 20, 2009
3
0
0
I am running ubuntu 9.04. I have eclipse and the Android s.d.k. set up and running perfectly. But I cannot figure out how to setup a.d.b.


I apologize for the new post, but I promise I have searched for hours on this forum and Google. All I found was info on installing on Windows, and fixing a.d.b that used to work but won't work now after updating to 9.04. Anybody have a tutorial or a fix that I might have missed? Thanks in advance.

sudo bash -c "echo SUBSYSTEM==\"usb\", SYSFS{idVendor}==\"0bb4\", MODE=\"0666\" > /etc/udev/rules.d/51-android.rules"
sudo /etc/init.d/udev restart
killall adb
adb shell
 

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