diff --git a/app/src/main/java/com/fox2code/mmm/settings/SettingsActivity.java b/app/src/main/java/com/fox2code/mmm/settings/SettingsActivity.java
index ebc76c0..a15ccf7 100644
--- a/app/src/main/java/com/fox2code/mmm/settings/SettingsActivity.java
+++ b/app/src/main/java/com/fox2code/mmm/settings/SettingsActivity.java
@@ -541,6 +541,42 @@ public class SettingsActivity extends FoxActivity implements LanguageActivity {
Toast.makeText(requireContext(), toastText, Toast.LENGTH_SHORT).show();
return true;
});
+ // Next, the pref_androidacy_thanks should lead to the androidacy website
+ linkClickable = findPreference("pref_androidacy_thanks");
+ linkClickable.setOnPreferenceClickListener(p -> {
+ IntentHelper.openUrl(p.getContext(), "https://www.androidacy.com?utm_source=FoxMagiskModuleManager&utm_medium=app&utm_campaign=FoxMagiskModuleManager");
+ return true;
+ });
+ linkClickable.setOnPreferenceLongClickListener(p -> {
+ String toastText = requireContext().getString(R.string.link_copied);
+ clipboard.setPrimaryClip(ClipData.newPlainText(toastText, "https://www.androidacy.com?utm_source=FoxMagiskModuleManager&utm_medium=app&utm_campaign=FoxMagiskModuleManager"));
+ Toast.makeText(requireContext(), toastText, Toast.LENGTH_SHORT).show();
+ return true;
+ });
+ // pref_contributors should lead to the contributors page
+ linkClickable = findPreference("pref_contributors");
+ linkClickable.setOnPreferenceClickListener(p -> {
+ // Remove the .git if it exists and add /graphs/contributors
+ String url = BuildConfig.REMOTE_URL;
+ if (url.endsWith(".git")) {
+ url = url.substring(0, url.length() - 4);
+ }
+ url += "/graphs/contributors";
+ IntentHelper.openUrl(p.getContext(), url);
+ return true;
+ });
+ linkClickable.setOnPreferenceLongClickListener(p -> {
+ String toastText = requireContext().getString(R.string.link_copied);
+ // Remove the .git if it exists and add /graphs/contributors
+ String url = BuildConfig.REMOTE_URL;
+ if (url.endsWith(".git")) {
+ url = url.substring(0, url.length() - 4);
+ }
+ url += "/graphs/contributors";
+ clipboard.setPrimaryClip(ClipData.newPlainText(toastText, url));
+ Toast.makeText(requireContext(), toastText, Toast.LENGTH_SHORT).show();
+ return true;
+ });
linkClickable = findPreference("pref_support");
linkClickable.setOnPreferenceClickListener(p -> {
devModeStep = 0;
diff --git a/app/src/main/java/com/fox2code/mmm/utils/ZipFileOpener.java b/app/src/main/java/com/fox2code/mmm/utils/ZipFileOpener.java
index c6a0791..c22e510 100644
--- a/app/src/main/java/com/fox2code/mmm/utils/ZipFileOpener.java
+++ b/app/src/main/java/com/fox2code/mmm/utils/ZipFileOpener.java
@@ -15,6 +15,7 @@ import com.fox2code.mmm.installer.InstallerInitializer;
import java.io.File;
import java.io.FileOutputStream;
+import java.io.IOException;
import java.io.InputStream;
public class ZipFileOpener extends FoxActivity {
@@ -30,6 +31,7 @@ public class ZipFileOpener extends FoxActivity {
File zipFile;
Uri uri = getIntent().getData();
if (uri == null) {
+ Log.e("ZipFileOpener", "onCreate: No data provided");
Toast.makeText(this, R.string.zip_load_failed, Toast.LENGTH_LONG).show();
finish();
return;
@@ -63,6 +65,30 @@ public class ZipFileOpener extends FoxActivity {
Toast.makeText(this, R.string.zip_load_failed, Toast.LENGTH_LONG).show();
finishAndRemoveTask();
return;
+ } else {
+ if (BuildConfig.DEBUG) {
+ Log.d("ZipFileOpener", "onCreate: Zip file is " + zipFile.length() + " bytes");
+ }
+ }
+ // Unpack the zip to validate it's a valid magisk module
+ // It needs to have, at the bare minimum, a module.prop file. Everything else is technically optional.
+ // First, check if it's a zip file
+ try (java.util.zip.ZipFile zip = new java.util.zip.ZipFile(zipFile)) {
+ if (zip.getEntry("module.prop") == null) {
+ Log.e(TAG, "onCreate: Zip file is not a valid magisk module");
+ Toast.makeText(this, R.string.invalid_format, Toast.LENGTH_LONG).show();
+ finishAndRemoveTask();
+ return;
+ }
+ } catch (
+ IOException e) {
+ Log.e(TAG, "onCreate: Failed to open zip file", e);
+ Toast.makeText(this, R.string.zip_load_failed, Toast.LENGTH_LONG).show();
+ finishAndRemoveTask();
+ return;
+ }
+ if (BuildConfig.DEBUG) {
+ Log.d("ZipFileOpener", "onCreate: Zip file is valid");
}
// Pass the file to the installer
FoxActivity compatActivity = FoxActivity.getFoxActivity(this);
diff --git a/app/src/main/res/drawable/baseline_favorite_24.xml b/app/src/main/res/drawable/baseline_favorite_24.xml
new file mode 100644
index 0000000..5ebd8c4
--- /dev/null
+++ b/app/src/main/res/drawable/baseline_favorite_24.xml
@@ -0,0 +1,6 @@
+
+
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 8aaf1fc..9f17f72 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -267,5 +267,7 @@
This app is outdated.
Please update the app to the latest version.
Your webview is outdated! Please update it.Don\'t see your language?Help us by translating it! Tap here to find out more.
- Commit %1$s @ %2$sNo file was provided when trying to open zip.Could not load the zip file
+ Commit %1$s @ %2$s
+ No file was provided when trying to open zip.
+ Could not load the zip fileDeveloped in part by AndroidacyHuge shoutout to Androidacy for their integration and contributions to the app.And of course, thanks to all of our contributors, whether it\'s translations, code, or just being fun to hang out with! We love you all.
diff --git a/app/src/main/res/xml/root_preferences.xml b/app/src/main/res/xml/root_preferences.xml
index ba053fd..c36ee96 100644
--- a/app/src/main/res/xml/root_preferences.xml
+++ b/app/src/main/res/xml/root_preferences.xml
@@ -174,6 +174,21 @@
app:key="pref_show_licenses"
app:singleLineTitle="false"
app:title="@string/show_licenses" />
+
+
+
+
+