whoami
Lucas Jenß
cat /etc/motd
The Coding Journal ツ — Notes taken on an epic coding journey. Technical solutions, debugging notes, and practical guides from the trenches of software development.
ls -la ~/languages/
- drwxr-xr-x
- ▶ PHP
- ▶ Ruby
- ▶ Scala
- ▶ C#
- ▶ JavaScript
- ▶ Objective-C
- ▶ Shell Scripting
ls -la ~/toolchain/
- drwxr-xr-x
- ▶ Typo3
- ▶ Akka
- ▶ Capistrano
- ▶ Git
- ▶ MAMP
- ▶ Adobe Illustrator
- ▶ NSTrackingArea (Cocoa)
uname -a
- drwxr-xr-x
- ▶ Mac OS X
- ▶ Unix
Faster Android emulator starts with snapshots and quick boot
Android emulator startup time can turn a quick test into a coffee break. A cold boot rebuilds the virtual device, starts the framework and loads installed packages, while restoring a known state can return the AVD to a usable screen much sooner. For developers across Australian cities such as Sydney, Melbourne and Brisbane, that difference is noticeable when the emulator shares a laptop with a compiler, IDE and video call.
The goal is not to make the emulator pretend to be production hardware. It is to remove repeated waiting from the development loop while keeping the test environment honest. Android is a significant part of Australia’s app market through Google Play, and checks against Telstra, Optus or Vodafone network profiles can expose timing issues. A dependable snapshot workflow gives those scenarios a clean starting point without paying the full boot cost every time.
When cold boot time breaks the flow
Measure the delay before changing anything. Record the time from launching the AVD to the moment your target app can receive input, and separate that from the emulator reaching Android’s boot-completed state. Otherwise, a fast framework start can hide a slow application launch, and you may optimise the wrong layer.
Hardware also affects the result. A busy workstation, a laptop on battery and background Gradle builds can all make a cold boot feel worse. Brisbane’s summer heat can push a fanless laptop into thermal throttling, reducing CPU and graphics performance just as the emulator starts. Closing unused IDE projects and running the emulator from a powered, cool workstation gives a fairer baseline.
Track timings beside the rest of your mobile workflow rather than in a throwaway note. The wider mobile tooling notes provide a useful place for recurring emulator problems, build delays and the small configuration changes that affect them.
How quick boot and snapshots restore state
Quick Boot is the emulator’s automatic use of snapshot technology. After a clean shutdown, the emulator can save its running state; on the next launch, it restores that state instead of replaying the entire boot sequence. This usually restores both the operating system and installed application data, so the device appears ready much earlier.
A manual snapshot serves a similar purpose but gives you a named checkpoint. Open the emulator’s Extended Controls, choose Snapshots and save a state after installing dependencies, signing in to a test account or configuring a feature. Restoring that checkpoint is useful for repeatable UI work because it removes package installation, first-run screens and database population from every test cycle.
Treat a snapshot as a specific machine state, not a universal clean image. It belongs to the AVD, system image, emulator version and hardware configuration that created it. Use cold boots when testing first-launch behaviour, onboarding or upgrade paths; use restored states for feature development, regression checks and routine debugging.
Preparing a stable AVD for restoration
Create a dedicated AVD for the task instead of changing an emulator while a snapshot is active. Keep the API level, ABI, screen size and locale stable. On Apple Silicon, an arm64-v8a system image generally performs better than an x86 image translated through emulation, and a lighter image can start faster, although a Google Play image is necessary when the app depends on Play services.
Enable the appropriate hardware accelerator rather than accepting unaccelerated virtualisation. Android Studio can use KVM on Linux, Hypervisor.framework on macOS and a supported Windows hypervisor. Give the AVD enough RAM for the application, commonly 2 to 4 GB, but avoid allocating most of the host’s memory; excessive cores and RAM can make the host sluggish and may reduce the benefit of a quick restore.
Consider what the saved disk contains. A snapshot can retain test emails, contacts, files, tokens and database records. If screenshots, logs or emulator exports contain personal information, Australian teams should assess their obligations under the Privacy Act 1988 and the Australian Privacy Principles. Use synthetic test data where possible, and create a fresh AVD when the previous state no longer represents a safe baseline.
Saving and measuring emulator states
In Extended Controls, select Snapshots and save a clearly named state such as logged-in-baseline. Then use AVD Manager to edit the device, reveal Advanced Settings and look for the Quick Boot or automatic snapshot option, depending on the Android Studio version. Keep automatic saving enabled, and confirm that the snapshot appears after the next clean exit.
Close the emulator normally when you expect Quick Boot to capture the final state. A window close or adb emu kill is preferable to terminating the emulator process with a force-kill command, because a forced stop can leave a partial save. Allow the emulator to finish saving, and if the process is interrupted, start with a cold boot and create a fresh checkpoint rather than trusting the damaged one.
Use an automated readiness check when comparing runs. This small script waits for the emulator and the Android framework to report completion:
adb -s emulator-5554 wait-for-device
adb -s emulator-5554 shell \
'while [ "$(getprop sys.boot_completed)" != "1" ]; do sleep 1; done'
Add an application-specific check if the app becomes usable later. Run the same sequence several times and compare the median, because disk caches, host load and the first restored launch can distort a single result.
Keeping the surrounding toolchain fast
An emulator can appear slow while the real delay sits in the build pipeline. Keep Gradle and dependency caches warm, avoid unnecessary clean builds and give native compilation its own attention. For projects that compile native code, this Gradle NDK setup explains how to keep the native build path separate from emulator startup, making it easier to identify which layer is consuming the time.
Use one consistent AVD definition and a repeatable snapshot checklist. Install the required API levels, fonts, locales and test accounts once, then save the state. For work targeting Australia’s Google Play audience, retain the Play services image needed by the app and test Australian network assumptions separately. Images with more Google services usually take longer to cold boot, even when Quick Boot restores them quickly.
On continuous integration, decide whether the runner can preserve an AVD directory. Snapshots are tied to the host emulator build, so an ephemeral worker may need cached system images and a scripted cold boot instead. A persistent runner can benefit from a prebuilt snapshot, but the startup check should still wait for the intended app state rather than treating the emulator process as sufficient proof of readiness.
Fixing stale snapshots and slow starts
If a restored AVD opens on an old screen, lacks a service or behaves inconsistently, bypass the snapshot. Launch with -no-snapshot-load to force a cold start, investigate the change and then create a new baseline. Add -no-snapshot-save if you want to prevent the emulator from replacing a good checkpoint with an unwanted experimental state. Use -wipe-data only when you intend to reset the device completely.
Check acceleration, disk space and graphics settings if even a cold boot is slow. Hardware virtualisation may be disabled in firmware, the emulator may be falling back to software rendering, and antivirus or indexing tools may be scanning large AVD directories. On Windows, review exclusions carefully within the organisation’s security policy; on other hosts, move the AVD to a fast local disk rather than a synchronised folder.
Schedule occasional cold boots and rebuild snapshots after an Android Studio, emulator or system-image update. Compare the restored state with a physical Australian handset when carrier registration, SMS, calls or battery behaviour matter. A snapshot accelerates repeatable work, but it cannot reproduce every radio or thermal condition found on real devices.
Start with one workflow today: create a dedicated AVD, complete one cold boot, install the baseline tools and test data, save a named snapshot, and enable Quick Boot. Record cold and restored startup times across several launches, then begin each development session by loading that known-good state and getting straight to the test you need to run.
Review the checkpoint after project dependencies change, and replace it deliberately rather than whenever a test leaves it in a different state. Load the baseline snapshot at the start of your next session and move straight to the test that matters.
cat ~/interests.json
| Key | Value |
|---|---|
| editor | Terminal-first workflow |
| os | Mac OS X / Unix |
| vcs | Git, distributed version control |
| deploy | Capistrano, cron automation |
| graphics | SVG, Adobe Illustrator troubleshooting |
| networking | IP validation, SSH, VPN |
git log --oneline --reverse
Solving SVG import issues in Adobe Illustrator CS6 and CC
When importing an SVG into Illustrator, the operation fails with an unknown error [CANT]. A workaround for this Adobe-side bug.
Solving NDK build issues on OS X
Troubleshooting native development kit compilation problems on Mac OS X.
Programmatically adding PHP generated TypoScript to the backend configuration
Integrating dynamically generated TypoScript into Typo3 backend setups using PHP.
ArgumentError: Could not parse PKey: no start line
Debugging an SSH key parsing error encountered during deployment.
Validating IP-Addresses in PHP
Using PHP filter functions with flags like FILTER_FLAG_IPV4 and FILTER_FLAG_IPV6, and understanding how filter_var handles reserved IP addresses.
Cocoa: Using NSTrackingArea
A short tutorial on using Cocoa's NSTrackingArea to capture mouseEntered and mouseExited events.
cat ~/contact.txt