Code Monkey home page Code Monkey logo

minisim's Introduction

MiniSim

App logo

About

MiniSim is a small utility menu bar app for launching Android 🤖 and iOS  emulators (and more!).

Written in Swift and AppKit.

Install

Download the app from releases page or use Homebrew:

brew install --cask minisim

Raycast extension

You can use Minisim together with a Raycast extension.

Features

  • Lightweight
  • Fast, 100% native
  • Open Source
  • Open with shortcut: ⌥ + ⇧ + e
  • Launch iOS emulators
    • Copy device UDID
    • Copy device name
    • Delete simulators
  • Launch Android emulators
    • Cold boot android emulators
    • Run android emulators without audio (Your bluetooth headphones will thank you 🎧)
    • Toggle a11y on selected emulator
    • Copy device name
    • Copy device ADB id
  • Focus devices using accessibility API
  • Set default launch flags
  • Indicate running devices

Screenshots

New.Recording.Mar.10.2023.0522.PM.mp4

Usage

important This utility uses xcrun and sdk/emulator to fetch available devices on your machine. It might not work if you don't have a proper XCode and Android Studio setup.

There is a global shortcut for invoking the menu: ⌥ + ⇧ + e.

Checkout the docs here.

minisim's People

Contributors

gabrieldonadel avatar garfeild avatar gokul1099 avatar jahirfiquitiva avatar jaworek avatar okwasniewski avatar szymonrybczak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

minisim's Issues

Android Emulator freezing

First of all, thanks for this utility is very useful!

But when I launch Emulator with it, emulator freeze few minutes / hours after, I don't have this issue when I launch emu with Android Studio.

I need to quit force, and I got this error

MiniSim - ShellOut encountered an error
Status code: 137
Message: "WARNING | cannot add library /Users/user/Library/Android/sdk/emulator/qemu/darwin-aarch64/lib64/vulkan/libvulkan.dylib: failed
WARNING | *** No gRPC protection active, consider launching with the -grpc-use-jwt flag.***
/bin/bash: line

Do you have an idea maybe?

[Code improvement] align codebase to use `Platform` enum

Currently Device struct looks like this:

struct Device: Hashable {
    var name: String
    var version: String?
    var ID: String?
    var booted: Bool = false
    
    var isAndroid: Bool = false
}

However it would be great to align the isAndroid with newly introduced Platform enum:

enum Platform: Codable {
    case ios, android
}

Goal of this issue is to replace all instances of isAndroid with this enum

New feature: add option to open logcat

The goal of this issue is to add option to launch logcat for each device separately.

Logcat should launch with -v color flag. This feature should also take into account user's preferred terminal (iTerm, Terminal.app etc.)

This was currently achievable through custom commands but native support would increase the use of this feature

How to add a custom command?

I'm trying to start an Anroid emulator with some custom params. I try to use the following:

$android_home_path/emulator/emulator $device_name -feature -Vulkan

But I get this error:

Screenshot 2023-06-30 at 14 48 39

I'm on Macbook Pro M1 2020 with Ventura 13.4.1

how to run ios simulator with commands?

I'm using M2 and xcode Version 14.2 (14C18), the ios simulator doesn't scroll smoothly. also there no rosetta any more.
I have to run this command to make it work:

xcrun simctl boot [deviceID] --arch=x86_64

is there any way that I can do that by using this app?

Create Release Github Action

Goal of this PR would be to create a Release CI pipeline automatically publishing to Github Releases and notarizing the app

Issue: error after clicking Minisim menu item

Clicking the Minisim menu item shows an error on the screen.

MiniSim - ShellOut encountered an error
Status code: 72
Message: "xcrun: error: unable to find utility "simctl", not a developer tool or in PATH"
Output: ""

MacOS 12.7

Version v0.2.0 cannot find $ANDROID_HOME

Hello,

I have updated to version 0.2.0, and when opening it, I'm getting prompted about an error to find my $ANDROID_HOME on the path.

Screenshot 2023-02-09 at 4 07 45 PM

But the path is set correctly and works fine when using version 0.1.0.

I'm using MacOS Ventura 13.2 on an M1 Pro Macbook Pro.

Thanks for the support!

Alternative Android SDK path (Homebrew)

When running MiniSim, I get an error saying it could not locate my Android SDK (in ~/Library/Android/...)

I am using google's sdkmanager cli tool to manage the SDK. It was downloaded from Homebrew, the formulae name is android-commandlinetools

Default Android SDK root is /opt/homebrew/share/android-commandlinetools
However, the locaiton of all executables, including emulators is ~/.android

Full path to .avd files is ~/.android/avd

Although the MiniSim.app is probably looking for /opt/homebrew/share/android-commandlinetools/emulator/emulator

Please, enable support for this type of installation, since it is inconvenient to create symlinks.

Docs: create a documentation on Custom Commands

The goal of this issue is to create a good documentation on how to use MiniSim custom commands. The docs can be placed inside the docs folder in the repo (create one if it doesn't exist).

The guide should cover:

  • What are Custom commands?
  • How custom commands can speed up your workflow?
  • Creating your first custom command
  • Useful commands you can use

Then add a help button inside of Custom Commands interface.

Refactor `ParametersTable` component to `Table`

Currently ParametersTable uses "custom" implementation of Table due to MacOS 11 as a target. However, with 0.6.0 release MiniSim will support only MacOS 12+ so this component can be refactored.

New feature: allow users to change MiniSim icon

The goal of this issue is to add new picker to options which would allow users to pick a new menubar icon.

Similar to the https://maccy.app/

CleanShot 2023-08-27 at 22 21 59@2x

The available icons would be:

  • Current one (iphone)
  • Landscape iPad (ipad.landscape)
  • Box (archivebox)

Names in backticks are the names from SF Symbols.

Those assets should be placed inside of Assets folder.

Feat: Connect device via WiFi

It would be great if you could connect an Android v11+ device over WiFi by scanning the a QR Code just like Android Studio has it.

Feature Request: Use it without Android SDK

I want to use MiniSim only for IOS simulators for now. However, application crashes if I do not have the Android SDK. Is there any chance to make it work without Android SDK?

Screenshot 2023-09-10 at 21 25 04

Add packaged build

What an exceptional great idea! I would love to see this packaged via Github Releases (and later on the App Store + In App Purchase), is this something that's possible?

New feature: show / hide platform sections

The goal is to add a way for users to easily hide Android / iOS sections inside the menubar.

This would require a new checkbox in the preferences panel. Together with some additional checks during rendering. Ideally, the user would be asked during onboarding which platform he wants to use.

This will allow MiniSim to target native developers that are interested in only one platform.

Incorrect Emulator list parsing

There's a erroneous entry in the android emulator list

image

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:

static func getAndroidDevices() throws -> [Device] {
let emulatorPath = try ADB.getEmulatorPath()
let adbPath = try ADB.getAdbPath()
let output = try shellOut(to: emulatorPath, arguments: ["-list-avds"])
let splitted = output.components(separatedBy: "\n")
return splitted
.filter { !$0.isEmpty }
.map { deviceName in
let adbId = try? ADB.getAdbId(for: deviceName, adbPath: adbPath)
return Device(name: deviceName, identifier: adbId, booted: adbId != nil, platform: .android)
}
}

Perhaps a simple && !$0.contains(" |") in the filter would be sufficient, as I don't think emulator names could/would contain | in their name.

New feature: show android emulator on disk

The goal is to add a new feature in Android subsection with an option to view emulator on disk (open in finder).

All the AVD images are placed under: ~/.android/avd. Each one has its own .ini file with the path key that will allow opening it using finder.

When developing this, pay close attention to a case when the user renames the emulator in Android Studio.

New feature: pin emulator to the top of the list

The goal of this issue is to add a new feature that would allow users to "pin" simulators / emulators to the top of its corresponding sections (iOS/Android).

This would require adding a new field in the Device struct and then filtering the list when populating NSMenu so that favorite items are pinned to the top.

ShellOut encountered an error Status code: 127

I just installed it via Homebrew and wanted to launch the app, but I got an error only. Similar to #39 (comment)

MiniSim - ShellOut encountered an error Status code: 127
Message: "/bin/bash: /Users/xyz/Library/Android/sdk/emulator/emulator:
No such file or directory"
Output: ""

Haven't done anything else.

macOS 12.6.3
iMac intel
Never done anything with Android, so I don't know if there is more software needed before using MiniSim.

errormessage

MiniSim - ShellOut encountered an error

Hello,

This issue is happening when we force close apps on Apple M1 Pro - macOS 13.2.1 (22D68)
then I have to restart machine, it means I could not close the warning message as below.

image

MiniSim - ShellOut encountered an error
Status code: 143
Message: "2023-03-13 12:28:28.084 Simulator[12018:156231] -[IOBluetoothDeviceInquiry initWithDelegate:] -  0x600002000ca0
2023-03-13 12:28:44.460 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x60000156d440>'
2023-03-13 12:28:58.787 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x60000156d440>'
2023-03-13 12:29:15.335 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:29:46.859 Simulator[12018:156231] -[IOBluetoothDeviceInquiry dealloc] -  0x600002000ca0
2023-03-13 12:30:24.137 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:33:21.711 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:35:36.380 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:36:14.614 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:38:16.138 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:38:20.939 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:39:34.736 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:40:02.352 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:40:16.568 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:40:42.745 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:40:59.011 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:41:33.743 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:47:58.068 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:48:37.932 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:48:46.653 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:49:00.391 Simulator[12018:156231] Simulator: Terminating capture support for coordinator '<DeviceCoordinator: 0x600001550a80>'
2023-03-13 12:49:30.028 Simulator[12018:156231] 

Screenshot 2023-03-14 at 14 11 37

Idea: Raycast Extension for MiniSim

Hey there, thanks for this great project! I'm a React Native developer as well, and before stumbling upon this tool, I've been using a Raycast Simulator Control extension for booting up simulators. Sadly it didn't support emulators, so this is a really nice tool to have.

I like the feature of copying ID/names too so i can install RN apps directly for those simulators 😊

It will be nice if there's a Raycast extension for MiniSim! I do have experience building a Raycast extension so I could help with that, but let me know your thoughts about this idea.

Custom command to boot devices

MiniSim - Custom Command Error
ShellOut encountered an error
Status code: 149
Message: "An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=405):
Unable to boot device in current state: Booted"
Output: ""

my custom command is : xcrun simctl boot $uuid --arch=x86_64

image

Feature ideas 💡✨

In this issue I want to track future feature ideas and gather some feedback around what you want to see next!

  • Turn on / off accessibility on Android Emulators
  • Send text to Android emulator
  • Clean derived data for each app separately
  • Show emulator on disk
  • Add emulators to favourites
  • Customise shortcuts launching emulators
  • Show / Hide - Android / iOS sections
  • copy simulator name for iOS to use in the terminal
  • copy android emulator device id to use in adb
  • Installed apps management
  • Show which android emulator has google play services (by @krozniata)
  • Show which flags were used to launch emulator (by @krozniata)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.