Can a user access app's private directory?

Hello Guys, can a user access app’s private directory??

Because I can easy accessed them files

Without rooting my Device and without using any

third party app (Xiaomi Note 7’s built-in File manager )

With this dir : /data/user/0/<packageName>/files/

If you can access them any other users can also Access :slightly_smiling_face:

If you want hide the folder then put a full stop (.) before name while creating the folder.

Eg : /download/.myapp

But still they can see if they enable show hidden folders in their file manager.

1 Like

Can u show the screenshot from the file manager?

You can check this guide :point_down:

2 Likes

Actually I have already use this mathod

But still folders can accessable

See this

File path : data/user/0/(package name)/files

It looks like you created the folder by mistake. Look at its date: 11/4/20.

Show us your blocks, cause I think you set the dir path in a bad manner. Some blocks adds automatically /storage/emulated/0/ to path. So you just created a path in the external storage.

The naming of storage is misleading. What you are looking at your screen is really external storage. But xiaomi app names it as internal (interal but shared).

here it is

Try to use TaifunFile extension. There’s also a move option, but you can set the absolute path to folders with “file:///” snippet.

U try to move a file from external storage to internal? What’s the purpose? What informations are included in VideoPicker selection block? Is it a name of file?

The File component is the only component that can access the Private dir (→ internal storage):

/data/user/0/<packageName>/files/

You are talking about the → external storage:

/storage/emulated/0/data/user/

(Whatever reason you created this folder.)

There is also no extension that can access the Private dir (internal storage).
Also not the EFile extension.
To see this dir on your device you need to root it.

1 Like

And as I remember the directory will be deleted once the app in uninstalled/data cleared?

1 Like

@bodymindpower since you’re typing a response, will directories created from the application be deleted when the app is too? For example if I create a directory in the download directory, will that be deleted?

Yes, that’s correct.

1 Like

are you sure? (well usually you are… :wink: ) so just to confirm…
the EFile extension is a copy of the App Inventor file component without asking for permission, therefore that extension also should be able to read/write files from/to the private application directory…

Taifun

Yes, I’m sure:

1 Like