LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, LiMo, Maemo, MeeGo, Openmoko, Ubuntu Mobile, WebOS, Firefox OS, Open Mobile Alliance and other similar projects and products.
A reminder that LQ now has a dedicated Android sister site: AndroidQuestions.org

Notices

Reply
 
Search this Thread
Old 09-28-2009, 03:39 PM   #1
exceed1
Member
 
Registered: Mar 2008
Location: oslo
Distribution: debian,redhat
Posts: 199

Rep: Reputation: 31
Question How to get access to HTC Heros SD card in linux ?


Hi

I connected the HTC Hero to the computer (running debian 5.0) and it says on the phone that the USB cable is connected.. and i see these lines in dmesg:
Code:
[ 4800.392051] usb 5-5: new high speed USB device using ehci_hcd and address 7
[ 4800.537331] usb 5-5: configuration #1 chosen from 1 choice
[ 4800.552718] scsi4 : SCSI emulation for USB Mass Storage devices
[ 4800.559682] usb-storage: device found at 7
[ 4800.559689] usb-storage: waiting for device to settle before scanning
[ 4800.566691] usb 5-5: New USB device found, idVendor=0bb4, idProduct=0c01
[ 4800.566702] usb 5-5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4800.566707] usb 5-5: Product: Android Phone
[ 4800.566710] usb 5-5: Manufacturer: HTC
[ 4800.566714] usb 5-5: SerialNumber: HT998L902322
[ 4805.557884] usb-storage: device scan complete
[ 4805.559840] scsi 4:0:0:0: Direct-Access     HTC      Android Phone    0100 PQ: 0 ANSI: 2
[ 4805.566908] sd 4:0:0:0: [sdb] Attached SCSI removable disk
[ 4805.566981] sd 4:0:0:0: Attached scsi generic sg2 type 0
It seems like the kernel (2.6.26-1-486) recognizes the phone and i see this in the /dev/disk/by-id:
Code:
usb-HTC_Android_Phone_HT998L902322-0:0
which points to /dev/sdb, but not actual device. There is no /dev/sdbX device present. When i try to mount the device above it says "mount: No medium found", but that seems to be because it tries to mount /dev/sdb. The device /dev/sdb does not show up in fdisk.

I have unmounted the SD card (from the settings on the phone) to try if that worked but there were no differences. I also tried to install the HTC sync software with wine, the installation went fine but the program didnt start up and the phone didnt act any different / it didnt work any better then.

Does someone know how to get this phone to sync with linux? I thinking that more people got to have this problem.. any help is appericiated.
 
Old 09-30-2009, 03:52 AM   #2
Trickie
Member
 
Registered: Sep 2004
Posts: 38

Rep: Reputation: 23
Can you read/write to the SD card, without the phone, using a card reader? Which file system do you have on the SD card? You need to establish that the card is working OK first. I've had problems with flakey SD cards in the past.

Richard
 
Old 09-30-2009, 03:56 AM   #3
Trickie
Member
 
Registered: Sep 2004
Posts: 38

Rep: Reputation: 23
...also, is the SD card switch set to read/write rather than read only?

Richard
 
Old 09-30-2009, 12:22 PM   #4
exceed1
Member
 
Registered: Mar 2008
Location: oslo
Distribution: debian,redhat
Posts: 199

Original Poster
Rep: Reputation: 31
the phone is brand new so i wouldnt expect any problems with the SD card and the phone has not indicated any problems with it either... i dont have a card reader to i cant read it that way, i cant spend more money on this when i spent about 900 dollars on the phone (norway is expensive)

i cant see any information on the found indicating if it is in read/write mode.
 
Old 09-30-2009, 04:21 PM   #5
Trickie
Member
 
Registered: Sep 2004
Posts: 38

Rep: Reputation: 23
The ro/rw switch is on top of the card. You can remove the card from the phone and inspect it manually.

Richard
 
Old 10-01-2009, 03:49 AM   #6
exceed1
Member
 
Registered: Mar 2008
Location: oslo
Distribution: debian,redhat
Posts: 199

Original Poster
Rep: Reputation: 31
Ok, but my question.. why would i want to remove the card or switch the read/write option when all i want is to attach the phone to the computer to transfer files.. even if it was read only i should have been able to at least mount it.. the kernel recognizes it but it doesnt seem like any block device is created for it.. when searching google i saw that some peope were mounting it like a usb harddrive and using "mount /dev/sdb1 /media/androidPhone", but since i dont have a "sdbX" device, that makes it kind of hard..
 
Old 10-01-2009, 05:04 AM   #7
Trickie
Member
 
Registered: Sep 2004
Posts: 38

Rep: Reputation: 23
I understand what it is you wish to do but you cannot assume that your SD card is OK just because it is new. I have bought new hardware in the past that has been faulty. The first thing to do, always, in the event of failure, is to prove that the media is working, otherwise you could spend hours trying to load data onto faulty media, which, clearly, is impossible. You won't even be able to mount it.

I know that you don't wish to spend any money on a card reader but they are very cheap (from 3 to 4 in the UK) and very useful. As an alternative, can't you try the card in another device.

Richard
 
Old 10-01-2009, 05:20 AM   #8
Trickie
Member
 
Registered: Sep 2004
Posts: 38

Rep: Reputation: 23
Just a thought: have you checked the output from fdisk -l /dev/sdb

Richard
 
Old 10-01-2009, 11:54 AM   #9
exceed1
Member
 
Registered: Mar 2008
Location: oslo
Distribution: debian,redhat
Posts: 199

Original Poster
Rep: Reputation: 31
Thats a good point, but i dont know how to verify if the SD cards is actually working as it should.

Yes i checked fdisk and i couldnt see any sdb device at all eventhough dmesg reported it as sdb.
 
Old 10-01-2009, 12:05 PM   #10
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,201

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
I have a htc hero and am an absolute noob with it, but I beat this problem. It takes me 4 steps every time (as root)

1. Plug in to the pc
2. Pull down the notifications thing, select usb connection, and you'll get the option to mount the disk. Do that
3. mount /dev/sdx (where x = your drive), and receive an error. Ignore that.
4 mount /dev/sdx1 -t vfat /mnt/tmp

and it's on. Nothing else worked here.
 
  


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
Please help, I need to sync a HTC Hero with my Linux laptop... joel.bourquard Linux - Mobile 7 01-12-2010 05:33 AM
htc and linux Mr.mick-duck Linux - Laptop and Netbook 1 10-31-2007 12:41 PM
Linux Mobile for HTC 4350 ymsetjenesta Linux - Laptop and Netbook 2 07-03-2007 03:04 PM
Unsung comedic heros---our Mods! slackist General 8 08-11-2004 02:57 PM


All times are GMT -5. The time now is 07:06 PM.

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