MustardChef / WSABuilds

Run Windows Subsystem For Android on your Windows 10 and Windows 11 PC using prebuilt binaries with Google Play Store (MindTheGapps) and/or Magisk or KernelSU (root solutions) built in.
GNU Affero General Public License v3.0
8.2k stars 1.37k forks source link

[REQUEST] Build with MicroG instead of normal GApps #262

Closed dabockster closed 6 months ago

dabockster commented 10 months ago

Describe your request

Currently we can't use MicroG instead of regular GApps in WSL when we install it as a user (due to valid security reasons by Microsoft related to app spoofing by malicious actors). So with that option out of the question for the foreseeable future, I was wondering if there's a way to install MicroG at build time so that WSL thinks MicroG is the "real" GApps and Google's is the spoofed one.

fillwithjoy1 commented 9 months ago

maybe it could be baked into the ROM

MichaelZ4714 commented 8 months ago

I managed to get it running, though it is not easy. I installed the WSA package with Magisk and without GApps. I installed a file manager with root access. Then I copied /system/framework/services.jar to the pc and patched it so Signature Spoofing is included. A guide is in this post. Then I added the Magisk module MinMicroG and added the patched services.jar to the module directory so it replaces the original one. Before booting I installed the migroG apk as user app. I don't know if this is still necessary, but with previous WSA releases the system did not boot without. After reboot there is a full working microG.

Edit: I forgot to mention that also services.odex and services.vdex need to be created and put into the Magisk module.

fillwithjoy1 commented 8 months ago

I managed to get it running, though it is not easy. I installed the WSA package with Magisk and without GApps. I installed a file manager with root access. Then I copied /system/framework/services.jar to the pc and patched it so Signature Spoofing is included. A guide is in this post. Then I added the Magisk module MinMicroG and added the patched services.jar to the module directory so it replaces the original one. Before booting I installed the migroG apk as user app. I don't know if this is still necessary, but with previous WSA releases the system did not boot without. After reboot there is a full working microG.

Edit: I forgot to mention that also services.odex and services.vdex need to be created and put into the Magisk module.

me after seeing the amount of steps required https://media1.tenor.com/m/XIJPpDD7Bc0AAAAC/squidward-squidward-shocked.gif

MichaelZ4714 commented 8 months ago

If you trust foreign binaries I could post here the files for WSA 1.8.32836.0, 2307.40000.3.0 and 2307.40000.6.0. I don't have a newer WSA running because of a problem with building it with integrated Magisk-Delta.

MustardChef commented 8 months ago

I am having a look at the feasibility of having a MicroG WSA Build without using Magisk and all the long steps to implement it manually. Looks like it is possible. No promises yet.

MichaelZ4714 commented 8 months ago

Yes, I can imagine that it's possible. From my point of view only the three mentioned files need to be replaced. And for WSA the app SignatureSpoofing.apk needed to be installed. Afaik it only sets a privilege. I'm willing to test.

MustardChef commented 8 months ago

Once my new PC arrives, I will begin work on implementing it into the MagiskOnWSA script. I might create a separate repo for WSA with MicroG, if all goes well.

fillwithjoy1 commented 8 months ago

I don't know if this is still necessary, but with previous WSA releases the system did not boot without. After reboot there is a full working microG.

I'm using March 2023 build because it's "Advanced Networking" is actually able to connect to my phone via wi-fi instead of the newer versions, where it's replaced by a another similar sounding feature that breaks that. So I'm nervous whether I can patch that with microG

MustardChef commented 6 months ago

Plan scrapped, as WSA has been discontinued. Sorry for any inconvenience caused.