Comparing the F-Droid and GitHub APKs (versionCode=30versionName=2.3.7), both are signed with your key, but the two differ: specifically, classes.dex (and resultingly assets/dexopt/baseline.prof as well). Looks like some code was moved around and you replaced the release and APK a day after it was published on F-Droid?
I'm not sure if this difference could cause unexpected issues for the app's users or is a minor issue that we can just ignore, but users would expect apps using reproducible builds to have identical APKs; we'd prefer to avoid this kind of situation and appreciate any changes being communicated :)
diff of decompiled code
```diff
--- x/classes-enjarify/a0/j.class.out 2023-07-02 17:13:19.819050397 +0200
+++ y/classes-enjarify/a0/j.class.out 2023-07-02 17:13:40.675215357 +0200
@@ -29,11 +29,11 @@
final String s = "Server started at: ";
final StringBuilder sb = new StringBuilder(s);
sb.append(mainActivity.B);
- mainActivity.N(sb.toString(), true);
+ mainActivity.O(sb.toString(), true);
if (!mainActivity.A.l("is_logger_visible")) {
final StringBuilder sb2 = new StringBuilder(s);
sb2.append(mainActivity.B);
- mainActivity.Q(sb2.toString());
+ mainActivity.R(sb2.toString());
}
return;
}
--- x/classes-enjarify/com/akansh/fileserversuit/MainActivity$a.class.out 2023-07-02 17:13:20.627056787 +0200
+++ y/classes-enjarify/com/akansh/fileserversuit/MainActivity$a.class.out 2023-07-02 17:13:41.527222096 +0200
@@ -45,7 +45,7 @@
}
else {
if (stringExtra.equals("progress")) {
- a.E(intent.getIntExtra("value", 100));
+ a.F(intent.getIntExtra("value", 100));
return;
}
if (stringExtra.equals("auth")) {
--- x/classes-enjarify/com/akansh/fileserversuit/MainActivity$d$a.class.out 2023-07-02 17:13:21.179061154 +0200
+++ y/classes-enjarify/com/akansh/fileserversuit/MainActivity$d$a.class.out 2023-07-02 17:13:42.011225924 +0200
@@ -13,6 +13,6 @@
}
public final void run() {
- this.b.b.E(100);
+ this.b.b.F(100);
}
}
--- x/classes-enjarify/com/akansh/fileserversuit/MainActivity.class.out 2023-07-02 17:13:22.379070645 +0200
+++ y/classes-enjarify/com/akansh/fileserversuit/MainActivity.class.out 2023-07-02 17:13:43.399236902 +0200
@@ -35,8 +35,6 @@
import com.google.android.material.snackbar.Snackbar;
import j1.l;
import android.os.Handler;
-import android.net.Uri;
-import android.content.Intent;
import android.text.Layout;
import java.util.Iterator;
import java.util.Collection;
@@ -63,13 +61,17 @@
import android.view.View$OnClickListener;
import j1.v;
import i0.g0;
-import android.os.Build$VERSION;
import android.content.DialogInterface$OnDismissListener;
import j1.u;
import com.dlazaro66.qrcodereaderview.QRCodeReaderView$b;
import j1.t;
import com.dlazaro66.qrcodereaderview.QRCodeReaderView;
import android.graphics.drawable.TransitionDrawable;
+import android.net.Uri;
+import android.content.Intent;
+import i0.c0;
+import android.os.Build$VERSION;
+import android.os.PowerManager;
import android.widget.ImageButton;
import androidx.activity.result.d;
import j1.b;
@@ -138,7 +140,20 @@
this.f0 = false;
}
- public final void E(final int p0) {
+ public final void E() {
+ if (!this.A.l("asked_battery_opt")) {
+ final PowerManager powerManager = (PowerManager)((Context)this).getSystemService("power");
+ if (Build$VERSION.SDK_INT >= 23 && powerManager != null && !i0.c0.r(powerManager, ((Context)this).getPackageName())) {
+ final Intent intent = new Intent("android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS");
+ final StringBuilder sb = new StringBuilder("package:");
+ sb.append(((Context)this).getPackageName());
+ intent.setData(Uri.parse(sb.toString()));
+ this.c0.j(intent);
+ }
+ }
+ }
+
+ public final void F(final int p0) {
//
// This method could not be decompiled.
//
@@ -261,7 +276,7 @@
throw new IllegalStateException("An error occurred while decompiling this method.");
}
- public final void F(final int n) {
+ public final void G(final int n) {
final int n2 = 1;
final int n3 = 200;
ImageView imageView;
@@ -285,7 +300,7 @@
((TransitionDrawable)this.P.getDrawable()).startTransition(n3);
}
- public final void G() {
+ public final void H() {
final StringBuilder sb = new StringBuilder("$ Welcome to ");
sb.append(((Context)this).getString(2131820573));
sb.append("\n");
@@ -293,7 +308,7 @@
((View)this.N).scrollTo(0, 0);
}
- public final void H() {
+ public final void I() {
this.X.setContentView(2131493004);
final QRCodeReaderView qrCodeReaderView = (QRCodeReaderView)this.X.findViewById(2131296667);
qrCodeReaderView.setOnQRCodeReadListener((QRCodeReaderView$b)new t(this, (PointsOverlayLayout)this.X.findViewById(2131296656), qrCodeReaderView));
@@ -304,7 +319,7 @@
this.X.setOnDismissListener((DialogInterface$OnDismissListener)new u(qrCodeReaderView));
}
- public final void I() {
+ public final void J() {
final int sdk_INT = Build$VERSION.SDK_INT;
final int n = 23;
final int n2 = 30;
@@ -313,25 +328,25 @@
}
else if (sdk_INT >= n2) {
if (!i0.g0.g()) {
- this.O();
+ this.P();
}
else {
- this.J();
+ this.K();
}
}
}
- public final void J() {
+ public final void K() {
final boolean i = this.A.i();
final int n = 1;
if (i) {
- this.F(n);
+ this.G(n);
final String m = this.A.m("temp_url");
if (m != null) {
this.B = m;
final StringBuilder sb = new StringBuilder("Server running at: ");
sb.append(this.B);
- this.N(sb.toString(), false);
+ this.O(sb.toString(), false);
}
}
((View)this.y).setOnClickListener((View$OnClickListener)new v(this, 0));
@@ -339,10 +354,14 @@
final Object[] args = new Object[n2];
args[0] = ((Context)this).getPackageName();
args[n] = "sharex_v2_0";
- new File(String.format("/data/data/%s/%s/index.html", args)).exists();
- final s0 s0 = new s0((Context)this, ((Context)this).getPackageName());
- s0.c = new MainActivity$c(this);
- ((AsyncTask)s0).execute((Object[])new Void[0]);
+ if (new File(String.format("/data/data/%s/%s/index.html", args)).exists()) {
+ this.E();
+ }
+ else {
+ final s0 s0 = new s0((Context)this, ((Context)this).getPackageName());
+ s0.c = new MainActivity$c(this);
+ ((AsyncTask)s0).execute((Object[])new Void[0]);
+ }
((NavigationView)this.findViewById(2131296616)).setNavigationItemSelectedListener((NavigationView$a)new w(this));
final CardView cardView = (CardView)this.findViewById(2131296727);
final CardView cardView2 = (CardView)this.findViewById(2131296728);
@@ -382,7 +401,7 @@
((View)imageButton).setOnClickListener((View$OnClickListener)new x(this, 3));
}
- public final boolean K() {
+ public final boolean L() {
final Context applicationContext = ((Context)this).getApplicationContext();
final String s = "wifi";
final WifiManager obj = (WifiManager)applicationContext.getSystemService(s);
@@ -424,7 +443,7 @@
return b;
}
- public final void L() {
+ public final void M() {
this.U = new ArrayList();
if (this.S.size() > 0) {
this.U.addAll(this.S);
@@ -465,7 +484,7 @@
}
}
- public final void M() {
+ public final void N() {
final boolean l = this.A.l("private_mode");
final ConstraintLayout constraintLayout = (ConstraintLayout)this.findViewById(2131296853);
int visibility;
@@ -478,7 +497,7 @@
((View)constraintLayout).setVisibility(visibility);
}
- public final void N(String string, final boolean b) {
+ public final void O(String string, final boolean b) {
if (this.N == null) {
this.N = (TextView)this.findViewById(2131296547);
}
@@ -523,7 +542,7 @@
catch (final Exception ex6) {}
}
- public final void O() {
+ public final void P() {
final String action = "android.settings.MANAGE_ALL_FILES_ACCESS_PERMISSION";
final String str = "package:";
if (Build$VERSION.SDK_INT >= 30) {
@@ -552,22 +571,22 @@
}
}
- public final void P() {
+ public final void Q() {
if (this.A.i()) {
- this.F(0);
- this.R();
- this.N("Restarting server...", true);
+ this.G(0);
+ this.S();
+ this.O("Restarting server...", true);
new Handler().postDelayed((Runnable)new l(this, 0), 2000L);
}
}
- public final void Q(final String s) {
+ public final void R(final String s) {
final Snackbar h = Snackbar.h(this.findViewById(2131296679), (CharSequence)s);
h.i.setBackgroundTintList(ColorStateList.valueOf(Color.parseColor("#000a12")));
h.i();
}
- public final void R() {
+ public final void S() {
if (this.A.i()) {
((Context)this).stopService(new Intent((Context)this, (Class)ServerService.class));
}
@@ -590,7 +609,7 @@
}
}
- public final void S() {
+ public final void T() {
final int visibility = ((View)this.I).getVisibility();
final int n = 2131296665;
final int n2 = 8;
@@ -610,7 +629,7 @@
}
}
- public final void T() {
+ public final void U() {
final ConstraintLayout i = this.I;
final int visibility = 8;
((View)i).setVisibility(visibility);
@@ -943,7 +962,7 @@
// 697: aload 8
// 699: putfield com/akansh/fileserversuit/MainActivity.S:Ljava/util/ArrayList;
// 702: aload_0
- // 703: invokevirtual com/akansh/fileserversuit/MainActivity.L:()V
+ // 703: invokevirtual com/akansh/fileserversuit/MainActivity.M:()V
// 706: goto 709
// 709: aload_0
// 710: iload_1
@@ -1033,10 +1052,10 @@
public final void onBackPressed() {
if (((View)this.G).getVisibility() == 0) {
- this.T();
+ this.U();
}
else if (((View)this.I).getVisibility() == 0) {
- this.S();
+ this.T();
}
else {
final int d0 = this.d0;
@@ -1095,16 +1114,16 @@
m.setText((CharSequence)((String[])this.V.a)[a2.j(s, 0)]);
this.e0 = this.A.j(s, 0);
((View)this.N).setOnLongClickListener((View$OnLongClickListener)new y());
- this.G();
+ this.H();
this.Y = new a((Activity)this);
this.a0 = ((ComponentActivity)this).z((androidx.activity.result.b)new w(this), new c());
this.b0 = ((ComponentActivity)this).z((androidx.activity.result.b)new z((Object)this), new c());
this.c0 = ((ComponentActivity)this).z((androidx.activity.result.b)new a0(this), new c());
if (Build$VERSION.SDK_INT >= 23) {
- this.I();
+ this.J();
}
else {
- this.J();
+ this.K();
}
final String pathname = "/mnt";
final File file = new File(pathname);
@@ -1210,10 +1229,10 @@
n2 = 1;
}
if (n2 == 0) {
- this.I();
+ this.J();
return;
}
- this.J();
+ this.K();
}
else if (n == 2) {
n = z.b.a((Context)this, "android.permission.CAMERA");
@@ -1221,7 +1240,7 @@
n2 = 1;
}
if (n2 != 0) {
- this.H();
+ this.I();
}
}
else {
@@ -1235,7 +1254,7 @@
final IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("service.to.activity.transfer");
((Context)this).registerReceiver((BroadcastReceiver)this.R, intentFilter);
- this.M();
+ this.N();
super.onResume();
}
catch (final Exception ex) {}
@@ -1244,7 +1263,7 @@
}
public final void onStart() {
- this.M();
+ this.N();
super.onStart();
}
}
--- x/classes-enjarify/com/google/android/material/navigation/a.class.out 2023-07-02 17:13:23.167076878 +0200
+++ y/classes-enjarify/com/google/android/material/navigation/a.class.out 2023-07-02 17:13:44.191243167 +0200
@@ -41,7 +41,7 @@
final int itemId = menuItem.getItemId();
Label_0368: {
if (itemId == 2131296756) {
- ((MainActivity)a).T();
+ ((MainActivity)a).U();
}
else if (itemId == 2131296686) {
final String s = "android.permission.CAMERA";
@@ -49,7 +49,7 @@
b = true;
}
if (b) {
- ((MainActivity)a).H();
+ ((MainActivity)a).I();
}
else if (Build$VERSION.SDK_INT >= 23) {
((Activity)a).requestPermissions(new String[] { s }, 2);
@@ -62,7 +62,7 @@
}
else {
if (itemId == 2131296385) {
- ((MainActivity)a).G();
+ ((MainActivity)a).H();
break Label_0368;
}
if (itemId == 2131296660) {
--- x/classes-enjarify/j1/c.class.out 2023-07-02 17:13:24.023083648 +0200
+++ y/classes-enjarify/j1/c.class.out 2023-07-02 17:13:44.967249304 +0200
@@ -92,7 +92,7 @@
activity.startActivityForResult(intent, n2);
}
catch (final Exception ex) {
- ((MainActivity)a).N(ex.toString(), e);
+ ((MainActivity)a).O(ex.toString(), e);
}
}
catch (final Exception ex2) {}
--- x/classes-enjarify/j1/e.class.out 2023-07-02 17:13:24.803089818 +0200
+++ y/classes-enjarify/j1/e.class.out 2023-07-02 17:13:45.623254493 +0200
@@ -25,13 +25,13 @@
((Context)c).startActivity(Intent.createChooser(intent, (CharSequence)"Sharing ShareX Url"));
}
else {
- c.Q("Start ShareX first!");
+ c.R("Start ShareX first!");
}
return;
}
case 0: {
final int g0 = MainActivity.g0;
- c.S();
+ c.T();
}
}
}
--- x/classes-enjarify/j1/g.class.out 2023-07-02 17:13:25.571095892 +0200
+++ y/classes-enjarify/j1/g.class.out 2023-07-02 17:13:46.315259966 +0200
@@ -26,14 +26,14 @@
case 1: {
final MainActivity mainActivity = (MainActivity)b2;
mainActivity.A.n("private_mode", b);
- mainActivity.P();
- mainActivity.M();
+ mainActivity.Q();
+ mainActivity.N();
return;
}
case 0: {
final MainActivity mainActivity2 = (MainActivity)b2;
mainActivity2.A.n("load_hidden_media", b);
- mainActivity2.P();
+ mainActivity2.Q();
}
}
}
--- x/classes-enjarify/j1/i.class.out 2023-07-02 17:13:26.199100860 +0200
+++ y/classes-enjarify/j1/i.class.out 2023-07-02 17:13:47.011265471 +0200
@@ -13,6 +13,6 @@
public final void onCheckedChanged(final CompoundButton compoundButton, final boolean b) {
final MainActivity a = this.a;
a.A.n("restrict_modify", b);
- a.P();
+ a.Q();
}
}
--- x/classes-enjarify/j1/l.class.out 2023-07-02 17:13:26.891106333 +0200
+++ y/classes-enjarify/j1/l.class.out 2023-07-02 17:13:47.719271072 +0200
@@ -17,19 +17,19 @@
switch (b) {
default: {
final int g0 = MainActivity.g0;
- c.F(0);
+ c.G(0);
return;
}
case 0: {
final int g2 = MainActivity.g0;
- if (c.K()) {
+ if (c.L()) {
if (!c.A.i()) {
((Context)c).startService(new Intent((Context)c, (Class)ServerService.class));
}
- c.F(1);
+ c.G(1);
}
else {
- c.Q("Make sure your hotspot is open or wifi connected...");
+ c.R("Make sure your hotspot is open or wifi connected...");
}
}
}
--- x/classes-enjarify/j1/m.class.out 2023-07-02 17:13:27.599111933 +0200
+++ y/classes-enjarify/j1/m.class.out 2023-07-02 17:13:48.427276672 +0200
@@ -39,7 +39,7 @@
final Intent intent = (Intent)d;
final int g3 = MainActivity.g0;
mainActivity.getClass();
- mainActivity.N(intent.getStringExtra("msg"), true);
+ mainActivity.O(intent.getStringExtra("msg"), true);
}
}
}
--- x/classes-enjarify/j1/r.class.out 2023-07-02 17:13:28.319117628 +0200
+++ y/classes-enjarify/j1/r.class.out 2023-07-02 17:13:49.135282271 +0200
@@ -36,7 +36,7 @@
sb2.append(int1);
Toast.makeText((Context)b, (CharSequence)sb2.toString(), n2).show();
dialogInterface.dismiss();
- b.P();
+ b.Q();
}
else {
Toast.makeText((Context)b, (CharSequence)"Please enter a valid port number", n2).show();
--- x/classes-enjarify/j1/s0.class.out 2023-07-02 17:13:29.283125252 +0200
+++ y/classes-enjarify/j1/s0.class.out 2023-07-02 17:13:50.231290940 +0200
@@ -4,14 +4,11 @@
package j1;
+import android.app.Activity;
import android.app.Dialog;
import android.app.AlertDialog;
import com.akansh.fileserversuit.MainActivity;
-import android.net.Uri;
-import android.content.Intent;
-import i0.c0;
-import android.os.Build$VERSION;
-import android.os.PowerManager;
+import android.view.ViewGroup;
import android.content.BroadcastReceiver;
import android.content.IntentFilter;
import android.content.DialogInterface$OnClickListener;
@@ -271,24 +268,19 @@
((Dialog)create).show();
}
try {
+ o = new(android.content.IntentFilter.class)();
try {
- o = new IntentFilter();
+ new IntentFilter();
((IntentFilter)o).addAction("service.to.activity.transfer");
((Context)a).registerReceiver((BroadcastReceiver)a.R, (IntentFilter)o);
+ o = new AlertDialog$Builder((Context)a);
+ ((AlertDialog$Builder)o).setView(((Activity)a).getLayoutInflater().inflate(2131492892, (ViewGroup)null));
+ ((Dialog)((AlertDialog$Builder)o).create()).show();
+ a.E();
}
catch (final Exception ex) {}
}
catch (final Exception ex2) {}
- if (!a.A.l("asked_battery_opt")) {
- final PowerManager powerManager = (PowerManager)((Context)a).getSystemService("power");
- if (Build$VERSION.SDK_INT >= 23 && powerManager != null && !c0.r(powerManager, ((Context)a).getPackageName())) {
- o = new Intent("android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS");
- final StringBuilder sb = new StringBuilder("package:");
- sb.append(((Context)a).getPackageName());
- ((Intent)o).setData(Uri.parse(sb.toString()));
- a.c0.j((Intent)o);
- }
- }
}
public final void onPreExecute() {
--- x/classes-enjarify/j1/v.class.out 2023-07-02 17:13:30.055131359 +0200
+++ y/classes-enjarify/j1/v.class.out 2023-07-02 17:13:50.959296699 +0200
@@ -41,28 +41,28 @@
else {
s = "Start ShareX First!";
}
- c.Q(s);
+ c.R(s);
return;
}
case 0: {
final boolean i = c.A.i();
final int n = 1;
if (!i) {
- if (c.K()) {
- c.N("Starting server...", (boolean)(n != 0));
+ if (c.L()) {
+ c.O("Starting server...", (boolean)(n != 0));
if (!c.A.i()) {
((Context)c).startService(new Intent((Context)c, (Class)ServerService.class));
}
- c.F(n);
+ c.G(n);
}
else {
- c.Q("Make sure your hotspot is open or wifi connected...");
+ c.R("Make sure your hotspot is open or wifi connected...");
}
}
else {
- c.N("Stopping server...", (boolean)(n != 0));
- c.R();
- c.F(0);
+ c.O("Stopping server...", (boolean)(n != 0));
+ c.S();
+ c.G(0);
}
}
}
--- x/classes-enjarify/j1/w.class.out 2023-07-02 17:13:30.679136295 +0200
+++ y/classes-enjarify/j1/w.class.out 2023-07-02 17:13:51.527301192 +0200
@@ -21,10 +21,10 @@
if (sdk_INT >= n && a2.f0) {
if (g0.g()) {
a2.f0 = false;
- a2.J();
+ a2.K();
}
else {
- a2.O();
+ a2.P();
}
}
else {
--- x/classes-enjarify/j1/x.class.out 2023-07-02 17:13:31.451142401 +0200
+++ y/classes-enjarify/j1/x.class.out 2023-07-02 17:13:52.335307582 +0200
@@ -29,7 +29,7 @@
switch (b) {
default: {
c.Z.getWritableDatabase().delete("D_LIST", (String)null, (String[])null);
- c.Q("All remembered devices cleared!");
+ c.R("All remembered devices cleared!");
new Timer().schedule(new d0(c), n);
return;
}
@@ -44,9 +44,9 @@
edit.apply();
final StringBuilder sb = new StringBuilder("Server root changed to ");
sb.append(c.F);
- c.N(sb.toString(), b2);
+ c.O(sb.toString(), b2);
c.K.setText((CharSequence)c.F);
- c.P();
+ c.Q();
return;
}
case 2: {
--- x/classes-enjarify/j1/z.class.out 2023-07-02 17:13:32.363149614 +0200
+++ y/classes-enjarify/j1/z.class.out 2023-07-02 17:13:53.163314131 +0200
@@ -64,11 +64,11 @@
edit.apply();
o = new StringBuilder(str);
((StringBuilder)o).append(mainActivity.F);
- mainActivity.N(((StringBuilder)o).toString(), true);
+ mainActivity.O(((StringBuilder)o).toString(), true);
final TextView k = mainActivity.K;
try {
k.setText((CharSequence)mainActivity.F);
- mainActivity.P();
+ mainActivity.Q();
}
catch (final Exception obj) {
final StringBuilder sb = new StringBuilder("Err2: ");
--- x/classes-enjarify/o2/a$a.class.out 2023-07-02 17:13:33.195156195 +0200
+++ y/classes-enjarify/o2/a$a.class.out 2023-07-02 17:13:53.891319889 +0200
@@ -42,7 +42,7 @@
final List list = Arrays.asList(a);
final MainActivity a2 = mainActivity$b.a;
a2.T = list;
- a2.L();
+ a2.M();
}
b.dismiss();
}
```
Comparing the F-Droid and GitHub APKs (
versionCode=30
versionName=2.3.7
), both are signed with your key, but the two differ: specifically,classes.dex
(and resultinglyassets/dexopt/baseline.prof
as well). Looks like some code was moved around and you replaced the release and APK a day after it was published on F-Droid?I'm not sure if this difference could cause unexpected issues for the app's users or is a minor issue that we can just ignore, but users would expect apps using reproducible builds to have identical APKs; we'd prefer to avoid this kind of situation and appreciate any changes being communicated :)
diff of decompiled code
```diff --- x/classes-enjarify/a0/j.class.out 2023-07-02 17:13:19.819050397 +0200 +++ y/classes-enjarify/a0/j.class.out 2023-07-02 17:13:40.675215357 +0200 @@ -29,11 +29,11 @@ final String s = "Server started at: "; final StringBuilder sb = new StringBuilder(s); sb.append(mainActivity.B); - mainActivity.N(sb.toString(), true); + mainActivity.O(sb.toString(), true); if (!mainActivity.A.l("is_logger_visible")) { final StringBuilder sb2 = new StringBuilder(s); sb2.append(mainActivity.B); - mainActivity.Q(sb2.toString()); + mainActivity.R(sb2.toString()); } return; } --- x/classes-enjarify/com/akansh/fileserversuit/MainActivity$a.class.out 2023-07-02 17:13:20.627056787 +0200 +++ y/classes-enjarify/com/akansh/fileserversuit/MainActivity$a.class.out 2023-07-02 17:13:41.527222096 +0200 @@ -45,7 +45,7 @@ } else { if (stringExtra.equals("progress")) { - a.E(intent.getIntExtra("value", 100)); + a.F(intent.getIntExtra("value", 100)); return; } if (stringExtra.equals("auth")) { --- x/classes-enjarify/com/akansh/fileserversuit/MainActivity$d$a.class.out 2023-07-02 17:13:21.179061154 +0200 +++ y/classes-enjarify/com/akansh/fileserversuit/MainActivity$d$a.class.out 2023-07-02 17:13:42.011225924 +0200 @@ -13,6 +13,6 @@ } public final void run() { - this.b.b.E(100); + this.b.b.F(100); } } --- x/classes-enjarify/com/akansh/fileserversuit/MainActivity.class.out 2023-07-02 17:13:22.379070645 +0200 +++ y/classes-enjarify/com/akansh/fileserversuit/MainActivity.class.out 2023-07-02 17:13:43.399236902 +0200 @@ -35,8 +35,6 @@ import com.google.android.material.snackbar.Snackbar; import j1.l; import android.os.Handler; -import android.net.Uri; -import android.content.Intent; import android.text.Layout; import java.util.Iterator; import java.util.Collection; @@ -63,13 +61,17 @@ import android.view.View$OnClickListener; import j1.v; import i0.g0; -import android.os.Build$VERSION; import android.content.DialogInterface$OnDismissListener; import j1.u; import com.dlazaro66.qrcodereaderview.QRCodeReaderView$b; import j1.t; import com.dlazaro66.qrcodereaderview.QRCodeReaderView; import android.graphics.drawable.TransitionDrawable; +import android.net.Uri; +import android.content.Intent; +import i0.c0; +import android.os.Build$VERSION; +import android.os.PowerManager; import android.widget.ImageButton; import androidx.activity.result.d; import j1.b; @@ -138,7 +140,20 @@ this.f0 = false; } - public final void E(final int p0) { + public final void E() { + if (!this.A.l("asked_battery_opt")) { + final PowerManager powerManager = (PowerManager)((Context)this).getSystemService("power"); + if (Build$VERSION.SDK_INT >= 23 && powerManager != null && !i0.c0.r(powerManager, ((Context)this).getPackageName())) { + final Intent intent = new Intent("android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"); + final StringBuilder sb = new StringBuilder("package:"); + sb.append(((Context)this).getPackageName()); + intent.setData(Uri.parse(sb.toString())); + this.c0.j(intent); + } + } + } + + public final void F(final int p0) { // // This method could not be decompiled. // @@ -261,7 +276,7 @@ throw new IllegalStateException("An error occurred while decompiling this method."); } - public final void F(final int n) { + public final void G(final int n) { final int n2 = 1; final int n3 = 200; ImageView imageView; @@ -285,7 +300,7 @@ ((TransitionDrawable)this.P.getDrawable()).startTransition(n3); } - public final void G() { + public final void H() { final StringBuilder sb = new StringBuilder("$ Welcome to "); sb.append(((Context)this).getString(2131820573)); sb.append("\n"); @@ -293,7 +308,7 @@ ((View)this.N).scrollTo(0, 0); } - public final void H() { + public final void I() { this.X.setContentView(2131493004); final QRCodeReaderView qrCodeReaderView = (QRCodeReaderView)this.X.findViewById(2131296667); qrCodeReaderView.setOnQRCodeReadListener((QRCodeReaderView$b)new t(this, (PointsOverlayLayout)this.X.findViewById(2131296656), qrCodeReaderView)); @@ -304,7 +319,7 @@ this.X.setOnDismissListener((DialogInterface$OnDismissListener)new u(qrCodeReaderView)); } - public final void I() { + public final void J() { final int sdk_INT = Build$VERSION.SDK_INT; final int n = 23; final int n2 = 30; @@ -313,25 +328,25 @@ } else if (sdk_INT >= n2) { if (!i0.g0.g()) { - this.O(); + this.P(); } else { - this.J(); + this.K(); } } } - public final void J() { + public final void K() { final boolean i = this.A.i(); final int n = 1; if (i) { - this.F(n); + this.G(n); final String m = this.A.m("temp_url"); if (m != null) { this.B = m; final StringBuilder sb = new StringBuilder("Server running at: "); sb.append(this.B); - this.N(sb.toString(), false); + this.O(sb.toString(), false); } } ((View)this.y).setOnClickListener((View$OnClickListener)new v(this, 0)); @@ -339,10 +354,14 @@ final Object[] args = new Object[n2]; args[0] = ((Context)this).getPackageName(); args[n] = "sharex_v2_0"; - new File(String.format("/data/data/%s/%s/index.html", args)).exists(); - final s0 s0 = new s0((Context)this, ((Context)this).getPackageName()); - s0.c = new MainActivity$c(this); - ((AsyncTask)s0).execute((Object[])new Void[0]); + if (new File(String.format("/data/data/%s/%s/index.html", args)).exists()) { + this.E(); + } + else { + final s0 s0 = new s0((Context)this, ((Context)this).getPackageName()); + s0.c = new MainActivity$c(this); + ((AsyncTask)s0).execute((Object[])new Void[0]); + } ((NavigationView)this.findViewById(2131296616)).setNavigationItemSelectedListener((NavigationView$a)new w(this)); final CardView cardView = (CardView)this.findViewById(2131296727); final CardView cardView2 = (CardView)this.findViewById(2131296728); @@ -382,7 +401,7 @@ ((View)imageButton).setOnClickListener((View$OnClickListener)new x(this, 3)); } - public final boolean K() { + public final boolean L() { final Context applicationContext = ((Context)this).getApplicationContext(); final String s = "wifi"; final WifiManager obj = (WifiManager)applicationContext.getSystemService(s); @@ -424,7 +443,7 @@ return b; } - public final void L() { + public final void M() { this.U = new ArrayList(); if (this.S.size() > 0) { this.U.addAll(this.S); @@ -465,7 +484,7 @@ } } - public final void M() { + public final void N() { final boolean l = this.A.l("private_mode"); final ConstraintLayout constraintLayout = (ConstraintLayout)this.findViewById(2131296853); int visibility; @@ -478,7 +497,7 @@ ((View)constraintLayout).setVisibility(visibility); } - public final void N(String string, final boolean b) { + public final void O(String string, final boolean b) { if (this.N == null) { this.N = (TextView)this.findViewById(2131296547); } @@ -523,7 +542,7 @@ catch (final Exception ex6) {} } - public final void O() { + public final void P() { final String action = "android.settings.MANAGE_ALL_FILES_ACCESS_PERMISSION"; final String str = "package:"; if (Build$VERSION.SDK_INT >= 30) { @@ -552,22 +571,22 @@ } } - public final void P() { + public final void Q() { if (this.A.i()) { - this.F(0); - this.R(); - this.N("Restarting server...", true); + this.G(0); + this.S(); + this.O("Restarting server...", true); new Handler().postDelayed((Runnable)new l(this, 0), 2000L); } } - public final void Q(final String s) { + public final void R(final String s) { final Snackbar h = Snackbar.h(this.findViewById(2131296679), (CharSequence)s); h.i.setBackgroundTintList(ColorStateList.valueOf(Color.parseColor("#000a12"))); h.i(); } - public final void R() { + public final void S() { if (this.A.i()) { ((Context)this).stopService(new Intent((Context)this, (Class)ServerService.class)); } @@ -590,7 +609,7 @@ } } - public final void S() { + public final void T() { final int visibility = ((View)this.I).getVisibility(); final int n = 2131296665; final int n2 = 8; @@ -610,7 +629,7 @@ } } - public final void T() { + public final void U() { final ConstraintLayout i = this.I; final int visibility = 8; ((View)i).setVisibility(visibility); @@ -943,7 +962,7 @@ // 697: aload 8 // 699: putfield com/akansh/fileserversuit/MainActivity.S:Ljava/util/ArrayList; // 702: aload_0 - // 703: invokevirtual com/akansh/fileserversuit/MainActivity.L:()V + // 703: invokevirtual com/akansh/fileserversuit/MainActivity.M:()V // 706: goto 709 // 709: aload_0 // 710: iload_1 @@ -1033,10 +1052,10 @@ public final void onBackPressed() { if (((View)this.G).getVisibility() == 0) { - this.T(); + this.U(); } else if (((View)this.I).getVisibility() == 0) { - this.S(); + this.T(); } else { final int d0 = this.d0; @@ -1095,16 +1114,16 @@ m.setText((CharSequence)((String[])this.V.a)[a2.j(s, 0)]); this.e0 = this.A.j(s, 0); ((View)this.N).setOnLongClickListener((View$OnLongClickListener)new y()); - this.G(); + this.H(); this.Y = new a((Activity)this); this.a0 = ((ComponentActivity)this).z((androidx.activity.result.b)new w(this), new c()); this.b0 = ((ComponentActivity)this).z((androidx.activity.result.b)new z((Object)this), new c()); this.c0 = ((ComponentActivity)this).z((androidx.activity.result.b)new a0(this), new c()); if (Build$VERSION.SDK_INT >= 23) { - this.I(); + this.J(); } else { - this.J(); + this.K(); } final String pathname = "/mnt"; final File file = new File(pathname); @@ -1210,10 +1229,10 @@ n2 = 1; } if (n2 == 0) { - this.I(); + this.J(); return; } - this.J(); + this.K(); } else if (n == 2) { n = z.b.a((Context)this, "android.permission.CAMERA"); @@ -1221,7 +1240,7 @@ n2 = 1; } if (n2 != 0) { - this.H(); + this.I(); } } else { @@ -1235,7 +1254,7 @@ final IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction("service.to.activity.transfer"); ((Context)this).registerReceiver((BroadcastReceiver)this.R, intentFilter); - this.M(); + this.N(); super.onResume(); } catch (final Exception ex) {} @@ -1244,7 +1263,7 @@ } public final void onStart() { - this.M(); + this.N(); super.onStart(); } } --- x/classes-enjarify/com/google/android/material/navigation/a.class.out 2023-07-02 17:13:23.167076878 +0200 +++ y/classes-enjarify/com/google/android/material/navigation/a.class.out 2023-07-02 17:13:44.191243167 +0200 @@ -41,7 +41,7 @@ final int itemId = menuItem.getItemId(); Label_0368: { if (itemId == 2131296756) { - ((MainActivity)a).T(); + ((MainActivity)a).U(); } else if (itemId == 2131296686) { final String s = "android.permission.CAMERA"; @@ -49,7 +49,7 @@ b = true; } if (b) { - ((MainActivity)a).H(); + ((MainActivity)a).I(); } else if (Build$VERSION.SDK_INT >= 23) { ((Activity)a).requestPermissions(new String[] { s }, 2); @@ -62,7 +62,7 @@ } else { if (itemId == 2131296385) { - ((MainActivity)a).G(); + ((MainActivity)a).H(); break Label_0368; } if (itemId == 2131296660) { --- x/classes-enjarify/j1/c.class.out 2023-07-02 17:13:24.023083648 +0200 +++ y/classes-enjarify/j1/c.class.out 2023-07-02 17:13:44.967249304 +0200 @@ -92,7 +92,7 @@ activity.startActivityForResult(intent, n2); } catch (final Exception ex) { - ((MainActivity)a).N(ex.toString(), e); + ((MainActivity)a).O(ex.toString(), e); } } catch (final Exception ex2) {} --- x/classes-enjarify/j1/e.class.out 2023-07-02 17:13:24.803089818 +0200 +++ y/classes-enjarify/j1/e.class.out 2023-07-02 17:13:45.623254493 +0200 @@ -25,13 +25,13 @@ ((Context)c).startActivity(Intent.createChooser(intent, (CharSequence)"Sharing ShareX Url")); } else { - c.Q("Start ShareX first!"); + c.R("Start ShareX first!"); } return; } case 0: { final int g0 = MainActivity.g0; - c.S(); + c.T(); } } } --- x/classes-enjarify/j1/g.class.out 2023-07-02 17:13:25.571095892 +0200 +++ y/classes-enjarify/j1/g.class.out 2023-07-02 17:13:46.315259966 +0200 @@ -26,14 +26,14 @@ case 1: { final MainActivity mainActivity = (MainActivity)b2; mainActivity.A.n("private_mode", b); - mainActivity.P(); - mainActivity.M(); + mainActivity.Q(); + mainActivity.N(); return; } case 0: { final MainActivity mainActivity2 = (MainActivity)b2; mainActivity2.A.n("load_hidden_media", b); - mainActivity2.P(); + mainActivity2.Q(); } } } --- x/classes-enjarify/j1/i.class.out 2023-07-02 17:13:26.199100860 +0200 +++ y/classes-enjarify/j1/i.class.out 2023-07-02 17:13:47.011265471 +0200 @@ -13,6 +13,6 @@ public final void onCheckedChanged(final CompoundButton compoundButton, final boolean b) { final MainActivity a = this.a; a.A.n("restrict_modify", b); - a.P(); + a.Q(); } } --- x/classes-enjarify/j1/l.class.out 2023-07-02 17:13:26.891106333 +0200 +++ y/classes-enjarify/j1/l.class.out 2023-07-02 17:13:47.719271072 +0200 @@ -17,19 +17,19 @@ switch (b) { default: { final int g0 = MainActivity.g0; - c.F(0); + c.G(0); return; } case 0: { final int g2 = MainActivity.g0; - if (c.K()) { + if (c.L()) { if (!c.A.i()) { ((Context)c).startService(new Intent((Context)c, (Class)ServerService.class)); } - c.F(1); + c.G(1); } else { - c.Q("Make sure your hotspot is open or wifi connected..."); + c.R("Make sure your hotspot is open or wifi connected..."); } } } --- x/classes-enjarify/j1/m.class.out 2023-07-02 17:13:27.599111933 +0200 +++ y/classes-enjarify/j1/m.class.out 2023-07-02 17:13:48.427276672 +0200 @@ -39,7 +39,7 @@ final Intent intent = (Intent)d; final int g3 = MainActivity.g0; mainActivity.getClass(); - mainActivity.N(intent.getStringExtra("msg"), true); + mainActivity.O(intent.getStringExtra("msg"), true); } } } --- x/classes-enjarify/j1/r.class.out 2023-07-02 17:13:28.319117628 +0200 +++ y/classes-enjarify/j1/r.class.out 2023-07-02 17:13:49.135282271 +0200 @@ -36,7 +36,7 @@ sb2.append(int1); Toast.makeText((Context)b, (CharSequence)sb2.toString(), n2).show(); dialogInterface.dismiss(); - b.P(); + b.Q(); } else { Toast.makeText((Context)b, (CharSequence)"Please enter a valid port number", n2).show(); --- x/classes-enjarify/j1/s0.class.out 2023-07-02 17:13:29.283125252 +0200 +++ y/classes-enjarify/j1/s0.class.out 2023-07-02 17:13:50.231290940 +0200 @@ -4,14 +4,11 @@ package j1; +import android.app.Activity; import android.app.Dialog; import android.app.AlertDialog; import com.akansh.fileserversuit.MainActivity; -import android.net.Uri; -import android.content.Intent; -import i0.c0; -import android.os.Build$VERSION; -import android.os.PowerManager; +import android.view.ViewGroup; import android.content.BroadcastReceiver; import android.content.IntentFilter; import android.content.DialogInterface$OnClickListener; @@ -271,24 +268,19 @@ ((Dialog)create).show(); } try { + o = new(android.content.IntentFilter.class)(); try { - o = new IntentFilter(); + new IntentFilter(); ((IntentFilter)o).addAction("service.to.activity.transfer"); ((Context)a).registerReceiver((BroadcastReceiver)a.R, (IntentFilter)o); + o = new AlertDialog$Builder((Context)a); + ((AlertDialog$Builder)o).setView(((Activity)a).getLayoutInflater().inflate(2131492892, (ViewGroup)null)); + ((Dialog)((AlertDialog$Builder)o).create()).show(); + a.E(); } catch (final Exception ex) {} } catch (final Exception ex2) {} - if (!a.A.l("asked_battery_opt")) { - final PowerManager powerManager = (PowerManager)((Context)a).getSystemService("power"); - if (Build$VERSION.SDK_INT >= 23 && powerManager != null && !c0.r(powerManager, ((Context)a).getPackageName())) { - o = new Intent("android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"); - final StringBuilder sb = new StringBuilder("package:"); - sb.append(((Context)a).getPackageName()); - ((Intent)o).setData(Uri.parse(sb.toString())); - a.c0.j((Intent)o); - } - } } public final void onPreExecute() { --- x/classes-enjarify/j1/v.class.out 2023-07-02 17:13:30.055131359 +0200 +++ y/classes-enjarify/j1/v.class.out 2023-07-02 17:13:50.959296699 +0200 @@ -41,28 +41,28 @@ else { s = "Start ShareX First!"; } - c.Q(s); + c.R(s); return; } case 0: { final boolean i = c.A.i(); final int n = 1; if (!i) { - if (c.K()) { - c.N("Starting server...", (boolean)(n != 0)); + if (c.L()) { + c.O("Starting server...", (boolean)(n != 0)); if (!c.A.i()) { ((Context)c).startService(new Intent((Context)c, (Class)ServerService.class)); } - c.F(n); + c.G(n); } else { - c.Q("Make sure your hotspot is open or wifi connected..."); + c.R("Make sure your hotspot is open or wifi connected..."); } } else { - c.N("Stopping server...", (boolean)(n != 0)); - c.R(); - c.F(0); + c.O("Stopping server...", (boolean)(n != 0)); + c.S(); + c.G(0); } } } --- x/classes-enjarify/j1/w.class.out 2023-07-02 17:13:30.679136295 +0200 +++ y/classes-enjarify/j1/w.class.out 2023-07-02 17:13:51.527301192 +0200 @@ -21,10 +21,10 @@ if (sdk_INT >= n && a2.f0) { if (g0.g()) { a2.f0 = false; - a2.J(); + a2.K(); } else { - a2.O(); + a2.P(); } } else { --- x/classes-enjarify/j1/x.class.out 2023-07-02 17:13:31.451142401 +0200 +++ y/classes-enjarify/j1/x.class.out 2023-07-02 17:13:52.335307582 +0200 @@ -29,7 +29,7 @@ switch (b) { default: { c.Z.getWritableDatabase().delete("D_LIST", (String)null, (String[])null); - c.Q("All remembered devices cleared!"); + c.R("All remembered devices cleared!"); new Timer().schedule(new d0(c), n); return; } @@ -44,9 +44,9 @@ edit.apply(); final StringBuilder sb = new StringBuilder("Server root changed to "); sb.append(c.F); - c.N(sb.toString(), b2); + c.O(sb.toString(), b2); c.K.setText((CharSequence)c.F); - c.P(); + c.Q(); return; } case 2: { --- x/classes-enjarify/j1/z.class.out 2023-07-02 17:13:32.363149614 +0200 +++ y/classes-enjarify/j1/z.class.out 2023-07-02 17:13:53.163314131 +0200 @@ -64,11 +64,11 @@ edit.apply(); o = new StringBuilder(str); ((StringBuilder)o).append(mainActivity.F); - mainActivity.N(((StringBuilder)o).toString(), true); + mainActivity.O(((StringBuilder)o).toString(), true); final TextView k = mainActivity.K; try { k.setText((CharSequence)mainActivity.F); - mainActivity.P(); + mainActivity.Q(); } catch (final Exception obj) { final StringBuilder sb = new StringBuilder("Err2: "); --- x/classes-enjarify/o2/a$a.class.out 2023-07-02 17:13:33.195156195 +0200 +++ y/classes-enjarify/o2/a$a.class.out 2023-07-02 17:13:53.891319889 +0200 @@ -42,7 +42,7 @@ final List