Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
old phone old card. cant read the card on gentoo properly
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
e3k
Guru
Guru


Joined: 01 Oct 2007
Posts: 362
Location: Inner Space

PostPosted: Tue Jun 21, 2016 10:00 pm    Post subject: old phone old card. cant read the card on gentoo properly Reply with quote

i have a good old cell phone sony ericsson w810i and the memory card is sandisk memory stick pro duo 2gb Magic Gate. i tried 2 card readers. one of them akasa usb2 and some ssk from dx.com usb3. also i have connnected the phone directly on pc via cable. but still i cant see all the mp3s in the /MP3 folder. the fs is fat16 i have runed fsck on it and it found 0x25 dirty bit set but the recovery did not change anything.

the phone can read all the files in the /MP3 folder but when i connect it to a gentoo pc i have only one mp3 there: Desention_b_ringtone.mp3
_________________
((O.o))
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7130
Location: almost Mile High in the USA

PostPosted: Wed Jun 22, 2016 12:23 am    Post subject: Reply with quote

I would believe that the external USB reader should always work unless the USB reader is broken.

Connecting USB to the phone directly is a craps shoot. Most modern phones will not event try to emulate mass storage because there's a lot of technical issues involved. So most will use either MTP/PTP and/or OBEX. Chances are, you will have to use these to access the on-phone memory, which is distinct from the card memory.

Some phones will do some chicanery and offer you mass storage after the phone itself relinquishes access to it. I find these rare and very crash prone.

Not having the exact phone I don't know exactly what issue you're seeing, I'm a bit confused with all the experiments you've tried.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
e3k
Guru
Guru


Joined: 01 Oct 2007
Posts: 362
Location: Inner Space

PostPosted: Thu Jun 23, 2016 11:44 am    Post subject: Reply with quote

i quoted the exact phone in the first post. the problem is that the phone itself does see all the files/albums in the /MP3 folder on the card but gentoo or RHEL do see only 1 mp3 file in the /MP3 folder.

now i noticed when running fsck.vfat that it says "FATs differ - using first FAT." and "Leaving filesystem unchanged" that would indicate a FS problem.

I will try to fix it with WIN7 and if this does not help i will have to format the card.
_________________
((O.o))
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7130
Location: almost Mile High in the USA

PostPosted: Thu Jun 23, 2016 2:08 pm    Post subject: Reply with quote

Knowing what phone it is and actually having it in hand to play with are two very different concepts :)

However directory contents are not stored in the FAT - while it is an issue, it shouldn't make things appear and/or disappear unless again the firmware behavior can be understood, and it's hard to know without the physical phone in hand.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43182
Location: 56N 3W

PostPosted: Thu Jun 23, 2016 2:36 pm    Post subject: Reply with quote

e3k,

Both the phone and card readers may be correct at the same time.

Phones often use some sort of overlay filesystem to merge two filesystems and make them appear as one.
You may really have one MP3 file on the memory card and the others in the phone memory.

What does the phone show when the memory card is removed?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7130
Location: almost Mile High in the USA

PostPosted: Thu Jun 23, 2016 3:01 pm    Post subject: Reply with quote

There are so many different implementations of phone and memory card uses.

Group 1: Mass-Storage. Note: proper handling of mass storage is when it's plugged in, the phone cannot access its own memories anymore. If it handles it incorrectly, corruption will ensue as mass-storage was not meant for multiple machines to access simultaneously.
subgroup 1: Only display card
subgroup 2: Show internal and external memory as different LUNs.

My Nokias are this way.

Group 2: Transfer Protocol (MTP, PTP, OBEX). This method can share access between the phone and other computer, and the phone will mediate between internal and computer access
subgroup 1: Show only memory card
subgroup 2: merge memory card and internal memory by path

MTP/PTP/OBEX require special drivers/software on the controlling computer though most have it now.

My old feature phone Sony Ericsson was like this, but it didn't have USB nor removable storage. My Android phone is also MTP.

Group 3: can use both. But the proper way is that if mass-storage is being used, it will disable phone use as well as MTP/PTP/OBEX.

Most phones use MTP/PTP/OBEX due to trying to prevent sharing violations and thus you should never even see FAT., unless you remove the card and use it externally. If you actually have a mass-storage phone, sometimes rebooting the phone can help as it would remove locks on the memory card, possibly then it will show its contents properly.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
e3k
Guru
Guru


Joined: 01 Oct 2007
Posts: 362
Location: Inner Space

PostPosted: Thu Jun 23, 2016 8:29 pm    Post subject: Reply with quote

NeddySeagoon wrote:
e3k,

Both the phone and card readers may be correct at the same time.

Phones often use some sort of overlay filesystem to merge two filesystems and make them appear as one.
You may really have one MP3 file on the memory card and the others in the phone memory.

What does the phone show when the memory card is removed?

when i remove the card the whole /MP3 folder disapears.
i have now put on win7 which chkdsk told me everything is fine. then i did run badblocks on it with exit code 0. the only crazy idea i have now to download the 2 different FATs and copy either 1 version or the other on both places. although i have never done this before...
_________________
((O.o))
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43182
Location: 56N 3W

PostPosted: Thu Jun 23, 2016 8:48 pm    Post subject: Reply with quote

e3k.

The differing FATs are not your problem. The directory entries would still be there.
The FAT is a linked list. The directory entry for a file points to the first cluster allocated to the file. The FAT entry for that cluster, points to the next cluster, or contains a special value if its the last cluster.

Directories are handled this way too, so that a directory could appear to be truncated if the FAT was incorrect but its likely it would contain a lot more than one file. There is another complication. As directories grow, more clusters are allocated, as they shrink, clusters are not freed. Its possible that the following conditions are true.
1. The first directory cluster contains only one non deleted file (rare)
2. The FAT entry pointing to the next cluster is damaged

From memory, the mount command for vfat has a parameter that tells it which copy of the FAT to use.
Try man mount.

Do not allow fsck to make changes, that will only make a bad situation worse.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
e3k
Guru
Guru


Joined: 01 Oct 2007
Posts: 362
Location: Inner Space

PostPosted: Thu Jun 23, 2016 9:38 pm    Post subject: Reply with quote

don't worry NeddySeagoon after trying some unsuccessful repair attempts with various software i did a dd image of that card with a card reader. i could find some mp3 file names with mc and the hex viewer at a high hex address so i guess it will be the second fat.

i failed to mount the fs manually with various options. sorry i did not read the whole document as it is too long. just 'Mount options for fat'.
_________________
((O.o))
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43182
Location: 56N 3W

PostPosted: Thu Jun 23, 2016 9:58 pm    Post subject: Reply with quote

e3k,

The two FAT copies follow one another before the top level directory. On a new FAT volume, empty space follows the top level directory. The top level directory will contain the special entries . and ..
For this dir and parent dir.

Any MP3 related text at high hex addresses is therefore likely to be directory entries. Directory layout depends on the filesystem variant. DOS, 8.3 Uppercase only. Win95 both DOS and long filenames and so on. FAT size, 12,16 or 32 plays a part as does cluster size.

Hexedit should find the .. enteries in directories, They will always be in the same place in the first sector of the first cluster allocated to the directory.

Have you tried photorec ?
It can find a lot more than just photos.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
e3k
Guru
Guru


Joined: 01 Oct 2007
Posts: 362
Location: Inner Space

PostPosted: Fri Jun 24, 2016 2:17 pm    Post subject: Reply with quote

yes i did run photorec now got some but not all files back. card is now newly formated and works fine. thank you all.
_________________
((O.o))
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum