0

I decompiled the code of an Android app. I'd like to find the portion of code that forces the user to update when a new version is detected. This is, however, complicated due to the significant amount of Java code. I found that Google's in-app updates aren't used, so it must be a custom procedure. In cases like this:

  1. A modal dialog or activity that fills the entire screen is displayed.
  2. This dialog should clearly inform the user that an update is mandatory to continue using the app.
  3. The dialogue must contain a button that directs the user to the Google Play Store via an Intent.

Regarding this last point, I tried searching the source code for "http://play.google" but found no matches. I've tried other strategies, but I cannot find anything significant.

The lines of code containing this information and related instructions obviously exist. Do you have any idea how to detect them?

EDIT

/* access modifiers changed from: private */
public static final void W(UpgradeRequiredFragment, upgradeRequiredFragment, View view) {
    Intent intent = new Intent("android.intent.action.VIEW",
            Uri.parse("market://details?id=it.positec.landroid"));
    intent.setPackage("com.android.vending");
    upgradeRequiredFragment.startActivity(intent):
}

EDIT 2

@Metadata(d1 =  {"\u0000>\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\b\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J+\u0010\u000b\u001a\u00020\n2\u0006\u0010\u0005\u001a\u00020\u00042\b\u0010\u0007\u001a\u0004\u0018\u00010\u00062\b\u0010\t\u001a\u0004\u0018\u00010\bH\u0016¢\u0006\u0004\b\u000b\u0010\fJ!\u0010\u000f\u001a\u00020\u000e2\u0006\u0010\r\u001a\u00020\n2\b\u0010\t\u001a\u0004\u0018\u00010\bH\u0016¢\u0006\u0004\b\u000f\u0010\u0010R\u0016\u0010\u0014\u001a\u00020\u00118\u0002@\u0002X.¢\u0006\u0006\n\u0004\b\u0012\u0010\u0013R\"\u0010\u001c\u001a\u00020\u00158\u0006@\u0006X.¢\u0006\u0012\n\u0004\b\u0016\u0010\u0017\u001a\u0004\b\u0018\u0010\u0019\"\u0004\b\u001a\u0010\u001b¨\u0006\u001d"}, d2 = {"Lcom/worxlandroid/landroid/features/application/UpgradeRequiredFragment;", "LE5/f;", "<init>", "()V", "Landroid/view/LayoutInflater;", "inflater", "Landroid/view/ViewGroup;", "container", "Landroid/os/Bundle;", "savedInstanceState", "Landroid/view/View;", "onCreateView", "(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;", "view", "La7/J;", "onViewCreated", "(Landroid/view/View;Landroid/os/Bundle;)V", "LJ5/P0;", "y", "LJ5/P0;", "binding", "LE5/c1;", "z", "LE5/c1;", "U", "()LE5/c1;", "setToolbarManager", "(LE5/c1;)V", "toolbarManager", "ui_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
public final class UpgradeRequiredFragment extends f {

/* renamed from: y  reason: collision with root package name */
private P0 f33619y;

/* renamed from: z  reason: collision with root package name */
public c1 f33620z;

/* access modifiers changed from: private */
public static final J V(C2623n0 n0Var) {
    C4003t.f(n0Var, "$this$set");
    n0Var.e(false);
    return J.f32396a;
}
8
  • 1
    I would start searching for the code that opens Google Play. See various Stackexchange questions on that topic how to do so: e.g. stackoverflow.com/q/11753000/150978 Common to all ways should be the startActivity() call in the end. Depending on how much the app is linked to other apps this call should only be used a few dozen times in the app. Commented Sep 16 at 8:50
  • @Robert Thanks, it took me a while, but I followed your suggestion. I found several files and checked them manually. There's basically only one that seems adequate, and I'm kindly asking you if you think it could be right. I added the code snippet to the initial question, and as you can see, it refers to a URL that is the software manufacturer's one. My guess is that there isn't a direct call to the Play Store from the app, but rather a processing on the manufacturer's server, which, if successful, dynamically triggers the block of the app Commented Sep 22 at 19:24
  • 1
    You never mentioned that a server is involved. Often upgrade dialogs exists for a reason e.g. if the server now expects a newer protocol version or something like that. Well you have the app and you can test this by simply disabling the dialog using apktool or on a rooted device using frida. BTW why do you post a phone of source code? Every OS has built- in screenshot function but as it is text code simply only and paste into the question would be the easiest way, just format it as code using three back ticks. Commented Sep 22 at 19:53
  • 1
    Seems to be the code that opens Play Store, thus it is the code that is called after showing the modal dialog. Trace back the code where it is called or check the UpgradeRequiredFragment which seems to be promising based on it's name. Commented Sep 24 at 7:06
  • 1
    Statically Jadx-Gui has the ability to trace calls of a function from other code parts. Or if you have a rooted phone for tests you can use frida.re for dynamic analysis, tracing function calls at run-time. To do so create a frida script that hooks the W function and throws an exception instead. Usually this exception with stack trace is logged in logcat or catch the exception yours elf and print the stack trace. Commented Sep 29 at 8:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.