(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
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;
}
}

@ -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();

@ -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")
}
}

Loading…
Cancel
Save