From d4218e5a9d3c0a2e85e3da345f22113b1f1ed2b1 Mon Sep 17 00:00:00 2001 From: androidacy-user Date: Sat, 22 Apr 2023 16:56:44 -0400 Subject: [PATCH] (misc) tweaks and upgrades Signed-off-by: androidacy-user --- README.md | 58 ++++++++++++------- app/build.gradle.kts | 46 +++++---------- .../mmm/androidacy/AndroidacyWebAPI.java | 11 +++- .../mmm/installer/InstallerActivity.java | 2 +- .../fox2code/mmm/utils/ExternalHelper.java | 2 +- gradle.properties | 3 +- gradle/wrapper/gradle-wrapper.properties | 6 +- settings.gradle.kts | 5 ++ 8 files changed, 73 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index 53d6b60..c7562fc 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,15 @@ # Fox's Magisk Module Manager +### Sponsored by and developed with Androidacy. Find them on the web [here](https://www.androidacy.com/?utm_source=fox-readme&utm_medium=web&utm_campagin=github). +
- Important news + Important news about Fox2Code -I have health problems that made me work slow on everything. I don't like sharing my health problmes +**Tl;Dr: Fox2Code is temporarily less involved with development and support due to health issues. Androidacy is happy to take on both in his absence, and will continue to provide both upon his return.** + +I have health problems that made me work slow on everything. I don't like sharing my health problems but it has been to much recently for me to keep it for myself. This has been too much for me recently, so my moderators (same that on telegram) @@ -97,21 +101,24 @@ and download and install the latest `.apk` on your device. ## Repositories Available -The app currently use these two repos as module sources, each with their own benefits and -drawbacks: -(Note: Each module repo can be disabled in the settings of the app) -(NoteĀ²: I do not own or actively monitor any of the repos or modules, **download at your own risk**) +#### Please note that we reserve the right to add, remove, and change default repos at any time, and the inclusion of any repo does not equate endorsement or any agreement with or of said repo. + +The app currently use the below repos as module sources, each with their own benefits and +drawbacks. Note that the app developers do not actively monitor any repos, and downloading or +installing from them is at the user's own risk. Default repos can be enabled or disabled in-app. -#### [https://www.androidacy.com/modules-repo/](https://www.androidacy.com/modules-repo/) +#### [Androidacy](https://www.androidacy.com/magisk-modules-repository/?utm_source=fox-readme&utm_medium=web&utm_campagin=github) -- Accepting new modules [here](https://www.androidacy.com/module-repository-applications/) +- Accepting new + modules [here](https://www.androidacy.com/module-repository-applications/?utm_source=fox-readme&utm_medium=web&utm_campagin=github) - Modules downloadable easily outside the app - Rigorously reviewed and tested modules - Officially supported by Fox's mmm -- May show ads to help cover infrastrcture costs. - - [Read more](https://www.androidacycom/doing-it-alone-the-what-the-how-and-the-why/) - | [Privacy policy](https://www.androidacy.com/privacy/) -- Added features like module reviews, automatic VirusTotal scans, and more +- May show ads to help cover infrastructure costs. + - [Read more](https://www.androidacycom/doing-it-alone-the-what-the-how-and-the-why/?utm_source=fox-readme&utm_medium=web&utm_campagin=github) + | [Privacy policy](https://www.androidacy.com/privacy/?utm_source=fox-readme&utm_medium=web&utm_campagin=github) +- Added features like module reviews, automatic VirusTotal scans, and more. + - Pays module developers for their work as part of the Revenue Sharing Program Support: @@ -121,13 +128,17 @@ Support: - Accepting new modules [here](https://github.com/Magisk-Modules-Alt-Repo/submission) - Less restrictive than the original repo - - May have lower quality, untested, or otherwise broken modules due to this + - May have lower quality, untested, or otherwise broken modules due to their policies or lack + thereof. - Officially supported by Fox's mmm Support: [![GitHub issues](https://img.shields.io/github/issues/Magisk-Modules-Alt-Repo/submission)](https://github.com/Magisk-Modules-Alt-Repo/submission/issues) +**Please do not use GitHub issues for help or questions. GitHub issues are specifically for bug +reporting and general app feedback.** + If a module is in multiple repos, the manager will just pick the most up to date version of the module, if a module is in multiple repos it will just use first registered repo. @@ -149,7 +160,7 @@ It allow module developers to have a more customizable install experience For more information please check the [developer documentation](docs/DEVELOPERS.md) -## For translators +## Help us make our app more accessible! **We need your help!** The app has started lagging behind in translations, and we need your help to catch up! As a reminder, translations are required to be at 60% or more to be included in the app. @@ -179,11 +190,17 @@ See [the documentation](docs/add-repo.md). If you have a problem with a repo, please contact the repo owner **first**. If you are unable to reach them or they are not willing to help, you can contact us as a last resort. +_The developers of this app are unable to help with any issues arising from use or installation of +modules, and may be of limited help with issues arising from a specific repo._ + Default repo owners: - Androidacy: [Telegram](https://telegram.dog/androidacy_discussions) - Magisk-Modules-Alt-Repo: [GitHub](https://github.com/Magisk-Modules-Alt-Repo/submission/issues) +Custom repos may have their own support channels, and we are unable to provide any support +whatsoever for them, outside of direct implementation bugs. + ## License Fox's Magisk Manager, the icon, and names are copyright @@ -192,17 +209,18 @@ later portions of the code are copyright 2022-present [Androidacy](https://www.androidacy.com/?utm_source=fox-repo&utm_medium=web). See [LICENSE](LICENCE) for details. Library licenses can be found in the licenses section of the app. -Modules and their files, names, and other assets are not covered by this license, please check the -license of each module before using it. +Modules and their files, names, and other assets are not covered by this license or other +agreements, and are not warranted, checked, or otherwise guaranteed by the authors of this app. -Some third party backend services may be proprietary or have additional terms, please check their +Some third party backend services may have additional terms, please check their terms of service before using them. ## EULA The EULA can be found [here](https://www.androidacy.com/foxmmm-eula/). By downloading, installing, -or using this app you agree to the terms of the EULA. Under no circumstances shall the EULA override -the LGPL-3.0 license, and in the event of a conflict between the EULA and the LGPL-3.0 license, the LGPL-3.0 shall take precedence. +or using this app you agree to the supplemental terms of the EULA. -`IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.` +**IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR AN CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.** diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 315b0a2..92898fe 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -4,7 +4,6 @@ import com.android.build.api.dsl.Packaging import io.sentry.android.gradle.extensions.InstrumentationFeature import io.sentry.android.gradle.instrumentation.logcat.LogcatLevel import com.android.build.api.variant.FilterConfiguration.FilterType.* -import java.io.ByteArrayOutputStream import java.util.Properties import java.io.File @@ -22,30 +21,15 @@ apply(plugin = "realm-android") val hasSentryConfig = File(rootProject.projectDir, "sentry.properties").exists() android { // functions to get git info: gitCommitHash, gitBranch, gitRemote - val gitCommitHash by lazy { - val stdout = ByteArrayOutputStream() - rootProject.exec { - commandLine("git", "rev-parse", "--short", "HEAD") - standardOutput = stdout - } - stdout.toString().trim() - } - val gitBranch by lazy { - val stdout = ByteArrayOutputStream() - rootProject.exec { - commandLine("git", "rev-parse", "--abbrev-ref", "HEAD") - standardOutput = stdout - } - stdout.toString().trim() - } - val gitRemote by lazy { - val stdout = ByteArrayOutputStream() - rootProject.exec { - commandLine("git", "config", "--get", "remote.origin.url") - standardOutput = stdout - } - stdout.toString().trim() - } + val gitCommitHash = providers.exec { + commandLine("git", "rev-parse", "--short", "HEAD") + }.standardOutput.asText.get().toString().trim() + val gitBranch = providers.exec { + commandLine("git", "rev-parse", "--abbrev-ref", "HEAD") + }.standardOutput.asText.get().toString().trim() + val gitRemote = providers.exec { + commandLine("git", "config", "--get", "remote.origin.url") + }.standardOutput.asText.get().toString().trim() namespace = "com.fox2code.mmm" compileSdk = 33 ndkVersion = "25.2.9519653" @@ -107,11 +91,11 @@ android { // debug http requests. do not set this to true if you care about performance!!!!! buildConfigField("boolean", "DEBUG_HTTP", "false") // Latest commit hash as BuildConfig.COMMIT_HASH - buildConfigField("String", "COMMIT_HASH", "\"" + gitCommitHash + "\"") + buildConfigField("String", "COMMIT_HASH", "\"$gitCommitHash\"") // Get the current branch name as BuildConfig.BRANCH_NAME - buildConfigField("String", "BRANCH_NAME", "\"" + gitBranch + "\"") + buildConfigField("String", "BRANCH_NAME", "\"$gitBranch\"") // Get remote url as BuildConfig.REMOTE_URL - buildConfigField("String", "REMOTE_URL", "\"" + gitRemote + "\"") + buildConfigField("String", "REMOTE_URL", "\"$gitRemote\"") dimension = "type" buildConfigField("boolean", "ENABLE_AUTO_UPDATER", "true") buildConfigField("boolean", "DEFAULT_ENABLE_CRASH_REPORTING", "true") @@ -151,11 +135,11 @@ android { buildConfigField("boolean", "DEBUG_HTTP", "false") // Latest commit hash as BuildConfig.COMMIT_HASH - buildConfigField("String", "COMMIT_HASH", "\"" + gitCommitHash + "\"") + buildConfigField("String", "COMMIT_HASH", "\"$gitCommitHash\"") // Get the current branch name as BuildConfig.BRANCH_NAME - buildConfigField("String", "BRANCH_NAME", "\"" + gitBranch + "\"") + buildConfigField("String", "BRANCH_NAME", "\"$gitBranch\"") // Get remote url as BuildConfig.REMOTE_URL - buildConfigField("String", "REMOTE_URL", "\"" + gitRemote + "\"") + buildConfigField("String", "REMOTE_URL", "\"$gitRemote\"") // Need to disable auto-updater for F-Droid flavor because their inclusion policy // forbids downloading blobs from third-party websites (and F-Droid APK isn"t signed diff --git a/app/src/main/java/com/fox2code/mmm/androidacy/AndroidacyWebAPI.java b/app/src/main/java/com/fox2code/mmm/androidacy/AndroidacyWebAPI.java index b0f6161..274f5c2 100644 --- a/app/src/main/java/com/fox2code/mmm/androidacy/AndroidacyWebAPI.java +++ b/app/src/main/java/com/fox2code/mmm/androidacy/AndroidacyWebAPI.java @@ -32,6 +32,7 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder; import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; +import java.util.Objects; import timber.log.Timber; @@ -100,7 +101,11 @@ public class AndroidacyWebAPI { } final String fModuleUrl = moduleUrl, fTitle = title, fConfig = config, fChecksum = checksum; final boolean fMMTReborn = mmtReborn; - builder.setPositiveButton(hasUpdate ? R.string.update_module : R.string.install_module, (x, y) -> IntentHelper.openInstaller(this.activity, fModuleUrl, fTitle, fConfig, fChecksum, fMMTReborn)); + builder.setPositiveButton(hasUpdate ? R.string.update_module : R.string.install_module, (x, y) -> { + IntentHelper.openInstaller(this.activity, fModuleUrl, fTitle, fConfig, fChecksum, fMMTReborn); + // close activity + this.activity.runOnUiThread(this.activity::finishAndRemoveTask); + }); } builder.setOnCancelListener(dialogInterface -> { if (!this.activity.backOnResume) @@ -173,7 +178,7 @@ public class AndroidacyWebAPI { this.downloadMode = false; if (BuildConfig.DEBUG) Timber.d("Received openUrl request: %s", url); - if (Uri.parse(url).getScheme().equals("https")) { + if (Objects.equals(Uri.parse(url).getScheme(), "https")) { IntentHelper.openUrl(this.activity, url); } } @@ -189,7 +194,7 @@ public class AndroidacyWebAPI { this.downloadMode = false; if (BuildConfig.DEBUG) Timber.d("Received openCustomTab request: %s", url); - if (Uri.parse(url).getScheme().equals("https")) { + if (Objects.equals(Uri.parse(url).getScheme(), "https")) { IntentHelper.openCustomTab(this.activity, url); } } diff --git a/app/src/main/java/com/fox2code/mmm/installer/InstallerActivity.java b/app/src/main/java/com/fox2code/mmm/installer/InstallerActivity.java index 3c5c4a3..49b0c8f 100644 --- a/app/src/main/java/com/fox2code/mmm/installer/InstallerActivity.java +++ b/app/src/main/java/com/fox2code/mmm/installer/InstallerActivity.java @@ -532,7 +532,7 @@ public class InstallerActivity extends FoxActivity { }); this.rebootFloatingButton.setVisibility(View.VISIBLE); // handle back button - this.cancelFloatingButton.setOnClickListener(_view -> this.finishAndRemoveTask()); + this.cancelFloatingButton.setOnClickListener(_view -> this.forceBackPressed()); if (message != null && !message.isEmpty()) this.installerTerminal.addLine(message); if (optionalLink != null && !optionalLink.isEmpty()) { this.setActionBarExtraMenuButton(ActionButtonType.supportIconForUrl(optionalLink), menu -> { diff --git a/app/src/main/java/com/fox2code/mmm/utils/ExternalHelper.java b/app/src/main/java/com/fox2code/mmm/utils/ExternalHelper.java index 067c111..8b2d374 100644 --- a/app/src/main/java/com/fox2code/mmm/utils/ExternalHelper.java +++ b/app/src/main/java/com/fox2code/mmm/utils/ExternalHelper.java @@ -37,7 +37,7 @@ public final class ExternalHelper { public void refreshHelper(Context context) { Intent intent = new Intent(FOX_MMM_OPEN_EXTERNAL, Uri.parse("https://fox2code.com/module.zip")); List resolveInfos = context.getPackageManager().queryIntentActivities(intent, PackageManager.GET_RESOLVED_FILTER); - if (resolveInfos == null || resolveInfos.isEmpty()) { + if (resolveInfos.isEmpty()) { Timber.i("No external provider installed!"); label = TEST_MODE ? "External" : null; multi = TEST_MODE; diff --git a/gradle.properties b/gradle.properties index d2508ef..758e8e4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,4 +23,5 @@ org.gradle.parallel=true android.enableR8.fullMode=true org.gradle.unsafe.configuration-cache=true android.defaults.buildfeatures.buildconfig=true -kotlin.jvm.target.validation.mode=IGNORE \ No newline at end of file +kotlin.jvm.target.validation.mode=IGNORE +org.gradle.caching=true \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 812cf6a..7c0acfb 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun Jun 05 10:40:53 EDT 2022 +#Sat Apr 22 15:39:14 EDT 2023 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index db591fe..2215b7b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -9,5 +9,10 @@ dependencyResolutionManagement { maven { setUrl("https://jitpack.io") } } } +buildCache { + local { + isEnabled = true + } +} rootProject.name = "MagiskModuleManager" include(":app") \ No newline at end of file