microg / GmsCore

Free implementation of Play Services
https://microg.org
Apache License 2.0
7.75k stars 1.62k forks source link

MicroG not working properly on WSA #1834

Closed fillwithjoy1 closed 1 year ago

fillwithjoy1 commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

The bug I'm facing is that microG isn't properly working in apps that require Google Play Services, although microG reports that it is ready image However using an app that requires Google Play Services still fails image And using Youtube Music simply crashes image

To Reproduce Steps to reproduce the behavior:

  1. Make sure you have adb tools available
  2. Download the fragment from https://github.com/fillwithjoy1/WSA-Magisk/actions/runs/3514162624
  3. Unzip all files and run Install.ps2 for Powershell
  4. After installing Powershell, open WSA Settings > Developer > Developer Mode and connect to adb
  5. Install GmsCore and all other microG apps using adb install
  6. Install Riru and flash via Magisk and reboot via adb push
  7. Install LSPosed module with Riru and reboot via adb push
  8. Install a root file explorer (I installed droid-ify and used Simple File Manager Pro) and then /data/adb/lspd/manager.apk and copy to downloads, and then install it like usual
  9. Make sure LSPosed manager is active, otherwise reboot
  10. Install FakeGApps and reboot
  11. Check microG app and see that signature spoofing is on and grant all permissions
  12. Use a app that requires Google Play Services
  13. Die inside, realizing that it isn't working and write a report

Expected behavior A clear and concise description of what you expected to happen.

Literally work

Screenshots If applicable, add screenshots to help explain your problem.

System Android Version: 12 (or 12L idk) Custom ROM: Windows Subsystem for Android

Additional context Add any other context about the problem here. None

fillwithjoy1 commented 1 year ago

I will add that if I install microG through a Magisk module opening the microG app crashes which is why I need to rely on the normal app

fillwithjoy1 commented 1 year ago

Logcat upon loading Youtube Music (com.google.android.apps.youtube.music)

logcat.txt

Sapiosenses commented 1 year ago

There were some microG app UI crash fixes in the latest release of GMSCore (v0.2.26.223616), some of which were related to Google account logins.

You may want to try updating to that release and see if it helps.

fillwithjoy1 commented 1 year ago

There were some microG app UI crash fixes in the latest release of GMSCore (v0.2.26.223616), some of which were related to Google account logins.

You may want to try updating to that release and see if it helps.

Nope, updated to that and still getting the same 'Get Google Play Services' error I will mention however that I'm unable to get to /system/priv-app, so I cannot install location modules onto the device, nor set microG as a system app, unless someone manages to find out how to do that

Sapiosenses commented 1 year ago

My comment solely referred to crash fixes. If that's not the problem, then let's see:

I have no experience trying to run microG on Windows Services for Android. It could be a problematic environment.

In step 1 of your problem description you mention downloading something for WSA that apparently has embedded Magisk. I see no reference anywhere on their repo about microG. Do you know for a fact that microG works in that Android emulator?

That repo has a discussion link. If I were you I would ask in their discussion if anyone has experience getting microG to work in that environment.

[doing a bit of research]

From what I can tell a lot of people had problems running microG on WSA, but it might work if you setup the virtual ROM (or whatever they call it) with SELinux in permissive mode.

Are you familiar with ROM building?

fillwithjoy1 commented 1 year ago

I am aware of ROM building for WSA, although I'm a total noob and don't really know anything much about it

Sent with Shortwave https://www.shortwave.com?utm_medium=email&utm_content=signature&utm_source=am95c2luZ2guanMxQGdtYWlsLmNvbQ==

On Sun Dec 25, 2022, 03:51 PM GMT, Sapiosenses @.***> wrote:

My comment solely referred to crash fixes. If that's not the problem, then let's see: I have no experience trying to run microG on Windows Services for Android. It could be a problematic environment. In step 1 of your problem description you mention downloading something for WSA that apparently has embedded Magisk. I see no reference anywhere on their repo about microG. Do you know for a fact that microG works in that Android emulator? That repo has a discussion link. If I were you I would ask in their discussion if anyone has experience getting microG to work in that environment. [doing a bit of research] From what I can tell a lot of people had problems running microG on WSA, but it might work if you setup the virtual ROM (or whatever they call it) with SELinux in permissive mode. Are you familiar with ROM building? — Reply to this email directly, view it on GitHub https://github.com/microg/GmsCore/issues/1834#issuecomment-1364701222, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHBFVTUK27H2Y7MLK3L34BTWPBUPXANCNFSM6AAAAAASGSGWRY. You are receiving this because you authored the thread.Message ID: @.***>

fillwithjoy1 commented 1 year ago

And I am using a WSA + Magisk + NoGApps build which I'm using Magisk to try and install stuff

Sent with Shortwave https://www.shortwave.com?utm_medium=email&utm_content=signature&utm_source=am95c2luZ2guanMxQGdtYWlsLmNvbQ==

On Wed Dec 28, 2022, 10:05 AM GMT, Joy Singh @.***> wrote:

I am aware of ROM building for WSA, although I'm a total noob and don't really know anything much about it

Sent with Shortwave https://www.shortwave.com?utm_medium=email&utm_content=signature&utm_source=am95c2luZ2guanMxQGdtYWlsLmNvbQ==

On Sun Dec 25, 2022, 03:51 PM GMT, Sapiosenses @.***> wrote:

My comment solely referred to crash fixes. If that's not the problem, then let's see: I have no experience trying to run microG on Windows Services for Android. It could be a problematic environment. In step 1 of your problem description you mention downloading something for WSA that apparently has embedded Magisk. I see no reference anywhere on their repo about microG. Do you know for a fact that microG works in that Android emulator? That repo has a discussion link. If I were you I would ask in their discussion if anyone has experience getting microG to work in that environment. [doing a bit of research] From what I can tell a lot of people had problems running microG on WSA, but it might work if you setup the virtual ROM (or whatever they call it) with SELinux in permissive mode. Are you familiar with ROM building? — Reply to this email directly, view it on GitHub https://github.com/microg/GmsCore/issues/1834#issuecomment-1364701222, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHBFVTUK27H2Y7MLK3L34BTWPBUPXANCNFSM6AAAAAASGSGWRY. You are receiving this because you authored the thread.Message ID: @.***>

ale5000-git commented 1 year ago

@fillwithjoy1 The latest version of my microG unofficial installer now support the installation via adb.

You have to extract zip-install.sh from the zip, send both zip-install.sh and the zip to the emulator then run it with: adb shell "sh full_path_on_the_device/zip-install.sh full_path_on_the_device/microg-unofficial-installer-v1.2.0-beta-by-ale5000-OSS-signed.zip"

If you have any problem I can help you.

fillwithjoy1 commented 1 year ago

Hey @ale5000-git, I've pushed it to my downloads on WSA and did the command adb shell "sh /sdcard/download/zip-install.sh /sdcard/download/microg-unofficial-installer-v1.2.0-beta-by-ale5000-OSS-signed.zip" this happens image Alright, I'll use adb shell su image Still stuck for the past 20+ minutes, probably stuck on something. Maybe this other method could help? image Also the same happens if I also execute it as root

ale5000-git commented 1 year ago

@fillwithjoy1

Have you been able to make it working?

fillwithjoy1 commented 1 year ago

@ale5000 http://github.com/ale5000

No I haven't, it's still just stuck on installing in the command prompt

Sent with Shortwave https://www.shortwave.com?utm_medium=email&utm_content=signature&utm_source=am95c2luZ2guanMxQGdtYWlsLmNvbQ==

On Wed Jan 18, 2023, 10:43 AM GMT, ale5000 @.***> wrote:

@fillwithjoy1 https://github.com/fillwithjoy1 Have you been able to make it working? — Reply to this email directly, view it on GitHub https://github.com/microg/GmsCore/issues/1834#issuecomment-1386844854, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHBFVTVRZNEWUSHWREZGDT3WS7CMJANCNFSM6AAAAAASGSGWRY. You are receiving this because you were mentioned.Message ID: @.***>

ale5000-git commented 1 year ago

@fillwithjoy1

Please get the latest zip-install.sh from here: https://raw.githubusercontent.com/micro5k/microg-unofficial-installer/main/zip-content/zip-install.sh Then send to the emulator, then run adb shell, then from inside adb shell run: cd /sdcard/download sh ./zip-install.sh ./microg-unofficial-installer-v1.2.0-beta-by-ale5000-OSS-signed.zip || echo "Err code: ${?}"

So if it fail I can know the error code.

PS: Note the running adb shell and then a command inside it is not the same of running adb shell "command" as the latter has differences and it is more likely to have problems.

fillwithjoy1 commented 1 year ago

@fillwithjoy1

Please get the latest zip-install.sh from here: https://raw.githubusercontent.com/micro5k/microg-unofficial-installer/main/zip-content/zip-install.sh Then send to the emulator, then run adb shell, then from inside adb shell run: cd /sdcard/download sh ./zip-install.sh ./microg-unofficial-installer-v1.2.0-beta-by-ale5000-OSS-signed.zip || echo "Err code: ${?}"

So if it fail I can know the error code.

PS: Note the running adb shell and then a command inside it is not the same of running adb shell "command" as the latter has differences and it is more likely to have problems.

image Hopefully that helps you

ale5000-git commented 1 year ago

@fillwithjoy1 I have released microG unofficial installer v1.3.0 beta that hopefully fix all issues. Could you please try?

It say You must execute this as root only if it cannot detect root (probably because is hidden). If this is the case you can force it with FORCE_ROOT, in this way:

adb shell
cd /sdcard/download
unzip ./microg-unofficial-installer-v1.3.0-beta-by-ale5000-OSS-signed.zip zip-install.sh
FORCE_ROOT=1 sh ./zip-install.sh ./microg-unofficial-installer-v1.3.0-beta-by-ale5000-OSS-signed.zip || echo "Err code: ${?}"
fillwithjoy1 commented 1 year ago

@ale5000-git Thank you for helping me with the process Turns out the system is just mounted as a read-only directory. Tried twice image

ale5000-git commented 1 year ago

It seems to be working at the start but exiting without giving any error, really strange. Could you please try this (it should create a debug log)?

adb shell
cd /sdcard/download
DEBUG_LOG=1 FORCE_ROOT=1 sh ./zip-install.sh ./microg-unofficial-installer-v1.3.0-beta-by-ale5000-OSS-signed.zip || echo "Err code: ${?}"

Then post the log file please.

fillwithjoy1 commented 1 year ago

Weird error now. I've checked the file names and they are identical image

ale5000-git commented 1 year ago

It is really weird since there isn't any place in zip-install.sh that display "ERROR" without a proper error message and also the 1 status code isn't used; this probably is related to a strange failure of su.

Could you please try to root manullay to see if it goes on? Run su manually and then

cd /sdcard/download
unzip ./microg-unofficial-installer-v1.3.0-beta-by-ale5000-OSS-signed.zip zip-install.sh
DEBUG_LOG=1 sh ./zip-install.sh ./microg-unofficial-installer-v1.3.0-beta-by-ale5000-OSS-signed.zip || echo "Err code: ${?}"
fillwithjoy1 commented 1 year ago

[image]

Getting this error. Do I need to replace the zip-install.sh that's in the installer?

On Sat Mar 4, 2023, 09:15 PM GMT, ale5000 @.***> wrote:

It is really weird since there isn't any place in zip-install.sh that display "ERROR" without a proper error message and also the 1 status code isn't used; this probably is related to a strange failure of su. Could you please try to root manullay to see if it goes on? Run su manually and then cd /sdcard/download unzip ./microg-unofficial-installer-v1.3.0-beta-by-ale5000-OSS-signed.zip zip-install.sh DEBUG_LOG=1 sh ./zip-install.sh ./microg-unofficial-installer-v1.3.0-beta-by-ale5000-OSS-signed.zip || echo "Err code: ${?}" — Reply to this email directly, view it on GitHub https://github.com/microg/GmsCore/issues/1834#issuecomment-1454885134, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHBFVTS3CXFEJQ3KSJOJQXDW2OWHXANCNFSM6AAAAAASGSGWRY. You are receiving this because you were mentioned.Message ID: @.***>

ale5000-git commented 1 year ago

@fillwithjoy1 Hi, I don't see any image, maybe there was a problem during the upload.

Do I need to replace the zip-install.sh that's in the installer?

No, if you need to retry maybe try the new test build directly (and extract the new zip-install.sh from there).

JonnyTech commented 1 year ago

@fillwithjoy1 please post directly to Github, replying to the notification email strips attachments and images.

fillwithjoy1 commented 1 year ago

Alright I got it working, but now when I try to add accounts it says 'There was a problem communicating with Google servers. Try again later."

On Thu Mar 9, 2023, 09:16 AM GMT, JonnyTech @.***> wrote:

@fillwithjoy1 https://github.com/fillwithjoy1 please post directly to Github, replying to the notification email strips attachments and images. — Reply to this email directly, view it on GitHub https://github.com/microg/GmsCore/issues/1834#issuecomment-1461629205, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHBFVTXGTOW2O5SZYVL6KITW3GNXVANCNFSM6AAAAAASGSGWRY. You are receiving this because you were mentioned.Message ID: @.***>

ale5000-git commented 1 year ago

It is probably blocked since it isn't a certified device, you have to spoof a certified device in microG settings => Device registration => Select profile => maybe try Motorola Moto G

fillwithjoy1 commented 1 year ago

Tried both device options, Motorola Moto G and Nexus 5X and still getting the same error

On Mon Mar 13, 2023, 02:37 PM GMT, ale5000 @.***> wrote:

It is probably blocked since it isn't a certified device, you have to spoof a certified device in microG settings => Device registration => Select profile => maybe try Motorola Moto G — Reply to this email directly, view it on GitHub https://github.com/microg/GmsCore/issues/1834#issuecomment-1466262382, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHBFVTVHCMYCROIG7ZAKU2TW34WJ3ANCNFSM6AAAAAASGSGWRY. You are receiving this because you were mentioned.Message ID: @.***>

ale5000-git commented 1 year ago

I'm not completely sure but the "block" may be cached somewhere in the server. The best way is:

fillwithjoy1 commented 1 year ago

Got it working! Thank you!

On Tue Mar 14, 2023, 01:26 PM GMT, ale5000 @.***> wrote:

I'm not completely sure but the "block" may be cached somewhere in the server. The best way is:

fillwithjoy1 commented 1 year ago

Checked YouTube Music and apparently it crashes? I re-installed the app and the issue persists, even with an older apk (Dec 2022)

ale5000-git commented 1 year ago

@fillwithjoy1

About YouTube Music, I haven't had time to try it yet but please open a new ticket.

PS: Could you please post the file /system/build.prop from WSA? So I can try to make microG working without the need of manually configuring the profile.

fillwithjoy1 commented 1 year ago

build.prop.txt Packaged as .txt file since github doesn't like .prop files

fillwithjoy1 commented 1 year ago

@fillwithjoy1

About YouTube Music, I haven't had time to try it yet but please open a new ticket.

PS: Could you please post the file /system/build.prop from WSA? So I can try to make microG working without the need of manually configuring the profile.

I'm wondering do you know how to get the build fingerprint of Google Pixel 7 or 7 Pro series without having physical access to the device?

ale5000-git commented 1 year ago

You can get many info by searching the build.prop over the internet, but to create a complete profile for microG (fingerprint alone isn't enough) you need the real device.

I'm working on a tool to automatically create a microG profile from a real (and unmodified) device via adb.

ale5000-git commented 1 year ago

The script to generate the profile is here: https://github.com/micro5k/microg-unofficial-installer/blob/main/utils/profile-generator.sh

@fillwithjoy1 Could you please run adb shell "getprop" > myprops.txt and then share the myprops.txt file? I need to check some things for my script.

fillwithjoy1 commented 1 year ago

The script to generate the profile is here: https://github.com/micro5k/microg-unofficial-installer/blob/main/utils/profile-generator.sh

@fillwithjoy1 Could you please run adb shell "getprop" > myprops.txt and then share the myprops.txt file? I need to check some things for my script.

Accidentally deleted my WSA so I reinstalled it and getting error code 127

image

ale5000-git commented 1 year ago

Could you please retry with microG unofficial installer v1.3.1 beta? I have fixed the auto-rooting and now it auto-set the profile.

You just need to do this:

adb push microg-unofficial-installer-v1.3.1-beta-by-ale5000-OSS-signed.zip /storage/emulated/0/Download/
adb shell
cd /storage/emulated/0/Download/
unzip -o microg-unofficial-installer-v1.3.1-beta-by-ale5000-OSS-signed.zip zip-install.sh
sh zip-install.sh microg-unofficial-installer-v1.3.1-beta-by-ale5000-OSS-signed.zip
fillwithjoy1 commented 1 year ago

ahhh right now getting 526 from CloudFlare, will have to wait for the website to come online then in around 3 days

On Mon May 1, 2023, 12:35 AM GMT, ale5000 @.***> wrote:

Could you please retry with microG unofficial installer v1.3.1 beta https://forum.xda-developers.com/showthread.php?t=3432360? I have fixed the auto-rooting and now it auto set the profile. You just need to do this: adb push microg-unofficial-installer-v1.3.1-beta-by-ale5000-OSS-signed.zip /storage/emulated/0/Download/ adb shell cd /storage/emulated/0/Download/ sh zip-install.sh microg-unofficial-installer-v1.3.1-beta-by-ale5000-OSS-signed.zip — Reply to this email directly, view it on GitHub https://github.com/microg/GmsCore/issues/1834#issuecomment-1529199977, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHBFVTVMXGWEQTRYI4W3BKLXD4ALLANCNFSM6AAAAAASGSGWRY. You are receiving this because you were mentioned.Message ID: @.***>

ale5000-git commented 1 year ago

ahhh right now getting 526 from CloudFlare, will have to wait for the website to come online then in around 3 days

Hi, I have added a mirror in the latest post.

fillwithjoy1 commented 1 year ago

image am getting this now

fillwithjoy1 commented 4 months ago

I AM THE BIGGEST IDIOT EVERYONE. Turns out the FakeGApps LSPosed Module needs microG services ticked image

That's it, and it works.