BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/)
-   Linux Users Corner (http://www.blackberryforums.com/linux-users-corner/)
-   -   Corrupt files when BB8130 media card accessed via Linux, but not via MS Windows (http://www.blackberryforums.com/linux-users-corner/133930-corrupt-files-when-bb8130-media-card-accessed-via-linux-but-not-via-ms-windows.html)

alvin_a_garcia 06-07-2008 07:23 PM

Corrupt files when BB8130 media card accessed via Linux, but not via MS Windows
 
Hello,

When I try accessing the JPEG photos on the MicroSD card in my BlackBerry 8130 over USB by mounting it as a Mass Storage Device under Linux (Fedora 8), the JPEG files are corrupted. However, when I try accessing the same files on the same card using the Windows Explorer under Microsoft Windows XP, the JPEG files are fine.

Any suggestions to getting this working properly under Linux?

Thanks!

rivviepop 06-09-2008 12:24 PM

Well that's rather odd - you didn't mention, but do you have the SD card encryption turned on in the BlackBerry options?

If not, have you tried reformatting the SD card completely (from the device) to see if that fixes it?

alvin_a_garcia 06-09-2008 02:56 PM

Quote:

Originally Posted by rivviepop (Post 962500)
Well that's rather odd - you didn't mention, but do you have the SD card encryption turned on in the BlackBerry options?

If not, have you tried reformatting the SD card completely (from the device) to see if that fixes it?

Thanks for your response.

I do/did not have encryption on.

I have not yet tried reformatting the SD card completely. In fact, I never formatted it originally -- I just inserted it into my phone. I'll give this a try, but I wonder why I can properly access the files when the card is mounted as a Mass Storage Device under MS Windows, but not when it's mounted as a Mass Storage Device under Linux.

rivviepop 06-09-2008 03:12 PM

Quote:

Originally Posted by alvin_a_garcia (Post 962716)
I have not yet tried reformatting the SD card completely. In fact, I never formatted it originally -- I just inserted it into my phone. I'll give this a try, but I wonder why I can properly access the files when the card is mounted as a Mass Storage Device under MS Windows, but not when it's mounted as a Mass Storage Device under Linux.

Stranger things have happened. :) Back when I used the S60 (Nokia) devices this was a common problem, sometimes things would just get mangled on the SD card (and sometimes they'd be 100% fine). Usually the answer to the problem was one of two things:

1) reformat the SD card from the phone itself. Theory: mass formatting at a factory used some sort of non-standard method that was off a bit.

2) replace SD card. Theory: SD card is either a cheap knockoff/counterfeit and/or has non-spec electronics in it that barely work under Windows and maybe not other standards-compliant OSes (Mac, FreeBSD, etc.).

So just test #1 out, easy to do and quick to find out if it works...

alvin_a_garcia 06-09-2008 03:36 PM

Quote:

Originally Posted by rivviepop (Post 962745)
Stranger things have happened. :) Back when I used the S60 (Nokia) devices this was a common problem, sometimes things would just get mangled on the SD card (and sometimes they'd be 100% fine). Usually the answer to the problem was one of two things:

1) reformat the SD card from the phone itself. Theory: mass formatting at a factory used some sort of non-standard method that was off a bit.

2) replace SD card. Theory: SD card is either a cheap knockoff/counterfeit and/or has non-spec electronics in it that barely work under Windows and maybe not other standards-compliant OSes (Mac, FreeBSD, etc.).

So just test #1 out, easy to do and quick to find out if it works...

Thanks again for the suggestions.

I tried 1), but I still get the same thing: corrupt JPEG files when I try mounting the MicroSD card over USB under Linux.

Weird.

rivviepop 06-09-2008 05:37 PM

Quote:

Originally Posted by alvin_a_garcia (Post 962788)
Thanks again for the suggestions.

I tried 1), but I still get the same thing: corrupt JPEG files when I try mounting the MicroSD card over USB under Linux.

Weird.

As another debugging step/test, do you have an external card reader (that works under Linux, of course :) ) that you could try plugging the SD card into? The idea here is to localize further where the problem is - the physical card, or the connection to the device to the card. It'll at least help narrow in on the trouble spot...

alvin_a_garcia 06-10-2008 05:03 PM

Quote:

Originally Posted by rivviepop (Post 963066)
As another debugging step/test, do you have an external card reader (that works under Linux, of course :) ) that you could try plugging the SD card into? The idea here is to localize further where the problem is - the physical card, or the connection to the device to the card. It'll at least help narrow in on the trouble spot...

Thanks for the suggestion; I had actually thought about this after my previous posting. Well, I tried it, and yes, I am able to successfully read the JPEG photos on the MicroSD card if I mount it via a card reader. So, something is FUBAR with the USB connection, at least under Linux.

Hmmm ....

rivviepop 06-10-2008 08:42 PM

Quote:

Originally Posted by alvin_a_garcia (Post 965134)
Thanks for the suggestion; I had actually thought about this after my previous posting. Well, I tried it, and yes, I am able to successfully read the JPEG photos on the MicroSD card if I mount it via a card reader. So, something is FUBAR with the USB connection, at least under Linux.

Hmmm ....

Hmmm indeed - at least knowing where to start digging is half the battle. :) Alas, my device doesn't have the newer operating system like yours, but I don't think that's it - a little google-fu show that other people have the 8130 working, mainly with Ubuntu.

Just out of curiosity, have you tried swapping the cable, trying a different USB port, not using a USB hub, and other hardware switchups like that? Also there is a bug in F8 ("fixed" in F9) where the BB crashes/reboots when plugged into an external USB hub but works fine when plugged directly in to a machine.

One thing you could also look at - there's a module called 'berry_charge' that messes with the USB mass storage sometimes; you could try unloading that module (rmmod berry_charge), then locate it on disk and physically rename the file so it won't load when you plug in your 8130; it lives in /lib/modules/<kernel version>/kernel/drivers/usb/misc/berry_charge.ko physically. Then try plugging in your 8130 and see what happens...

alvin_a_garcia 06-10-2008 09:08 PM

Quote:

Originally Posted by rivviepop (Post 965476)
Hmmm indeed - at least knowing where to start digging is half the battle. :) Alas, my device doesn't have the newer operating system like yours, but I don't think that's it - a little google-fu show that other people have the 8130 working, mainly with Ubuntu.

Just out of curiosity, have you tried swapping the cable, trying a different USB port, not using a USB hub, and other hardware switchups like that? Also there is a bug in F8 ("fixed" in F9) where the BB crashes/reboots when plugged into an external USB hub but works fine when plugged directly in to a machine.

One thing you could also look at - there's a module called 'berry_charge' that messes with the USB mass storage sometimes; you could try unloading that module (rmmod berry_charge), then locate it on disk and physically rename the file so it won't load when you plug in your 8130; it lives in /lib/modules/<kernel version>/kernel/drivers/usb/misc/berry_charge.ko physically. Then try plugging in your 8130 and see what happens...

Hello,

Thanks very much again for your suggestions. I have tried the different things you've suggested: different USB ports, I don't have a USB hub, and I have berry_charge in my modprobe blacklist file so that this kernel module doesn't get loaded. I've also tried this on a different computer, which is using a much older linux distro (Scientific Linux 3(?), which is a respin of Red Hat Enterprise Linux 3), and with a different USB cable. Same thing there.

Very, very strange. If not for the fact that I can properly read over USB under MS Windows, I would think that my phone is somehow fubar.

Thanks again for all the suggestions.

alvin_a_garcia 06-14-2008 10:42 PM

I've run out of ideas here; This is pretty frustrating.

Can anybody who can properly mount and access the files on their BlackBerry's MicroSD card over USB under Linux let me know what "mount" options are being used? Also, can you tell me what BlackBerry OS version you're using. In particular, I'd be curious to hear from any 8130 owners. The problem doesn't appear to be distro-specific; I encountered the same problem using a much older Linux distro than the Fedora 8 distro I use on my primary-use computer.

Thanks!

Ashex 06-15-2008 03:06 AM

I'm using Kubuntu Hardy. These are the mount options used when it automounts:

Code:

/dev/sdf1 on /media/disk type vfat (rw,nosuid,nodev,noatime,uhelper=hal,flush,uid=1000,utf8,shortname=lower)
OS is 4.3.0.127 Sprint


Are there any other files you can test with? song perhaps? Also, copy the file out first before opening it via terminal, so just do cp /media/disk/pic.jpg ~/

alvin_a_garcia 06-15-2008 07:02 AM

Quote:

Originally Posted by Ashex (Post 971819)
I'm using Kubuntu Hardy. These are the mount options used when it automounts:

Code:

/dev/sdf1 on /media/disk type vfat (rw,nosuid,nodev,noatime,uhelper=hal,flush,uid=1000,utf8,shortname=lower)
OS is 4.3.0.127 Sprint


Are there any other files you can test with? song perhaps? Also, copy the file out first before opening it via terminal, so just do cp /media/disk/pic.jpg ~/

Thanks for your feedback. The same mount options (except UID, of course!) are used when my phone is automounted under Fedora 8.

It does not seem to matter whether I try loading the image file directly from the phone, or first copying it to disk.

I tried copying an mp3 from my computer to the phone. While the mp3 seemed to play fine, the md5 checksum on the file on the phone was different than the md5 checksum of the source file on disk. So it seems that there are errors both moving a file from the phone to my computer, and vice-versa.

My phone's OS is 4.3.0.97 (this is a Verizon Wireless phone), which is different from yours. I wonder if this is why you seem to have no problems with your phone, but I do?

Thanks for your suggestions.

Ashex 06-15-2008 09:59 AM

Quote:

Originally Posted by alvin_a_garcia (Post 971871)
My phone's OS is 4.3.0.97 (this is a Verizon Wireless phone), which is different from yours. I wonder if this is why you seem to have no problems with your phone, but I do?

Thanks for your suggestions.

I used to have some issues with copying files over a long time ago with my 8130 freezing up and crashing, but they stopped occuring. I was able to copy files over without any problems before I upgraded though. Is it possible the md5 changes because your file manager changes the modified date for some reason?

alvin_a_garcia 06-15-2008 10:55 AM

Quote:

Originally Posted by Ashex (Post 971989)
I used to have some issues with copying files over a long time ago with my 8130 freezing up and crashing, but they stopped occuring. I was able to copy files over without any problems before I upgraded though. Is it possible the md5 changes because your file manager changes the modified date for some reason?

Thanks very much for the information. Oh well, there goes my theory about the BB OS version.

My "file manager" ("cp -p") doesn't change the file modification date. Even if I did, however, I believe that the md5sum should be identical, as it's based on file content, not meta-data like the modification date. In fact, I just tested this by copying ("cp", without "-p") a file to another file: they have different modification dates, but the same md5 checksum.

Thanks!

Ashex 06-15-2008 02:37 PM

Gotcha. I actually just experienced the incomplete file issue and my blackberry froze up on me :/

alvin_a_garcia 06-23-2008 10:01 PM

Anyone else have any other ideas/suggestions?

Thanks.

iBerry8130 07-22-2008 02:38 AM

I too, am having this very same issue. Works fine under Windows, JPEG corruption under Linux. :?

I'm using Ubuntu Hardy with an 8130, OS 4.3.0.97 US Cellular.

Anyone have any new information to report?

rivviepop 07-22-2008 03:37 PM

I know this might be a long shot, but...

a) are you guys using the same brand/size of SD card?
b) have you tried using a different (brand, size) SD card?

I just wonder if it's something weird - hardware wise - with the 8130 and a specific SD card, it's maybe reporting odd behaviour to Linux.

mrn 07-28-2008 12:18 PM

Quote:

Originally Posted by alvin_a_garcia (Post 960348)
Hello,

When I try accessing the JPEG photos on the MicroSD card in my BlackBerry 8130 over USB by mounting it as a Mass Storage Device under Linux (Fedora 8), the JPEG files are corrupted. However, when I try accessing the same files on the same card using the Windows Explorer under Microsoft Windows XP, the JPEG files are fine.

Any suggestions to getting this working properly under Linux?

Thanks!

I have both a FC8 and FC9 and have no problem with the jpg files. In fact the filemanager automounts the device and I can browse the pictures. I have a 1GB microSD.

Have you tried with any other brand of microSD? asl have you tried to read the card directly in your computer through a card reader and not the BB?

Ashex 09-05-2008 01:28 AM

just wanted to give this a bump. I've more or less confirmed it is a kernel issue, this is what I did to test:

mounted blackberry, created symbolic link from the folder of pictures to one in my home folder.

Launched virtualbox, (I have my home folder mapped through to the windows vm)
Browsed to pictures, was able to see a few. I had thumbnail view on by accident, so after loading a few, I got a partial load then the phone rebooted twice (hard reboots).
After reconnecting phone, tried browsing again, but all pictures either didn't load, or were partial/corrupy.

This is in Kubuntu hardy 32-bit 2.6.24-21-generic


All times are GMT -5. The time now is 04:23 PM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.