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

Commit bf9fadb

Browse files
authored
Merge branch 'Fox2Code:master' into master
2 parents 151b97d + 3b5eb81 commit bf9fadb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1757
-1303
lines changed

DEVELOPERS.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,33 @@ it is a check that verify that the module is declaring the minimum required to
2727
allow the app to show your module to the user without hurting his experience.
2828
Filling all basic Magisk properties is often enough to not get filtered out by it.
2929

30+
## Custom Repo format
31+
32+
Note: This feature is for `0.6.0` version that is not released yet.
33+
34+
`last_update` fields uses unix millis.
35+
36+
Json format is
37+
```json
38+
{
39+
"name": "Repo name",
40+
"website": "repo website",
41+
"support": "optional support url",
42+
"donate": "optional support url",
43+
"submitModule": "optional submit module URL",
44+
"last_update": 0,
45+
"modules": [
46+
{
47+
"id": "module id",
48+
"last_update": 0,
49+
"notes_url": "notes url",
50+
"prop_url": "module.prop url",
51+
"zip_url": "module.zip url"
52+
}
53+
]
54+
}
55+
```
56+
3057
## Properties
3158

3259
In addition to the following required magisk properties

README.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
11
# Fox's Magisk Module Manager
22

3+
## Fox Module contest
4+
5+
If you publish a modules using ANSI color styling or FoxMMM extensions
6+
(see [`DEVELOPERS.md`](DEVELOPERS.md)) you can enter the contest to win 20€ via PayPal.
7+
8+
The winning module will also be displayed on this spot for at least 2 weeks.
9+
10+
Note: The module install script must **not** be obfuscated and
11+
be published on a repo supported by FoxMMM to be able to participate.
12+
13+
The winner will be selected at the end of this month (July).
14+
(Don't forget to join telegram to be sure I don't miss your module when selecting the winner)
15+
316
## Join us on Telegram!
417

518
[![Telegram Group](https://img.shields.io/endpoint?color=neon&style=flat&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2FFox2Code_Chat)](https://telegram.dog/Fox2Code_Chat)
619

20+
## Screenshots
21+
22+
Main activity:
23+
[<img src="screenshot-dark.jpg" width="250"/>](screenshot-dark.jpg)
24+
[<img src="screenshot-light.jpg" width="250"/>](screenshot-light.jpg)
25+
726
## What is this?
827

928
The official Magisk is dropping support to download online modules...
@@ -59,28 +78,13 @@ Support:
5978

6079
[![Telegram Group](https://img.shields.io/endpoint?color=neon&style=flat&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fandroidacy_discussions)](https://telegram.dog/androidacy_discussions)
6180

62-
#### [https://github.com/Magisk-Modules-Repo](https://github.com/Magisk-Modules-Repo)
63-
- No longer accept new modules or receive update to existing modules
64-
- May be shut down at any moment
65-
- Official app dropped support for it
66-
- No longer supported by Fox's mmm
67-
68-
As the main repo may shutting down due to the main app no longer supporting it, stopped
69-
accepting new modules, and also no longer receive updates since the 21 December 2021.
70-
7181
If a module is in multiple repos, the manager will just pick the most up to date version
72-
of the module, allowing developers to switch repo at their own pace if they want to.
82+
of the module, if a module is in multiple repos it will just use first registered repo.
7383

7484
Note: If you or a friend uploaded a module and it doesn't appear in your module
7585
list you can disable the low quality filter in the app settings.
7686
Go to the [developer documentation](DEVELOPERS.md) for more info.
7787

78-
## Screenshots
79-
80-
Main activity:
81-
[<img src="screenshot-dark.jpg" width="250"/>](screenshot-dark.jpg)
82-
[<img src="screenshot-light.jpg" width="250"/>](screenshot-light.jpg)
83-
8488
## For developers
8589

8690
The manager can read new meta keys to allow modules to customize their own entry
@@ -100,8 +104,7 @@ For more information please check the [developer documentation](DEVELOPERS.md)
100104
See [`app/src/main/res/values/strings.xml`](https://github.com/Fox2Code/FoxMagiskModuleManager/blob/master/app/src/main/res/values/strings.xml)
101105
and [`app/src/main/res/values/arrays.xml`](https://github.com/Fox2Code/FoxMagiskModuleManager/blob/master/app/src/main/res/values/arrays.xml)
102106

103-
If your language is right to left you should make a copy of [`app/src/main/res/values/bools.xml`](https://github.com/Fox2Code/FoxMagiskModuleManager/blob/master/app/src/main/res/values/bools.xml)
104-
and set `lang_support_rtl` to `true`.
107+
If your language is right to left don't forget to set `lang_support_rtl` to `true`.
105108

106109
Translators are not expected to have any previous coding experience.
107110

app/build.gradle

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ plugins {
44
}
55

66
android {
7-
compileSdk 32
7+
compileSdk 33
88

99
defaultConfig {
1010
applicationId "com.fox2code.mmm"
1111
minSdk 21
12-
targetSdk 32
13-
versionCode 43
14-
versionName "0.5.0"
12+
targetSdk 33
13+
versionCode 50
14+
versionName "0.6.0-dev1"
1515

1616
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1717
}
@@ -36,8 +36,8 @@ android {
3636
buildConfigField "boolean", "ENABLE_AUTO_UPDATER", "true"
3737
buildConfigField(
3838
"java.util.List<String>",
39-
"DISABLED_REPOS",
40-
"java.util.Arrays.asList()",
39+
"ENABLED_REPOS",
40+
"java.util.Arrays.asList(\"magisk_alt_repo\", \"dg_magisk_repo\", \"androidacy_repo\")",
4141
)
4242
}
4343

@@ -54,8 +54,8 @@ android {
5454
// F-Droid flavor.
5555
buildConfigField(
5656
"java.util.List<String>",
57-
"DISABLED_REPOS",
58-
"java.util.Arrays.asList(\"androidacy_repo\")",
57+
"ENABLED_REPOS",
58+
"java.util.Arrays.asList(\"magisk_alt_repo\")",
5959
)
6060
}
6161
}
@@ -80,26 +80,28 @@ configurations {
8080

8181
dependencies {
8282
// UI
83-
implementation 'androidx.appcompat:appcompat:1.4.1'
83+
implementation 'androidx.appcompat:appcompat:1.4.2'
8484
implementation 'androidx.emoji2:emoji2:1.1.0'
8585
implementation 'androidx.emoji2:emoji2-views-helper:1.1.0'
8686
implementation 'androidx.preference:preference:1.2.0'
8787
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
8888
implementation 'androidx.recyclerview:recyclerview:1.2.1'
8989
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
9090
implementation 'androidx.webkit:webkit:1.4.0'
91-
implementation 'com.google.android.material:material:1.6.0'
91+
implementation 'com.google.android.material:material:1.6.1'
9292
implementation "com.mikepenz:aboutlibraries:${latestAboutLibsRelease}"
9393
implementation "dev.rikka.rikkax.layoutinflater:layoutinflater:1.2.0"
94-
implementation "dev.rikka.rikkax.insets:insets:1.2.0"
94+
implementation "dev.rikka.rikkax.insets:insets:1.3.0"
9595
implementation 'com.github.Dimezis:BlurView:version-1.6.6'
9696
implementation 'com.github.KieronQuinn:MonetCompat:0.4.1'
97+
implementation 'com.github.Fox2Code:FoxCompat:0.0.2'
9798

9899
// Utils
100+
implementation 'androidx.work:work-runtime:2.7.1'
99101
implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:4.9.3'
100102
implementation 'com.squareup.okhttp3:okhttp-brotli:4.9.3'
101103
implementation 'com.github.topjohnwu.libsu:io:5.0.1'
102-
implementation 'com.github.Fox2Code:RosettaX:1.0.2'
104+
implementation 'com.github.Fox2Code:RosettaX:1.0.8'
103105
implementation 'com.github.Fox2Code:AndroidANSI:1.0.1'
104106

105107
// Markdown
@@ -110,9 +112,6 @@ dependencies {
110112
annotationProcessor "io.noties:prism4j-bundler:2.0.0"
111113
implementation "com.caverock:androidsvg:1.4"
112114

113-
// Utils for compat (Needs to be outsourced ASAP)
114-
// compileOnly "org.robolectric:android-all:11-robolectric-6757853"
115-
116115
// Test
117116
testImplementation 'junit:junit:4.+'
118117
androidTestImplementation 'androidx.test.ext:junit:1.1.3'

app/src/main/AndroidManifest.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<uses-permission android:name="android.permission.INTERNET" />
1212
<!-- WebView offline webpage support -->
1313
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
14-
<!-- Make sure of the module active state by checking enabled modules on boot -->
14+
<!-- Check if there is modules updates on boot -->
1515
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
1616
<!-- Open config apps for applications -->
1717
<uses-permission-sdk-23 android:name="android.permission.QUERY_ALL_PACKAGES" />
@@ -33,8 +33,9 @@
3333
android:networkSecurityConfig="@xml/network_security_config"
3434
android:usesCleartextTraffic="false"
3535
tools:targetApi="s"
36-
tools:replace="android:supportsRtl">
37-
<receiver android:name="com.fox2code.mmm.manager.ModuleBootReceive"
36+
tools:replace="android:supportsRtl"
37+
tools:ignore="ManifestResource">
38+
<receiver android:name="com.fox2code.mmm.background.BackgroundBootListener"
3839
android:exported="true">
3940
<intent-filter>
4041
<action android:name="android.intent.action.BOOT_COMPLETED" />
@@ -94,6 +95,8 @@
9495
tools:node="merge">
9596
<meta-data android:name="androidx.emoji2.text.EmojiCompatInitializer"
9697
tools:node="remove" />
98+
<meta-data android:name="androidx.work.WorkManagerInitializer"
99+
tools:node="remove" />
97100
</provider>
98101
</application>
99102
</manifest>

app/src/main/java/android/os/SystemProperties.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
import com.topjohnwu.superuser.ShellUtils;
66

7+
/**
8+
* I will probably outsource this to a separate library later
9+
*/
710
@Keep
811
public class SystemProperties {
912
@Keep
@@ -13,4 +16,15 @@ public static String get(String key) {
1316
prop = prop.substring(0, prop.length() - 1).trim();
1417
return prop;
1518
}
19+
20+
@Keep
21+
public static int getInt(String key, int def) {
22+
try {
23+
String value = get(key);
24+
if (value.isEmpty()) return def;
25+
return Integer.parseInt(value);
26+
} catch (Exception e) {
27+
return def;
28+
}
29+
}
1630
}

0 commit comments

Comments
 (0)