Just to tinker with it, last night I installed the Android Studio/SDK, and both during install and use, it repeatedly blew my 2Gb /tmp partition. Is there any way to tell t
Setting java.io.tmpdir as others have said used to work for me, but unzipping system images are still using /tmp in Android Studio 3.0.1. It wasn't reliably using the same PackageOperation0x directories so I didn't really want the special symlinks for them as in user3150128's answer.
Since it's only a problem when needing new SDKs and images, I ran Android Studio once and successfully did the update by setting TMPDIR on the command line:
$ TMPDIR=/path/to/bigger/tmp/dir /path/to/android/studio.sh