This repository has been archived by the owner on May 4, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 60360fb
Showing
106 changed files
with
101,401 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: false | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
androidacy-user
Collaborator
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/ | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# Fox's Magisk Module Manager (Developer documentation) | ||
|
||
Note: This doc assume you already read the | ||
[official Magisk module developer guide](https://topjohnwu.github.io/Magisk/guides.html) | ||
|
||
Also note that *Fox's Magisk Module Manager* will be shorten to fox *Fox's Mmm* in this doc | ||
|
||
Index: | ||
- [Properties](DEVELOPERS.md#properties) | ||
- [Installer commands](DEVELOPERS.md#installer-commands) | ||
|
||
## Properties | ||
|
||
In addition to the following magisk properties | ||
```properties | ||
id=<string> | ||
name=<string> | ||
version=<string> | ||
versionCode=<int> | ||
author=<string> | ||
description=<string> | ||
``` | ||
|
||
This the app manager support these new properties | ||
```properties | ||
# Fox's Mmm supported properties | ||
minApi=<int> | ||
minMagisk=<int> | ||
support=<url> | ||
donate=<url> | ||
config=<package> | ||
``` | ||
(Note: All urls must start with `https://`, or else will be ignored) | ||
|
||
- `minApi` tell the manager which is the minimum SDK version required for the module | ||
(See: [Codenames, Tags, and Build Numbers](https://source.android.com/setup/start/build-numbers)) | ||
- `minMagisk` tell the manager which is the minimum Magisk version required for the module | ||
(Often for magisk `xx.y` the version code is `xxy00`) | ||
- `support` support link to direct users when they need support for you modules | ||
- `donate` donate link to direct users to where they can financially support your project | ||
- `config` package name of the application that configure your module | ||
(Note: Locally installed module don't show the button on the install screen) | ||
|
||
Note: Fox's Mmm use fallback | ||
[here](app/src/main/java/com/fox2code/mmm/utils/PropUtils.java) | ||
for some modules | ||
Theses values are only used if not defined in the `module.prop` files | ||
|
||
## Installer commands | ||
|
||
The Fox's Mmm also allow better control over it's installer interface | ||
|
||
Fox's Mmm defined the variable `MMM_EXT_SUPPORT` to expose it's extension support | ||
|
||
All the commands start with it `#!`, by default the manager process command as log output | ||
unless `#!useExt` is sent to indicate that the app is ready to use commands | ||
|
||
Commands: | ||
- `useExt`: Enable the execution of commands | ||
- `addLine <arg>`: Add line to the terminal, this commands can be useful if | ||
you want to display text that start with `#!` inside the terminal | ||
- `setLastLine <arg>`: Set the last line of text displayed in the terminal | ||
- `clearTerminal`: Clear the terminal of any text, making it empty | ||
- `scrollUp`: Scroll up at the top of the terminal | ||
- `scrollDown`: Scroll down at the bottom of the terminal | ||
- `showLoading`: Show an indeterminate progress bar | ||
(Note: the bar is automatically hidden when the install finish) | ||
- `hideLoading`: Hide the indeterminate progress bar if previously shown | ||
- `setSupportLink <url>`: Set support link when loading finishes | ||
(Note: It override the config button if loaded from repo, it's recommended | ||
to only use this command when the script fail, or don't have any config app) | ||
|
||
Note: | ||
The current behavior with unknown command is to ignore them, | ||
I may add or remove commands in the future depending of how they are used | ||
|
||
A wrapper script to use theses commands could be | ||
```sh | ||
if [ -n "$MMM_EXT_SUPPORT" ]; then | ||
ui_print "#!useExt" | ||
mmm_exec() { | ||
ui_print "$(echo "#!$@")" | ||
} | ||
else | ||
mmm_exec() { true; } | ||
fi | ||
``` | ||
And there is an instance of it in use | ||
```sh | ||
# mmm_exec only take effect if inside the loader | ||
mmm_exec showLoading | ||
ui_print "The installer doesn't support mmm_exec" | ||
mmm_exec setLastLine "The installer support mmm_exec" | ||
sleep 5 | ||
mmm_exec hideLoading | ||
mmm_exec setSupportLink https://github.com/Fox2Code/FoxMagiskModuleManager | ||
``` | ||
|
||
You may look at the [example module](example_module) code or | ||
download the [module zip](example_module.zip) and try it yourself | ||
|
||
Have fun with the API making the user install experience a unique experience | ||
|
||
Also there is the source of the app icon | ||
[here](https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html#foreground.type=clipart&foreground.clipart=extension&foreground.space.trim=0&foreground.space.pad=0.25&foreColor=rgb(255%2C%20255%2C%20255)&backColor=rgb(255%2C%20152%2C%200)&crop=0&backgroundShape=circle&effects=elevate&name=ic_launcher) | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
GNU LESSER GENERAL PUBLIC LICENSE | ||
Version 3, 29 June 2007 | ||
|
||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> | ||
Everyone is permitted to copy and distribute verbatim copies | ||
of this license document, but changing it is not allowed. | ||
|
||
|
||
This version of the GNU Lesser General Public License incorporates | ||
the terms and conditions of version 3 of the GNU General Public | ||
License, supplemented by the additional permissions listed below. | ||
|
||
0. Additional Definitions. | ||
|
||
As used herein, "this License" refers to version 3 of the GNU Lesser | ||
General Public License, and the "GNU GPL" refers to version 3 of the GNU | ||
General Public License. | ||
|
||
"The Library" refers to a covered work governed by this License, | ||
other than an Application or a Combined Work as defined below. | ||
|
||
An "Application" is any work that makes use of an interface provided | ||
by the Library, but which is not otherwise based on the Library. | ||
Defining a subclass of a class defined by the Library is deemed a mode | ||
of using an interface provided by the Library. | ||
|
||
A "Combined Work" is a work produced by combining or linking an | ||
Application with the Library. The particular version of the Library | ||
with which the Combined Work was made is also called the "Linked | ||
Version". | ||
|
||
The "Minimal Corresponding Source" for a Combined Work means the | ||
Corresponding Source for the Combined Work, excluding any source code | ||
for portions of the Combined Work that, considered in isolation, are | ||
based on the Application, and not on the Linked Version. | ||
|
||
The "Corresponding Application Code" for a Combined Work means the | ||
object code and/or source code for the Application, including any data | ||
and utility programs needed for reproducing the Combined Work from the | ||
Application, but excluding the System Libraries of the Combined Work. | ||
|
||
1. Exception to Section 3 of the GNU GPL. | ||
|
||
You may convey a covered work under sections 3 and 4 of this License | ||
without being bound by section 3 of the GNU GPL. | ||
|
||
2. Conveying Modified Versions. | ||
|
||
If you modify a copy of the Library, and, in your modifications, a | ||
facility refers to a function or data to be supplied by an Application | ||
that uses the facility (other than as an argument passed when the | ||
facility is invoked), then you may convey a copy of the modified | ||
version: | ||
|
||
a) under this License, provided that you make a good faith effort to | ||
ensure that, in the event an Application does not supply the | ||
function or data, the facility still operates, and performs | ||
whatever part of its purpose remains meaningful, or | ||
|
||
b) under the GNU GPL, with none of the additional permissions of | ||
this License applicable to that copy. | ||
|
||
3. Object Code Incorporating Material from Library Header Files. | ||
|
||
The object code form of an Application may incorporate material from | ||
a header file that is part of the Library. You may convey such object | ||
code under terms of your choice, provided that, if the incorporated | ||
material is not limited to numerical parameters, data structure | ||
layouts and accessors, or small macros, inline functions and templates | ||
(ten or fewer lines in length), you do both of the following: | ||
|
||
a) Give prominent notice with each copy of the object code that the | ||
Library is used in it and that the Library and its use are | ||
covered by this License. | ||
|
||
b) Accompany the object code with a copy of the GNU GPL and this license | ||
document. | ||
|
||
4. Combined Works. | ||
|
||
You may convey a Combined Work under terms of your choice that, | ||
taken together, effectively do not restrict modification of the | ||
portions of the Library contained in the Combined Work and reverse | ||
engineering for debugging such modifications, if you also do each of | ||
the following: | ||
|
||
a) Give prominent notice with each copy of the Combined Work that | ||
the Library is used in it and that the Library and its use are | ||
covered by this License. | ||
|
||
b) Accompany the Combined Work with a copy of the GNU GPL and this license | ||
document. | ||
|
||
c) For a Combined Work that displays copyright notices during | ||
execution, include the copyright notice for the Library among | ||
these notices, as well as a reference directing the user to the | ||
copies of the GNU GPL and this license document. | ||
|
||
d) Do one of the following: | ||
|
||
0) Convey the Minimal Corresponding Source under the terms of this | ||
License, and the Corresponding Application Code in a form | ||
suitable for, and under terms that permit, the user to | ||
recombine or relink the Application with a modified version of | ||
the Linked Version to produce a modified Combined Work, in the | ||
manner specified by section 6 of the GNU GPL for conveying | ||
Corresponding Source. | ||
|
||
1) Use a suitable shared library mechanism for linking with the | ||
Library. A suitable mechanism is one that (a) uses at run time | ||
a copy of the Library already present on the user's computer | ||
system, and (b) will operate properly with a modified version | ||
of the Library that is interface-compatible with the Linked | ||
Version. | ||
|
||
e) Provide Installation Information, but only if you would otherwise | ||
be required to provide such information under section 6 of the | ||
GNU GPL, and only to the extent that such information is | ||
necessary to install and execute a modified version of the | ||
Combined Work produced by recombining or relinking the | ||
Application with a modified version of the Linked Version. (If | ||
you use option 4d0, the Installation Information must accompany | ||
the Minimal Corresponding Source and Corresponding Application | ||
Code. If you use option 4d1, you must provide the Installation | ||
Information in the manner specified by section 6 of the GNU GPL | ||
for conveying Corresponding Source.) | ||
|
||
5. Combined Libraries. | ||
|
||
You may place library facilities that are a work based on the | ||
Library side by side in a single library together with other library | ||
facilities that are not Applications and are not covered by this | ||
License, and convey such a combined library under terms of your | ||
choice, if you do both of the following: | ||
|
||
a) Accompany the combined library with a copy of the same work based | ||
on the Library, uncombined with any other library facilities, | ||
conveyed under the terms of this License. | ||
|
||
b) Give prominent notice with the combined library that part of it | ||
is a work based on the Library, and explaining where to find the | ||
accompanying uncombined form of the same work. | ||
|
||
6. Revised Versions of the GNU Lesser General Public License. | ||
|
||
The Free Software Foundation may publish revised and/or new versions | ||
of the GNU Lesser General Public License from time to time. Such new | ||
versions will be similar in spirit to the present version, but may | ||
differ in detail to address new problems or concerns. | ||
|
||
Each version is given a distinguishing version number. If the | ||
Library as you received it specifies that a certain numbered version | ||
of the GNU Lesser General Public License "or any later version" | ||
applies to it, you have the option of following the terms and | ||
conditions either of that published version or of any later version | ||
published by the Free Software Foundation. If the Library as you | ||
received it does not specify a version number of the GNU Lesser | ||
General Public License, you may choose any version of the GNU Lesser | ||
General Public License ever published by the Free Software Foundation. | ||
|
||
If the Library as you received it specifies that a proxy can decide | ||
whether future versions of the GNU Lesser General Public License shall | ||
apply, that proxy's public statement of acceptance of any version is | ||
permanent authorization for you to choose that version for the | ||
Library. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Fox's Magisk Module Manager | ||
|
||
The official Magisk is dropping support to download online modules... | ||
So I made my own app to do that! | ||
|
||
**This app is not officially supported by Magisk or it's developers** | ||
|
||
# For users | ||
|
||
Related commits: | ||
- [Remove online section in modules fragment](https://github.com/topjohnwu/Magisk/commit/f5c982355a2e3380b2b64af4b0caa8f4f7cf9157) | ||
- [Cleanup unused code](https://github.com/topjohnwu/Magisk/commit/8d59caf635591eb23813d75601039bb138f5716b) | ||
- [Remove DoH](https://github.com/topjohnwu/Magisk/commit/acf25aa4d31ee221354019daa097ccff579b8704) | ||
*(Note: DoH was used to fix modules Downloads by preventing MiTM on DNS queries)* | ||
|
||
The app currently use these two repo as their modules sources: | ||
[https://github.com/Magisk-Modules-Alt-Repo](https://github.com/Magisk-Modules-Alt-Repo) | ||
[https://github.com/Magisk-Modules-Repo](https://github.com/Magisk-Modules-Repo) | ||
|
||
As the main repo may shutting down due to the main app no longer supporting it, | ||
I recommend submitting your modules [here](https://github.com/Magisk-Modules-Alt-Repo/submission) instead | ||
|
||
If a module is in both repo, the manager will just pick the most up to date version of the module | ||
|
||
# For developers | ||
|
||
The manager add and read new meta keys to modules | ||
|
||
It use `module.prop` the `minApi` and `minMagisk` properties to detect compatibility | ||
And use the `support` and `donate` key to detect module related links | ||
|
||
It also add new ways to control the installer ui via a new command system | ||
|
||
For more information please check the [developer documentation](DEVELOPERS.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/build | ||
/release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
plugins { | ||
id 'com.android.application' | ||
id 'com.mikepenz.aboutlibraries.plugin' | ||
} | ||
|
||
android { | ||
compileSdk 30 | ||
|
||
defaultConfig { | ||
applicationId "com.fox2code.mmm" | ||
minSdk 21 | ||
targetSdk 30 | ||
versionCode 1 | ||
versionName "0.0.1" | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled true | ||
shrinkResources true | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
debug { | ||
applicationIdSuffix '.debug' | ||
debuggable true | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
} | ||
|
||
aboutLibraries { | ||
additionalLicenses { | ||
LGPL_3_0_only | ||
} | ||
} | ||
|
||
dependencies { | ||
// UI | ||
implementation 'androidx.appcompat:appcompat:1.3.1' | ||
implementation 'androidx.preference:preference:1.1.1' | ||
implementation 'androidx.constraintlayout:constraintlayout:2.1.0' | ||
implementation 'androidx.recyclerview:recyclerview:1.2.1' | ||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' | ||
implementation 'com.google.android.material:material:1.4.0' | ||
implementation "com.mikepenz:aboutlibraries:${latestAboutLibsRelease}" | ||
|
||
// Utils | ||
implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:4.9.1' | ||
implementation 'com.github.topjohnwu.libsu:io:3.1.2' | ||
|
||
// Markdown | ||
implementation "io.noties.markwon:core:4.6.2" | ||
implementation "io.noties.markwon:html:4.6.2" | ||
implementation "io.noties.markwon:image:4.6.2" | ||
implementation "com.caverock:androidsvg:1.4" | ||
|
||
// Test | ||
testImplementation 'junit:junit:4.+' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.3' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' | ||
} |
Oops, something went wrong.
First line of a big project...