After previous suggestions did not work for me, I want to add another (not very clean) solution:
Upon starting to install a new virtual device (still using /tmp) the file
~/Android/Sdk/system-images/android-< version >/google_apis/x86/.installer/.installData
is created, which contains the temp path. Cancel the download, edit the temp path to your desired folder and restart the installation of the device.
I later realized that the solution adding -Djava.io.tmpdir=< tempdir >
as suggested by Paul Ratazzi via Help -> Edit Custom VM Options did not work for me, since it was added to android-studio/bin/studio64.vmoptions
but adding it to android-studio/bin/studio.vmoptions
instead did the job for me. That is probably the better way to do it...