LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
Search this Thread
Old 02-18-2010, 10:15 PM   #1
rndm_luser
LQ Newbie
 
Registered: Jan 2009
Posts: 8

Rep: Reputation: 1
Mount Android phone in FreeBSD [Solution]


I was having a problem recently mounting my HTC G1 Android phone in FreeBSD as the device nodes for the slices were not being created. The solution was found in a post on the FreeBSD mailing lists. The solution as stated in the post is to use dd so "so devfs looks at it (actually the GEOM code, I think), detects the new partitons, and creates nodes in /dev.". My phone shows up as da1 on my system (as I have another SCSI disk). The device nodes were created after issuing the following:

Code:
dd if=/dev/null of=/dev/da1 count=0
Note that the count equals zero to prevent actually writing anything.

Last edited by rndm_luser; 02-18-2010 at 10:18 PM. Reason: Clarification
 
Old 03-21-2010, 09:06 AM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 248Reputation: 248Reputation: 248
Nice solution. Thanks.
 
Old 06-19-2010, 01:48 PM   #3
rpavery
LQ Newbie
 
Registered: Jun 2010
Location: Seattle, WA
Distribution: FreeBSD 8.2
Posts: 4

Rep: Reputation: 0
So I'm running FreeBSD 8 on an eee 901, and I have the T-Mobile myTouch 3g. I saw the same problem (no device nodes created for da0, but the device is recognized and receives power). Anyway, I tried the same command noted above, but I receive the message "dd: /dev/da0: Device not configured". I know the USB stack was re-written for 8.0, but I don't see how that would affect this.

Does anybody have any idea what is wrong, or what I should try? Has anybody else managed to mount an android device under FreeBSD 8? Thanks for any help!
 
Old 06-24-2010, 07:46 PM   #4
stuckpig
LQ Newbie
 
Registered: Jun 2010
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by rpavery View Post
So I'm running FreeBSD 8 on an eee 901, and I have the T-Mobile myTouch 3g. I saw the same problem (no device nodes created for da0, but the device is recognized and receives power). Anyway, I tried the same command noted above, but I receive the message "dd: /dev/da0: Device not configured". I know the USB stack was re-written for 8.0, but I don't see how that would affect this.

Does anybody have any idea what is wrong, or what I should try? Has anybody else managed to mount an android device under FreeBSD 8? Thanks for any help!
I had a similar problem with my HTC Droid Eris (the "device not configured" error)-- then I realized my phone was set to 'charge only' and not in disk drive mode. Make sure the proper mode is selected and then run dd with the given conditional, this will cause the proper slice to be recognized (s1). then mount_msdosfs /dev/da0s1 /mountpoint and you should be good to go.

I accomplished this while running FreeBSD 8.0.
 
Old 06-26-2010, 08:12 PM   #5
rpavery
LQ Newbie
 
Registered: Jun 2010
Location: Seattle, WA
Distribution: FreeBSD 8.2
Posts: 4

Rep: Reputation: 0
Hi again,

I tried again on my desktop and it worked this time. Thanks Stuckpig, I was pretty sure I checked that it wasn't just in charge mode, but perhaps I messed up the first time. Anyway, it works now. Now if I could only find a way to get HAL/Dbus to rescan after making the device nodes so that it would be automounted rather than having to manually mount as root or with sudo.
 
Old 06-26-2010, 11:17 PM   #6
stuckpig
LQ Newbie
 
Registered: Jun 2010
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by rpavery View Post
Hi again,

I tried again on my desktop and it worked this time. Thanks Stuckpig, I was pretty sure I checked that it wasn't just in charge mode, but perhaps I messed up the first time. Anyway, it works now. Now if I could only find a way to get HAL/Dbus to rescan after making the device nodes so that it would be automounted rather than having to manually mount as root or with sudo.
I'm about to build the volume manager plugin for thunar (thunar-volman) which accomplishes just that. It's specific to the xfce4 window manager though-- if you want to do it with the base FreeBSD system, check out 'amd' (the FreeBSD automount daemon).
 
Old 06-27-2010, 11:23 PM   #7
rpavery
LQ Newbie
 
Registered: Jun 2010
Location: Seattle, WA
Distribution: FreeBSD 8.2
Posts: 4

Rep: Reputation: 0
Hey again!

I have thunar-volman installed, but it doesn't seem to re-scan the bus since it was already scanned when the phone was plugged in (but only charging). I've searched online for a way to tell it to rescan, but I didn't find a solution (I did try various things related to hal, dbus, and even camcontrol). I wrote a quick shell script to automatically create the device nodes and mount it (as root using sudo), but then I can't write files as a regular user. I could also change my script to run automatically using devd, which I might get around to next weekend, but this still won't solve the permissions issue unless I find a way to get hald/dbus to make Thunar aware of the new device after creating the /dev nodes.

I looked into amd as well, but since I already use Thunar and XFCE, I wanted to stick with those. I know the thunar-volman works already because anything else I plug in shows up in the list in the left hand pane of Thunar.

Thanks again!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
android phone at&t Polanski Linux - Mobile 5 03-31-2010 08:51 PM
LXer: Android rocks out on Fender phone LXer Syndicated Linux News 0 01-23-2010 10:20 AM
LXer: Jailbreaking the Google Android G1 Phone LXer Syndicated Linux News 0 11-07-2008 07:50 PM
LXer: Android, Apple, and phone phreedom LXer Syndicated Linux News 0 10-03-2008 04:10 AM
LXer: Android phone could come in November LXer Syndicated Linux News 0 08-19-2008 06:00 AM


All times are GMT -5. The time now is 03:00 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration