2 questions about termux
It all started when I tried to delete a folder inside Android/data, but i got the error "Permision Denied" so I tried Shizuku + Termux to delete it, I set it up and run the command "rm -rf [folder]" but I also got "Permission denied" (First image), so I searched a little and saw that I should've used the "termux-setup-storage" command, so i went and used, but I got a text (image 2) and I got afraid that typing "Y" would erase all my data (even if it's saying that will not be deleted). So I'm here to ask, if I type "Y" all my data will be erased? And if not, am I be able to delete that folder?


86 Replies
as it said, pressing Y would not delete your data
as for how to delete android/data/stuff folder, idk
if you don't have root, you can't, and if you do have root, you shouldn't. whatever search told you termux-setup-storage would help is sending you a wildly wrong direction.
@PSYCHO why do you want to do this? what problem do you think it's going to solve?
The reason is dumb tbh, i just wanted to remove a skin pack inside minecraft, but ingame didnt have the option, so I tried just deleting whats inside that folder
But it looks like without root i can only delete with a pc
And even if the pc doesnt work, I'll just give up
I don't think you can do this at all
dunno where you're getting this info
also entirely possible that you break that app because it's not expecting that file to be deleted out from under it
Pure guess
yeah, you should probably let this one go
bad idea
But i found a way
that doesn't mean it wasn't and isn't a bad idea :P
Just wipe all the data of the app, simple
... sure
that's safe to do, assuming you aren't losing any other data you care about
I mean, I was only trying to delete a folder inside that skin_packs folder
I don't think doing this would break the app
Yah, I just made a backup before doing it
so the thing about android is that apps can correctly assume that no one will do what you're trying to do
/data/data/com.whatever is their private storage
But I tried deleting on the pc but didn't work either, android 11 broke everthing
nobody but the com.whatever app should be able to delete anything in there
so if there's a list of things that are in the skins dir, and you delete something from it, and then it goes and tries to access all the skins it thinks it has, and it hasn't expected the case that the skin disappears out from under it because android is not supposed to let anyone else delete that
you have a crash you can't recover from
If I had root, I could delete any folder inside the data folder, right? Or its literally impossible?
and you can't actually know if it'll do that ahead of time
sure, and you could very easily break stuff doing so
this is not a good assumption :)
I wasn't that important, if it broke just reinstall the app ðŸ˜
sure, if you don't care about reinstalling it, you can do whatever
Yah
it's still a bad assumption that you can just go in and fuck with other apps' files and they should be fine
this is an important point
But i wish there was a easier way to delete those things
welcome to android
apps are protected against the user in ways they are not on normal computers
Yah
It would cost nothing to also add option to delete inside the app
it would not, in fact, cost nothing
Although, for minecraft, i dont think it would cause much issues. A few years ago they used to store gamedata in /sdcard/games/` folder instead of Android/data. So it was expected people modify that dir (e.g. importing/exporting worlds/texture pack/etc)
because that's not the model apps are given in android
I had a phone with root a long time ago, so I'm not used to root anymore, but if I root my phone, id be able to update it?
the point is that once it's in private storage, it is reasonable and safe for the app to start assuming no one else can touch that stuff
so that doesn't really help, either
depends on your phone?
there's no general answer to that question
Hm, a Samsung one
I don't know
Or need to be more especifc? XD
xda is generally the best place to get info on rooting specific phones
yeah, it matters exactly which
And today I noticed that the OEM unlocking option disappeared from my setting, maybe its an android 16 thing
Or one ui 8
Also you can delete files using this file browser (its builtin, i think its called saf?)

Saf?
storage access framework, it's a file access API for android apps, not an app itself
it does not grant any unique permissions
you know you're looking at a different dir, right
But it allows the user to delete the files inside Android/data dir
Android/data/$package in shared storage, not /data/data/$package (which is private storage)
But not in subfolders
Is he talking about /data/data/* dir?
yes
Am I?
That too
no
I misread
Bruh
U can?
I think Android/data/$package is actually also private, but that's another thing
Yah only the so itself can modify it
yes, I think it's actually restricted the same way
Yes, you ca
but didn't think that was relevant
I mean, I can't even
ls ~/storage/shared/Android/data over hereHow did u access that app?
which makes sense because the list of apps you have installed is supposed to be protected at this point
I think that's a normal file app
using activity manager app on f droid
its just called file app
uhhh it looks a lot like the files app that ships with lineageos
using
am might also possibleUsing material files -> then open Android/data -> then it will open native android file browser (material files itself cant access that)
!tag saf
I am not sure the tag helps
though I guess we're not getting it
I'm not understanding shit ðŸ˜
ah, you wanted https://f-droid.org/en/packages/me.zhanghai.android.files
Material Files | F-Droid - Free and Open Source Android App Repository
Open source Material Design file manager
android makes a lot of promises to apps. at least on A16 here, one of them is that other apps can't touch your files in Android/data, same as /data/data, or even tell if you have any. I think earlier versions might not enforce that.
you can try with that file browser but it has no superpowers
I don't know why it would work if your built in one doesn't
Let's try then
what version of android do you have?
Material files cant access that. But it can open the android native file manager,which can
might be an sdk target difference, actually
12
I don't think the android native file manager has superpowers, either
It needs root
the guarantees made to apps aren't supposed to have clever workarounds
I don't think it needs root
bet you five internet bux this changed between 12 and 16

remote filesystem :blobhyperthink:
anyway
again
no superpowers
no, from side pannel add storage device and then add Android/data
your phone is enforcing that those dirs are private to their apps
or try that idk
U cant delete folders tho, weird
it's an SDK target difference: https://developer.android.com/training/data-storage/app-specific#external
Android Developers
Access app-specific files  | App data and files  | Android De...
I think its only for
/data/data/* and not /storage/emulated/0/Android/data/* because you can access the later using a pcread the last paragraph there - it's definitely at least enforced for apps targeting >29 == A10
I can delete everything for me (android 12)
Yesc i remember when that change occured. but that saf has more permissions over regular file managers.
Like if i plug in a usb, it wont automatically show up in material files, i have to add it using the saf
I don't think "more" is correct, exactly? it allows things that are not filesystems to be exposed through the same APIs as the filesystems. like how termux lets you mess with its private storage, even though that's obviously illegal
uh
SAF is an android system API
"add it using the SAF" doesn't parse
not sure what you mean
Yeah, i my be getting the term wrong. Hold on a minute (or two) let me record what I am trying to say
Damn, Samsung removed the oem unlock option on one ui 8 💔
@Juhan meet me in #off-topic for the rest of this, let's close out this person's question here
@PSYCHO I think you're out of luck on both, but is there anything else left to try?
Nah, the problem was already solved, thank you guys for offering help and info
sorry we couldn't figure it out for you
Np
In the end it was an android problem XD