[GH-ISSUE #1389] One Android Emulator Available, But Proxyman Sees Two #1384

Open
opened 2026-03-03 19:51:00 +03:00 by kerem · 4 comments
Owner

Originally created by @armen-y on GitHub (Oct 12, 2022).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1389

Originally assigned to: @NghiaTranUIT on GitHub.

Description

Only one Android emulator exists on my system, as reported by both Android Studio and the adb devices command. Proxyman reports that there are two.

Steps to Reproduce

Cannot provide steps to reproduce. But can provide evidence, in the form a a screenshot, attached.

Current Behavior

Proxyman's Certificate -> Install Certificate on Android -> Emulators -> Override Emulator unavailable due to phantom second emulator visible to Proxyman, but invisible to adb devices.

Expected Behavior

Overriding the one extant emulator should be possible.

Environment

Proxyman Version 3.11.0 (31100)

macOS Monterey 12.6, arm64

Android Debug Bridge version 1.0.41
Version 33.0.3-8952118

Android Studio Dolphin | 2021.3.1
Build #AI-213.7172.25.2113.9014738, built on August 31, 2022
Runtime version: 11.0.13+0-b1751.21-8125866 aarch64

Proxyman
Originally created by @armen-y on GitHub (Oct 12, 2022). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1389 Originally assigned to: @NghiaTranUIT on GitHub. ## Description Only one Android emulator exists on my system, as reported by both Android Studio and the `adb devices` command. Proxyman reports that there are two. ## Steps to Reproduce Cannot provide steps to reproduce. But can provide evidence, in the form a a screenshot, attached. ## Current Behavior Proxyman's `Certificate -> Install Certificate on Android -> Emulators -> Override Emulator` unavailable due to phantom second emulator visible to Proxyman, but invisible to `adb devices`. ## Expected Behavior Overriding the one extant emulator should be possible. ## Environment Proxyman Version 3.11.0 (31100) macOS Monterey 12.6, arm64 Android Debug Bridge version 1.0.41 Version 33.0.3-8952118 Android Studio Dolphin | 2021.3.1 Build #AI-213.7172.25.2113.9014738, built on August 31, 2022 Runtime version: 11.0.13+0-b1751.21-8125866 aarch64 <img width="1976" alt="Proxyman" src="https://user-images.githubusercontent.com/83722897/195414292-35ae3e9a-100f-40fb-bef8-cc58cd86f464.png">
Author
Owner

@NghiaTranUIT commented on GitHub (Oct 13, 2022):

Look like it's a bug.

To count the number of emulators, Proxyman reads the Running Processes in the Monitor Activity app. (NSWorkspace.runningApplications), and counts how many processes which has the prefix name: qemu-system

If the executable path also contains the Android/sdk/emulator, it's an Android Emulator.


If you don't mind @armen-y, please

  1. open the Monitor Activity app
  2. Filter qemu-system
  3. See how many processes.
Screen Shot 2022-10-13 at 08 46 49

=> Please kill all of them to fix the bug.


Maybe I also allow running the scripts if there are >= 2 devices.

<!-- gh-comment-id:1276922896 --> @NghiaTranUIT commented on GitHub (Oct 13, 2022): Look like it's a bug. To count the number of emulators, Proxyman reads the Running Processes in the Monitor Activity app. ([NSWorkspace.runningApplications](https://developer.apple.com/documentation/appkit/nsworkspace/1534059-runningapplications)), and counts how many processes which has the prefix name: `qemu-system` If the executable path also contains the `Android/sdk/emulator`, it's an Android Emulator. -------------- If you don't mind @armen-y, please 1. open the Monitor Activity app 2. Filter `qemu-system` 3. See how many processes. <img width="1148" alt="Screen Shot 2022-10-13 at 08 46 49" src="https://user-images.githubusercontent.com/5878421/195480067-964e4fde-cc78-40b9-b6a7-8e63eb4804a0.png"> => Please kill all of them to fix the bug. -------------- Maybe I also allow running the scripts if there are >= 2 devices.
Author
Owner

@NghiaTranUIT commented on GitHub (Oct 13, 2022):

@armen-y let's try this Beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.11.0_Support_multiple_android_emulators.dmg

I've improved the Bash script to support multiple Android Emulators 👍

Proxyman with Android Emulator

<!-- gh-comment-id:1277185534 --> @NghiaTranUIT commented on GitHub (Oct 13, 2022): @armen-y let's try this Beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.11.0_Support_multiple_android_emulators.dmg I've improved the Bash script to support multiple Android Emulators 👍 ![Proxyman with Android Emulator](https://user-images.githubusercontent.com/5878421/195535830-3f44d461-9144-4dd1-9aa9-e3ad6c9991f2.jpg)
Author
Owner

@armen-y commented on GitHub (Oct 13, 2022):

Hi Nghia,

I like the beta, looks good to me! Here are my findings, from the
screenshot attached.

  • Both adb get-state and adb devices show only a single emulator available.
    Android Studio shows only one available emulator.
  • Process list does show two qemu processes, just like you predicted. One
    of them is a "phantom" process for a non-existent emulator. I expect this
    will disappear after a reboot or manual kill.
  • Proxyman beta 3.11.0 correctly installs and uninstalls the cert for the
    one available emulator without error. It silently ignores the missing
    emulator.

I think this is perfect! Many thanks for your help!!
-A.

[image: Devices.png]

On Thu, Oct 13, 2022 at 12:53 AM Nghia Tran @.***>
wrote:

@armen-y https://github.com/armen-y let's try this Beta build:
https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.11.0_Support_multiple_android_emulators.dmg

I've improved the Bash script to support multiple Android Emulators 👍

[image: Proxyman with Android Emulator]
https://user-images.githubusercontent.com/5878421/195535830-3f44d461-9144-4dd1-9aa9-e3ad6c9991f2.jpg


Reply to this email directly, view it on GitHub
https://github.com/ProxymanApp/Proxyman/issues/1389#issuecomment-1277185534,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT6YFENC4DJZZEQHFE6TUADWC65YLANCNFSM6AAAAAARDQYDEQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

<!-- gh-comment-id:1278104312 --> @armen-y commented on GitHub (Oct 13, 2022): Hi Nghia, I like the beta, looks good to me! Here are my findings, from the screenshot attached. - Both adb get-state and adb devices show only a single emulator available. Android Studio shows only one available emulator. - Process list does show two qemu processes, just like you predicted. One of them is a "phantom" process for a non-existent emulator. I expect this will disappear after a reboot or manual kill. - Proxyman beta 3.11.0 correctly installs and uninstalls the cert for the one available emulator without error. It silently ignores the missing emulator. I think this is perfect! Many thanks for your help!! -A. [image: Devices.png] On Thu, Oct 13, 2022 at 12:53 AM Nghia Tran ***@***.***> wrote: > @armen-y <https://github.com/armen-y> let's try this Beta build: > https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.11.0_Support_multiple_android_emulators.dmg > > I've improved the Bash script to support multiple Android Emulators 👍 > > [image: Proxyman with Android Emulator] > <https://user-images.githubusercontent.com/5878421/195535830-3f44d461-9144-4dd1-9aa9-e3ad6c9991f2.jpg> > > — > Reply to this email directly, view it on GitHub > <https://github.com/ProxymanApp/Proxyman/issues/1389#issuecomment-1277185534>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AT6YFENC4DJZZEQHFE6TUADWC65YLANCNFSM6AAAAAARDQYDEQ> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Author
Owner

@NghiaTranUIT commented on GitHub (Oct 14, 2022):

Awesome, glad to know that it works 😄

Gonna ship this feature soon 🙌

<!-- gh-comment-id:1278317654 --> @NghiaTranUIT commented on GitHub (Oct 14, 2022): Awesome, glad to know that it works 😄 Gonna ship this feature soon 🙌
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#1384
No description provided.