From b429b7ca078c7fcdc46b0557fa306a5037351f02 Mon Sep 17 00:00:00 2001 From: androidacy-user Date: Sun, 16 Jul 2023 21:55:35 -0400 Subject: [PATCH] another attempt to work around libsu bug also update deps Signed-off-by: androidacy-user --- app/build.gradle.kts | 18 +++++++++--------- app/proguard-rules.pro | 6 ++++++ .../mmm/installer/InstallerInitializer.kt | 4 ++-- build.gradle.kts | 2 +- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 77abdd8..a278175 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -53,8 +53,8 @@ android { applicationId = "com.fox2code.mmm" minSdk = 24 targetSdk = 33 - versionCode = 80 - versionName = "2.2.2" + versionCode = 81 + versionName = "2.2.3" vectorDrawables { useSupportLibrary = true } @@ -462,7 +462,7 @@ dependencies { implementation("com.github.KieronQuinn:MonetCompat:0.4.1") implementation("com.github.Fox2Code.FoxCompat:foxcompat:1.2.14") implementation("com.github.Fox2Code.FoxCompat:hiddenapis:1.2.14") - implementation("com.mikepenz:aboutlibraries:10.8.0") + implementation("com.mikepenz:aboutlibraries:10.8.2") // Utils implementation("androidx.work:work-runtime:2.8.1") @@ -487,12 +487,12 @@ dependencies { implementation("com.github.Fox2Code:AndroidANSI:1.2.1") // sentry - implementation("io.sentry:sentry-android:6.25.0") - implementation("io.sentry:sentry-android-timber:6.25.0") - implementation("io.sentry:sentry-android-fragment:6.25.0") - implementation("io.sentry:sentry-android-okhttp:6.25.0") - implementation("io.sentry:sentry-kotlin-extensions:6.25.0") - implementation("io.sentry:sentry-android-ndk:6.25.0") + implementation("io.sentry:sentry-android:6.25.2") + implementation("io.sentry:sentry-android-timber:6.25.2") + implementation("io.sentry:sentry-android-fragment:6.25.2") + implementation("io.sentry:sentry-android-okhttp:6.25.2") + implementation("io.sentry:sentry-kotlin-extensions:6.25.2") + implementation("io.sentry:sentry-android-ndk:6.25.2") // Markdown // TODO: switch to an updated implementation diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 736f755..a37ef02 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -211,6 +211,12 @@ -keep class com.topjohnwu.superuser.Shell$Result -keep class com.topjohnwu.superuser.Shell +# fix for Parameter specified as non-null is null: method com.fox2code.mmm.installer.InstallerInitializer.a, parameter context which extends com.topjohnwu.superuser.Shell$Initializer +# a is actually onInit and the code is in kotlin +-keepclassmembers class com.fox2code.mmm.installer.InstallerInitializer { + public onInit(android.content.Context, com.topjohnwu.superuser.Shell); +} + # dontwarn -dontwarn android.os.SystemProperties -dontwarn android.view.ThreadedRenderer diff --git a/app/src/main/kotlin/com/fox2code/mmm/installer/InstallerInitializer.kt b/app/src/main/kotlin/com/fox2code/mmm/installer/InstallerInitializer.kt index f34d834..f0d1491 100644 --- a/app/src/main/kotlin/com/fox2code/mmm/installer/InstallerInitializer.kt +++ b/app/src/main/kotlin/com/fox2code/mmm/installer/InstallerInitializer.kt @@ -160,11 +160,11 @@ class InstallerInitializer : Shell.Initializer() { Companion.mgskVerCode = mgskVerCode return mgskPth } catch (ignored: Exception) { - return if (tries <= 5) { + return if (tries <= 10) { tries++ // sleep tries * 25ms try { - Thread.sleep(tries * 25L) + Thread.sleep(tries * 50L) } catch (e: InterruptedException) { Timber.e(e) } diff --git a/build.gradle.kts b/build.gradle.kts index 88509c7..8a6afae 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ buildscript { gradlePluginPortal() } dependencies { - classpath("com.android.tools.build:gradle:8.1.0-rc01") + classpath("com.android.tools.build:gradle:8.0.2") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22") classpath("com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:10.8.0")