Writing in internal phone storage

Hello Koders :smile: :wave:
I want to know if there is a possibility to store files in the internal storage of the phone, where user can’t access to it
So it must be before /storage/emulated/0/Android/data in the root directory, I want my game download assets in root directory when installed after user’s permission to download and then each time i set the source for images or videos to the file in the folder where installed assets in root directory, is that possible ? :smile: :nerd_face:
Thanks :heart:

Make a hidden folder in app data folder and store files in them.
Directory - /storage/emulated/0/Android/data/yourapppackage/data/.appdata

Here .appdata is hidden folder name so that this folder is hide from user

Thanks :heart:
But i think when the user check “Show hidden folders and files” he can find the folder :neutral_face:

There is no way to hide because if you change the extension of file too then it’s not accessible. So try only this way. Else you show them online if you don’t want that user got files

If i make them online it will need more internet while playing and that’s every time i want to download everything just one time to access to it at any time even if my game is online and needs internet to play i don’t want the user to cost much internet to access for assets
I see some games that download their sources after installation when i go to Android folder i don’t find anything in data folder and obb folder so i think that it’s in root directory i want to know if that’s possible in Kodular or not
Thanks :heart:

They saved there files in raw data folder which is not accessible by any user else they extract apk into zip.
But you can’t do thus in kodular.

Hope you got your solution

Ok thanks :nerd_face: :blush:
I’ll think about setting images and videos sources to online so that anyone can edit or delete them :smile:

But is there any extension i can made can do such thing? :grin:

@bodymindpower you was replying then stopped what do you wanted to say? :sweat_smile: :laughing:

What are you talking about here? It seems to me that everyone wants to contribute without knowing what they are actually talking about.

Some examples:

“root directory” of what?

What is that supposed to be?

See also here:

Thanks for your reply :blush:
I’m not so good at english that’s why i can’t describe well what i want sorry :sweat_smile:

I can store downloaded assets here and the user can’t access to it? :face_with_monocle:

i mean he can find the folder where i downloaded assets which is /data/user/0/<packageName>/files/ or not

Yes, try to copy / save the files in the private directory of the internal storage:


Only with a rooted device.

Here’s what i want :
I upload every asset i need to Firebase Storage, then when the user opens the game, it appears the home menu and Play button, then the game will check if assets are downloaded or not, if not, it will appear a notifier that says “You need to download required assets” if the user accepts it will download them in /data/user/0/<packageName>/files/ and every image or video or any component will have the source link to the folder where all assets are stored
I can do that or not, is that possible?
Thanks :revolving_hearts:

See my blocks and the video in this thread (AI2 forum):


1 Like

Ok but i just want to know if this path is accessible for Firebase Storage component :sweat_smile: :firebase:

I don’t know if there is a component or extension that can download files directly to the private directory. (You would probably be the first to try this. :wink:)
Otherwise, you can try to download the files to the ASD (app-specific directory), then copy them to the Private directory and (after copying) remove them from the ASD.

Then a user would only have access to these files (just like the files in the assets) if he had rooted his device.

1 Like

@youssef_achour Btw, this procedure should actually get along completely without permissions (READ / WRITE) if Kodular would handle it the way Google intended.

I don’t understand what you mean :sweat_smile:

Means i can do that without permissions yes ?