From d2dc8f64ac6a561f9b13cc0c2043782468bbf759 Mon Sep 17 00:00:00 2001 From: androidacy-user Date: Thu, 27 Apr 2023 03:25:14 +0000 Subject: [PATCH] (fix) small fixes Signed-off-by: androidacy-user --- .../com/fox2code/mmm/installer/InstallerInitializer.java | 5 ++++- app/src/main/java/com/fox2code/mmm/repo/RepoUpdater.java | 6 ++---- build.gradle.kts | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/fox2code/mmm/installer/InstallerInitializer.java b/app/src/main/java/com/fox2code/mmm/installer/InstallerInitializer.java index 3f6aa81..3575378 100644 --- a/app/src/main/java/com/fox2code/mmm/installer/InstallerInitializer.java +++ b/app/src/main/java/com/fox2code/mmm/installer/InstallerInitializer.java @@ -139,6 +139,7 @@ public class InstallerInitializer extends Shell.Initializer { @Override public boolean onInit(@NonNull Context context, @NonNull Shell shell) { if (!shell.isRoot()) { + Timber.w("No root access!"); return false; } // switch to global namespace @@ -148,11 +149,13 @@ public class InstallerInitializer extends Shell.Initializer { // switch to local namespace // first check if nsenter is available if (!shell.newJob().add("which nsenter").exec().isSuccess()) { - return true; // just return, some modules will break but oh fucking well + Timber.w("nsenter cmd unavailable"); + return shell.newJob().add("export ASH_STANDALONE=1; /data/local/tmp/busybox ash").exec().isSuccess(); } else { return shell.newJob().add("export ASH_STANDALONE=1; nsenter -t 1 -m -u /data/local/tmp/busybox ash").exec().isSuccess(); } } else { + Timber.w("Could not copy bb"); return false; } } diff --git a/app/src/main/java/com/fox2code/mmm/repo/RepoUpdater.java b/app/src/main/java/com/fox2code/mmm/repo/RepoUpdater.java index d39be64..1ee6a7e 100644 --- a/app/src/main/java/com/fox2code/mmm/repo/RepoUpdater.java +++ b/app/src/main/java/com/fox2code/mmm/repo/RepoUpdater.java @@ -328,14 +328,12 @@ public class RepoUpdater { realm.copyToRealmOrUpdate(moduleListCache); realm.commitTransaction(); } catch ( - Exception e) { - Timber.w("Failed to get module info from module " + module + " in repo " + this.repoData.id + " with error " + e.getMessage()); + Exception ignored) { } } realm.close(); } catch ( - Exception e) { - Timber.w("Failed to get module info from %s with error %s", this.repoData.id, e.getMessage()); + Exception ignored) { } this.indexRaw = null; RealmConfiguration realmConfiguration2 = new RealmConfiguration.Builder().name("ReposList.realm").encryptionKey(MainApplication.getINSTANCE().getKey()).allowQueriesOnUiThread(true).allowWritesOnUiThread(true).directory(MainApplication.getINSTANCE().getDataDirWithPath("realms")).schemaVersion(1).build(); diff --git a/build.gradle.kts b/build.gradle.kts index 6abedda..f233471 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -21,7 +21,7 @@ buildscript { // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files //noinspection GradleDependency - classpath("io.realm:realm-gradle-plugin:10.14.0-transformer-api") + classpath("io.realm:realm-gradle-plugin:10.15.1") classpath("io.sentry:sentry-android-gradle-plugin:3.5.0") } }