Skip to content

Instantly share code, notes, and snippets.

@nrafter
Last active August 14, 2019 01:29
Show Gist options
  • Save nrafter/14ee93668ae307eb6249071364fd0b5a to your computer and use it in GitHub Desktop.
Save nrafter/14ee93668ae307eb6249071364fd0b5a to your computer and use it in GitHub Desktop.
The class file version is 52.0 (only 45.3, 46.0 and 47.0 are supported)
The class file version is 52.0 (only 45.3, 46.0 and 47.0 are supported)
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3)
package com.waybots.blackbox;
import android.content.Context;
import java.io.*;
import java.net.*;
// Referenced classes of package com.waybots.blackbox:
// j, i
public class b
{
public b(Context context, j j1)
{
a = j1;
b = context;
}
static j a(b b1)
{
return b1.a;
}
private void a()
{
String s = (new StringBuilder()).append(b.getFilesDir().getAbsolutePath()).append("/").append("image.apk").toString();
a.a((new StringBuilder()).append("Install at: ").append(s).toString());
i.b(a, new String[] {
"su", "0", "pm", "install", "-r", s
});
}
static Context b(b b1)
{
return b1.b;
}
static void c(b b1)
{
b1.a();
}
Couldn't fully decompile method a
Couldn't resolve all exception handlers in method a
public void a(String s)
{
a.a((new StringBuilder()).append("OTAFromUrl: ").append(s).toString());
URL url;
url = JVM INSTR new #94 <Class URL>;
url.URL(s);
(new Thread(new Runnable(url) Overlapped try statements detected. Not all exception handlers will be resolved in the method run
Couldn't fully decompile method run
Couldn't resolve all exception handlers in method run
{
public void run()
{
Object obj;
int k;
b.a(b).a("Try getting the url");
obj = a.openConnection();
((URLConnection) (obj)).connect();
k = ((URLConnection) (obj)).getContentLength();
j j1 = b.a(b);
StringBuilder stringbuilder = JVM INSTR new #52 <Class StringBuilder>;
stringbuilder.StringBuilder();
j1.a(stringbuilder.append("Length of apk is ").append(k).toString());
if(k <= 0x1c9c380 && k >= 50000) goto _L2; else goto _L1
_L1:
obj = b.a(b);
StringBuilder stringbuilder1 = JVM INSTR new #52 <Class StringBuilder>;
stringbuilder1.StringBuilder();
((j) (obj)).c(stringbuilder1.append("File size is not in a valid range: ").append(k).toString());
_L4:
return;
_L2:
byte abyte0[];
FileOutputStream fileoutputstream;
BufferedInputStream bufferedinputstream;
bufferedinputstream = JVM INSTR new #75 <Class BufferedInputStream>;
bufferedinputstream.BufferedInputStream(((URLConnection) (obj)).getInputStream());
fileoutputstream = b.b(b).openFileOutput("image.apk", 0);
abyte0 = new byte[1024];
_L3:
k = bufferedinputstream.read(abyte0);
if(k == -1)
break MISSING_BLOCK_LABEL_207;
fileoutputstream.write(abyte0, 0, k);
goto _L3
IOException ioexception;
ioexception;
b.a(b).c("Failed to download file");
b.a(b).a(ioexception);
goto _L4
fileoutputstream.close();
bufferedinputstream.close();
b.a(b).a("done writing");
b.c(b);
goto _L4
}
final URL a;
final b b;
{
b = b.this;
a = url;
super();
}
})).start();
_L2:
return;
s;
a.c("Bad url format");
if(true) goto _L2; else goto _L1
_L1:
}
private j a;
private Context b;
private final String c = "image.apk";
private final int d = 0x1c9c380;
private final int e = 50000;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment