简体   繁体   中英

If I know the exact location of a file or folder on an Android device, can I put a file there even if it doesn't belong to my app?

I've been asked to make my android app, at the press of a button, download a file and put it into /enterprise/device/settings/datawedge/autoimport/ . This location isn't something that my app creates or belongs to my app -- another app on the system reads files from there to import settings.

Is it possible in general to do this kind of thing? If so, how?

Is it possible in general to do this kind of thing?

No. In general, files exist outside of areas where you could possibly get permission to write. That would include /enterprise/ , /TKoL/ , or other arbitrarily-named directories off of the system root directory.

On a rooted device, you probably can arrange to write there. And pre-installed system apps might be able to write there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM