Skip to content

Releases: kdbhalala/avdslim

v1.0.12

Choose a tag to compare

@github-actions github-actions released this 19 Sep 18:29

Added

  • Host System Memory & Swap Pressure Audit: Added Section 2 to avdslim doctor checking host physical RAM and swap pressure. On Apple Silicon, uses os.Getpagesize() to dynamically account for 16 KB pages instead of assuming 4 KB (which undercounts free RAM 4x), and warns if macOS is heavily compressing or swapping anonymous memory.
  • Compressed & Swapped Memory Indicator: When physical RSS reads significantly lower than Activity Monitor memory footprint due to macOS page compression or swap, doctor, measure, and status now display the compressed/swapped delta directly ((%d MB compressed/swapped out)).

Fixed

  • footprint Exact Bytes & Unit-Aware Parsing: Hardened GetHostFootprintMb to request exact bytes via footprint --format bytes and parse B, KB, MB, and GB (including decimal representations like 1.8 GB). Prevents formatting parse errors from silently falling back to ps RSS (which omits compressed/swapped pages).

Full Changelog: v1.0.11...v1.0.12

v1.0.11

Choose a tag to compare

@github-actions github-actions released this 18 Sep 18:29

Fixed

  • tune-avd could rewrite config.ini with no backup: the config.ini.bak write ignored its error but still reported success, so a failed backup (permissions, full disk) left the tune irreversible once config.ini was rewritten and snapshots/ purged. It now aborts before touching either.

v1.0.10

Choose a tag to compare

@github-actions github-actions released this 17 Sep 14:42

Fixed

  • start / bake targeted the wrong emulator when another was already running: the boot wait and slimming ran against whichever device adb picked, so avdslim start 2 with AVD 1 up re-slimmed AVD 1 and left AVD 2 on a black screen. Both now pass -port to the emulator and target that serial.

v1.0.9

Choose a tag to compare

@github-actions github-actions released this 17 Sep 11:57

Added

  • avdslim repair Command: Unsticks an AVD hung on a black screen by re-enabling boot-critical packages directly in package-restrictions.xml (via adb root) and restarting the framework. Keeps user data.

Fixed

  • AVD stuck on black screen after stop/start: slimming no longer disables com.google.android.bluetooth. On Android 16+ images system_server crash-loops at boot (FATAL: Conflicting system configuration detected) when the Bluetooth APK is disabled, so every cold boot after the first slim hung. Bluetooth is still switched off at runtime via bluetooth_on=0.

v1.0.8

Choose a tag to compare

@github-actions github-actions released this 17 Sep 11:14

Added

  • avdslim enable Command: Selectively re-enable specific features (bluetooth, animations, sync, location, bglimit) or app packages (maps, photos, chrome, camera, store, etc.) on running AVDs without performing a full restore. Supports index, AVD name, serial, and --all multi-device targeting.
  • Bluetooth Debloating & --skip bluetooth: Added Bluetooth subsystem (com.google.android.bluetooth, com.android.bluetoothmidiservice, bluetooth_on) debloating, saving ~25 MB RAM. Added --skip bluetooth option for developers testing BLE peripherals.
  • Privacy Sandbox Debloating: Silenced com.google.android.adservices.api and com.google.mainline.adservices background attribution daemons.
  • Continuous Integration (CI): Added GitHub Actions CI workflow to run formatting checks, go vet, tests, and binary compilation on push and pull requests.

Changed

  • Animation Default Inverted: Animations are now ON by default (Fluid 1.0x) for natural UI navigation. Added --no-anim / --no-animations flag to explicitly disable animations (0x) for instant UI response.
  • Background Process Capping: Configured max_cached_processes=4 alongside background_process_limit=4 to eliminate hidden cached app RAM bloat on Android 14–37.
  • CPU Thread Tuning: Set hw.cpu.ncore=2 in tune-avd to curb host thread stack allocation and parallel compilation thread churn.
  • PhotoPicker Protected: Excluded com.google.android.photopicker by default to ensure modern ActivityResultContracts.PickVisualMedia dialogs remain functional.

v1.0.7

Choose a tag to compare

@github-actions github-actions released this 17 Sep 09:50

Added

  • OS-Specific GPU Backends: Automatically selects -gpu host on macOS (native Apple Metal acceleration), -gpu auto on Linux and Windows (native DRI/Vulkan and Direct3D 11 via ANGLE), and -gpu swiftshader_indirect on headless Linux CI runners without display servers.
  • Flexible Device Target Resolution: Commands (stop, snapshot, on, off, bench) now accept numeric 1-based index numbers (1, 2), AVD names (Slim_Pixel_5), or ADB serials (emulator-5554).
  • Physical Keyboard Forwarding: Automatically sets hw.keyboard = yes during tune-avd so typing on host keyboards works out-of-the-box inside the emulator.

Changed

  • Default RAM Raised to 1536 MB: Raised default guest RAM from 1024 MB to 1536 MB across CLI flags, Android Studio shim, AVD tuner, bake snapshots, and GitHub Actions workflows. Balances lightweight host memory (~1.7 GB) with guest OS lmkd headroom, preventing Gboard and dev application kills on Android API 34–37 images.

Fixed

  • Fixed avdslim stop to correctly target emulators by index, name, or serial with responsive termination polling.
  • Fixed github-repo-stats workflow downsampling ZeroDivisionError on new or sparse data branches.

v1

v1

Choose a tag to compare

@github-actions github-actions released this 16 Sep 11:21

Full Changelog: v1.0.5...v1

Full Changelog: v1.0.6...v1

Full Changelog: v1.0.7...v1

Full Changelog: v1.0.8...v1

v1.0.6

Choose a tag to compare

@github-actions github-actions released this 16 Sep 20:45

Upgrading

  • Run avdslim install-shim again after upgrading if you use the Android
    Studio shim. Shims installed by 1.0.5 or earlier don't read the new defaults
    file. avdslim doctor flags an outdated shim.
  • go install github.com/kdbhalala/avdslim/cmd/avdslim@latest works again
    (the module path now matches the repository).
  • Emulators slimmed by 1.0.5 or earlier have no saved setting values, so
    avdslim off still resets them to stock (animations 1x, location on).
    Run avdslim off then avdslim on once to start saving your own values.

Added

  • --skip=animations,bglimit,sync,location,setup on on, watch, start,
    bake and snapshot to leave those settings unchanged.
  • Per-user defaults file (~/Library/Application Support/avdslim/defaults on
    macOS, ~/.config/avdslim/defaults on Linux). The shim reads --ram from
    it at every launch.
  • doctor and watch warn when an Android Studio emulator update has
    replaced the shim.
  • Release tarballs carry build provenance attestations
    (gh attestation verify).
  • TRADEMARKS.md: naming rules for forks and the list of official channels.

Changed

  • avdslim off restores each setting to the value it had before
    avdslim on, instead of fixed stock values.
  • start passes --aggressive, --keep and --skip through to slimming.
  • install-shim refuses on Windows with an explanation (the script wrapper
    never worked there); uninstall-shim still removes an old one.

Fixed

  • avdslim version now reports the release tag.

v1.0.5: 1024MB Default RAM, Golden SDK Recommendations & GitHub Action CI Support

Choose a tag to compare

@github-actions github-actions released this 16 Sep 10:44

⚡ What's New in v1.0.5

v1.0.5 introduces a leaner default memory footprint (1024 MB RAM), built-in SDK image auditing, and official support for the GitHub Actions Marketplace.


🌟 Highlights

  • 1024 MB Default RAM Allocation:

    • The default RAM allocation across avdslim tune-avd, avdslim launch, the Android Studio emulator shim, and GitHub Actions is now 1024 MB (down from 1536 MB). Emulators run smoothly while saving up to 75% host RAM.
  • Golden SDK System Image Recommendations (avdslim doctor):

    • Added diagnostics to detect and audit AVD system images:
      • Google APIs (Standard 4 KB): Recommended. Full Firebase Auth, Google Sign-In, FCM Push, and Maps support with zero Play Store updater bloat + guest root enabled for kernel memory compaction.
      • 🚨 16 KB Page Size (ps16k) Detection: Alerts users when QEMU enforces a hardcoded 4096 MB RAM floor and allocates 4x larger page buffers.
      • ⚠️ Google Play Production Image Detection: Alerts users when Play Store background self-updaters and lack of adb root increase RAM usage by ~40%.
  • Graceful Shutdown & Snapshot-on-Exit (avdslim stop):

    • avdslim stop: Interactive prompt asks if you want to save the current state into the Golden Snapshot before powering off.
    • avdslim stop --snap: Automatically trims memory, refreshes the Golden Snapshot, and shuts down in one step.
  • Official GitHub Action (uses: kdbhalala/avdslim@v1):

    • Pre-configured composite action to prevent OutOfMemory (OOM) kills on memory-constrained GitHub Actions CI runners (ubuntu-latest 7 GB / macos-latest 14 GB).

📦 Installation & Upgrade

Homebrew (macOS & Linux)

brew update
brew upgrade avdslim
# or for fresh install:
brew install kdbhalala/avdslim/avdslim

Curl Install Script

curl -fsSL https://raw.githubusercontent.com/kdbhalala/avdslim/main/install.sh | bash

GitHub Actions CI

- name: Optimize Android Emulator RAM
  uses: kdbhalala/avdslim@v1
  with:
    ram: '1024'
    install-shim: 'true'

🔍 Verification & Diagnostics

Run the updated doctor command to audit your installed AVDs and system images:

avdslim doctor

Full Changelog: v1.0.4...v1.0.5

v1.0.4

Choose a tag to compare

@github-actions github-actions released this 16 Sep 10:31

Full Changelog: v1.0.3...v1.0.4