Skip to content

feat(Instagram): Support app version 378.0.0.52.68 and add bypass check signature #4901

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

Merged
merged 9 commits into from
May 13, 2025

Conversation

hoo-dles
Copy link
Contributor

@hoo-dles hoo-dles commented May 3, 2025

So the fix for the ads fingerprint is straightforward. The method is still there, but one of the string matches is now gone. Fingerprint is still unique with just the remaining string.

Since v371+, any modified/resigned app crashes on startup during splash screen, so there must be some sort of signature check. The class I'm patching has a string reference of "IgSecureContext", so makes sense.

Instagram's code is highly obfuscated, but the instafel standalone project had a fix that I tested out. It stopped the app from crashing, so I wrote a revanced patch that doesn't rely on obfuscated class/method names.

I need help testing because I don't use IG, and Meta's auto-detection tools really do not like my burner account.

@hoo-dles
Copy link
Contributor Author

hoo-dles commented May 3, 2025

Related: #4891 #4723 #4584

@hoo-dles hoo-dles changed the title Fix/instagram ads fix(Instagram) - Fix hide ads fingerprint and add bypass check signature May 3, 2025
@cyberboh
Copy link
Contributor

cyberboh commented May 3, 2025

Well, I built this PR and patched IG v378, all patches applied successfully. After testing, I can login into the app and ads disappear on home feeds. So, basically all patches work as expected.

My bug #4584 is fixed by this PR.
Also, possibly fixes #3651 and I tested with this issue, also fixed by Bypass signature patch #4317 as discussed here https://github.com/orgs/ReVanced/discussions/1117

For this issue #55 I thought fixed also, but on my device there is no share to Story. So, new additional patch is needed.

@cyberboh
Copy link
Contributor

cyberboh commented May 3, 2025

@hoo-dles Maybe be need to refactor the Bypass signature in order to support IG version latest available. So, no need to constrains to 378. But for initial, the patch is super. Kudos. 🚀

@Karthik-Subbu
Copy link

There was a version constraint to 350.0.0.43.93 as the links couldn't open in the app instead of browser. Is it still valid?

@cyberboh
Copy link
Contributor

cyberboh commented May 3, 2025

There was a version constraint to 350.0.0.43.93 as the links couldn't open in the app instead of browser. Is it still valid?

I tested 378.0.0.52.68 with this PR, any IG links can be opened directly to app. 👍

@Karthik-Subbu
Copy link

Thanks much @hoo-dles and @cyberboh

@hoo-dles
Copy link
Contributor Author

hoo-dles commented May 5, 2025

@oSumAtrIX most of the review comments are a consequence of taking the patching logic from a separate project (noted in the code and initial PR comment). I am making my best guess at the changes in logic from working backwards. This section of the code is obfuscated (which is why I don't have proper class names either).

The original patch does not conform to revanced best practices, as the author searches for classes/methods by obfuscated name (eg. X.A00.A01()). I did my best to back trace to identifiable fingerprints.

@hoo-dles
Copy link
Contributor Author

hoo-dles commented May 5, 2025

The original patch essentially makes the following change:

// class X.1he

public static final void A01(Context context, Intent intent) {
    // Take A00.A0x() from A02() and replace in A01()

    // A00.A07().A05(context, intent);
    A00.A08().A05(context, intent);
}

public static final void A02(Context context, Intent intent) {
    A00.A08().A0C(context, intent);
}

This is where X.1he.A01() is called:

public final class LauncherActivity extends IgFragmentActivity implements InterfaceC47421dy {
    public UserSession A00;

    private final void A00(Intent intent, Bundle bundle) {
        Intent intent2 = new Intent();
        intent2.setClassName(this, "com.instagram.mainactivity.InstagramMainActivity");
        intent2.setData(intent.getData());
        intent2.setFlags(67108864);
        intent2.putExtras(intent);
        boolean z = C31023Brl.A05;
        if (bundle != null) {
            intent2.putExtras(bundle);
            intent2.putExtra("redirect_from_launcher_activity", true);
        }
        C49701he.A01(this, intent2); // <---- Here
        finish();
    }

...

@cyberboh
Copy link
Contributor

cyberboh commented May 6, 2025

@hoo-dles Quick test IG 379.0.0.41.80-build-378313536-arm64-v8a-nodpi patched successfully. Installed on top of 378.0.0.52.68-build-378213511 so far no issue.

@Figim
Copy link

Figim commented May 6, 2025

There is a new project that is updated frequently. You get automatic updates within the app. https://github.com/mamiiblt/instafel

@cyberboh
Copy link
Contributor

cyberboh commented May 8, 2025

@hoo-dles 379.1.0.43.80 build 378313923 arm64-v8a (nodpi) patched successfully.

@LisoUseInAIKyrios LisoUseInAIKyrios removed the request for review from oSumAtrIX May 12, 2025 22:38
@LisoUseInAIKyrios
Copy link
Contributor

@hoo-dles is this ready to merge?

@hoo-dles
Copy link
Contributor Author

@hoo-dles is this ready to merge?

@LisoUseInAIKyrios ready on my end

@Xandaro1

This comment was marked as off-topic.

@LisoUseInAIKyrios

This comment was marked as off-topic.

@Nekothegamer

This comment was marked as spam.

@LisoUseInAIKyrios LisoUseInAIKyrios linked an issue May 16, 2025 that may be closed by this pull request
3 tasks
@lakimakromedia

This comment was marked as off-topic.

@netceil

This comment was marked as off-topic.

@Nekothegamer

This comment was marked as off-topic.

@oSumAtrIX

This comment was marked as off-topic.

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title fix(Instagram) - Fix hide ads fingerprint and add bypass check signature fix(Instagram): Support app version 378.0.0.52.68 and add bypass check signature May 19, 2025
@LisoUseInAIKyrios LisoUseInAIKyrios changed the title fix(Instagram): Support app version 378.0.0.52.68 and add bypass check signature feat(Instagram): Support app version 378.0.0.52.68 and add bypass check signature May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet