Whenever I run an emulator on my Mac, qemu-system-aarch64 quickly climbs to 7-8GB in Activity Monitor. Add Android Studio and a couple browser tabs, and a 16GB machine is basically out of memory.
Most of that waste isn't even the OS itself:
- Android Studio often defaults to software rendering (
lavapipe), dumping gigabytes of raster buffers straight into your RAM. - Stock images boot with dozens of background services running (Assistant, YouTube, telemetry, wear sync) that you don't need while testing an app.
I put together a small CLI in Go called avdslim to clean this up.
It forces the emulator to use your real GPU (Metal on macOS, Vulkan/DRI on Linux) with -lowram, and shuts down about 45 background packages via adb once booted.
Takes memory down from ~8.5GB to around 1.5GB resident on my machine. Auth, FCM push notifications, and WebView still work without issues, and running avdslim off reverts everything back to default.
If you want to try it (macOS / Linux):
brew tap kdbhalala/avdslim https://github.com/kdbhalala/avdslim.git && brew install avdslim avdslim tune-avd # adjusts config to 1.5GB + host GPU avdslim start # boots and slims Code is here if anyone finds it useful: https://github.com/kdbhalala/avdslim
Let me know if you run into any weird behavior on your API level.
submitted by /u/Rude_Gate7599[link] [comments]