Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.

Commit 73c8baa

Browse files
authored
Merge branch 'master' into f2c-merge-patch
2 parents cffd90c + f227a75 commit 73c8baa

File tree

8 files changed

+227
-157
lines changed

8 files changed

+227
-157
lines changed

CODE_OF_CONDUCT.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Contributor Covenant Code of Conduct
22

3+
Note: The code of conduct are the rules that applies to everyone interacting
4+
with the repo, regardless of acceptance, moderators of the repo are not forced
5+
to apply it strictly, so be nice!
6+
37
## Our Pledge
48

59
We as members, contributors, and leaders pledge to make participation in our
@@ -24,15 +28,17 @@ community include:
2428
and learning from the experience
2529
* Focusing on what is best not just for us as individuals, but for the
2630
overall community
31+
* Respecting mistakes as something happening to everyone that is useful as
32+
learning material
2733

2834
Examples of unacceptable behavior include:
2935

3036
* The use of sexualized language or imagery, and sexual attention or
3137
advances of any kind
3238
* Trolling, insulting or derogatory comments, and personal or political attacks
3339
* Public or private harassment
34-
* Publishing others' private information, such as a physical or email
35-
address, without their explicit permission
40+
* Publishing others' private information, such as a physical or email address,
41+
with or without their explicit permission unless widely publicly available
3642
* Other conduct which could reasonably be considered inappropriate in a
3743
professional setting
3844

@@ -73,16 +79,16 @@ the consequences for any action they deem in violation of this Code of Conduct:
7379
### 1. Correction
7480

7581
**Community Impact**: Use of inappropriate language or other behavior deemed
76-
unprofessional or unwelcome in the community.
82+
harmful or unwelcome in the community.
7783

7884
**Consequence**: A private, written warning from community leaders, providing
7985
clarity around the nature of the violation and an explanation of why the
80-
behavior was inappropriate. A public apology may be requested.
86+
behavior was inappropriate.
8187

8288
### 2. Warning
8389

8490
**Community Impact**: A violation through a single incident or series
85-
of actions.
91+
of actions, or a behaviour that induce hatred in the community.
8692

8793
**Consequence**: A warning with consequences for continued behavior. No
8894
interaction with the people involved, including unsolicited interaction with

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ android {
1010
applicationId "com.fox2code.mmm"
1111
minSdk 21
1212
targetSdk 32
13-
versionCode 39
14-
versionName "0.4.4"
13+
versionCode 40
14+
versionName "0.4.5"
1515

1616
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1717
}

app/src/main/java/com/fox2code/mmm/NotificationType.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,16 @@ public boolean shouldRemove() {
8383
try {
8484
boolean needPatch;
8585
try (ZipFile zipFile = new ZipFile(d)) {
86-
needPatch = zipFile.getEntry("module.prop") == null;
86+
needPatch = zipFile.getEntry("module.prop") == null &&
87+
zipFile.getEntry("anykernel.sh") == null;
8788
}
8889
if (needPatch) {
8990
Files.patchModuleSimple(Files.read(d),
9091
new FileOutputStream(d));
9192
}
9293
try (ZipFile zipFile = new ZipFile(d)) {
93-
needPatch = zipFile.getEntry("module.prop") == null;
94+
needPatch = zipFile.getEntry("module.prop") == null &&
95+
zipFile.getEntry("anykernel.sh") == null;
9496
}
9597
if (needPatch) {
9698
if (d.exists() && !d.delete())

app/src/main/java/com/fox2code/mmm/installer/InstallerActivity.java

Lines changed: 157 additions & 106 deletions
Large diffs are not rendered by default.

app/src/main/java/com/fox2code/mmm/utils/Files.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.fox2code.mmm.utils;
22

33
import android.os.Build;
4+
import android.util.Log;
45

56
import androidx.annotation.NonNull;
67

@@ -45,6 +46,11 @@ public static void writeSU(File file, byte[] bytes) throws IOException {
4546
}
4647

4748
public static byte[] readSU(File file) throws IOException {
49+
if (file.isFile() && file.canRead()) {
50+
try { // Read as app if su not required
51+
return read(file);
52+
} catch (IOException ignored) {}
53+
}
4854
try (InputStream inputStream = SuFileInputStream.open(file)) {
4955
return readAllBytes(inputStream);
5056
}

app/src/main/java/com/fox2code/mmm/utils/IntentHelper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ public static void openFileTo(CompatActivity compatActivity, File destination,
371371
}
372372
outputStream = new FileOutputStream(destination);
373373
Files.copy(inputStream, outputStream);
374+
Log.d(TAG, "File saved at " + destination);
374375
success = true;
375376
} catch (Exception e) {
376377
Log.e(TAG, "failed copy of " + uri, e);

app/src/main/java/com/fox2code/mmm/utils/PropUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ else if (moduleInfo.id.startsWith("riru_")
303303
}
304304

305305
public static String readModuleId(InputStream inputStream) {
306+
if (inputStream == null) return null;
306307
String moduleId = null;
307308
try (BufferedReader bufferedReader = new BufferedReader(
308309
new InputStreamReader(inputStream, StandardCharsets.UTF_8))) {
Lines changed: 45 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<resources>
22
<string name="app_name">Fox\'s Magisk Module Manager</string>
33
<string name="app_name_short">Fox\'s Mmm</string>
4-
<string name="fail_root_magisk">Failed to get access to Root or Magisk</string>
4+
<string name="fail_root_magisk">Could not access either Root or Magisk</string>
55
<string name="loading">Loading…</string>
6-
<string name="updatable">Updatable</string>
6+
<string name="updatable">Upgradable</string>
77
<string name="installed">Installed</string>
88
<string name="online_repo">Online Repo</string>
9-
<string name="showcase_mode">The application is in lockdown mode</string>
10-
<string name="failed_download">Failed to download file.</string>
9+
<string name="showcase_mode">The app is in lockdown mode</string>
10+
<string name="failed_download">Could not download the file</string>
1111
<string name="slow_modules">Modules took too long to boot, consider disabling some modules</string>
12-
<string name="fail_internet">Failed to connect to the internet</string>
13-
<string name="no_web_view">Failed to get system WebView</string>
12+
<string name="fail_internet">Could not connect to the Internet</string>
13+
<string name="no_web_view">Could not open system WebView</string>
1414
<string name="title_activity_settings">SettingsActivity</string>
15-
<string name="app_update_available">Application update available</string>
16-
<string name="app_update">Update</string>
15+
<string name="app_update_available">A new version of the app is available</string>
16+
<string name="app_update">Upgrade</string>
1717
<string name="no_desc_found">No description found.</string>
1818
<string name="download_module">Download module</string>
1919
<string name="install_module">Install module</string>
20-
<string name="update_module">Update module</string>
20+
<string name="update_module">Upgrade module</string>
2121
<string name="changelog">Changelog</string>
2222
<string name="website">Website</string>
2323
<string name="support">Support</string>
@@ -29,7 +29,7 @@
2929
<string name="no">No</string>
3030

3131
<!-- Module section translation -->
32-
<string name="module_last_update">Last update:</string>
32+
<string name="module_last_update">Last version:</string>
3333
<string name="module_repo">Repo:</string>
3434
<string name="module_by">by</string>
3535
<string name="module_downloads">Downloads:</string>
@@ -42,65 +42,68 @@
4242
<string name="showcase_mode_desc">Lockdown mode prevent manager to do action on modules</string>
4343
<string name="prevent_reboot_pref">Prevent reboot</string>
4444
<string name="prevent_reboot_desc">Prevents unexpected reboots</string>
45+
<string name="showcase_mode_desc">Lockdown mode prevents the manager from carrying out actions on modules</string>
4546
<string name="pref_category_settings">Settings</string>
4647
<string name="pref_category_info">Info</string>
4748
<string name="show_licenses">Show licenses</string>
4849
<string name="licenses">Licences</string>
4950
<string name="show_incompatible_pref">Show incompatible modules</string>
50-
<string name="show_incompatible_desc">Show modules that are incompatible with your device based on their metadata</string>
51-
<string name="magisk_outdated">Magisk is outdated!</string>
51+
<string name="show_incompatible_desc">Show modules unlikely to work on your device based on their metadata</string>
52+
<string name="magisk_outdated">There is a new version of Magisk to install!</string>
5253
<string name="pref_category_repos">Repos</string>
5354
<string name="pref_category_security">Security</string>
5455
<string name="pref_category_appearance">Appearance</string>
5556
<string name="pref_category_general">General</string>
5657
<string name="repo_main_desc">The repository hosting Magisk Modules</string>
5758
<string name="repo_main_alt">An alternative to Magisk-Modules-Repo with fewer restrictions.</string>
59+
<string name="repo_main_desc">The repository hosting Magisk modules</string>
60+
<string name="repo_main_alt">An alternative to the Magisk-Modules-Repo with fewer restrictions.</string>
5861
<string name="master_delete">Delete the module files?</string>
59-
<string name="master_delete_no">Keep files</string>
60-
<string name="master_delete_yes">Delete files</string>
61-
<string name="master_delete_fail">Failed to delete the module files</string>
62+
<string name="master_delete_no">Keep</string>
63+
<string name="master_delete_yes">Delete</string>
64+
<string name="master_delete_fail">Could not delete the module files</string>
6265
<string name="theme_pref">Theme</string>
6366
<string name="theme_mode_pref">Theme mode</string>
64-
<string name="module_id_prefix">Module id: </string>
67+
<string name="module_id_prefix">Module ID: </string>
6568
<string name="install_from_storage">Install module from storage</string>
66-
<string name="invalid_format">The selected module is in an invalid format</string>
69+
<string name="invalid_format">The selected module has an invalid format</string>
6770
<string name="local_install_title">Local install</string>
6871
<string name="source_code">Source code</string>
69-
<string name="magisk_builtin_module">Magisk builtin module</string>
70-
<string name="substratum_builtin_module">Substratum builtin module</string>
71-
<string name="force_dark_terminal_title">Force dark mode terminal</string>
72-
<string name="file_picker_failure">Your current file picker failed to give access to the file.</string>
72+
<string name="magisk_builtin_module">Magisk built-in module</string>
73+
<string name="substratum_builtin_module">Substratum built-in module</string>
74+
<string name="force_dark_terminal_title">Dark terminal</string>
75+
<string name="file_picker_failure">Your current file picker could not access the file.</string>
7376
<string name="remote_install_title">Remote install</string>
74-
<string name="file_picker_wierd">Your file picker returned a non standard response.</string>
75-
<string name="use_magisk_install_command_pref">Use magisk module install command</string>
77+
<string name="file_picker_wierd">Your file picker returned a non-standard response.</string>
78+
<string name="use_magisk_install_command_pref">Use the \"magisk --install-module\" command</string>
7679
<string name="use_magisk_install_command_desc">
77-
During test it caused problems to the module install error diagnosis tool,
78-
so I hid this option behind developer mode, enable this at your own risk!
80+
During testing it caused problems to the module install error diagnosis tool,
81+
so this option behind is hidden behind developer mode.\nTurn this on at your own risk!
7982
</string>
80-
<string name="dev_mode_enabled">Developer mode enabled</string>
81-
<string name="force_english_pref">Force English language</string>
82-
<string name="disable_low_quality_module_filter_pref">Disable low quality module filter</string>
83+
<string name="dev_mode_enabled">Developer mode on</string>
84+
<string name="force_english_pref">English app language</string>
85+
<string name="disable_low_quality_module_filter_pref">Show low-quality modules</string>
8386
<string name="disable_low_quality_module_filter_desc">
84-
Some modules do not declare their metadata properly,causing visual glitches,
85-
and/or indicating poor module quality, disable at your own risk!
87+
Some modules do not declare their metadata properly, causing visual glitches,
88+
and/or indicating poor module quality.\nTurn this off at your own risk!
8689
</string>
87-
<string name="dns_over_https_pref">Dns over https</string>
90+
<string name="dns_over_https_pref">DNS over HTTPS</string>
8891
<string name="dns_over_https_desc">
8992
May fix connections issues in some cases.
90-
(Does not apply to WebView)
93+
(Does not apply to WebView.)
9194
</string>
92-
<string name="disable_extensions_pref">Disable extensions</string>
95+
<string name="disable_extensions_pref">No Mmm</string>
9396
<string name="disable_extensions_desc">
94-
Disable Fox\'s Mmm extensions, this prevent modules from using
95-
terminal extensions, useful if a module misuse Fox\'s Mmm extensions.
97+
Turn off Fox\'s Mmm extensions, preventing modules from using
98+
terminal extensions.\nUseful if a module misuses Fox\'s Mmm extensions.
9699
</string>
97-
<string name="wrap_text_pref">Wrap text</string>
100+
<string name="wrap_text_pref">Text wrapping</string>
98101
<string name="wrap_text_desc">
99-
Wrap text to a new line instead of putting
100-
all text on the same line when installing a module
102+
Show text on multiple lines instead of putting
103+
all text on the same line when installing a module.
101104
</string>
102-
<string name="enable_blur_pref">Enable blur</string>
103-
<string name="repo_enabled">Repo enabled</string>
104-
<string name="repo_disabled">Repo disabled</string>
105-
<string name="androidacy_repo_info">Androidacy repo uses ads and trackers.</string>
105+
<string name="enable_blur_pref">Blur</string>
106+
<string name="repo_enabled">Repo on</string>
107+
<string name="repo_disabled">Repo off</string>
108+
<string name="androidacy_repo_info">The Androidacy repo has ads and trackers.</string>
106109
</resources>

0 commit comments

Comments
 (0)