Hi Jonathan,

Well - yes and no. I think it is because we're all used to Windows where you do 
not have to worry about these things. When an unknown USB device enumerates in 
Linux, the default behavior is to make it writable only by root (probably to 
prevent un-intended access to devices by users not authorized to do so). You 
can create a udev rule to relax permissions whenever the device is inserted. 
This link should give you an idea of how it works, but you have to tweak 
idVendor and idProduct values:

http://3dgo.net/2010/01/26/nexus-one-adb-on-ubuntu-9-10/

..then I would create a UNIX group called something like "android", make 
yourself member of that group and set the device owned by that group in the 
udev rule. Then I believe you can skip being root :-)

---
Henrik Uhrenfeldt
Chief Software Engineer
Ixonos Denmark ApS
Niels Jernes Vej 10,
DK-9220 Aalborg Ø, Denmark
mobile +45 4030 2607
email: [email protected]
http://www.ixonos.com

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Jonathan
Sent: 10. juni 2010 18:28
To: android-porting
Subject: [android-porting] Re: Android on Ubuntu 10.4

Henrik,

Thanks for all your insight and help...

You make a good point... although I don't like typing long command
lines... So I logged in as root and created a link in /usr/local/bin
to /home/user/mydroid/out/host/linux-x86/bin/fastboot & adb

Now when I sudo fastboot or adb, it should execute from my out
directory which should be up to date with latest version... Correct?

It seems strange that you have to be root to have access to devices on
the USB...

- Jonathan
Director Platform Solutions
LitePoint
Sunnyvale CA, 94085

SKYPE:jonathan_b_hirst



On Jun 9, 10:47 pm, Uhrenfeldt Henrik <[email protected]>
wrote:
> Hi Jonathan,
>
> I believe it will suffice to explicitly state the path to fastboot with sudo 
> - ie.
>
> # sudo /path/to/fastboot
>
> I would say that depending on your setup it may be a bad idea to just copy 
> the fastboot binary into /usr/local/bin. If you update to a newer SDK (and 
> thereby newer fastboot) you have to remember to update the copy.
>
> We build Android from source all the time, and just use the newly built 
> fastboot:
>
> # cd <ANDROID_TOP_LEVEL_DIRECTORY>
> # sudo out/host/linux-x86/bin/fastboot flash system 
> out/target/product/<variant>/system.img
>
> ---
> Henrik Uhrenfeldt
> Chief Software Engineer
> Ixonos Denmark ApS
> Niels Jernes Vej 10,
> DK-9220 Aalborg Ø, Denmark
> mobile +45 4030 2607
> email: [email protected]http://www.ixonos.com
>
>
>
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Jonathan
> Sent: 9. juni 2010 22:54
> To: android-porting
> Subject: [android-porting] Re: Android on Ubuntu 10.4
>
> Thanks for all of the hints from everyone...
>
> I have determined that my problem was trying to execute fastboot
> without SU privledges... if you exeuct $ sudo fastboot... fastboot
> must be in a path that is in the root users path in order to execute
> properly. So in order to make this work had to do the following...
>
> 1) enable root account
>         1.$ sudo passwd root            (Enter a password when prompted)
> 2) $ su                                       (Enter your root password)
> 3) copy fastboot into your /usr/local/bin directory
>
> I am sure any combination of things that would put the fastboot
> executable into a path that was executable by the root user would
> work...
>
> I think I should write up all the steps from clean install of Ubuntu --
> > Building baseline of Android --> Getting adb and fastboot to work
> under Ubuntu 10.4... Maybe I will do this once I figure out how to
> build for an actual target like Nexus One instead of just generic
> build.
>
> On Jun 8, 11:59 pm, Uhrenfeldt Henrik <[email protected]>
> wrote:
> > Hi Jonathan,
>
> > If you have libusb installed, you should be able to execute something like:
>
> > lsusb -v
>
> > It should list all devices and their USB descriptors..
>
> > Do you remember to run fastboot as root? It will not be able to access the 
> > usb device as a normal user, unless you put udev rules in place to make 
> > sure it gets different ownership than root.
>
> > I use fastboot in Linux all the time with the TI Zoom2 board, but I need a 
> > 'sudo' in front of every invocation, or nothing happens.
>
> > ---
> > Henrik Uhrenfeldt
> > Chief Software Engineer
> > Ixonos Denmark ApS
> > Niels Jernes Vej 10,
> > DK-9220 Aalborg Ø, Denmark
> > mobile +45 4030 2607
> > email: [email protected]http://www.ixonos.com
>
> > -----Original Message-----
> > From: [email protected] 
> > [mailto:[email protected]] On Behalf Of Jonathan
> > Sent: 8. juni 2010 18:18
> > To: android-porting
> > Subject: [android-porting] Re: Android on Ubuntu 10.4
>
> > I have the Android SDK installed on the machine. I 
> > downloadedhttp://developer.android.com/sdk/download.html?v=android-sdk_r06-linu...
>
> > Unzipped it, and ran the Android SDK manager and selected all
> > available that showed in the list... I am assuming that would have
> > installed anything necessary into my Linux OS that was required...
>
> > is there a tool in Linux I can check to see what is on the USB even if
> > the driver is not installed for it?
>
> > - J
>
> > On Jun 7, 8:48 pm, Akash Choudhari <[email protected]> wrote:
> > > Did you install the Android SDK?
>
> > > I had noticed that the Nexus-One drivers are part of SDK
>
> > > - Akash
>
> > > On Mon, Jun 7, 2010 at 3:41 PM, jonathan hirst <[email protected]> wrote:
> > > > Help,
>
> > > > I have setup a Dell Dual Quad Core machine with Ubuntu 10.4 32 bit...
>
> > > > Synced the REPO and completed a build using make
>
> > > > When I plug my Nexus One into the Linux box, it shows a Nexus One when I
> > > > open the computer browser from 'places'...
>
> > > > When i force the Nexus One into Fastboot, nothing shows up, and fastboot
> > > > on linux can not talk to the phone.
>
> > > > (I am able to see the phone on a windows machine when in fastboot)
>
> > > > It was my understanding that everything that was needed in linux to talk
> > > > to google devices and use fastboot was already installed.
>
> > > > Please help,
>
> > > > Jonathan Hirst
> > > > +1-847-309-8730
>
> > > >  --
> > > > unsubscribe: 
> > > > [email protected]<android-porting%2Bunsubscribe@
> > > >  googlegroups.com>
> > > > website:http://groups.google.com/group/android-porting
>
> > --
> > unsubscribe: [email protected]
> > website:http://groups.google.com/group/android-porting
>
> --
> unsubscribe: [email protected]
> website:http://groups.google.com/group/android-porting

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting


-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to