[GH-ISSUE #1916] Android emulator setup script doesnt work for Medium phone android 14 (api 34) #1907

Closed
opened 2026-03-03 19:55:20 +03:00 by kerem · 13 comments
Owner

Originally created by @StanislavMayorov on GitHub (Jan 19, 2024).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1916

Originally assigned to: @NghiaTranUIT on GitHub.

Description

@NghiaTranUIT hello. SSL proxy doesn't works for android 14 emulator (Google API). It works fine for android 13. There's no error in the patch script.

Steps to Reproduce

  1. Install and run android emulator API 34 (Google API)
    Screenshot 2024-01-19 at 17 05 39
  2. Click override emulator
Screenshot 2024-01-19 at 15 27 51

Current Behavior

SSL proxy doesn't work.

Expected Behavior

SSL proxy works.

Environment

  • App version: 4.16.0
  • macOS version: 13.6.3
Originally created by @StanislavMayorov on GitHub (Jan 19, 2024). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1916 Originally assigned to: @NghiaTranUIT on GitHub. ## Description <!--- Description for the bug? --> @NghiaTranUIT hello. SSL proxy doesn't works for android 14 emulator (Google API). It works fine for android 13. There's no error in the patch script. ## Steps to Reproduce <!-- Add relevant code and/or a live example --> 1. Install and run android emulator API 34 (Google API) <img width="1061" alt="Screenshot 2024-01-19 at 17 05 39" src="https://github.com/ProxymanApp/Proxyman/assets/11670429/00cdac49-ab58-4682-95bf-111ac0c0baf7"> 2. Click override emulator <img width="800" alt="Screenshot 2024-01-19 at 15 27 51" src="https://github.com/ProxymanApp/Proxyman/assets/11670429/85ca5857-3eaa-41cc-a0aa-be372c11ec07"> ## Current Behavior SSL proxy doesn't work. <!--- What went wrong? --> ## Expected Behavior SSL proxy works. <!--- What should have happened? --> ## Environment - App version: 4.16.0 - macOS version: 13.6.3
kerem 2026-03-03 19:55:20 +03:00
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 21, 2024):

@StanislavMayorov can you verify the Proxyman Certificate is installed in Setting app -> Security -> Encryption & Credential -> Trusted Certificate -> User Tab?

May I ask: If you finish the step 5 in the Android docs: https://docs.proxyman.io/debug-devices/android-device

  • Add res/xml/network_security_config.xml
  • Add to AndroidManifest.xml

to your android app source code?

<!-- gh-comment-id:1902473879 --> @NghiaTranUIT commented on GitHub (Jan 21, 2024): @StanislavMayorov can you verify the Proxyman Certificate is installed in Setting app -> Security -> Encryption & Credential -> Trusted Certificate -> User Tab? May I ask: If you finish the step 5 in the Android docs: https://docs.proxyman.io/debug-devices/android-device - Add res/xml/network_security_config.xml - Add to AndroidManifest.xml to your android app source code?
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 21, 2024):

@StanislavMayorov I tested again and it works fine with Android API 34
Screenshot 2024-01-21 at 09 36 01

Screenshot 2024-01-21 at 09 36 18
<!-- gh-comment-id:1902483255 --> @NghiaTranUIT commented on GitHub (Jan 21, 2024): @StanislavMayorov I tested again and it works fine with Android API 34 ![Screenshot 2024-01-21 at 09 36 01](https://github.com/ProxymanApp/Proxyman/assets/5878421/ce43204c-f0e3-4f2d-b9d4-aeb7d3df5c28) <img width="550" alt="Screenshot 2024-01-21 at 09 36 18" src="https://github.com/ProxymanApp/Proxyman/assets/5878421/7bb6c876-4ced-43a1-ae76-bf3486ba6838"> - The important point: You have to complete the 5th Step in the Android Emulator Guide. Otherwise, you will get an SSL Error. - Here is the android project: https://github.com/ProxymanApp/OKHTTP-Android-Sample
Author
Owner

@StanislavMayorov commented on GitHub (Jan 21, 2024):

@NghiaTranUIT thank you for reply. I tested OKHTTP-Android-Sample and reproduced the same error like in my app.

OKHTTP-Android-Sample Error:

Request failed:
java.security.cert.CertPathValidatorException
Trust anchor for certification path not found
Screenshot 2024-01-21 at 18 17 54 Screenshot 2024-01-21 at 17 43 48 Screenshot 2024-01-21 at 18 18 52 Screenshot 2024-01-21 at 18 13 18

@StanislavMayorov can you verify the Proxyman Certificate is installed in Setting app -> Security -> Encryption & Credential -> Trusted Certificate -> User Tab?

May I ask: If you finish the step 5 in the Android docs: https://docs.proxyman.io/debug-devices/android-device

  • Add res/xml/network_security_config.xml
  • Add to AndroidManifest.xml

to your android app source code?

Yes. So my app works on android API 33. I tested using OKHTTP-Android-Sample to have the same env.

<!-- gh-comment-id:1902671940 --> @StanislavMayorov commented on GitHub (Jan 21, 2024): @NghiaTranUIT thank you for reply. I tested [OKHTTP-Android-Sample](https://github.com/ProxymanApp/OKHTTP-Android-Sample) and reproduced the same error like in my app. OKHTTP-Android-Sample Error: ``` Request failed: java.security.cert.CertPathValidatorException Trust anchor for certification path not found ``` <img width="591" alt="Screenshot 2024-01-21 at 18 17 54" src="https://github.com/ProxymanApp/Proxyman/assets/11670429/98bda48b-b2f7-4845-b595-2e5dcf81619c"> <img width="522" alt="Screenshot 2024-01-21 at 17 43 48" src="https://github.com/ProxymanApp/Proxyman/assets/11670429/9c4a22e4-d510-4c8e-bf12-96450e69a8e2"> <img width="491" alt="Screenshot 2024-01-21 at 18 18 52" src="https://github.com/ProxymanApp/Proxyman/assets/11670429/2dc7557c-e5cb-4bc6-88e8-63544768ef34"> <img width="1447" alt="Screenshot 2024-01-21 at 18 13 18" src="https://github.com/ProxymanApp/Proxyman/assets/11670429/c458360a-7312-4fdb-8283-ba8e73053f8f"> > @StanislavMayorov can you verify the Proxyman Certificate is installed in Setting app -> Security -> Encryption & Credential -> Trusted Certificate -> User Tab? > > May I ask: If you finish the step 5 in the Android docs: https://docs.proxyman.io/debug-devices/android-device > > * Add res/xml/network_security_config.xml > * Add to AndroidManifest.xml > > to your android app source code? Yes. So my app works on android API 33. I tested using OKHTTP-Android-Sample to have the same env.
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 22, 2024):

It's odd. Let me try again with your emulator (Created by Other Image Tab -> Upsidedown Cake, API 34, Google APIs).

Mime was created from the Recommended Tab.

<!-- gh-comment-id:1902872719 --> @NghiaTranUIT commented on GitHub (Jan 22, 2024): It's odd. Let me try again with your emulator (Created by Other Image Tab -> Upsidedown Cake, API 34, Google APIs). Mime was created from the Recommended Tab.
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 25, 2024):

@StanislavMayorov it just works fine again with the sample code, that I provide you.

There is something odd, the first request always fails. If you re-send the GET request again, it will work.

<!-- gh-comment-id:1909229749 --> @NghiaTranUIT commented on GitHub (Jan 25, 2024): @StanislavMayorov it just works fine again with the sample code, that I provide you. There is something odd, the first request always fails. If you re-send the GET request again, it will work.
Author
Owner

@StanislavMayorov commented on GitHub (Jan 26, 2024):

@NghiaTranUIT I got it. I can reproduce it only on the new Medium phone template! It works fine on pixel 7 with the same API SDK. I have android studio 2023.1.1. Medium phone template is a new one.
Screenshot 2024-01-26 at 15 34 57
Screenshot 2024-01-26 at 15 35 30

<!-- gh-comment-id:1912009678 --> @StanislavMayorov commented on GitHub (Jan 26, 2024): @NghiaTranUIT I got it. I can reproduce it only on the new `Medium phone` template! It works fine on `pixel 7` with the same API SDK. I have android studio 2023.1.1. `Medium phone` template is a new one. <img width="638" alt="Screenshot 2024-01-26 at 15 34 57" src="https://github.com/ProxymanApp/Proxyman/assets/11670429/85385140-b8db-49d9-8295-fc1a99bfb316"> <img width="1095" alt="Screenshot 2024-01-26 at 15 35 30" src="https://github.com/ProxymanApp/Proxyman/assets/11670429/792e74c0-e3b8-4b7f-9217-fc56a834c8d3">
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 27, 2024):

@StanislavMayorov

Medium Phone doesn't work with Proxyman because it's a PlayStore version. Pixel phone works fine because it's not 👍

Screenshot 2024-01-27 at 10 21 56

<!-- gh-comment-id:1912942922 --> @NghiaTranUIT commented on GitHub (Jan 27, 2024): @StanislavMayorov Medium Phone doesn't work with Proxyman because it's a PlayStore version. Pixel phone works fine because it's not 👍 ![Screenshot 2024-01-27 at 10 21 56](https://github.com/ProxymanApp/Proxyman/assets/5878421/e31b9297-d2d2-4c30-9332-aa37414a6a30)
Author
Owner

@StanislavMayorov commented on GitHub (Jan 29, 2024):

@NghiaTranUIT pixel 7 has the same play store icon, but it works fine with Google API image.

image

<!-- gh-comment-id:1914163668 --> @StanislavMayorov commented on GitHub (Jan 29, 2024): @NghiaTranUIT pixel 7 has the same play store icon, but it works fine with Google API image. ![image](https://github.com/ProxymanApp/Proxyman/assets/11670429/3fdd8881-fa99-4b1d-a195-82466d694ecc)
Author
Owner

@StanislavMayorov commented on GitHub (Feb 6, 2024):

@NghiaTranUIT Hello. Pixel 7 and Medium Phone have the same play store icon. Could you explain the difference please?

300149741-e31b9297-d2d2-4c30-9332-aa37414a6a30

<!-- gh-comment-id:1929612417 --> @StanislavMayorov commented on GitHub (Feb 6, 2024): @NghiaTranUIT Hello. Pixel 7 and Medium Phone have the same play store icon. Could you explain the difference please? ![300149741-e31b9297-d2d2-4c30-9332-aa37414a6a30](https://github.com/ProxymanApp/Proxyman/assets/11670429/4e254f8e-575a-404d-9b11-30cf3593f081)
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 6, 2024):

Sorry, I don't know honestly. I guess it's how Medium Phone Emulator works, it doesn't allow the Mitm app to decrypt their data. You can try with other proxy apps, like Charles Proxy.

May I ask: Why do you need to use the Medium Phone? Can we try the Pixel phone with the same API? 🤔

<!-- gh-comment-id:1929900186 --> @NghiaTranUIT commented on GitHub (Feb 6, 2024): Sorry, I don't know honestly. I guess it's how Medium Phone Emulator works, it doesn't allow the Mitm app to decrypt their data. You can try with other proxy apps, like Charles Proxy. May I ask: Why do you need to use the `Medium` Phone? Can we try the Pixel phone with the same API? 🤔
Author
Owner

@StanislavMayorov commented on GitHub (Feb 7, 2024):

@NghiaTranUIT I can use pixel instead of Medium Phone. Pixel works fine with the same API. I hadn't just known about this compatibility issue. It had been confusing.
Can you update this comment to describe that only pixel emulator is supported please?
Screenshot 2024-02-07 at 12 31 10

<!-- gh-comment-id:1931753509 --> @StanislavMayorov commented on GitHub (Feb 7, 2024): @NghiaTranUIT I can use `pixel` instead of `Medium Phone`. Pixel works fine with the same API. I hadn't just known about this compatibility issue. It had been confusing. Can you update this comment to describe that only pixel emulator is supported please? <img width="749" alt="Screenshot 2024-02-07 at 12 31 10" src="https://github.com/ProxymanApp/Proxyman/assets/11670429/12c5a60a-b0d9-4d9c-b7b3-7885eb1bccaf">
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 7, 2024):

Sure, I will add this note. For now, I might update the online documentation first 👍

<!-- gh-comment-id:1932007082 --> @NghiaTranUIT commented on GitHub (Feb 7, 2024): Sure, I will add this note. For now, I might update the online documentation first 👍
Author
Owner

@StanislavMayorov commented on GitHub (Feb 7, 2024):

thank you!

<!-- gh-comment-id:1932088832 --> @StanislavMayorov commented on GitHub (Feb 7, 2024): thank you!
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#1907
No description provided.