Skip to content

Commit 308a84b

Browse files
authored
Merge branch 'okwasniewski:main' into main
2 parents 2c9d80b + da002a3 commit 308a84b

File tree

2 files changed

+95
-16
lines changed

2 files changed

+95
-16
lines changed

README.md

+17-16
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

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

9-
Written in Swift and AppKit.
9+
Written in Swift and AppKit.
1010

1111
## Install
1212

@@ -20,39 +20,40 @@ brew install --cask minisim
2020

2121
You can use Minisim together with a [Raycast](https://www.raycast.com) extension.
2222

23-
<a title="Install minisim Raycast Extension" href="https://www.raycast.com/okwasniewski/minisim"><img src="https://www.raycast.com/okwasniewski/minisim/[email protected]?v=1.1" height="64" alt="" style="height: 64px;"></a>
23+
<a title="Install minisim Raycast Extension" href="https://www.raycast.com/okwasniewski/minisim"><img src="https://www.raycast.com/okwasniewski/minisim/[email protected]?v=1.1" height="64" alt="" style="height: 64px;"></a>
2424

2525
## Features
26+
2627
- Lightweight
2728
- Fast, 100% native
2829
- Open Source
2930
- Open with shortcut: <kbd>⌥ + ⇧ + e</kbd>
3031
- Launch iOS emulators
31-
- Copy device UDID
32-
- Copy device name
33-
- Delete simulators
32+
- Copy device UDID
33+
- Copy device name
34+
- Delete simulators
3435
- Launch Android emulators
35-
- Cold boot android emulators
36-
- Run android emulators without audio (Your bluetooth headphones will thank you 🎧)
37-
- Toggle a11y on selected emulator
38-
- Copy device name
39-
- Copy device ADB id
36+
- Cold boot android emulators
37+
- Run android emulators without audio (Your bluetooth headphones will thank you 🎧)
38+
- Toggle a11y on selected emulator
39+
- Copy device name
40+
- Copy device ADB id
4041
- Focus devices using accessibility API
41-
- Set default launch flags
42+
- Set default launch flags
4243
- Indicate running devices
4344

44-
45-
## Screenshots
45+
## Screenshots
4646

4747
<img width="512" src="https://user-images.githubusercontent.com/52801365/223483262-aa3bad72-2948-4893-87a0-578e5d3d8e89.png">
4848

4949
https://user-images.githubusercontent.com/52801365/224473566-a6248f20-8fc9-4b8e-ab95-64e85bc6d5c6.mp4
5050

51-
## Usage
51+
## Usage
5252

5353
> **important**
54-
This utility uses `xcrun` and `sdk/emulator` to fetch available devices on your machine.
55-
It might not work if you don't have a proper XCode and Android Studio setup.
54+
> This utility uses `xcrun` and `sdk/emulator` to fetch available devices on your machine.
55+
> It might not work if you don't have a proper XCode and Android Studio setup.
5656
5757
There is a global shortcut for invoking the menu: <kbd>⌥ + ⇧ + e</kbd>.
5858

59+
Checkout the docs [here](https://github.com/okwasniewski/MiniSim/tree/main/docs).

docs/custom_commands.md

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
## What are custom commands?
2+
3+
Custom commands allows you to add additional menu items that speed up your workflow. If you have a command that you execute regularly through terminal you can convert it to custom command and make your life easier.
4+
5+
Some examples of custom commands:
6+
7+
- Execute a sequence of clicks to log into your app
8+
- Reverse Android emulator port (for React Native)
9+
- Open iOS deep link
10+
- Open Logcat
11+
12+
## Creating your first command
13+
14+
1. Go to Preferences > Commands > Add new
15+
2. Assign a name
16+
3. Write custom command
17+
18+
For Android you will most likely use ADB:
19+
20+
```sh
21+
$adb_path -s $adb_id reverse tcp:8081 tcp:8081
22+
```
23+
24+
You can find available variables that you can use based on selected toggles if command needs booted device or not.
25+
26+
Let's break down the command:
27+
28+
- `$adb_path` - absolute path of the ADB utility
29+
- `-s $adb_id` - executes command on emulator with a given ID (useful when you have multiple emulators running)
30+
- `reverse tcp:8081 tcp:8081` rest of the ADB command. Run `adb --help` to check out what can be done.
31+
32+
For iOS you will most likely use `xcrun simctl` utility:
33+
34+
```sh
35+
$xcrun_path simctl openurl booted "app://test.com"
36+
```
37+
38+
You can identify simulators by the `$uuid` variable.
39+
40+
4. Choose icon
41+
5. Click Add
42+
43+
Done! ✅
44+
45+
## Ready to use recipes
46+
47+
Here you can find a list of ready to use commands.
48+
49+
### Reverse React Native Metro port
50+
51+
```sh
52+
$adb_path -s $adb_id reverse tcp:8081 tcp:8081
53+
```
54+
55+
### Launch Logcat
56+
57+
```sh
58+
osascript -e 'tell app "Terminal"
59+
do script "adb logcat -v color"
60+
end tell'
61+
```
62+
63+
### Login in to your app
64+
65+
```sh
66+
$adb_path -s $adb_id
67+
shell input text "[email protected]"
68+
&& $adb_path -s $adb_id shell input tap 500 600
69+
&& $adb_path -s $adb_id shell input text "password"
70+
```
71+
72+
_This might need some tweaking to fit your app_
73+
74+
### Wipe emulator data
75+
76+
```sh
77+
$android_home_path/emulator/emulator @$device_name -wipe-data
78+
```

0 commit comments

Comments
 (0)