Where is the temp folder on Android devices?

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.


I believe what you're looking for is getCacheDir()!

Tags:

Android

Temp