-1

I wanted to analyse the code for some functionality. in my understanding the code contains a logic handling intents with extras. I want to know how these Works! and also how can I pass extras using adb. Here is code snippet:

package com.facebook.katana.activity;
public class FbMainTabActivity extends com.facebook.base.activity.FbFragmentActivity implements X.11j, X.11g, X.11k, X.11n, X.11r, X.11p, X.11o, X.11q, X.11s, X.19d, X.11t, X.0B2, X.2IH, X.11u, X.11v, X.11x, X.12k, X.2II, X.12l, X.1z9, X.12v, X.12w {
    public static X.12x A09;
    public static final com.google.common.collect.ImmutableList A0A;
    public com.facebook.common.util.TriState A00;
    public boolean A01;
    public android.view.View A02;
    public X.0lw A03;
    public X.12x A04;
    public X.3tw A05;
    public Object A06;
    public boolean A07;
    public final long A08;

    public static FbMainTabActivity()
    {
        com.facebook.katana.activity.FbMainTabActivity.A0A = com.google.common.collect.ImmutableList.of("chromeless:content:fragment:tag", "PhotoAnimationDialogFragment_MEDIA_GALLERY", "PhotoAnimationDialogFragment_PHOTOS_FEED");
        return;
    }

    public FbMainTabActivity()
    {
        this.A00 = com.facebook.common.util.TriState.UNSET;
        this.A08 = android.os.SystemClock.uptimeMillis();
        this.A05 = 0;
        this.A02();
        return;
    }

    private final android.view.ViewGroup A00()
    {
        return ((X.2Pt) X.0km.A04(10, 9992, this.A03)).A04();
    }

    private final com.facebook.feed.fragment.NewsFeedFragment A01()
    {
        com.facebook.feed.fragment.NewsFeedFragment v0_0 = 0;
        if (this.BjY()) {
            X.2Ur v1_1 = this.A1C();
            if (v1_1 != null) {
                v0_0 = ((com.facebook.feed.fragment.NewsFeedFragment) v1_1.A2D());
            }
        }
        return v0_0;
    }

    private void A02()
    {
        String v0_0 = com.facebook.katana.activity.FbMainTabActivity.A09;
        if ((v0_0 == null) || (v0_0.get() == null)) {
            com.facebook.katana.activity.FbMainTabActivity.A09 = new X.12x(this);
            return;
        } else {
            if ((((com.facebook.katana.activity.FbMainTabActivity) com.facebook.katana.activity.FbMainTabActivity.A09.get()).A04 != null) && (((com.facebook.katana.activity.FbMainTabActivity) com.facebook.katana.activity.FbMainTabActivity.A09.get()).A04.get() == null)) {
                X.00N.A0F("FbMainTabActivity", "FbMainTabActivity might have leaked!");
            }
            return;
        }
    }

    private final void A03()
    {
        ((X.2Pt) X.0km.A04(10, 9992, this.A03)).A0C();
        return;
    }

    public static final void A04(android.content.Context p0, com.facebook.katana.activity.FbMainTabActivity p1)
    {
        com.facebook.katana.activity.FbMainTabActivity.A0A(X.0km.get(p0), p1);
        return;
    }

    private void A05(android.content.Intent p10)
    {
        X.08P.A02("FbMainTabActivity.handleNewIntent", 548977818);
        try {
            boolean v0_9;
            if (!((X.2Tl) X.0km.A04(27, 10032, this.A03)).A00(this, p10)) {
                android.content.Intent v3 = ((X.1Q5) X.0km.A05(9134, this.A03)).A02(p10);
                if ((v3.getBooleanExtra("refresh_feed", 0)) && (this.BjY())) {
                    this.A01().A2M(X.16v.A06);
                }
                String v8 = v3.getStringExtra("rum_destination_uri");
                boolean v7 = v3.getBooleanExtra("should_show_rum_player", 0);
                boolean vtmp9 = v3.getBooleanExtra("should_hide_rum_player", 0);
                if ((v8 == null) || (!v7)) {
                    if (vtmp9) {
                        ((X.1lF) X.0km.A04(23, 9433, this.A03)).A02(0);
                    }
                } else {
                    boolean v0_28 = ((X.1lF) X.0km.A04(23, 9433, this.A03));
                    v0_28.A02(v7);
                    v0_28.A01(v8);
                }
                if (!com.facebook.katana.activity.FbMainTabActivity.A0M(v3)) {
                    if (((v3.getBooleanExtra("force_reset_to_feed_from_certain_tabs", 0)) && (((X.2Pt) X.0km.A04(10, 9992, this.A03)).A0N())) || (v3.getBooleanExtra("force_reset_to_feed", 0))) {
                        this.Czs();
                    }
                    if (v3.getBooleanExtra("jump_to_top", 0)) {
                        this.A1K();
                    }
                    if ((this.A0L(v3)) || (v3.hasExtra("target_tab_id"))) {
                        if (v3.hasExtra("from_deeplink_to_watch")) {
                            if (v3.hasExtra("is_warion_state")) {
                                ((X.3tx) X.0km.A04(5, 16982, this.A03)).A02(v3.getBooleanExtra("is_warion_state", 0));
                            }
                            if (v3.hasExtra("is_warion_dark_mode")) {
                                ((X.3tx) X.0km.A04(5, 16982, this.A03)).A01(v3.getBooleanExtra("is_warion_dark_mode", 0));
                            }
                        }
                        this.A09(v3);
                    }
                    if (v3.hasExtra("pass_deeplink_intent_to_tab")) {
                        this.A07(v3);
                    }
                    this.A06(v3);
                    v0_9 = 734594812;
                } else {
                    this.A08(v3);
                    v0_9 = -1612877982;
                }
            } else {
                v0_9 = -1639492758;
            }
        } catch (X.3tx v1_6) {
            X.08P.A01(744680193);
            throw v1_6;
        }
        X.08P.A01(v0_9);
        return;
    }
....

This method in the code snippet it gets an intent type parameter and does some work:


private void A05(android.content.Intent p10) 
{
        X.08P.A02("FbMainTabActivity.handleNewIntent", 548977818);
        try {
            boolean v0_9;
            if (!((X.2Tl) X.0km.A04(27, 10032, this.A03)).A00(this, p10)) {
                android.content.Intent v3 = ((X.1Q5) X.0km.A05(9134, this.A03)).A02(p10);
                if ((v3.getBooleanExtra("refresh_feed", 0)) && (this.BjY())) {
                    this.A01().A2M(X.16v.A06);
                }
                String v8 = v3.getStringExtra("rum_destination_uri");
                boolean v7 = v3.getBooleanExtra("should_show_rum_player", 0);
                boolean vtmp9 = v3.getBooleanExtra("should_hide_rum_player", 0);
                if ((v8 == null) || (!v7)) {
                    if (vtmp9) {
                        ((X.1lF) X.0km.A04(23, 9433, this.A03)).A02(0);
                    }
                } else {
                    boolean v0_28 = ((X.1lF) X.0km.A04(23, 9433, this.A03));
                    v0_28.A02(v7);
                    v0_28.A01(v8);
                }
                if (!com.facebook.katana.activity.FbMainTabActivity.A0M(v3)) {
                    if (((v3.getBooleanExtra("force_reset_to_feed_from_certain_tabs", 0)) && (((X.2Pt) X.0km.A04(10, 9992, this.A03)).A0N())) || (v3.getBooleanExtra("force_reset_to_feed", 0))) {
                        this.Czs();
                    }
                    if (v3.getBooleanExtra("jump_to_top", 0)) {
                        this.A1K();
                    }
                    if ((this.A0L(v3)) || (v3.hasExtra("target_tab_id"))) {
                        if (v3.hasExtra("from_deeplink_to_watch")) {
                            if (v3.hasExtra("is_warion_state")) {
                                ((X.3tx) X.0km.A04(5, 16982, this.A03)).A02(v3.getBooleanExtra("is_warion_state", 0));
                            }
                            if (v3.hasExtra("is_warion_dark_mode")) {
                                ((X.3tx) X.0km.A04(5, 16982, this.A03)).A01(v3.getBooleanExtra("is_warion_dark_mode", 0));
                            }
                        }
                        this.A09(v3);
                    }
                    if (v3.hasExtra("pass_deeplink_intent_to_tab")) {
                        this.A07(v3);
                    }
                    this.A06(v3);
                    v0_9 = 734594812;
                } else {
                    this.A08(v3);
                    v0_9 = -1612877982;
                }
            } else {
                v0_9 = -1639492758;
            }
        } catch (X.3tx v1_6) {
            X.08P.A01(744680193);
            throw v1_6;
        }
        X.08P.A01(v0_9);
        return;
    }

Apparently, these codes are heavily obfuscated, how can I deobfuscate it?

2

That is not heavily obfuscated. The code is just using short names. I would use Search & Replace in your favorite text editor to give them more memorable names.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.