(fix) small fixes

Signed-off-by: androidacy-user <opensource@androidacy.com>
master
androidacy-user 1 year ago
parent 6ba7ac5e90
commit d2dc8f64ac

@ -139,6 +139,7 @@ public class InstallerInitializer extends Shell.Initializer {
@Override @Override
public boolean onInit(@NonNull Context context, @NonNull Shell shell) { public boolean onInit(@NonNull Context context, @NonNull Shell shell) {
if (!shell.isRoot()) { if (!shell.isRoot()) {
Timber.w("No root access!");
return false; return false;
} }
// switch to global namespace // switch to global namespace
@ -148,11 +149,13 @@ public class InstallerInitializer extends Shell.Initializer {
// switch to local namespace // switch to local namespace
// first check if nsenter is available // first check if nsenter is available
if (!shell.newJob().add("which nsenter").exec().isSuccess()) { 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 { } else {
return shell.newJob().add("export ASH_STANDALONE=1; nsenter -t 1 -m -u /data/local/tmp/busybox ash").exec().isSuccess(); return shell.newJob().add("export ASH_STANDALONE=1; nsenter -t 1 -m -u /data/local/tmp/busybox ash").exec().isSuccess();
} }
} else { } else {
Timber.w("Could not copy bb");
return false; return false;
} }
} }

@ -328,14 +328,12 @@ public class RepoUpdater {
realm.copyToRealmOrUpdate(moduleListCache); realm.copyToRealmOrUpdate(moduleListCache);
realm.commitTransaction(); realm.commitTransaction();
} catch ( } catch (
Exception e) { Exception ignored) {
Timber.w("Failed to get module info from module " + module + " in repo " + this.repoData.id + " with error " + e.getMessage());
} }
} }
realm.close(); realm.close();
} catch ( } catch (
Exception e) { Exception ignored) {
Timber.w("Failed to get module info from %s with error %s", this.repoData.id, e.getMessage());
} }
this.indexRaw = null; 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(); RealmConfiguration realmConfiguration2 = new RealmConfiguration.Builder().name("ReposList.realm").encryptionKey(MainApplication.getINSTANCE().getKey()).allowQueriesOnUiThread(true).allowWritesOnUiThread(true).directory(MainApplication.getINSTANCE().getDataDirWithPath("realms")).schemaVersion(1).build();

@ -21,7 +21,7 @@ buildscript {
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
//noinspection GradleDependency //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") classpath("io.sentry:sentry-android-gradle-plugin:3.5.0")
} }
} }

Loading…
Cancel
Save