Encrypted portable microSD card in Settings; apps can't read it. Help? - HTC U11 Questions & Answers

Not sure if many of you are aware, but the U11 allows you to encrypt portable microSD cards in the settings, which is nice for privacy purposes. The problem is since I did that (I even rebooted after) many of my apps can't properly read or write to the microSD card. I've noticed many of said apps don't implement Google's expandable storage permissions properly either (i.e. they don't ask you to select the root directory of the microSD card in Android File Explorer so they have proper read-write access to everything.)
My questions, therefore, are:
What am I doing wrong? Is there some permission I'm missing?
Are 3rd party apps supposed to be able to work with encrypted portable storage?
Is encrypted portable storage even an AOSP feature? Or something specific to 3rd party OEMs?
Why do so many apps not implement microSD storage read/write permissions correctly?
Any ideas?

Related

[I9505G] MicroSD app compatibility

UPDATE: Google's API changes to KitKat means the following, as per Google:
An application may request broad read-oonly permissions for external storage. This means that the application will be able to read the MicroSD only.
Applications cannot obtain permission to write to external storage. This means that file managers cannot edit/create/delete files on MicroSD anymore. This is a casualty of a change meant for security.
With or without requested permission for external storage, an application may now modify conents of its assigned folder on external storage (IE, /android/data). This allows an application to offload content to external storage if the storage is considered "permanent," Ie, MicroSD is considered permanent while OTG is not.
The benefits to this change means that applications required less tweaking to offload their data to external storage. We saw this with the recent Google Music update (and I'm loving that). Even now, it seems updates to recent Google applications are preparing to utilize this functionality. Google's camera.apk has taken up residence on my MicroSD so I suspect that a future update will allow you to store to external storage.
The downsides are that file managers cannot make use of MicroSD anymore, aside from reading the contents. Consider it collateral damage.
-reserved-
Titanium backup. Requires external SD permissions.xml fix to be able to store there.
Sent from my GT-I9505G using Tapatalk
ES doesn't work. If you delete a folder, it will show as deleted. Exit and come back, and the folder remains. Cannot edit or create a folder (in MicroSD).
Bump. OP now has full explanation of what's going on.
jaykresge said:
UPDATE: Google's API changes to KitKat means the following, as per Google:
An application may request broad read-oonly permissions for external storage. This means that the application will be able to read the MicroSD only.
Applications cannot obtain permission to write to external storage. This means that file managers cannot edit/create/delete files on MicroSD anymore. This is a casualty of a change meant for security.
With or without requested permission for external storage, an application may now modify conents of its assigned folder on external storage (IE, /android/data). This allows an application to offload content to external storage if the storage is considered "permanent," Ie, MicroSD is considered permanent while OTG is not.
The benefits to this change means that applications required less tweaking to offload their data to external storage. We saw this with the recent Google Music update (and I'm loving that). Even now, it seems updates to recent Google applications are preparing to utilize this functionality. Google's camera.apk has taken up residence on my MicroSD so I suspect that a future update will allow you to store to external storage.
The downsides are that file managers cannot make use of MicroSD anymore, aside from reading the contents. Consider it collateral damage.
Click to expand...
Click to collapse
Reading from Android Developer new API changes tha way you read and write from External Sd card... but if your app has WRITE_EXTERNAL_STORAGE permission it should be able to write your ext sd card without problems.
This means that current apps (and File Managers) should be updated to support kitkat API level 9 and obtain WRITE_EXTERNAL_STORAGE permission.
public static final String WRITE_EXTERNAL_STORAGE
Added in API level 4
Allows an application to write to external storage.
Note: If both your minSdkVersion and targetSdkVersion values are set to 3 or lower, the system implicitly grants your app this permission. If you don't need this permission, be sure your targetSdkVersion is 4 or higher.
Starting in API level 19, this permission is not required to read/write files in your application-specific directories returned by getExternalFilesDir(String) and getExternalCacheDir().
Constant Value: "android.permission.WRITE_EXTERNAL_STORAGE"
API level 19 is kitkat code....

SSH server on Android N (no root) with write access to the SD card

I want to mount all of my phone's storage read/write with ssfs, but I haven't yet found an SSH server able to do that properly. SimpleSSHD came closest, but it doesn't get write access to /storage/148C-40DE, which is my removable SD card. Also, it doesn't support setting the file attributes and date/time, which is annoying (all files I copy to the phone will have the current date/time).
It's not the protocol, because I've also tried the open source Primitive FTPD app, and it had the same problem. So back to SSH, I've tried a bunch of other free and paid apps from Play, and all had the same problem with the external SD Card, except for WiFi FTP Server, which was able to write on folders in the external SD card, but the connection kept breaking to the point of being unusable, but it did show that it's possible for a server app to offer write access to the SD card without root.
So is there a current solution to run an SSH server on Android Nougat with write access to the external SD card? The guides I've found were very old (2011).
Nothing?
I'm looking for the same thing, since I really want wireless file syncing with my microSD card, but NFS/SMB is out due to not being rooted.
This is the best one I've seen so far -- https://forum.xda-developers.com/android/apps-games/app-ssh-sftp-server-terminal-interface-t3740091 -- https://play.google.com/store/apps/details?id=net.xnano.android.sshserver
It can write to the SD card. But it does have some odd issues -- file modification times aren't kept, and mounting from windows causes an error if you have more than one root per user (workaround: I just created a user for the internal memory root and one for the SD card). But the modification time is a big problem. I haven't found any SSH server on Android that keeps modification times, where openSSH out the box does it on Linux.
In the reviews for this app someone mentioned a better app that's not on the playstore, but I couldn't find one like that.
I'm surprised no one has really gotten wireless sharing on Android working well yet (and frankly, I'm surprised it just isn't support by Android directly on the correct port numbers.

SD card mirror / symlink (like ts-bind, but w/o Magisk)

Hi.
This general question has been asked a several times and has a several different and (mostly) acceptable answers, but I have a separate requirement I'd like to address. As far as I can tell, the closest tool to what I need is the ts-bind Magisk module, but since it requires the SD card to be present at boot it will not work for me.
Here's my scenario:
I've added an SD card to my device, and I'd like to use it as "Adoptable storage". However, I can't do that directly since I'd like to be able to manipulate the driver (in this case, specifically to manually suspend the device when it's not being used). ts-bind allows you to unbind the storage via a terminal, which is what I would need, but as my device is only loaded after boot that specific module will not work.
What I'm after is a way to emulate Adoptable storage via a script / symlink, but I need to be able to control it over the command line. The catch is that the mirrored drive needs to stick around, as the "source" folder is effectively unmounted when it's suspended until it's accessed again.
Ideally there would be a way to create a "replica" of the storage device (again, like symlink) and the use that with the built-in adoptable storage function.
Is there some kind of combination of symlinks / swapping apps or anything you can think of that might accomplish the above?
Cheers,
Rafael

How to manage the limited internal memory of a smartphone with whatsapp

Hi, I have an old Redmi6A phone (Lineage OS 17.1) that only has 8GB of internal memory. This is very little if you use Whatsapp. Of course I added a 32Gb SD card, but with whatsapp I have trouble saving my photos on the card. What are the possible workarounds?
1- Is there a difference depending on whether you set the SD card as portable storage or internal storage?
2 - My phone is rooted. I've looked for practical solutions including magisk, but no module matches.
3 - Beyond whatsapp, what should I do: is there an app that allows other apps to be installed on the external media? Is this a good idea? Is it better to limit the storage of data on the SD card to avoid the crash of these "deported" apps?
Just an advice or two would make me happy...
If Android device allows to make external SD-card part of internal storage memory ( keyword: Adoptable Storage ) then you are good. Check it.
I believe that my android device allows me to do this. The French translation does not use the words adoptable storage "stockage adoptable" but the 1st drawing seems to match.
What I have read on the subject indicates that the reading and access time to the data on the external card is much longer than on the internal memory. How does android arbitrate what it stores on the internal or external memory? Can the user control this?
I assume and hope that the most crucial apps are on the internal memory
It's on you how much of the SD-card's storage memory ( in % ) you'll add to internal memory: 1,2,...,100.
Yes, reading / writing to device's "portable memory" basically takes longer. So with regards to file transfer speeds, choosing the right memory card is crucial. Look here:
The best SD cards for 2023: top memory cards for your camera
We've tested and ranked all of the best SD cards you can buy
www.techradar.com
Android by default uses device's internal memory. The least app's allow to store their data on external SD-card: this is set by app's developer.
I tested the 2 options; first the adoptable storage but for some reason it didn't work; I mean the operation was correctly done but the 32Gb was not added to my internal memory; just a few hundred Mb more. I repeated the operation 3 times to rule out the possibility of an isolated incident.
So I was forced to reformat the SD card as external memory. Everything went well. But now I'm back to the original situation.
My search led me to 2 apps (Link2SD and App2SD) to override the restriction to move to the SD card. Those apps don't seem to be really used anymore: their peak corresponds to the 2015-2016 versions of Android (Marschmallow and Nougat) and are quite complex to handle since you have to format the external SD card in several partitions to be able to consider moving anything.
What do you think about this type of solution?
As @xXx yYy already said:
The least app's allow to store their data on external SD-card: this is set by app's developer.
Click to expand...
Click to collapse
Thus forget the named 3rd-party-tools that claim they can.
BTW: look inside here
Whatsapp folder in Android: Here's where to find it
WhatsApp folder with all media files in Android can be found on new location if you are on Android 11. Learn here where to find it.
mobileinternist.com
Napafroi said:
I tested the 2 options; first the adoptable storage but for some reason it didn't work; I mean the operation was correctly done but the 32Gb was not added to my internal memory; just a few hundred Mb more. I repeated the operation 3 times to rule out the possibility of an isolated incident.
So I was forced to reformat the SD card as external memory. Everything went well. But now I'm back to the original situation
Click to expand...
Click to collapse
After an external memory got converted to portable memory it's Android what automatically moves data from internal memory to portable memory as long as they moveable to gain internal memory space. Thus the few 100MB you reported.
You always can configure the amount of portable memory indeed to be used by Android's Storage Manager ( SM ) using ADB.
Well, I think I'm getting used to this adoptable storage which is really confusing since the size doesn't take into account the extra 32Gb (in the storage manager and also in solid explorer).
I don't know if it's a bug but sd maid and its memory analysis function allows me to check that telegram, osmand (including downloadable maps) and vivaldi browser will install directly on the adaptable storage. That's all I ask.
It's still surprising not to be able to view the content of the SD card; maybe it's a bug like others have experienced like on this thread
I wanted to experiment a nandroid backup on MicroSD adopted-storage with TWRP which was refused.
xXx yYy said:
You always can configure the amount of portable memory indeed to be used by Android's Storage Manager ( SM ) using ADB.
Click to expand...
Click to collapse
So I understand better the interest to calibrate the portion of adoptable storage...
Screenshot no. 5 shows 2.7 GB of the portable memory ( real capacity 31 GB ) are used.
To get the whole portable memory as internal memory used using ADB try this
Code:
adb shell
sm list-disks -> This cmd returns id of SD-card e.g. 179:160
sm partition disk:179:160 private -> Here you use the id of SD-card
where the numbers are the Android's name of your disk.
I just did this.
Reboot but it didn't change anything. Maybe the card is defective...
EDIT : oh wait, yesterday I inserted this same micro SDcard in an old samsung galaxy tab4 with the "same" custom rom (LineageOS 17.10) as adoptable storage. The 32Gb capacity was not added to internal memory as well. Maybe this rom is buggy for managing adoptable storage.
Sorry for my english
The ( meanwhile outdated ) Lineage OS 17.1 - a Lineage OS 17.10 probably doesn't exist - is based on Android 10 and can "Adoptable Storage" as you initially confirmed.
IMO you are probably doing things wrong
"migrate data" is the 2nd necessary step after 1st step "adoptable-storage" is created. It will ( try to ) move all apps from phone into SD-card ( if app is moveable ), means all new installed apps will directly get installed into SD-card as long as android:installLocation="auto" is defined in app's AndroidManifest.xml.
When 100% disk space got adopted you can't see your SD-card any longer, the only way to check disk usage is from Android's cmd line running df -h /mnt/expand/* ( if Android is rooted consider 3rd party apps like Link2SD instead ).

"Force allow apps on external" not working on Motorola G Power 2021

So I recently ran out of storage on my Motorola G Power 2021, so I bought a micro SD to move some of my less-used but not quite expendable apps. Originally I'd planned to format as internal storage, but my phone doesn't appear to allow this and doesn't even show the option to do so. So I opted for the next best thing, migrating some of the app data over by going to Apps & notifications > All Apps > (app) > Storage & cache, but there's no option to move the app to the external storage device. As per the title, I also turned "Force allow apps on external" in developer settings to no avail. Could Motorola be blocking this too? I've done a little searching, and I can't seem to find any examples of this other than this one which was on a completely different phone brand and this one which seems to have been caused by misunderstanding and resolved.
What I've tried:
Restarting phone - didn't help
Checking other apps - checked about a dozen and none had the move to external storage option
Rooting - can't unlock bootloader as per Motorola's website
Does anyone have any idea what could be causing this, if I can work around it, or even if I can somehow format as internal storage? Any help would be greatly appreciated.
Installing apps over to the microSD card isn't supported by all apps. In fact, many don’t support this feature at all. Some manufacturers - namely, Samsung and LG - reviously allowed users to format microSD cards as internal storage. That meant apps and games would be installed there by default. Sadly, this feature is no longer present on newer devices.
Technically, it’s still possible to install apps on the microSD if you’re willing to go through the trouble of rooting your Android phone and afterwareds use Link2SD to move the apps from internal storage to exernal storage.
xXx yYy said:
Installing apps over to the microSD card isn't supported by all apps. In fact, many don’t support this feature at all. Some manufacturers - namely, Samsung and LG - reviously allowed users to format microSD cards as internal storage. That meant apps and games would be installed there by default. Sadly, this feature is no longer present on newer devices.
Technically, it’s still possible to install apps on the microSD if you’re willing to go through the trouble of rooting your Android phone and afterwareds use Link2SD to move the apps from internal storage to exernal storage.
Click to expand...
Click to collapse
I thought the purpose of "Force allow apps on external" was to be able to transfer any app regardless of the developers' wishes. Is this not the case?
you already gave the answer yourself
Wrig9 said:
Originally I'd planned to format as internal storage, but my phone doesn't appear to allow this and doesn't even show the option to do so.
Click to expand...
Click to collapse
alecxs said:
you already gave the answer yourself
Click to expand...
Click to collapse
Does it have to be formatted as internal storage to be allowed to transfer apps? I guess I didn't really think about that.
Edit: Just to be sure we're all on the same page, the SD card is formatted, just not as part of the internal storage. I can access any files on it, but I can't put any apps there. I was under the impression that if you formatted as internal storage the SD card would act as a direct expansion somehow and automatically install data there once the integrated storage filled.
I haven't tested that specific option but afaik it overrides android:installLocation="preferExternal" in app manifest. that would allow to move the apk to Adoptable Storage, but requires MicroSD Card formatted as internal.
Only new apps are installed external automatically (based on that setting), for existing apps the "Migrate Data" option is offered.

Categories

Resources