fix: restore default Android SDK discovery - #152
Open
Nozomi-Hijikata wants to merge 1 commit into
Open
Conversation
Recover when onboarding completes without persisting androidHome by validating the default SDK path at startup and saving it only when Android support is enabled and available. Preserve custom SDK paths and iOS-only setups, and cover the fallback behavior with unit tests.
Nozomi-Hijikata
marked this pull request as ready for review
September 4, 2026 08:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for building and maintaining this awesome tool! I ran into an issue where Android emulators were not appearing, so I investigated the onboarding and startup flow and put together this fix.
Summary:
MiniSim can complete onboarding with Android emulators enabled even when Android setup validation fails. The validation error is suppressed, so
isOnboardingFinishedcan becometruewhileandroidHomeremains unset.After onboarding, the menu requests Android devices only when
androidHomeis already present in UserDefaults. That guard preventsADB.getAndroidHome()from resolving the default~/Library/Android/sdklocation, so installing the SDK later does not restore Android emulator discovery automatically.This change repairs that state before the menu is created:
Performing this repair at startup is intentional. Fixing onboarding alone would not recover users who already completed it with a missing preference or who install the Android SDK later.
This PR does not change the onboarding validation UI or migrate from the legacy
emulatorexecutable to the new Android CLI. Those can be handled separately.Refs #149
Changelog:
Restore Android emulator discovery when onboarding completed without saving the default Android SDK path.
Test Plan:
Added unit coverage for persisting a valid default SDK path, preserving a custom path, and rejecting an invalid SDK path.
Ran the full test suite successfully; the existing iOS device discovery test remained skipped.
Installed and launched the PR build from
/Applicationsand verified these onboarding flows:isOnboardingFinished = trueand no savedandroidHome; Android menu entries were absentandroidHome, and Android menu entries remained absent