External SDHC card not (quite) recognised?

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Almond
Junior Member
Junior Member
Posts: 5
Joined: 2016-04-13, 11:27 UTC
Location: Aix-la-Chapelle, Earth

External SDHC card not (quite) recognised?

Post by *Almond »

Hey,
I have this issue with TC that it won't write to the "external" SD card (/storage/sdcard1) despite the necessary root permissions in place (per /system/etc/permissions/platform.xml). After adding those permissions, most other programs can now simply write to the SD card without asking any further credentials, but not so TC.
The device (Xperia L, C2105 taoshan) is rooted and running CyanogenMod 12.1 (Android 5.1.1).
When TC tries to write to the SD card (downloading a file from my PC via TC's FTP plugin, in case it matters), it still says that it's "Write protected!" although "Root functions everywhere" is checked.
It subsequently calls Androids root access dialogue (the one where I'm supposed to "Select" the root dir of the SD card to grant access) which lists the SD card as "SDHC", so I tap that and then "Select".
TC then claims that I chose the wrong directory.. but I did not?
I've tried selecting /storage/sdcard1 or /ext_card instead, to no avail.
Any ideas?

PS: The device's internal memory is repartitioned (to increase the capacity available to the root mounts, though that never caused any trouble and I don't think it does now).

PS2: Same thing happens when trying to copy any file from the internal memory to the SD card, so the issue isn't FTP-related at all. - Also, rebooting doesn't help, neither does enabling/disabling USB debug mode.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC does not use root functions to write to external SD card on Android 5.x. There are official non-root functions available to write to the card. But you need to pick the SD card from a special Android dialog to give TC write access.
Author of Total Commander
https://www.ghisler.com
Almond
Junior Member
Junior Member
Posts: 5
Joined: 2016-04-13, 11:27 UTC
Location: Aix-la-Chapelle, Earth

Post by *Almond »

I know, that's what I was referring to in my question and what didn't work. I did select the external SD card from that dialogue, yet TC just assumed that I picked the wrong one.. which I did not. There only are two options and the SD card is simply listed as "SDHC". It's the correct entry, of that I'm sure. - (I wanted to post a screenshot of that "Open from" screen here but I'm not yet allowed to.)
Almond
Junior Member
Junior Member
Posts: 5
Joined: 2016-04-13, 11:27 UTC
Location: Aix-la-Chapelle, Earth

Post by *Almond »

This:
Image: http://www.pixhoster.info/f/2016-04/aa68e8270ba12960d2a45bd51b1394af.png

leads to this:
Image: http://www.pixhoster.info/f/2016-04/847627f74030b03857f1dede0fc273b0.png

I'm at a loss there. Is there anything more I can do, permissions, mounts, whatever, to get this to snap into the right places?

PS: Could this, for example, have anything to do with the file system used for the SD card or in which way the data was handled when it was first copied/moved to the card. - More than half of the apps installed on the device are on that card too, so I'd have to move them to the internal memory (there's not enough room for that either way) and then move some of the other stuff somewhere else (I can access most of it via USB), then format the card. Definitely something I'd rather avoid to do.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC makes a test write to the card you pick this way. Unfortunately I can't see the path of the disk since you are on FTP. Can you try to rename a file on the external card, and post a screenshot, please?
Author of Total Commander
https://www.ghisler.com
Almond
Junior Member
Junior Member
Posts: 5
Joined: 2016-04-13, 11:27 UTC
Location: Aix-la-Chapelle, Earth

Post by *Almond »

It's exactly the same thing when I try to rename a file. The same messages, the same 'Open from' dialogue, and TC telling me that I picked the wrong folder (Cancel or Retry?). They are all just the same generic messages, so I'm not sure which one I should take a screenshot of.

When I tap Cancel, it just says "Rename failed!" and the directory I'm in at the time (/storage/sdcard1/, if that's what you were referring to). There's an 'OK' button that, when tapped, causes the same message to appear again (but not a third time).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, this should work just fine, the path looks normal. Did you really click on the button at the bottom in this dialog?
http://www.pixhoster.info/f/2016-04/aa68e8270ba12960d2a45bd51b1394af.png

To do this, you need to close this white "hamburger menu", then you should see a list of files and folders on the card. Make sure to go to the root of the card, then tap on the button at the bottom.

It's also possible that your device has the volume label bug: In early versions of Android 5, SD-Cards and USB drives which didn't have a volume name (volume label) couldn't be accessed with this write method. But Android 5.1 shouldn't have this problem any more...
Author of Total Commander
https://www.ghisler.com
tag
Junior Member
Junior Member
Posts: 61
Joined: 2014-12-11, 11:03 UTC

Post by *tag »

Yesterday I cleared data and cache from "Medienspeicher" (should be something like "media storage" in english) and rebooted my Moto X Play Android 6.0. That helped when I needed to see the files via USB and MTP, but since that time I have the same problem! The camera, which is a slightly modified version additionaly installed to the original Motorola Camera to have the "Lady bug menu", has the same problem. It can't store photos on the SD card and crashes when trying. I'm not sure if some structure on my SD card needs to be repaired after this action. Will check the next days.

Almond, did you do something similar?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Android 6 works differently! Instead of trying to write to the write-protected folders under "storage", add the card yourself by tapping on the line with the blue icon, "User-defined location".
Author of Total Commander
https://www.ghisler.com
Almond
Junior Member
Junior Member
Posts: 5
Joined: 2016-04-13, 11:27 UTC
Location: Aix-la-Chapelle, Earth

Post by *Almond »

This is now solved for me.
I'm still not sure what the actual cause was but I updated Cyanogenmod (with the latest nightly snapshot 20160424) and now Total Commander has access to the SD card just as it should be - deleting, copying, moving and renaming files works fine. (I suppose that CM really hadn't quite fixed the volume label issue or maybe even a completely separate issue.)
ghisler(Author) wrote:Did you really..
Yea. It did say 'Select "SDHC"' at the bottom of that screen, no subdirectory or anything like that. There's practically no way I could have been selecting the wrong thing. (After updating Cyanogenmod, I didn't even have to do this again, so the access grant still stuck from before.)
tag wrote:I cleared data and cache from "Medienspeicher" ..
Almond, did you do something similar?
I did clear data and cache from certain (system) apps in the past, namely the Download Manager, Downloads, Google Play services, Google Services Framework and Package installer (when I had some issues with apps not installing correctly) but that's about it.
I don't think I ever touched the Medienspeicher (Media Storage) or the Camera in that respect.
I use Open Camera and it indeed failed to save to the SD card. It caused an error message to appear and quickly disappear which stated: "The file system is read-only. Try to mount the file system as read-write before attempting the operation." This seems to be a message specific to Cyanogenmod though, so that probably doesn't help you either, sorry.
I wasn't sure what I was supposed to do with the message anyway. (nor how I'd go about mounting the card any differently (other than remounting it, looking at the /proc dirs and vold.fstab).
ghisler(Author) wrote:the volume label bug .. Android 5.1 shouldn't have
Well.. I'm not sure Cyanogenmod doesn't just obscure any information about the Android version it's built on, but it claims to be 5.1.1 so that's what I assumed to be correct to its fullest extent.
IF in fact it was still affected by the volume label bug then it's gone now (even though it's still just the same Android version).
Before that, I unsuccessfully tried to rename the card via USB and ADB, and checking it for errors in Windows didn't have any effect either. I had to reinstall the drivers entirely, so they should have been OK (but obviously something is still wrong with the connection, separate issue I guess). I managed to rename the volume on the card only by directly accessing it with a card reader (it didn't help to get back write access on the phone though).

Hmm..
Thank you for your help, you kind of pointed me into the right directions. :wink:
I guess I could just have updated CM in the first place instead of jumping all around it. (Noch Fragen?)
tag
Junior Member
Junior Member
Posts: 61
Joined: 2014-12-11, 11:03 UTC

Post by *tag »

As addition the solution for my problem: Yesterday I found out my SD card is broken. It is seen as write protected. Also in my Mac using a card reader! The computer reports the structures are broken (cluster crosd over in two files) and repair would be needed, but it would be impossible to partition or format. Or repair.

Interestingly, the not working sd card had some side effects. Like, twrp not starting at all.
Post Reply