Android 11 calamities

Support for Android version of Total Commander

Moderators: Hacker, Stefan2, white

Post Reply
georgeb
Junior Member
Junior Member
Posts: 33
Joined: 2021-04-30, 13:25 UTC

Android 11 calamities

Post by *georgeb »

Sorry for this kind of off-topic question but a gut-feeling tells me that in this forum I have the best chance to get some advice from Android power-users.

I have switched to a new phone running Android 11 as of recently that would allow me to further stay "in the game", at least kind of, before removable batteries and SD-cards would become completely extinct and users thereby - by obvious malicious intent - ultimately being coerced into paying for their "cloud-based personal espionage devices" even themselves. So I've settled for a somewhat exotic "Fairphone 4" for now despite of its substandard display.

Now after trying to port my trusty old apps to the new device I've run into seemingly serious difficulties.

Some of my favorite apps, like for instance the picture-gallery app "just pictures" seemed to install correctly but now refuse to start/run altogether by constantly popping up a message that the "application has stopped", needless to say without telling me why, and without ever opening any front-page with possible settings to tweak.

Others, like in particular 2 quite recent hex-editor/viewer-apps will open normally - but then cannot show a single file ANYWHERE, by either saying "access denied", even for the complete internal storage, or the other one showing all directories in the file-manager-dialogue correctly but then presenting every one of them as "empty" - even when this is by no means the case.

I have already read about the restriction for programs being unable to look into "foreign" directories and have already unblocked each of them in the "permission manager" - but to no avail.

TCAnd on the other hand, when initially restricted to access certain sub-trees, can handle that situation by offering to grant access by the user via some special screen. Unfortunately TCAnd gives no clue from what exact (Settings-?)-section/location that grant of permission can be accomplished.

Now if those less capable, more primitive other apps do not offer that internal unlocking-capability - is there, apart from the unhelpful permission-manager, any other Settings-region from where I could administer those access-rights actively in a system-wide manner? Some research via the Internet brought up the advice to set the access-permissions for those dirs/files in some kind of "file-sharing-manager" to "Everyone" - not unlike the NTFS-permission-settings. But I have no idea where to find such an equivalent in Android-11.

Any help would be appreciated and I once more apologize for the off-topic character of this post.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 43207
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Android 11 calamities

Post by *ghisler(Author) »

This is caused by Android changes meant to protect the user's data: Apps are not longer allowed to see all files, except for a few categories like file managers (including Total Commander), backup software etc.

Apps need to be updated to let the user choose a specific file or folder with a system dialog to give the app access to it. However, older "legacy" apps not updated to the latest Android functions should still work.

However, when a developer just changes the supported Android version in the app, but doesn't make the necessary changes, then the app can no longer access local files.

You can try getting an older version of the affected app from sites like apkmirror, because these older legacy apps should still be able to access files.
Author of Total Commander
https://www.ghisler.com
georgeb
Junior Member
Junior Member
Posts: 33
Joined: 2021-04-30, 13:25 UTC

Re: Android 11 calamities

Post by *georgeb »

ghisler(Author) wrote: 2022-05-12, 09:07 UTCHowever, when a developer just changes the supported Android version in the app, but doesn't make the necessary changes, then the app can no longer access local files.
Does that mean hundreds of mature apps at the end or past their development-cycle are now rendered defunct?

The mentioned Hex-editor for instance (one of them, "Windhex") is its latest version 0.4.34 from July 28th, 2020 and is rated for Android 4.1 and up.

Is there perhaps some kind of "shell" or "compatibility-mode" that would provide such a "system dialog" from outside and elevate the legacy-app in question to file-manager-status?

"Just Pictures", a very mature gallery-app, on the other hand, which is no longer developed because it could already do all that was needed, is from around 2015 (latest version 6.4) and therefore a "legacy application" par excellence. It cannot possibly falsely be internally rated for And_11 as that was not above the horizon in 2015. In spite of that it doesn't start up as such a "legacy app" at all and I don't see how an even older version thereof should run successfully.

But for gallery I have a newer app that works on And_11, so no big deal. On the other hand I have no more working Hex-Editor and inspection-tool at all. If anyone could name me a candidate that would work (and see files) with And_11 any such advice would be highly welcome.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 43207
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Android 11 calamities

Post by *ghisler(Author) »

Does that mean hundreds of mature apps at the end or past their development-cycle are now rendered defunct?
No it doesn't.
The mentioned Hex-editor for instance (one of them, "Windhex") is its latest version 0.4.34 from July 28th, 2020 and is rated for Android 4.1 and up.
The problem isn't the minimum Android version supported. The problem is the targeted Android version. In the manifest that would be the "targetSdkVersion". Apps which target Android 10 (API level 29) and want to use file system functions need to declare the requestLegacyExternalStorage flag in the manufest, otherwise they can't access the storage:
https://developer.android.com/about/versions/11/privacy/storage
On Android 12, even requestLegacyExternalStorage doesn't help any more, the apps must be adapted.

However, as I wrote before, Apps which target Android 9 and older can still access storage! You just can't put them in the Play Store any more because Google only accepts apps which target an Android version 2 years old or younger.

That's why I told you to look for an _older_ version of these apps. If they target Android 9 or older, they will have no problems accessing your files. You may have to enable file access manually in their settings, though. You can open the settings in the task switcher, in the menu of the app icon at the top.
Author of Total Commander
https://www.ghisler.com
georgeb
Junior Member
Junior Member
Posts: 33
Joined: 2021-04-30, 13:25 UTC

Re: Android 11 calamities

Post by *georgeb »

ghisler(Author) wrote: 2022-05-12, 14:57 UTCHowever, as I wrote before, Apps which target Android 9 and older can still access storage! You just can't put them in the Play Store any more because Google only accepts apps which target an Android version 2 years old or younger.
Well, seemingly things are more complicated. Said legacy gallery-app "Just Pictures", obviously no longer in Playstore, says in its manifest:

Code: Select all

Just Pictures:
 <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="7"/>
and won't run anyway in spite of being "legacy".

The Hex-Editor says:

Code: Select all

Windhex:
 <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="29"/>
 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
 android:requestLegacyExternalStorage="true">
 
cannot see or open any files in spite of seemingly declaring all those flags and statements needed.
ghisler(Author) wrote: 2022-05-12, 14:57 UTCYou may have to enable file access manually in their settings, though. You can open the settings in the task switcher, in the menu of the app icon at the top.
Not sure if I understand what you mean. When clicking on the square-symbol at the bottom of the UI and then navigate to the program in question and click-and-hold the icon at the top - all I get is "app info" and in there no special file-access can be declared.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 43207
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Android 11 calamities

Post by *ghisler(Author) »

android:targetSdkVersion="7"
That's far too old, it doesn't even request file system access as required on e.g. Android 9.
targetSdkVersion="29"
And that's too new, it either has to declare requestLegacyExternalStorage in the manifest, or you need to find a version which targets Sdk Version 28 or older.
Author of Total Commander
https://www.ghisler.com
georgeb
Junior Member
Junior Member
Posts: 33
Joined: 2021-04-30, 13:25 UTC

Re: Android 11 calamities

Post by *georgeb »

ghisler(Author) wrote: 2022-05-13, 10:12 UTC And that's too new, it either has to declare requestLegacyExternalStorage in the manifest, or you need to find a version which targets Sdk Version 28 or older.
Well, I thought it DID declare that request in its manifest, as cited above:

Code: Select all

android:requestLegacyExternalStorage="true"
Or did they use any wrong syntax?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 43207
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Android 11 calamities

Post by *ghisler(Author) »

Yes, it should work with android:requestLegacyExternalStorage="true" declared:
https://developer.android.com/about/versions/11/privacy/storage

Did you check in the app properties whether file system access is still enabled?

Also some apps have hard coded the location of the data to e.g. /sdcard or /storage/emulated/0, but it's not always one of these on all devices. If you can change the path in the affected app, you can check what Total Commander uses and go to the same location.
Author of Total Commander
https://www.ghisler.com
georgeb
Junior Member
Junior Member
Posts: 33
Joined: 2021-04-30, 13:25 UTC

Re: Android 11 calamities

Post by *georgeb »

ghisler(Author) wrote: 2022-05-15, 06:49 UTCDid you check in the app properties whether file system access is still enabled?
Things are getting weirder by each day I gain new information. So let me update you one by one:

First I had a chance to install that "way too old" (for legacy compatibility) mature gallery-application "Just Pictures" on an Android_10 tablet. And who would've thought - it is working flawlessly there! So it is certainly fair to say that Android_11 with its botched "legacy-compatibility" has rendered this once premium gallery-app defunct. All declarations needed to function properly in a compatibility-environment are certainly there b/c otherwise it couldn't run on Android_10 like a charm.

Now to the strange behavior of "Windhex", one of two of the very latest Hex-editors still on the Play-Store. As cited above that "requestLegacyExternalStorage=true"-flag has been properly declared. In spite of that this app can display all accessible directories, either on "/storage/emulated/0" or on external SD-card, but it won't show a single file - all directories are shown as empty with an "access denied" warning at he top of the empty list.

So what about the permissions-manager? It simply says "no permissions requested" - and furthermore that whole section is "greyed out" so no permissions can be granted manually by the user either. Now as I understood your initial remarks the setting of that LegacyExternalStorage-compatibility-flag should exempt that Sdk-29 targeted app from properly requesting all those permissions and make it run in compatibility mode. Well, seemingly it doesn't.

What is even more strange, the second fairly recent Hex-editor app still on Google Play, simply called "Hex Editor" by "First Row" with its latest Google-proclaimed-version of "2.8.3" will show 3 entries, "internal" (which in fact is root), "external" (which in fact is /storage/emulated/0) and a number (which in fact seems to be the SD-card), all of them with "access denied".

But it gets weirder than that! Deeply hidden within the web I've now found a newer version "2.8.5" of that app which Play-Store makes no mention of. I was of course suspicious of a hoax or malware and downloaded it with caution and had it undergo a thorough inspection - but all looked genuine. So I installed and it really turned out as an upgrade. So now, would it work, what would be different? First it offers a new option to hide the inaccessible directories - instead of making them accessible if and when the developer obviously must be aware of all those file-access-declaration-necessities.

If checked all that remains visible is "external" (which in fact is /storage/emulated/0) an this time you can really look into it and access and open files. But wait a minute! All files? No! Only .jpg's and the like are shown, most common files shown by TCAnd are still missing! -

A look into permissions-manager brings the answer. Allegedly no permissions are withheld but opening the section "files and media" will tell you "media only", no possibility to manually elevate that permission to "all files" again.

Conclusion: there must be some sinister Google-intervention on the march again! No developer in his right mind would - while obviously being well aware of all these requirements - voluntarily choose to restrict the "file-access" of his app to "media only" when the effort to grant it full file-access would be the same.

And this kind of user-obstruction is ridiculous, too! If I now intend to hex-edit any file all I have to do is to copy it by a file-manager with full access from anywhere to local usb-storage and rename it to .jpg. Now I can hex-edit it ad-lib and after saving the altered version simply rename it again to its proper extension and transfer it back to the original or desired location. So all there is is added inconvenience and obstruction but that is certainly no viable way to keep determined users, let alone malicious hackers, from doing what they intend to do!
Post Reply