Incorrect Emulator list parsing
There's a erroneous entry in the android emulator list
For reference:
$ANDROID_HOME/cmdline-tools/latest/bin/avdmanager list avd
Available Android Virtual Devices:
Name: Pixel_7_Pro_API_34
Device: pixel_7_pro (Google)
Path: /Users/rigor789/.android/avd/Pixel_7_Pro_API_34.avd
Target: Google Play (Google Inc.)
Based on: Android 14.0 ("UpsideDownCake") Tag/ABI: google_apis_playstore/arm64-v8a
Skin: 1440x3120
Sdcard: 512M
---------
Name: ZTelevision_API_34
Device: tv_1080p (Google)
Path: /Users/rigor789/.android/avd/ZTelevision_720p_API_34.avd
Target: Android TV
Based on: Android 14.0 ("UpsideDownCake") Tag/ABI: android-tv/arm64-v8a
Skin: 1920x1080
Sdcard: 512 MB
$ANDROID_HOME/emulator/emulator -list-avds
INFO | Storing crashdata in: /tmp/android-rigor789/emu-crash-34.1.20.db, detection is enabled for process: 58515
Pixel_7_Pro_API_34
ZTelevision_API_34
$ANDROID_HOME/emulator/emulator -version
INFO | Storing crashdata in: /tmp/android-rigor789/emu-crash-34.1.20.db, detection is enabled for process: 58580
INFO | Android emulator version 34.1.20.0 (build_id 11610631) (CL:N/A)
INFO | Storing crashdata in: /tmp/android-rigor789/emu-crash-34.1.20.db, detection is enabled for process: 58580
INFO | Duplicate loglines will be removed, if you wish to see each individual line launch with the -log-nofilter flag.
Android emulator version 34.1.20.0 (build_id 11610631) (CL:N/A)
Copyright (C) 2006-2017 The Android Open Source Project and many others.
This program is a derivative of the QEMU CPU emulator (www.qemu.org).
This software is licensed under the terms of the GNU General Public
License version 2, as published by the Free Software Foundation, and
may be copied, distributed, and modified under those terms.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This likely needs to be filtered here: https://github.com/okwasniewski/MiniSim/blob/0dffe44bce54dd321983bd79c56d78ccd5fa856c/MiniSim/Service/DeviceService.swift#L379-L391
Perhaps a simple && !$0.contains(" |") in the filter would be sufficient, as I don't think emulator names could/would contain | in their name.
| Confirm | Unable to Delete it |
|---|---|
|
|
|
Hey, this is a bug in ADB that happens after upgrading Android Studio. Try to update to the latest version and remove this simulator using Android Studio. You can check if ADB works properly using:
emulator -list-avds
It is a bug of emulator. This StackOverflow answer worked for me: https://stackoverflow.com/a/78111618.
It might be worth filtering emulator names started by INFO | Storing crashdata in.
I've added filtering out emulator names in 0.8.4