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

Update SmsHandlerHook.java #68

Merged
merged 2 commits into from
Apr 4, 2020
Merged

Update SmsHandlerHook.java #68

merged 2 commits into from
Apr 4, 2020

Conversation

Fantasy156
Copy link
Contributor

add Support Android Q

add Support Android Q
Copy link
Owner

@apsun apsun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! Please fix the type and formatting/indentation to be consistent with the rest of the file.

XposedHelpers.findAndHookMethod(SMS_HANDLER_CLASS, lpparam.classLoader, "dispatchIntent",
/* intent */ Intent.class,
/* permission */ String.class,
/* appOp */ int.class,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be String (I think? Unless you tested this and it worked?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it here and it works

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm then you must have gotten an Android build based off the code between this commit and this commit. What ROM you are using? This does not seem to be the version in the android10-release branch, and others have reported that the original code works on Android Q as-is, so this will probably break it for them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

havoc3.1

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, what do you know, they actually changed this in the middle of a version. That hasn't happened before. Okay, we need to try both versions then, that is:

try {
    hookDispatchIntent29(lpparam);
} catch (NoSuchMethodError) {
    hookDispatchIntent23(lpparam);
}

We might also need to make this more generic in the future, but this should suffice for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now you can compile this version, because this method was told by others, and he found that several roms are like this, if there is time, you can do it again.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean, at the very least we need to try both modes, right?

@apsun apsun merged commit 0dad6ec into apsun:master Apr 4, 2020
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.

2 participants