Where is the temp folder located on An开发者_开发问答droid phones?
The temporary directory is /data/local/tmp
.
I've seen some comments that claim you need to be rooted to access it but I'm not sure that's true. Whilst it is true that you need root to freely access /data
, this is not required for /data/local/tmp
.
I have verified this on Android 5.1.1.
I believe what you're looking for is getCacheDir()!
Reading this post from the android developers google group leads me to believe that there is not 1 global temp directory, and each application is expected to maintain their own temporary files.
The files downloaded using "creatTempFile()" are stored in folder:
/data/data/YOURapp/cache/
精彩评论