disable android 11 APP_DATA_DIRECTORY_ISOLATION system wide (breaks app2sd linking) - Android Software/Hacking General [Developers Only]

yes, (dead brained) android developers again broken the file-system access....
as lot of users that have an old device, I use app2sd app to move my app to sdcard (because adoptable storage is a sh..t, that don´t even care about partitioning a sdcard to still allow to use it to store data that I want to access from a pc when the phone has problems... again, theses "clever" google engineer didn't even asked themselves why user created app2sd like app... why they chosen to use dedicated partition and still allow to have a shareable storage... ) , my sdcard speed is fast enough to not see any difference between internal storage and sd card stored app, and I worry more about emmc aging than a few ms....
BUT, seems that the APP_DATA_DIRECTORY_ISOLATION feature prevent moving the data to sdcard, I use lineageos, in developper settings there is override per application compatibility, when I uncheck APP_DATA_DIRECTORY_ISOLATION in this for a particular app linked to sdcard, this solve the issue, and a sd card stored app can be used...
however, this settings isn't persistent... so on next reboot I have to do it again for every app linked to sdcard....
and you know what? it was reported to android dev, that replied... to buy a new phone!!! because emmc storage is much more faster.... I begin to really get upset at android, they took a nice system (linux) and made it s....t, and more, how many cpu power is lost by android checks (since it can be desactivated on the fly per app... this isn't something that rely on kernel....)
so my question, is it possible to have this option set to off by default on boot? how?
thanks

jl forums said:
yes, (dead brained) android developers again broken the file-system access....
as lot of users that have an old device, I use app2sd app to move my app to sdcard (because adoptable storage is a sh..t, that don´t even care about partitioning a sdcard to still allow to use it to store data that I want to access from a pc when the phone has problems... again, theses "clever" google engineer didn't even asked themselves why user created app2sd like app... why they chosen to use dedicated partition and still allow to have a shareable storage... ) , my sdcard speed is fast enough to not see any difference between internal storage and sd card stored app, and I worry more about emmc aging than a few ms....
BUT, seems that the APP_DATA_DIRECTORY_ISOLATION feature prevent moving the data to sdcard, I use lineageos, in developper settings there is override per application compatibility, when I uncheck APP_DATA_DIRECTORY_ISOLATION in this for a particular app linked to sdcard, this solve the issue, and a sd card stored app can be used...
however, this settings isn't persistent... so on next reboot I have to do it again for every app linked to sdcard....
and you know what? it was reported to android dev, that replied... to buy a new phone!!! because emmc storage is much more faster.... I begin to really get upset at android, they took a nice system (linux) and made it s....t, and more, how many cpu power is lost by android checks (since it can be desactivated on the fly per app... this isn't something that rely on kernel....)
so my question, is it possible to have this option set to off by default on boot? how?
thanks
Click to expand...
Click to collapse
Note: Questions go in Q&A Forum
If you are posting a Question Thread post it in the Q&A forum. Technical discussion of Android development and hacking. No noobs, please. Device-specific releases should go under the appropriate device forum...
forum.xda-developers.com

Related

[Q] Why does no Mod Rom or Custom ROM allow official ext4 external?

Dear All,
I have a simple question to open a discussion here. We all know that modern android phones are having the ability to understand ext4 (and if my research is right - the internal storage in most Android 4.x phones is formatted in ext4). Why is dev or mod build like Cyanogenmod or even a OEM like Xiaomi which develops MIUI not removing emulated sdcard functionality (optionally) and instead allow users choose to reformat their actual sd to ext4 when inserted (and mark that as internal SD - to allow standard App2sd)? Thereby enabling secure app + media storage a reality? And in the same way as Internal Storage, I think we can use MTP to read the external storage (ext4) when connected to PCs.
Furthermore, we can have a setting to warn the users about this compatibility change (that once they take up/choose this method)- they will not be able to read cards in normal way when connected directly via card reader to Windows PCs because of no direct ext4 support in Windows.
Additionally, can't we at least have this as an advanced or developer only setting, if we want novice users to not mess with the functionality?
Do you all agree? Or am I having a over-simplified understanding of making such a change?
Lastly, given an option, I would definitely choose such a change at the cost of compatibility rather than paying tons of extra money for higher internal flash storage
Nobody wants to answer this? We have so many experts here - I am really surprised to see no replies

[Completed] [Mod] Maximizing relocating internal data to external SD, LG Optimus Fuel L34C KitKat

Can you please help a noob figure out where this post belongs?
I make no pretense to being a developer, and I was very hesitant to join XDA, but these are questions concerning modding which I have not found answers to, despite posting to a number of other Android forums, so I was forced to "raise my sights."
I have an LG Optimus Fuel L34C (KitKat). I am an Android noob but I have a history with Linux, so I know just enough about what goes on behind the KitKat curtain to make me dangerous. So yes, I also care about the journey. And I'm already heavily invested in this quest, so despite my lack of expertise, I'm willing to do the leg work to make it happen.
My one saving grace is I have a backup fetish. And I want to continue to make Nandroid backups even when the L34C's puny internal storage (1790 MB usable) is maxed out (or nearly so). But I don't want to resort to backups to the cloud because 1) it offends my inner geek that I have to rely on someone else for backup support, and 2) as a delusional paranoid, the concept of "the cloud" gives me the willies.
I'm using TWRP Manager (Root) for Nandroid backups now, but TWRP only can write to the internal SD. Which means that once internal storage is about half full, there's no longer enough space remaining for any more Nandroids. And a bare bones installation with just enough additional apps installed to perform the Nandroid already takes up about 700 MB. So there's no chance of any further Nandroid backups after downloading or installing just two or three hundred more MB.
So my primary goal is to be able to write Nandroid backups to the external SD card (or, pipe dream, to write them to USB). If this also allows me to install apps or store other (internal) data on the external card, so much the better.
I just bought a second L34C because the WiFi on the original L34C pooped the bed. So now I have a new and unmodded L34C to experiment on. I had (towel) rooted the old phone, write-enabled the external SD card and installed the TeamWin open recovery image v2.8. And I replaced the OE 4GB external SD card with a 16GB class 4 card, partitioned half in Fat32 and half in Ext3.
The primary obstacle was that I could never get the second partition on the 16GB card to mount, which prevented me even from experimenting with symlinks. I also installed the latest version of Link2SD, but when I tried to use it to move an app that Link2SD labeled as movable, I got this:
!Failure
App2SD is not supported by your device. Because your device has a primary external storage which is emulated from the internal storage. You can link the app in order to move its files to the SD card.
Click to expand...
Click to collapse
Dunno why it's blaming Apps2SD unless Link2 is built around Apps2.
Curiously, I installed Aparted, too, and it was able to access (and process) the 2nd partition, even though it wasn't mounted. I've not heard this definitively but I'm led to believe this is down to the L34C's lack of support for init.d. So I downloaded a copy of daishi4u's custom boot image, which includes support for init.d, but the old phone crapped out before I could try it.
So with background in place, and a spanking new L34C in hand, on to the questions.
#1. With the current state of L34C/KitKat development, is what I'm asking even possible? Once the internal SD card has got too crowded for a Nandroid, is there a solution that will allow me to continue making local Nandroid backups? In particular, I'm thinking there might be another Nandroid backup app that I am unaware of that can write its backups to some location other than the internal SD card.
If this already has been accomplished (and is documented online), please just point me to the details and I'll get out of your hair.
2. I picked daishi4u's custom boot image because the reputation of daishi4u's work is known to me, and because it offered init.d support. If you think another boot image is preferable, please enlighten me.
3. Is Link2SD's problem with the L34C truly the emulated storage? I ask because I know developers typically code apps to make a best guess as to the cause of an error, but despite their best efforts, an app still is liable to be exposed to unanticipated conditions, resulting in a problem that might be beyond the scope of their programming to understand and enunciate.
4. Is the lack of init.d support in fact what prevents an L34C mounting additional partitions on the external SD card? Or am I barking up the wrong tree?
5.a. I found a post in another forum that was near three years old stating that the extra partition on an Android external SD card must be no more than 2GB, and preferably just 1GB. If this ever was true, is it still the case for KitKat? And what is the source of the limitation?
5.b. If there is a 2GB partition limit, is there a limit to how many 2GB partitions can be externally mounted? A Nandroid backup of a heavily configured L34C could take up most of 2GB, so it would be especially useful work-around if there were one (additional) partition for the Nandroid and a second (or third, or fourth, ...) for moving apps and random data off the internal SD.
6. Which app(s) would you suggest I try for moving apps/data/folders to the external SD? There are so many available, and I have not been able to find any comparisons/contrasts of their relative merits, so I would appreciate your recommendations to avoid having to resort to the 'shotgun' approach. This is presuming I'm able to get more than one partition on the external SD card to mount.
I've not lost sight of the fact that some of these apps do not require a second partition on the SD card (creating something functionally akin to an iSCSI partition on it?), but I'm not counting on finding a solution in one of them.
Thank you for taking the time to read my long-winded post.
Well personally I don't keep more than one nandroid on my phone but what you may wish to do is transfer them to your pc for safe keeping and not have to worry about it. You could also try inserting your sd card into your pc and manually transferring the nandroids from your pc to your sd card afterwards. It may work.
Now with regards to the sd card write protection issue, I could not locate anything for your device in particular but if you register you can ask your question here and someone may be able to help you.

[Completed] Marshmallow 6.0.1 & Moving Apps to other storage -Possible? How?

I have a rooted XT912V Verizon Motorola Razr-Maxx (original).
This phone has safestrap 2.75. Recently updated to CM13. It has pico gapps and a core set of the typical Google apps we all LIKE vs the ones we dont
Anyways....
Developers mode is enabled. I am able to go into memory and storage (or APPS), and can move a few of the apps, but not many. The phone only has 2GB main storage, and every app downloaded from the store INSISTS on installing on this 2GB space. Its very irritating. The phone also has 8GB of internal storage space, non removable.
With that said, I have a few questions.
1.) Why can't I format the internal fixed 8GB as proprietary internal storage vs portable? There seems to be NO WAY to do this. (rather preposterous).
2.) Why do only some apps have the option to be moved and others dont? Is it a "System App" setting which disallows this? Can it be overwritten?
3.) Given the issues, why cant I change the memory space the phone uses for RAM to at least the built in 8GB? Can I partition the XD card (removable) and set it as part internal part portable?
Shame on Google for getting so sloppy with their software. Things like disk management and storage space, log file backups, and clean up should come and the first feature after providing an OS. Granted I am using CM, but I digress - its no better on stock on any of my other devices.
Thanks for any help you can provide. I googled, and searched on threads here. I'm really not looking to be pointed to a thread for an app that requires busybox and other hoops to be jumped through. I'm looking for information on why it is like this, is it being fixed, or is "fixing" it to make it MORE like this. Can I do this manually via adb? I'm not a linux novice but I have a lot to learn about Android and loading more apps on the phone from what I've read so far is unclear if it will work and continue to work. Some people have said in threads they move it manually after each app they load. I don't mind that, but I want to understand what makes an app declare itself as NON movable.
Thank you
noybman said:
I have a rooted XT912V Verizon Motorola Razr-Maxx (original).
This phone has safestrap 2.75. Recently updated to CM13. It has pico gapps and a core set of the typical Google apps we all LIKE vs the ones we dont
Anyways....
Developers mode is enabled. I am able to go into memory and storage (or APPS), and can move a few of the apps, but not many. The phone only has 2GB main storage, and every app downloaded from the store INSISTS on installing on this 2GB space. Its very irritating. The phone also has 8GB of internal storage space, non removable.
With that said, I have a few questions.
1.) Why can't I format the internal fixed 8GB as proprietary internal storage vs portable? There seems to be NO WAY to do this. (rather preposterous).
2.) Why do only some apps have the option to be moved and others dont? Is it a "System App" setting which disallows this? Can it be overwritten?
3.) Given the issues, why cant I change the memory space the phone uses for RAM to at least the built in 8GB? Can I partition the XD card (removable) and set it as part internal part portable?
Shame on Google for getting so sloppy with their software. Things like disk management and storage space, log file backups, and clean up should come and the first feature after providing an OS. Granted I am using CM, but I digress - its no better on stock on any of my other devices.
Thanks for any help you can provide. I googled, and searched on threads here. I'm really not looking to be pointed to a thread for an app that requires busybox and other hoops to be jumped through. I'm looking for information on why it is like this, is it being fixed, or is "fixing" it to make it MORE like this. Can I do this manually via adb? I'm not a linux novice but I have a lot to learn about Android and loading more apps on the phone from what I've read so far is unclear if it will work and continue to work. Some people have said in threads they move it manually after each app they load. I don't mind that, but I want to understand what makes an app declare itself as NON movable.
Thank you
Click to expand...
Click to collapse
Hi,
I couldn't find much information about your device here. Try posting your query in
Android Q&A,Help and Troubleshooting
or in the Q&A thread here->[Ask Any Question][Newbie Friendly].
Experts there may be able to assist you.
Good luck
Art Vanderlay
XDA Assist

1. Allow any app to write external SD and 2. Resize any activity for multi-window

Nothing earth shattering but I thought the info it's worth sharing in a new thread.
Assuming that you have already activated the Developer Options section, at the very bottom there are two very interesting options (recently introduced):
1. Allow any app to write on external SD and
2. Make any activity resizeable so it can be used in multi-window.
This is it! See the screenshot!
Cheers!
i did it but not sure what it does.. maybe usefull in dex mode?
miman04 said:
i did it but not sure what it does.. maybe usefull in dex mode?
Click to expand...
Click to collapse
Did you read the description?? It allows all apps to go sd card and multi window usage
I used it to move whatsapp on the external sd card, but all media are still on the internal memory and if move them manually, whatsapp can't see them and create a new folder in the internal memory. How can i fix it?
After I made the change, it seemed laggy. Using an Evo select card. Unchecked the setting and moved my apps back to internal and things are back to normal.
Op clearly does not understand this option (talking only about first one). When I say this, I honestly don't mean to insult. It is meant for adoptable storage (which we don't have on samsung). It is to force install apps on adoptable storage even if dev has not allowed this in the app. It is a buggy feature, that prevents app updating, on the phones that have this function, so even there it is best left alone.
This will not magically allow app write access to our phone, but it might allow the app to be moved to the card, with caveats above.
Sent from my phone

"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