Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change hook logic to avoid having to enable the module for all apps on LSPosed #1

Merged
merged 3 commits into from
Oct 11, 2021

Conversation

Fs00
Copy link

@Fs00 Fs00 commented Aug 2, 2021

Hello @whew-inc!
I did the move to LSPosed, but soon after I found frustrating having to enable FakeGApps for all apps that need GMS signature spoofing. Another consequence of this is that - due to how LSPosed and EdXposed 0.5+ work - there is a small (albeit noticeable) lag on start-up of hooked apps.
So in order to fix these inconveniences, I've taken inspiration from LineageOS for MicroG spoofing patches and slightly reworked the logic to only hook into the PackageManagerService class of the system server, precisely after the method generatePackageInfo. This private method has proved to remain stable throughout the years and is present even on very old Android versions (including 4.0).
I can confirm this works on Android 6 (original Xposed) and 10 (LSPosed), but should work on other versions too.

I've also added .idea folder to gitignore and bumped app version (feel free to revert/change that if you don't agree).

PS: I've seen that in this fork you have both a branch and a tag named lsposed. This caused me some trouble when trying to push the code due to this ambiguity. I think it would be best to delete and recreate the tag with a different name.

Fs00 added 3 commits August 2, 2021 08:49
This avoids the need to select every app that needs GMS signature
spoofing when using LSPosed
@whew-inc
Copy link
Owner

Hey @Fs00 !

This looks good. I'll test this when I find the time. Thanks for the PR!

As for the lsposed branch/tag, you're right. After testing/merging your proposal I'll clean the repo. Sorry for the confusion.

@j0110
Copy link

j0110 commented Sep 18, 2021

Is there any updates on this PR ?

@whew-inc
Copy link
Owner

@dev0110 I'm currently in a situation irl that makes me unable to work on this or anything really.

If all goes fine expect an update or merge somewhere next week.

@whew-inc whew-inc changed the base branch from lsposed to master October 10, 2021 21:54
@whew-inc
Copy link
Owner

whew-inc commented Oct 11, 2021

It looks like it works on Android 11 with EdXposed, but I don't know about Lsposed and I don't want to risk installing right now because I'm lacking time and backups. If someone else can test and confirm it works especially on 11 then I'll merge it, otherwise I'll wait a bit before I do.

https://transfer.sh/J5VETT/app-release.apk

@Fs00
Copy link
Author

Fs00 commented Oct 11, 2021

Great! At this point, I think that the odds that this PR won't work on LSPosed/Android 11 are extremely low, given that it works with EdXposed.
I've been using FakeGapps with this PR applied on LSPosed on Android 9 and 10 since a few months and everything works fine.

@rhjdvsgsgks
Copy link

it works on my device, Android 11 + lsposed

@whew-inc
Copy link
Owner

Great! At this point, I think that the odds that this PR won't work on LSPosed/Android 11 are extremely low, given that it works with EdXposed. I've been using FakeGapps with this PR applied on LSPosed on Android 9 and 10 since a few months and everything works fine.

I'm only worried about the activation scope not working properly on 11. I tried using the feature with EdXposed but it seems no matter what I select signature spoofing always works

@whew-inc
Copy link
Owner

It looks like it works on Android 11 with EdXposed, but I don't know about Lsposed and I don't want to risk installing right now because I'm lacking time and backups. If someone else can test and confirm it works especially on 11 then I'll merge it, otherwise I'll wait a bit before I do.

https://transfer.sh/J5VETT/app-release.apk

On second thought I'll just merge this now. It works fine on 11 with edxposed and Lsposed should work fine too, just not sure about activation scope. If it doesn't the older apk can be used in the meantime.

@whew-inc whew-inc merged commit 3f9a6be into whew-inc:master Oct 11, 2021
@Fs00
Copy link
Author

Fs00 commented Oct 11, 2021

I tried using the feature with EdXposed but it seems no matter what I select signature spoofing always works

It always works because the module has been changed to hook only the Android system server, which corresponds to the "System framework" app when selecting activation scope on LSPosed.
I honestly don't remember if you can toggle modules for the "system framework" app in EdXposed.

Anyway, thanks for testing and merging!

@whew-inc
Copy link
Owner

whew-inc commented Oct 11, 2021

It's rather strange. Even if I don't select ANYTHING or an irrelevant app, spoofing still works. EdXposed moment? Persists with reboots too.

Screenshot_20211011-181209_EdXposed_Manager

@Fs00
Copy link
Author

Fs00 commented Oct 11, 2021

Definitely strange. Maybe a bug in the activation scope implementation of EdXposed?

@whew-inc
Copy link
Owner

Ah, it's because my rom already has MicroG spoofing support, rendering this module redundant for me.

@Fs00 Fs00 mentioned this pull request Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants