LSPosed / MagiskOnWSALocal

Integrate Magisk root and Google Apps into WSA (Windows Subsystem for Android)
GNU Affero General Public License v3.0
9.6k stars 23.13k forks source link

[Bug] Play Store crashes when you try to install any app #550

Closed MustardChef closed 1 year ago

MustardChef commented 1 year ago

Steps to reproduce/复现步骤

  1. Build WSA using MagiskOnWSALocal
  2. Open and sign in to your Google Account in the Google Play Store
  3. Try to install an app
  4. Play Store will crash

Expected behaviour/预期行为

Application from the Play Store should install withou any issue

Actual behaviour/实际行为

Play Store crashes

MagiskOnWSALocal commit full SHA/MagiskOnWSALocal 提交的完整哈希

969d2b2fa69e132b7ad8d220ffa984cf0f4d7c75

Linux distribution info/Linux 发行版信息

OS: Ubuntu 22.04.2 LTS on Windows 10 x86_64 Kernel: 5.15.90.1-microsoft-standard-WSL2

Windows version/Windows 版本

10.0.22621.1702

Build Parameters/构建参数

sudo ./build.sh --arch x64 --release-type WIF --magisk-ver canary --gapps-brand MindTheGapps --gapps-variant pico --root-sol none --compress-format zip --remove-amazon

INFO: Architecture: x64 INFO: Release Type: WIF INFO: Magisk Version: canary INFO: GApps Brand: MindTheGapps INFO: GApps Variant: pico INFO: Root Solution: none INFO: Compress Format: zip Build: RELEASE_TYPE=Insider Fast

Version requirement/版本要求

Logs/日志

[//]: <> (Don't modify above) ``` # Replace this line with the log / 将此行用日志替换 ``` [//]: <> (Don't modify below)
MustardChef commented 1 year ago

I would like to add that this is not an isolated incident, but many people have been having this issue/ are still having this issue.

MustardChef commented 1 year ago

https://github.com/LSPosed/MagiskOnWSALocal/assets/68516357/ddd10410-479d-466d-9458-05a9ceea5ed3

Howard20181 commented 1 year ago

Check microsoft/WSA#309

MustardChef commented 1 year ago

Check microsoft/WSA#309

Ah, so that is the reason for this.

Howard20181 commented 1 year ago

Not thing we can do.

YT-Advanced commented 1 year ago

Not thing we can do.

Turn off the setting "Block installation of malcious apps" will work ? image

Howard20181 commented 1 year ago

Not thing we can do.

Turn off the setting "Block installation of malcious apps" will work ? image

No. Only work if you disable antivirus.

YT-Advanced commented 1 year ago

Only work if you disable antivirus.

Hmm, so sad :(

MustardChef commented 1 year ago

I would like to add that some users are also having their Play Store app crash without installing anything. Is this also to do with the WSA stated earlier

Howard20181 commented 1 year ago

I would like to add that some users are also having their Play Store app crash without installing anything. Is this also to do with the WSA stated earlier

Did only the Play Store crash (single app) or the entire WSA crash (entire WSA reload)? Logs are needed to know what happened.

marchingon12 commented 1 year ago

System Info:

OS: Windows 11 Home
CPU: Ryzen 7 4800H
RAM: 32GB DDR4 SDRAM
iGPU: AMD Radeon Graphics
GPU: NVIDIA RTX 2060
Model name: OMEN 15 Laptop (HP)

On behalf of @MustardChef I will be providing some visual evidence and logs (they may not be 100% accurate to the videos as they were recorded in an earlier time). There are two parts in the investigation:

  1. Installing WSA with Magisk and Play Store without AmazonAppstore:

WSA seems to be running in the background, setting up stuff that is required for it to work properly. However, no apps get installed and Android Settings appears to launch but will not load, ultimately killing itself altogether. I restart the whole laptop (part 2).

https://streamable.com/kk98lg

Logs included:

20230524123514.log 20230524123831.log 20230524123900.log 20230524124048.log 20230524123323.log

  1. Signing in to Play Store before trying to install an app (Instagram)

Play Store seems to crash before installing any app, I'm suspecting maybe something trying to get installed/updated in the background like Play Services or AR Services. There are no notification pop-ups indicating any installations or updates.

https://streamable.com/ts1eil

Logs included:

20230524125524.log 20230524125719.log 20230524125044.log

Howard20181 commented 1 year ago

Try turning off all manually installed antivirus software, leaving only Microsoft Defender.

marchingon12 commented 1 year ago

Installing works without any crashing when only Microsoft Defender is on, it's quite apparent to your findings on https://github.com/microsoft/WSA/issues/309

Howard20181 commented 1 year ago

From the logs, the line I FileSystemRedirectionHandler: Package verification request always appears a few seconds before the system crashes. When installing the application, WSA will call FileSystemRedirectionHandler to forward the file to the antivirus software on Windows for real-time scanning, regardless of whether the "Prevent malware installation" is disabled (this feature will prevent the installation of malware when it is turned on, and pop-up notifications when it is turned off, so it needs to be scanned whether it is turned on or off), but some third-party antivirus providers incorrectly implement the engine display name, which can cause WsaClient to crash.

There are several situations that may trigger a Package verification request

  1. when trying to install Magisk App during a new WSA installation
  2. The Play Store will update itself automatically when needed
  3. The Play Store will update the Play service when needed (this can happen at login)
  4. Installing the app by any method (including installing on the Play Store)
MustardChef commented 1 year ago

So this is still due to the Package Verification/ Malicious app detection feature on WSA, right?

Howard20181 commented 1 year ago

So this is still due to the Package Verification/ Malicious app detection feature on WSA?

Yes, and you can't turn off scanning, the difference between the switch is just alert or block. Turning the switch on is blocking, turning it off is alerting.

marchingon12 commented 1 year ago

Seems to have been fixed with the release of WSA_2304.40000.7.0_x64, tested on latest build with Magisk + MindTheGapps - AmazonAppstore

MustardChef commented 1 year ago

Will close the issue as it is no longer an issue now.