Phone Crashing due to too many files/directories on SDCard - General Questions and Answers

Hello!
My Galaxy S9+ running Android 10 crashes whenever I insert my microsd card containing upwards of 9000 sub-directories and 92000 files. The SDCard is using 330GB out of 400GB.
Basically the way this happens is that I insert the sdcard and then a notification displays saying "Checking SanDisk SD card... Reviewing current content"
Obviously some kind of timeout is occurring when android attempts to scan the sdcard.
I have tried to disable the scanning a number of ways, making all the sub-directories hidden by prefixing them with a dot, putting a .nomedia file in every sub-directory and by not using any sub-directories and instead having all the files loose in the top level of the sdcard. This last "solution" actually works to stop the crashing but is unacceptable to me.
Basically my question boils down to this: Is there any way to disable android scanning the sdcard upon boot and when it is inserted ? I have rooted my phone so I could make modifications to the system to achieve this.
I simply want the sdcard to be usuable like on my linux desktop computer, I insert the sdcard, browse it with a file browser, and that's it. I don't want anything to happen by itself when it is inserted, no scanning, no indexing, nothing!
The MicroSD Card is formatted as exFAT

Assuming the external SD-card is FAT32-formatted, then this is true:
The maximum number of files within a directory of a FAT32 file system is 65,536 if all files have short filenames (8.3 format). Short filenames are stored in a single 32-Byte entry.
That means the maximum size of a direcotry (what by nature simply is a file) is 65,536 * 32 Bytes, i.e. 2,097,152 Bytes.

jwoegerbauer said:
Assuming the external SD-card is FAT32-formatted, then this is true:
The maximum number of files within a directory of a FAT32 file system is 65,536 if all files have short filenames (8.3 format). Short filenames are stored in a single 32-Byte entry.
That means the maximum size of a direcotry (what by nature simply is a file) is 65,536 * 32 Bytes, i.e. 2,097,152 Bytes.
Click to expand...
Click to collapse
Thank you for your reply,
I wish it were that simple. The SDCard is formatted as exfat and works perfectly fine under windows and linux.
The file system has nothing to do with the issue I don't think, it must be some issue with android.

Your phone should can handle exFAT-formatted SD-cards ( microSDXC cards ). At least so it's written it its specs.

jwoegerbauer said:
AFAIK exFAT is not supported on all ROMs.
Click to expand...
Click to collapse
It is on mine. The SDCard works perfectly fine with less subdirectories on it, the issue really is not the file system itself, I ran a logcat and this error always occurs
*** WATCHDOG KILLING SYSTEM PROCESS: Blocked in monitor com.android.server.StorageManagerService on foreground thread (android.fg)

I figured it out in the end, I had to format the sdcard as ext4 and then mount it from the command line with appropriate namespace and permissions

People still use SD cards?
Wow.

Related

Disappeared directories in SD card - what best way to recover?

Not sure if it is the same as Orbit2 file corruption problem. But mine consists of a few disappeared file directories - 3 directories all over 900MB. All the other smaller directories were unaffected. And the files should still be there as the space used and space left reported were the same as if the directories were there.
What would be the best tool to recover the directories and the files? Thought about using chkdsk, but I worry that it would just delete them. I have rescuePro bundled with SanDisk, but the files types were not listed in their compatible table.
Anyway to prevent this from happening again?
I used a program (for Windows) that recovered my hard disk from a total disaster. I deleted a partition and created another over it. It recovered everything.
Its name is [email protected] Partition Recovery. Connect you card reader with the card and check it.

[Tweak] Vold - NTFS support - v0.2

This patch allows mounting of NTFS volumes through vold (i.e the disk is automatically mounted when pluged into the device).
Mountpoint is:
/mnt/sdcard/usb<disk-number>-disk0
Known issues:
- NTFS volumes are mounted read-only, this has been explicitly added to the vold to prevent data loss or filesystem corruption until we know that the patch is stable.
Tested on FolioMod v1.3c
Installation:
copy zip file to your sdcard, rename to update.zip and flash using recovery.
vold-update-0.2.zip - this is the patch for vold containing ntfs support
vold-rollback.zip - rollback to default FolioMod 1.3 vold
source-0.2.zip - source code for updated vold
v0.1
- Initial release
- Ntfs support, multiple disks working
v0.1.1
- make sure that the mount point directory exists, create if necessary
v0.2
- multiple partitions are working
- fixed asec handling as discussed
- mount point directories are removed, when unmounting disk (if empty)
I know vold also handles sdcard + multiple usb stick is that part still included?
and the strange vold.fstab with wildcards? otherwise it will be hard to use for a toshiba rom, i think.
Yes this should all be still included, until now I had no issues with my sdcard.
What the patch does is try to mount everythin with FAT like before, if that fails, it tries NTFS.
The vold.fstab is still included, only change is what partitions should be mounted, this was 'all' before and has been changed to 'auto' (as the 'all' seems to be a toshiba addition)
Still need to figure out how to use this, hope to get a new disk on Monday, so I can test that.
weeds2000 said:
The vold.fstab is still included, only change is what partitions should be mounted, this was 'all' before and has been changed to 'auto' (as the 'all' seems to be a toshiba addition)
Click to expand...
Click to collapse
Could that also help recognizing some strange formatted SD cards? E.g. I have a digicam (Panasonic) that modifies the FAT32 somehow that the folio tells me the card is defective (but still works perfectly fine in Windows or the Digicam)?
I doubt it, as nothing has changed for sdcard.
But as this vold is compiled with additional debug output you may as well trry to use it. Maybe the output will give some more information on what is going wrong.
But I guess this is because your cam actually uses the "secure" part in your Secure Digital Memory Card. See http://en.wikipedia.org/wiki/Secure_Digital#DRM_features for more info on that.
Very interesting! Thank you !!
Tested with FolioTNT 4.0a and 2 usb sticks (16 and 8 gigs) and working perfectly on both
Great job
Is write supported already or is only for read?
Can large files be read?!?! (i mean no laggy?)
Thanks
Great job, thank you very much Mr. Weeds!
OK partition support is somehow working now, but not really a solution I like to release.
Looks like vold was not intended to handle that.
The main reason for this post is, that the handling of /mnt/asec and /mnt/asec_secure is somewhat bad (again vold was not intended to even handle multiple external storage devices at the same time)
Just to make sure anyone know what that is: Apps2SD stores the packages in that folder.
At the moment vold will create (and mount) an asec container for every storage device attached to the folio. So if I insall an app (or move it manually) with SDCard inserted it will use the asec dir of the SDCard. If I install an app without SDCard it will use the asset directory of the internal storage.
The problem is it seems I cannot change on the fly between those two directories. If I unmount SDCard /mnt/asec does not contain the package if put there. So I need to take out the SDCard and reboot the device.
Fixing this behaviour would be quite simple. The question rather is where to put it?
Internal storage or SDCard?
The same question goes for what should be the default SDCard (i.e. the one mounted under /sdcard, the one where apps download their resources). Internal Storage or external SDCard.
The one thing I can think of is creating a selection setting within the settings app where I can select which device should be mounted as primary SDCard.
If that is switched the systrem may copy contens from asec to the new device.
So the layout of /mnt may look like that
/mnt/sdcard (linked to /sdcard) - the primary sdcard device as selected by the user (defaults to internal storage)
/mnt/sdcard2 - well, the other one (either internal or sdcard depending on what the first device is)
/mnt/usb-storage/usb<disk-number>-disk<partition-number> - hdd's mounted over USB
Just waiting for anyone to come up wither other/better ideas...
weeds2000 said:
Fixing this behaviour would be quite simple. The question rather is where to put it?
Internal storage or SDCard?
The same question goes for what should be the default SDCard (i.e. the one mounted under /sdcard, the one where apps download their resources). Internal Storage or external SDCard.
Just waiting for anyone to come up wither other/better ideas...
Click to expand...
Click to collapse
proper behaviour would be internal storage for apps.. as its not nice that the apps you install disappear if you remove the sdcard or usbsticks.
i noticed this problem early on..but no one mentioned it as a problem.
do you see why the .android_secure mountpoint does not happen?
i think somehow this relate to the problem of downloading paid apps.
If this is OK for everyone, then this would be a much simpler approach, so /sdcard and /mnt/sdcard always point to internal storage.
If someone needs more storage (i.e. for downloaded resources) we may simply create a tool wich does some linking (e.g. link /sdcard/gameloft to /sdcard2/gameloft)
The mount point for asec_secure exists as well, 2 times with the same issues as asec. I don't know if this is related to paid apps. According to the logs I get a 403 response from the google servers.
Is there any specific reason, why SDCard is put under /sdcard/sdvcard-disk0?
I'd like to move that to /mnt/sdcard where usb-storage will go as well.
Using that approach it might be unessesary to unmount the external storage when a USB-connection is made.
weeds2000 said:
Is there any specific reason, why SDCard is put under /sdcard/sdvcard-disk0?
I'd like to move that to /mnt/sdcard where usb-storage will go as well.
Using that approach it might be unessesary to unmount the external storage when a USB-connection is made.
Click to expand...
Click to collapse
normally its a good reason.. the Toshiba filemanager looks at a location where all users got access..
no regular user would look into a /mnt/sdcard2 unless the toshiba pointed to the location.
so /mnt/sdcard offers both internal storage + sdcard + usbstick here which i think works well and all users easily find it as its within the sdcard default location.
i dont think that logic should change..
updated to 0.2 write support is still disabled.
As I always used NTFS-3G I cannot tell if the driver implementation is reliable and complete. However I think it is, as my knowledge from incomplete write support is 3 or 4 years old...
From weeds2000:
"This patch allows mounting of NTFS volumes through vold (i.e the disk is automatically mounted when pluged into the device)...."
------------------
This patch was tested by me on FolioMod v1.3c.
It readed well one HD NTFS, and recognized all of SD cards that were not recognized before.
Many thanks.
weeds2000 said:
updated to 0.2 write support is still disabled.
As I always used NTFS-3G I cannot tell if the driver implementation is reliable and complete. However I think it is, as my knowledge from incomplete write support is 3 or 4 years old...
Click to expand...
Click to collapse
do you consider this ok to be included in a new update?
I of course let you approve if its ok for regular use..
denver-tempor said:
From weeds2000:
"This patch allows mounting of NTFS volumes through vold (i.e the disk is automatically mounted when pluged into the device)...."
------------------
This patch was tested by me on FolioMod v1.3c.
It readed well one HD NTFS, and recognized all of SD cards that were not recognized before.
Many thanks.
Click to expand...
Click to collapse
You have NTFS formatted SD Cards? Or FAT cards which weren't recognized before?
Nemo0815 said:
You have NTFS formatted SD Cards? Or FAT cards which weren't recognized before?
Click to expand...
Click to collapse
I have some SD cards (several trades and capacities) FAT formatted that weren't recognised before applying this patch. Now, they are.
Also, I tested a 2.5 USB HD, NTFS, and it was readed without problems.
weeds2000 said:
As I always used NTFS-3G I cannot tell if the driver implementation is reliable and complete. However I think it is, as my knowledge from incomplete write support is 3 or 4 years old...
Click to expand...
Click to collapse
OK, so I was wrong, this is from the kernel documentation on NTFS Write support.
This enables the partial, but safe, write support in the NTFS driver.
The only supported operation is overwriting existing files, without
changing the file length. No file or directory creation, deletion or
renaming is possible. Note only non-resident files can be written to
so you may find that some very small files (<500 bytes or so) cannot
be written to.
While we cannot guarantee that it will not damage any data, we have
so far not received a single report where the driver would have
damaged someones data so we assume it is perfectly safe to use.
Click to expand...
Click to collapse
So it looks like ntfs-3g is the way to go, this will take some time however.
@dexter
I played around with various disks today, watched a movie, etc... Seems like everything is OK, so I would consider 0.2 be a candidate for regular use.
I will include this in the next update..
You seem to have many downloads, but not really any complaints
that should tell us something.

Failed to write to sdcard1 after ota kitkat

Has any one else lost the ability to write to their socketed sdcard since the 4.4.2?
thesavo said:
Has any one else lost the ability to write to their socketed sdcard since the 4.4.2?
Click to expand...
Click to collapse
Thats a "feature" of kitkat. Can't be changed unless you have root.
Seriously?
Yes, see here for fix(if your rooted):
https://play.google.com/store/apps/details?id=nextapp.sdfix
thesavo said:
Seriously?
Click to expand...
Click to collapse
It's a security issue. Before KK, the SD card was wide open to any other process to be able to request read/write to any directory and file, regardless of whether or not they created that file or directory.
Now, under KK, a program can create a file or folder in a "protected" area and only that program has the ability to modify the contents in that folder. It cannot modify other folders or files that it didn't create.
Time to move the podcasts. So my older shows that I worked hard to keep to keep the ext sdcard1 as a target, will have to be copied to sdcard0.too bad.thanks @iBolski
No wonder BeyondPod kept 'accidently' putting shows on SDcard0 for the last year. Even though I "pinned" it to SDcard1 in the advanced settings.
Even with the application that patches the /etc/permissions/platform.xml, I have found certain apps still do not work correctly. Dolphin Browser, for example, cannot switch to /storage/sdcard1. It keeps saying it can't find it and I need to ensure I don't have "USB Mode" enabled, which I don't even have as an option when connected to a PC.
I also have init.d installed on my machine and I had startup scripts that mounted various directories from my external to the internal SD card to "fool" the device so that apps that wouldn't save to the external but the internal would save across a mount. Well, that no longer works. For example, Amazon MP3 will not save downloaded music anywhere except to the internal sd card. I had my startup scripts mount an amazonmp3 directory on my external SD card to the internal amazonmp3 directory on the internal memory card. When I proceeded to download music, it didn't show up in the external directory. However, I noticed that the internal sd card's memory did decrease. I then unmounted the directory and saw that the Amazon MP3 app was ignoring the mount under KitKat and directory saved the files into the /storage/sdcard0/amazonmp3 directory, even though it was mounted to the directory on the external SD card. It did work under JB and ICS, but apparently, with KitKat, some apps will still write directly to the native directory on the internal SD card, ignoring the fact that I've mounted a different directory to it.
The stock Moto camera will write to the external SD card if you go and change the setting for it. However, the Google Camera does not give you any option to store your pictures anywhere except on the internal SD card memory. :crying:
Remember, apps can write to the external card, if you don't apply the "patch", but only to what is considered a protected are (the /storage/sdcard1/Android directory structure) and then, they can only write to a directory that the app created. They can read other directories, but they cannot modify them.
iBolski said:
It's a security issue. Before KK, the SD card was wide open to any other process to be able to request read/write to any directory and file, regardless of whether or not they created that file or directory.
Now, under KK, a program can create a file or folder in a "protected" area and only that program has the ability to modify the contents in that folder. It cannot modify other folders or files that it didn't create.
Click to expand...
Click to collapse
That's official explanation (bull****) as you described above with non stock camera. Basically KK made external storage almost useless. I found this nice description quite long time ago.
https://plus.google.com/+TodLiebeck/posts/gjnmuaDM8sn
Zeljko1234 said:
That's official explanation (bull****) as you described above with non stock camera. Basically KK made external storage almost useless. I found this nice description quite long time ago.
https://plus.google.com/+TodLiebeck/posts/gjnmuaDM8sn
Click to expand...
Click to collapse
I know at this point, Root Explorer still works with it, after setting the correct permissions into the /etc/permissions/platform.xml file. That works for a lot of apps. The only one that I know that is currently broken is Dolphin browser. I cannot navigate to the /storage/sdcard1/ area anymore. It keeps telling me it can't find the file or directrory and that I should make sure the SD card is ready and USB Mass Storage (haven't seen this option since my Droid X2) is not on.
So definitely, Dolphin Browser is doing something differently that even the patch isn't working for it.
Problem is that without root user cannot edit platform.xml and even after that some applications refuse to write to sd card. Another example is OfficeSuite 7 Pro which I bought and now cannot edit file if it's needed. Workaround is to save to internal then overwrite to sd card.
Basically stock Android becoming more and more limited, harder and harder to get root... That's so bad that I wouldn't update to official kk in the case that my phone has locked bootloader.
Read this article http://www.xda-developers.com/andro...use-even-more-issues-for-root-app-developers/

How to set up SD Card as Internal Storage?

I've been all day trying to get a Micro SD installed on my T-Mobile Samsung Galaxy Go5 so I can move apps onto it. After bricking an old SD 32 GB card and buying a new 64 GB card I started searching for help here. I found information that said the card has to be formatted as 'Internal Storage.' This post described the process (the process that worked toward the bottom).
I'd been trying to figure out how to install the Android SDK on my Windows PC without downloading Android Studio in order to get the adb shell mentioned in that post set up. I found this post and this post on the stackoverflow forum, but just wasn't able to figure it all out. But it looks like I need the Java SE Development Kit 10 installed.
I was able to set up USB debugging on the phone though.
Can anyone help me out here and describe just what must be done to achieve all this?
Thanks for any feedback on this
Not really able to help but i read many people advise against using SD card as internal storage. Most regular SD cards r not fast enough or durable enough to last more than a few months. Just sharing
sautom said:
Not really able to help but i read many people advise against using SD card as internal storage. Most regular SD cards r not fast enough or durable enough to last more than a few months. Just sharing
Click to expand...
Click to collapse
I think you're right about that. I've installed programs on USB sticks that can be quite sluggish. Then again I've had a number of system maintenance utilities on flash drives for years that aren't and still perform fine. Then they don't get used for hours on a day to day basis.
I moved a number of apps on my old Galaxy Ace to a micro sd card though, most used was the Poweramp music player that's always performed well.
And I've got the card now, so I may as well try to get it set as internal and just see how it performs over time. Thanks for you feedback sautom.
TakuSkan said:
I've been all day trying to get a Micro SD installed on my T-Mobile Samsung Galaxy Go5 so I can move apps onto it. After bricking an old SD 32 GB card and buying a new 64 GB card I started searching for help here. I found information that said the card has to be formatted as 'Internal Storage.' This post described the process (the process that worked toward the bottom).
I'd been trying to figure out how to install the Android SDK on my Windows PC without downloading Android Studio in order to get the adb shell mentioned in that post set up. I found this post and this post on the stackoverflow forum, but just wasn't able to figure it all out. But it looks like I need the Java SE Development Kit 10 installed.
I was able to set up USB debugging on the phone though.
Can anyone help me out here and describe just what must be done to achieve all this?
Thanks for any feedback on this
Click to expand...
Click to collapse
If you have lollipop or newer Android version, you should be able to use the "Adoptable storage" option.
Also, if performance is important to you, then you won't like this option, using sdcard as internal is slower, the only "gain" in using this is the system has more storage to use. There is no gain on performance, you actually lose there.
I don't recommend using sdcard as internal storage though. There are way too many issues that come along with using this kind of modification. A lot of times, the sdcard gets corrupted, then the real issues start when you try to fix it, usually, the device won't function properly, the data on the sdcard gets lost/corrupted, just to name a couple of the many possible issues. It isn't exactly "easy" to fix this when it happens, depending on what goes wrong, sometimes it can't be fixed.
Sent from my LGL84VL using Tapatalk
Droidriven said:
If you have lollipop or newer Android version, you should be able to use the "Adoptable storage" option.
Click to expand...
Click to collapse
I've read quite a bit on this and "adoptable storage" now, and agree that trying to use an expansion SD card as internal memory to run apps is a bad idea Droidriven. I still have a little over 1 GB left on the tiny built in 8GB internal SD Card memory, and have most of what I want installed.
I'm pretty green when it comes to Android, coming from many years with Windows and a tad with Linux. I see that with v6.0.1 Marshmallow, the OS began setting up a system directory tree on the 64 GB SD card when I installed it, and I'm able to set data folders there for apps like the camera. That'll be good for storing large camera videos and other media files.
One thing I haven't figured out yet though is whether or not there's any setting on a non-rooted phone like this Go5 that will allow me to transfer files directly into the 'Android' folder on the internal 8 GB card from Windows. I'm able to connect the two via USB or FTP and write files from Windows to folders on the 8 GB card like 'Download'. But I can't copy any files from Windows over to any of the writable apps folders in the 'Android' folder. I've resorted to copying them 1st to 'Download' from Windows, and then using a file manager in Android to copy files over to the 'Android' folder. I'm not used to such rigid file/folder permissions.
Does this sound like an issue that will require rooting? It'd make life a lot easier if that weren't the case. I'd think if I can write files to that 'Android' folder from within Android, I ought to be able to do the same remotely somehow.
Thoughts?
TakuSkan said:
I've read quite a bit on this and "adoptable storage" now, and agree that trying to use an expansion SD card as internal memory to run apps is a bad idea Droidriven. I still have a little over 1 GB left on the tiny built in 8GB internal SD Card memory, and have most of what I want installed.
I'm pretty green when it comes to Android, coming from many years with Windows and a tad with Linux. I see that with v6.0.1 Marshmallow, the OS began setting up a system directory tree on the 64 GB SD card when I installed it, and I'm able to set data folders there for apps like the camera. That'll be good for storing large camera videos and other media files.
One thing I haven't figured out yet though is whether or not there's any setting on a non-rooted phone like this Go5 that will allow me to transfer files directly into the 'Android' folder on the internal 8 GB card from Windows. I'm able to connect the two via USB or FTP and write files from Windows to folders on the 8 GB card like 'Download'. But I can't copy any files from Windows over to any of the writable apps folders in the 'Android' folder. I've resorted to copying them 1st to 'Download' from Windows, and then using a file manager in Android to copy files over to the 'Android' folder. I'm not used to such rigid file/folder permissions.
Does this sound like an issue that will require rooting? It'd make life a lot easier if that weren't the case. I'd think if I can write files to that 'Android' folder from within Android, I ought to be able to do the same remotely somehow.
Thoughts?
Click to expand...
Click to collapse
I always just use the ES File Explorer app, it lets me move whatever I want to/from Android folder.
Sent from my LGL84VL using Tapatalk
Droidriven said:
I always just use the ES File Explorer app, it lets me move whatever I want to/from Android folder.
Click to expand...
Click to collapse
Yes, from within Android. I'm using the free open source Amaze file manager that I can do that with. But I can't connect the Android phone to a Windows PC and be able to copy files from Windows to the Android folder on the phone. Just to Download, and maybe DCIM and the root of the internal 8 GB SD memory.
Can ES File Explorer access shared folders on a Windows PC? Amaze sets up an FTP server, but I don't see where it can access files on a Windows system.
EDIT: Seems it can: How to Access Shared Windows Folders on Android, iPad, and iPhone
TakuSkan said:
Yes, from within Android. I'm using the free open source Amaze file manager that I can do that with. But I can't connect the Android phone to a Windows PC and be able to copy files from Windows to the Android folder on the phone. Just to Download, and maybe DICM and the root of the internal 8 GB SD memory.
Click to expand...
Click to collapse
You should be able to do this with just Windows. Are you sure that you have your USB options set correctly? It should be set to MTP(file transfer).
When you connect the device to PC, you should see a USB icon in the status bar on the device, pull down notification panel, it should have a notification that takes you to your USB options.
Or, when you connect the device, you might get a pop-up menu on your device that has settings for USB options.
It varies from one device to another and one android version to another.
Do you have USB debugging enabled in developer options?
Also, if you do some reading about everything that the ES File Explorer app can do, you'll see that it can be used to transfer files to/from PC via more than a few options, including wirelessly/remotely.
It has several things it can do and different ways to connect when connecting/connected to other devices, including smart TV and others. It can also be used as a server or even be used to create a hotspot.
Sent from my LGL84VL using Tapatalk
Droidriven said:
You should be able to do this with just Windows. Are you sure that you have your USB options set correctly? It should be set to MTP(file transfer).
Click to expand...
Click to collapse
Yes Droidriven. I have set USB debugging and USB is set as MTP. I just discovered that Amaze does connect to Windows like ES File Explorer by running it's cloud search function. So far Amaze has done everything I've been told to use ESFE for. But Amaze is very light. I just used Amaze to copy a file over from a shared Windows folder to that Android folder on the phone.
I have Total Commander on the Windows system, but when I use it to navigate to an apps subfolder of Android on the phone, it can't see any of the files or folders that I can access with Amaze from within the phone.
So I'm half way there Just need to figure out how to get Windows to see and write files on this Go5 now.
TakuSkan said:
Yes Droidriven. I have set USB debugging and USB is set as MTP. I just discovered that Amaze does connect to Windows like ES File Explorer by running it's cloud search function. So far Amaze has done everything I've been told to use ESFE for. But Amaze is very light. I just used Amaze to copy a file over from a shared Windows folder to that Android folder on the phone.
I have Total Commander on the Windows system, but when I use it to navigate to an apps subfolder of Android on the phone, it can't see any of the files or folders that I can access with Amaze from within the phone.
So I'm half way there Just need to figure out how to get Windows to see and write files on this Go5 now.
Click to expand...
Click to collapse
I don't know where you're having issues, all I have ever done is just connect my device to Windows via USB then use the native Windows Explorer file manager to transfer to/from internal/external to PC/device. I've never had to do anything special or use any extra software on the device or PC to achieve this, plus, I've done this on different Windows systems.
Sent from my LGL84VL using Tapatalk
Droidriven said:
I don't know where you're having issues, all I have ever done is just connect my device to Windows via USB then use the native Windows Explorer file manager to transfer to/from internal/external to PC/device. I've never had to do anything special or use any extra software on the device or PC to achieve this, plus, I've done this on different Windows systems.
Sent from my LGL84VL using Tapatalk
Click to expand...
Click to collapse
I think it may be because this was a T-Mobile phone and that they may have disabled some functions like "adoptable storage" which doesn't seem to be present, as well as maybe setting permissions to prevent access to certain system folders.
I've even found that I have to change the extensions of some files like ini files to txt before I can drag and drop from Windows Explorer via a USB connection to just a few folders on Android.
It is a bit nutz. Rooting would probably solve the problem. But I'm not ready to go there yet. There may be an answer for getting the Windows > Android file viewing and writing yet. But at least for the moment I can copy both ways with the Amaze File Manager.
Okay, I'm back to considering formatting this 64 GB SD Card as internal storage. I would really like to record video to it, and with the internal memory limited to 1 GB that's left of the total of 8 GB from the factory, that's just not going to make it.
I got the Android SDK and 'adb shell' working on my PC, and started researching how to run commands that would target just the SD Card, and not the existing memory. The command 'sm list-disks' returns: disk:179,32
Is that the phone's internal memory, the SD Card's memory, or perhaps all memory on the phone? When I run the command 'sm list-volumes' I get:
private mounted null
public:179,33 mounted 38C4-18FE
emulated mounted null
I know 38C4-18FE is listed on the phone as being my added SD Card. So I'm hesitant to run the command I see people using to format their SD Cards: 'sm partition disk:179,33' I've wiped the wrong drives by mistake before using Windows diskpart when I didn't specify the right drive/volume. Can anyone clear that up for me?
I'm still hesitant to do this as it seems the phone will automatically begin to use the entire contents of the SD Card as space to run its OS. Might there be commands that would specifically alot the space on the card for writing data, and not for apps that would write and rewrite data there? Something I could create a folder in and point video recording apps to?
Android 6.0.1 Marshmallow
TakuSkan said:
Okay, I'm back to considering formatting this 64 GB SD Card as internal storage. I would really like to record video to it, and with the internal memory limited to 1 GB that's left of the total of 8 GB from the factory, that's just not going to make it.
I got the Android SDK and 'adb shell' working on my PC, and started researching how to run commands that would target just the SD Card, and not the existing memory. The command 'sm list-disks' returns: disk:179,32
Is that the phone's internal memory, the SD Card's memory, or perhaps all memory on the phone? When I run the command 'sm list-volumes' I get:
private mounted null
public:179,33 mounted 38C4-18FE
emulated mounted null
I know 38C4-18FE is listed on the phone as being my added SD Card. So I'm hesitant to run the command I see people using to format their SD Cards: 'sm partition disk:179,33' I've wiped the wrong drives by mistake before using Windows diskpart when I didn't specify the right drive/volume. Can anyone clear that up for me?
I'm still hesitant to do this as it seems the phone will automatically begin to use the entire contents of the SD Card as space to run its OS. Might there be commands that would specifically alot the space on the card for writing data, and not for apps that would write and rewrite data there? Something I could create a folder in and point video recording apps to?
Android 6.0.1 Marshmallow
Click to expand...
Click to collapse
It's possible to partition the external sdcard so that it has separate partitions with one of those partitions devoted to internal storage and the other for whatever you want. I'm not versed in specific tools and methods to do it, there are many.
Sent from my LGL84VL using Tapatalk
Droidriven said:
It's possible to partition the external sdcard so that it has separate partitions with one of those partitions devoted to internal storage and the other for whatever you want. I'm not versed in specific tools and methods to do it, there are many.
Sent from my LGL84VL using Tapatalk
Click to expand...
Click to collapse
I'm happy with dedicating the entire memory in my sd card to adoptable storage space. I just want to know if adb is returning the right designation of my added sd card memory, and not the default internal memory.
Does the command 'sm list-disks' run from an adb shell that returns this for me: disk:179,32 mean that 179,32 is the designation that represents the sd memory card I added? Or if I try to use adb to partition 179,32 as adoptive memory, will I be formatting the default internal memory? What would be an adb command to return the designation of the small 8 GB default internal memory of my phone?
TakuSkan said:
I'm happy with dedicating the entire memory in my sd card to adoptable storage space. I just want to know if adb is returning the right designation of my added sd card memory, and not the default internal memory.
Does the command 'sm list-disks' run from an adb shell that returns this for me: disk:179,32 mean that 179,32 is the designation that represents the sd memory card I added? Or if I try to use adb to partition 179,32 as adoptive memory, will I be formatting the default internal memory? What would be an adb command to return the designation of the small 8 GB default internal memory of my phone?
Click to expand...
Click to collapse
Have you tried running the command without the external sdcard inserted? That will tell you the designation of your internal because internal is all it will see, then insert the external sdcard, then you can run the command to see what the designation for the external is. Once you setup Adoptable Storage, there will be no difference in designation, the OS will see your internal and your external as one complete storage space, it sees external as if it were internal and identifies/labels it as such for all intents and purposes.
Sent from my LGL84VL using Tapatalk
Droidriven said:
Have you tried running the xommand without the external sdcard inserted? That will tell you the designation of your internal because internal is all it will see, then insert the external sdcard, then you can run the command to see what the designation for the external is. Once you setup Adoptable Storage, there will be no difference in designation, the OS will see your internal and your external as one complete storage space, it sees external as if it were internal and identifies/labels it as such for all intents and purposes.
Sent from my LGL84VL using Tapatalk
Click to expand...
Click to collapse
That is exactly the information I've been after Droidriven. That sounds like the perfect way to differentiate default internal memory from an SD addon. I read where after formatting/partitioning the sd card, installed apps will stay on the internal memory unless you opt for an ill advised process of moving them to the new space where they probably won't perform well.
How will the OS see the added sd memory after formatted as adoptable storage? My concern is that since this a cheap flash memory sd card, I don't want the OS to start writing and rewriting to this sluggish, slow flash memory card and just wear the thing down. Is there any way to specify the added memory as being data storage only? I only want the extra memory for writing video from the phone to a space large enough to hold multiple files
TakuSkan said:
I read where after formatting/partitioning the sd cardm installed apps will stay on the internal memory unless you opt for an ill advised process of moving them to the new space where they probably won't perform well.
Click to expand...
Click to collapse
That's right.
TakuSkan said:
How will the OS see the added sd memory after formatted as adoptable storage?
Click to expand...
Click to collapse
As far as I know, it will see all one space with no way to "store here instead of there" that I know of. The OS uses the entire space as it sees fit.
TakuSkan said:
My concern is that since this a cheap flash memory sd card, I don't want the OS to start writing and rewriting to this sluggish, slow flash memory card and just wear the thing down.
Click to expand...
Click to collapse
That is exactly what it will do, this is the common cause of sdcard formatted as internal getting burned out, they aren't meant to do all that writing/rewriting/overwriting/deleting constantly. Frequent activity kills it in the end, hence, my original post warning against the downsides to using external as internal. Once external is incorporated into internal, if the external gets corrupted, the OS won't boot or operate, potentially making a terrible mess to get the device recovered but not the external sdcard, it's toast at that point, along with everything that was stored on it, in some cases, the device can't be recovered either, due to lack of software support or publicly available downloadable firmware.
TakuSkan said:
Is there any way to specify the added memory as being data storage only? I only want the extra memory for writing video from the phone to a space large enough to hold multiple files
Click to expand...
Click to collapse
It might be possible somehow, but it probably requires root and some other apps that use root to make the needed modifications to direct data where you want it stored. I'm not sure it's possible though because, as I said previously, the OS sees internal and external as one complete partition, with no way to "see" a difference between them because they no longer have differing disk designations.
In my honest opinion(based on my exposure and experience with various devices that have used this as an option and the issues they have had along the way), using external as internal is too risky and shouldn't be used. Oddly, Adoptable Storage works better on devices that have better hardware and plenty of internal storage than it does on lower end devices with limited hardware and limited storage, the lower, limited devices are typically the ones that end up having issues. I know, this seems counter-intuitive since the better devices don't need the extra internal storage and the lower devices do need the extra internal storage, but we both know that flash memory is very unreliable for continuous write/delete/rewrite and is doomed to fail.
Could you possibly consider some kind of OTG storage, wireless USB drive or some kind of "cloud" storage or FTP setup?
You should be able to direct your downloads, your pics and your recordings to the folder of your choice when downloaded/created instead of having to move them after. I'm not certain you need to do this just to be able to use your external to store data.
Sent from my LGL84VL using Tapatalk

[Q] broken filesystem on sdcard

Hello
I'm looking for some help on repairing a broken filesystem on a sdcard. There is a popular issue with the Redmi Note 8T that is corrupting the filesystem when copying a lot of files to the sdcard. Technical details and questions below.
The sdcard is a 128GB Sandisk Extereme card. It's encrypted (used as Adoptable Storage), the phone has still the decryption key, so when I insert the card it shows files and directories. Before the crash there was around 100GB of data on the sdcard. Now it has only 2,8GB of used storage (for most of the time - explenation below).
I've made a dd copy of the card and copied it to a larger 256GB card and a 512GB pendrive. Both starages connected to the phone (over usb, microcard reader) are giving the same result - the files and directories are decrypted, but the filesystem is corrupted. When I insert the sdcard into the phone and check the capacity, it shows that there is -6126312313/128GB of used space. After couple of minutes, the number changes to ~100GB/128GB or to 2,8GB/128GB (which is 95% of times).
Actually only one directory is corrupted the "Camera" directory. This one had previously around 95GB of pictures. When entering over MTP protocol and trieng to open this directory, it show's an error releted with bad directory size, entering over adb shell allows to enter it, but it's empty. Over adb it also shows that its size is 120KB. But there aren't any files inside the directory.
The phone of course isn't rooted and the bootloader is locked. Android 10 on board.
I'm looking for help, or any kind of idea on how to access the images in the Camera direcotry - and couple of questions below.
1. Is there any way to fsck over adb without root?
2. Can I access the decryption key on the phone? And decrypt the partitions on linux?
3. Can the sdcard be decrypted? And if yes - will it delete the decryption key after that?
4. Can I make a dd/binary copy of the card over adb and save it (looking for a way to fsck the filesystem on linux, but for that I need a full decrypted copy of the card)?
5. Is there a known app that could repair a broken filesystem?
6. Can the phone be rooted without loosing the decryption key? The phone doesn't need to be functional after that. If accesing the directory means breaking the phone - I'll go for it.
7. Any other ideas are very welcome, will give a try on anything.
And a final one - are there any other places on the internet (except xda) where I could ask for help which I'm not aware off?
Thanks!

Categories

Resources