Where is the temp folder located on Android phones?
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 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.
adb shell
) and store screenshots in that temp directory and then pull them from the device using adb
. Tested on non-rooted devices. –
Victoir 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 createTempFile()
are stored in folder:
/data/data/YOURapp/cache/
© 2022 - 2024 — McMap. All rights reserved.