Today production environment has a machine's hard disk full, troubleshooting found that my module in the/tmp/android-username directory left a bunch of shapes such as "emulator-1tph5l" files, occupy a lot of space.
This module restarts several Android simulators repeatedly, creating a temporary file each time it is started, which looks like a copy of the system.img, and then the emulator stops and the temp file is not deleted.
Search the Web. You can change the temp directory of the emulator by setting the environment variable "android_tmp", which does not solve this problem completely.
Later discovered the reason, in the Stop simulator for me to directly use "kill-9" killed the simulator, was afraid that the ADB did not respond, and did not find side effects to do so. After changing to "adb-s emulator_name EMU Kill" command, it is found that temporary files can be deleted normally.