microg / GmsCore

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

Android SetupWizard With microG Can This Work? #681

Open 0pLuS0 opened 5 years ago

0pLuS0 commented 5 years ago

I'm using Stock OxygenOS Oreo 8.1 for a OnePlus 5T that I've done a deodex, debloated, and applied signature spoofing, added in microG, and made this into a flashable zip to install in TWRP.

Problem is, when the phone first starts and you come to the Android Wizard with microG installed, it won't work. The wifi network section, when GSF is installed will show a Skip link at the bottom, so then I thought, take out the SetupWizard and just skips this and go straight to the rom, but then the rom doesn't even run properly.

Is there a way to replace GSF with microG on an Android ROM and work with the SetupWizard?

Thanks

0pLuS0 commented 5 years ago

Anyone breathing around here, know anything about this?

As I mentioned, if I remove the SetupWizard, then when the phone starts up for the first time after I have flashed the ROM, the Recent Nav Button doesn't work, also the Settings > User section, I tap it nothing happens.

The build section I tap several times to get the Developer Option, nothing happens...

It's as though the OxygenOS ROM needs GSF to first get setup and running, then it can be replaced with microG, but I want to make it into a microG rom, and I can't figure how... :(

Anyway to get past this?

DynaSpan commented 5 years ago

Is there a specific reason you want to use OxygenOS & not LineageOS?

ale5000-git commented 5 years ago

If you flash my microG unofficial installer then the SetupWizard should work. If there is any problem please post a logcat.

0pLuS0 commented 5 years ago

@ale5000-git sorry for not explaining better.

This is not a situation where Oxygen is installed, setup and running, debloated/tweaked and now installing microG.

I'm using SuperR's Kitchen and customizing Oxygen into a Custom Rom. So once Kitchen has extracted the system.img, I'm taking GmsCore and Gsf and placing them in these /paths;

/system/app/GsfProxy/GsfProxy.apk /system/priv-app/GmsCore/GmsCore.apk

So once I've done, debloating, doing a deodex in Kitchen, I also too by the way, edited the framework-res.apk and figured out how to remove the Xposed dependency for the XposedGmsCoreUnifiedNlP module, then I patched the services.jar for signature spoofing, and I kept a copy of it, so then I drop it along with my new framework-res.apk, and I now have no need for Xposed, then I build the ROM in Kitchen flash it in twrp.

Now it starts, I come to the Setup Wizard, but Oxygen has some tie to GSF, that I have not figured out how to get it started/setup with microG installed.

As I mentioned, I debloated the SetupWizard in Kitchen, built the rom, flashed, it but then Oxygen has some things not working.

SO all I can say is Oxygen is tied in with GSF that it needs it to get up and running, but once that is done, then you can replace it.

Question is, how I'm building this into a ROM with microG in it, can this be done?

I also thought I might need to just add/change permissions, so I played around with these in /etc/permissions but I didn't have any luck with that, unless I missed something with it...

Hope that is more clear now...

@ale5000-git did you take GsfProxy and rename it to GoogleServicesFramework.apk?

I don't want to simply use someone's tools, I'm also trying to learn/understand do my own hacking just like you and hopefully figure it out and make it work, if possible. I greatly appreciate the reply, and hopefully you can help me in this situation?

Maybe I do need to add in the permissions for /etc, I'll try again, and see if what you have going on, I can just incorporate into it, then wasn't sure if build.prop or a manifest needed changing, still not even sure if this can be done, or it has to be at theSource Level and compiled in...

hmm

@DynaSpan please stick to the topic, if you can help, then it would be greatly appreciated.

Thanks

ale5000-git commented 5 years ago

Yes, GsfProxy renamed to GoogleServicesFramework.

I use these filenames (to mimic Google): /system/priv-app/GmsCore/GmsCore.apk /system/priv-app/GoogleServicesFramework/GoogleServicesFramework.apk /system/priv-app/Phonesky/Phonesky.apk

SetupWizard do some things needed for the ROM to work, you should keep it. Try to use the xml files here: https://github.com/micro5k/microg-unofficial-installer/tree/master/zip-content/files/etc (you can exclude the F-Droid one if not needed)

Then if the SetupWizard do not work take a logcat.

0pLuS0 commented 5 years ago

@ale5000-git it's not working and if I keep the SetupWizard I'm stuck at the WiFi Network Section, and you can't get a logcat in the Setup Wizard, and if I remove the Wizard, flash the new rom, and when it boots up, then I also can't get a logcat because I can't enable the Developer options.

If I get a logcat from a working ROM, will it at least help to see how GSF is working with the SetupWizard and how it's setting up the system, to figure how to make this work with microG?

Thanks

P.S. I tried Safe Mode too and still can't enable Developer and can't get a logcat... :(

0pLuS0 commented 5 years ago

AHHH I BLOODY FIGURED IT OUT! WoOT!

/vendor/build.prop

---> ro.setupwizard.mode=DISABLED

I can't believe I did this!

Hopefully this will help others.

Nanolx commented 5 years ago

I've also added it to my Issues section:

One could also use Magisk's resetprop to do it without modifying build.prop by the way.

This also shows (once again) that microG could really deserve someone who maintains it's wiki properly.

0pLuS0 commented 5 years ago

@Nanolx well at least in the meantime my workaround is working... :+1:

Thanks for your reply and dedication to microG!

0pLuS0 commented 5 years ago

@ale5000-git

Well I managed to fix my problem!

It wasn't an issue with needing to figure out how to get the Setup Wizard working, it's actually since I debloated Chrome, that I need to figure out how to activate WebViewGoogle.apk in my ROM, so when I flash the ROM in TWRP, Webview is already active and activated. It does show as the webview in the phone settings, but apps that depend on it aren't working unless I update it off of Play Store, Yalp or Aurora Store, then once I update Webview everything works ok that depends on it.

NOW I need to figure out in a ROM that will be flashed in TWRP how to make sure Webview is already active and working without needing to be updated...

The downloaded version I have I renamed to webview.apk and placed in /system/app/webview I hope this is enough to get everything that depends on it working...

But maybe it gets activated through the Setup Wizard? Hmm

P.S. I see now in the framework-res.apk res/xml/config_webview_packages.xml now to see if I can make this work...

hmm

svenjuga commented 1 year ago

Hi, I'm facing the same issue but on stock android 6.0. Debloated / UnGoogled manually, removed SetupWizard, flashed with TWRP (no microG). Basically things work fine so far. But removing SetupWizard leads to same problems you described: the Nav Buttons doesn't work right, also tapping the settings build section several times does not unlock Developer Options. And in Home Screen swiping down from upper border does not show short settings (only a small grey bar with the battery symbol, but no WiFi, Location, Bluetooth etc. But all this works when I take the long way through System Settings).

If I keep SetupWizard (flash with ROM) I get errors on startup. But It works, when I keep also the whole google stuff.

Now, how can I make settings related thinks work proper without google stuff und SetupWizard? I was looking around and searching for threads with similar problems for hours. Yours is the closest one. So I very much hope that you found a solution when you had this issues. And I hope you can help me.