Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2171364
Replace captcha webview with warning
androidacy-user Oct 22, 2022
154e5d7
Update with upstream
androidacy-user Oct 22, 2022
b6fc437
Merge branch 'master' of https://github.com/Fox2Code/FoxMagiskModuleM…
androidacy-user Oct 22, 2022
f20d95e
Merge branch 'Fox2Code:master' into master
androidacy-user Nov 9, 2022
801c136
Update README.md
androidacy-user Nov 9, 2022
c88de9c
Update README.md
androidacy-user Nov 9, 2022
5967765
Merge branch 'Fox2Code:master' into master
androidacy-user Nov 20, 2022
05a29b9
Merge branch 'Fox2Code:master' into master
androidacy-user Nov 25, 2022
b6077f2
Loads of work
androidacy-user Nov 26, 2022
7c934e9
Code cleanup and minor fixes
androidacy-user Nov 26, 2022
55b2b5c
Fix weird proguard error
androidacy-user Nov 26, 2022
37b19f0
Handle notification perm properly
androidacy-user Nov 27, 2022
39cfa8c
Allow user to permanently dismiss notifications request
androidacy-user Nov 27, 2022
29e3d7e
Add option to make dark theme a black theme
androidacy-user Nov 28, 2022
35b00cf
Update androidacy api integration with new reqs
androidacy-user Nov 29, 2022
ff1cb4f
Updates
androidacy-user Dec 2, 2022
0339dd7
Proper implementation for black theme
androidacy-user Dec 2, 2022
4fa978b
Add client ID as per androidacy spec
androidacy-user Dec 6, 2022
f07627d
Fix tests
androidacy-user Dec 6, 2022
dfe5357
Fix crashing for theme switcher
androidacy-user Dec 7, 2022
f3d31ed
Fix empty androidacy client id and bundle cronet
androidacy-user Dec 7, 2022
46a4bd2
Fix tests, again
androidacy-user Dec 7, 2022
9f8703d
Fix tests, again
androidacy-user Dec 7, 2022
cdc4bcd
We're gonna be nice and include default client keys
androidacy-user Dec 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
.cxx
local.properties
sentry.properties
androidacy.properties
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Fox's Magisk Module Manager

## Important
<details>
<summary>
Important news
</summary>

I have health problems that made me work slow on everything.
I don't like sharing my health problmes but it has been to much recently for me to keep it for myself.
Expand Down Expand Up @@ -50,6 +53,8 @@ at least you won't be hurting peoples with mental/health issues by faking having
I'll probably delete this section once my health would be gotten better, or at
least good enough for me to not be stuck on my bed at least once a day because of pain.

</details>

## Community

[![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)
Expand Down Expand Up @@ -94,9 +99,9 @@ and download and install the latest `.apk` on your device.
## Repositories Available


The app currently use these three repo as it's module sources, with it's benefits and drawback:
The app currently use these two repos as module sources, each with their own benefits and drawback:
(Note: Each module repo can be disabled in the settings of the app)
(Note²: I do not own or monitor any of the repo, **download at your own risk**)
(Note²: I do not own or actively monitor any of the repos or modules, **download at your own risk**)

#### [https://github.com/Magisk-Modules-Alt-Repo](https://github.com/Magisk-Modules-Alt-Repo)
- Accepting new modules [here](https://github.com/Magisk-Modules-Alt-Repo/submission)
Expand All @@ -112,6 +117,7 @@ Support:
- Modules downloadable easily outside the app
- Officially supported by Fox's mmm
- Contains ads to help cover server costs
- Added features like module reviews, automatic VirusTotal scans, and more

Support:

Expand Down Expand Up @@ -152,6 +158,13 @@ If your language is right to left don't forget to set `lang_support_rtl` to `tru

Translators are not expected to have any previous coding experience.

## License
See [LICENSE](LICENCE). Library licenses can be found in the licenses section of the app.

Cronet is licensed under the Apache License, Version 2.0. Static libraries are licensed under
the BSD license. See [LICENSE](https://chromium.googlesource.com/chromium/src/+/master/LICENSE)
for more information. Libraries were built using the microg build script which can be found [here](https://github.com/microg/cronet-build).

## I want to add my own repo

To add you own repo to Fox's mmm it need to follow theses conditions:
Expand Down
81 changes: 65 additions & 16 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,36 +1,53 @@
plugins {
// Gradle doesn't allow conditionally enabling/disabling plugins
id "io.sentry.android.gradle" version "3.1.5"
id "io.sentry.android.gradle" version "3.3.0"
id 'com.android.application'
id 'com.mikepenz.aboutlibraries.plugin'
}

android {
namespace "com.fox2code.mmm"
compileSdk 33
buildToolsVersion '30.0.3'
signingConfigs {
release {
// Everything comes from local.properties
Properties properties = new Properties()
if (project.rootProject.file('local.properties').exists()) {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
storeFile file(properties.getProperty('keystore.file'))
storePassword properties.getProperty('keystore.password')
keyAlias 'key0'
keyPassword properties.getProperty('keystore.password')
}
}
}

defaultConfig {
applicationId "com.fox2code.mmm"
minSdk 21
targetSdk 33
versionCode 59
versionName "0.6.7"
versionCode 60
versionName "0.6.8"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.release
}

buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro'
}
debug {
applicationIdSuffix '.debug'
debuggable true

// ONLY FOR TESTING SENTRY
// minifyEnabled true
// shrinkResources true
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),'proguard-rules.pro'
}
}

Expand All @@ -40,9 +57,26 @@ android {
dimension "type"
buildConfigField "boolean", "ENABLE_AUTO_UPDATER", "true"
buildConfigField "boolean", "DEFAULT_ENABLE_CRASH_REPORTING", "true"
buildConfigField("java.util.List<String>",
"ENABLED_REPOS",
"java.util.Arrays.asList(\"magisk_alt_repo\", \"androidacy_repo\")",)
// Get the androidacy client ID from the androidacy.properties
Properties properties = new Properties()
// If androidacy.properties doesn't exist, use the default client ID which is heavily
// rate limited to 30 requests per minute
if (project.rootProject.file('androidacy.properties').exists()) {
properties.load(project.rootProject.file('androidacy.properties').newDataInputStream())
} else {
properties.setProperty('client_id', '"5KYccdYxWB2RxMq5FTbkWisXi2dS6yFN9R7RVlFCG98FRdz6Mf5ojY2fyJCUlXJZ"')
}
buildConfigField("String", "ANDROIDACY_CLIENT_ID", properties.getProperty('client_id'))
// If client ID is empty, disable androidacy
if (properties.getProperty('client_id').isEmpty()) {
buildConfigField("java.util.List<String>",
"ENABLED_REPOS", "java.util.Arrays.asList(\"magisk_alt_repo\")")
} else {
buildConfigField("java.util.List<String>",
"ENABLED_REPOS",
"java.util.Arrays.asList(\"magisk_alt_repo\", \"androidacy_repo\")",)
}

}

fdroid {
Expand All @@ -62,6 +96,17 @@ android {
buildConfigField("java.util.List<String>",
"ENABLED_REPOS",
"java.util.Arrays.asList(\"magisk_alt_repo\")",)

// Get the androidacy client ID from the androidacy.properties
Properties properties = new Properties()
// If androidacy.properties doesn't exist, use the default client ID which is limited
// to 50 requests per minute
if (project.rootProject.file('androidacy.properties').exists()) {
properties.load(project.rootProject.file('androidacy.properties').newDataInputStream())
} else {
properties.setProperty('client_id', '"dQ1p7X8bF14PVJ7wAU6ORVjPB2IeTinsuAZ8Uos6tQiyUdUyIjSyZSmN54QBbaTy"')
}
buildConfigField("String", "ANDROIDACY_CLIENT_ID", properties.getProperty('client_id'))
}
}

Expand Down Expand Up @@ -137,7 +182,7 @@ sentry {
// as Gradle will resolve it to the latest version.
//
// Defaults to the latest published sentry version.
sentryVersion = '6.5.0'
sentryVersion = '6.9.2'
}
}

Expand Down Expand Up @@ -175,31 +220,35 @@ dependencies {
implementation 'androidx.work:work-runtime:2.7.1'
implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:5.0.0-alpha.10'
implementation 'com.squareup.okhttp3:okhttp-brotli:5.0.0-alpha.10'
// Chromium cronet from microG
implementation fileTree(dir: 'libs', include: '*.jar')
// Force prefer our own version of Cronet
implementation 'com.github.topjohnwu.libsu:io:5.0.1'
implementation 'com.github.Fox2Code:RosettaX:1.0.9'
implementation 'com.github.Fox2Code:AndroidANSI:1.0.1'

if (hasSentryConfig) {
// Error reporting
defaultImplementation 'io.sentry:sentry-android:6.5.0'
defaultImplementation 'io.sentry:sentry-android-fragment:6.5.0'
defaultImplementation 'io.sentry:sentry-android-okhttp:6.5.0'
defaultImplementation 'io.sentry:sentry-android-core:6.5.0'
defaultImplementation 'io.sentry:sentry-android-ndk:6.5.0'
defaultImplementation 'io.sentry:sentry-android:6.9.2'
defaultImplementation 'io.sentry:sentry-android-fragment:6.9.2'
defaultImplementation 'io.sentry:sentry-android-okhttp:6.9.2'
defaultImplementation 'io.sentry:sentry-android-core:6.9.2'
defaultImplementation 'io.sentry:sentry-android-ndk:6.9.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 "io.noties.markwon:syntax-highlight:4.6.2"
implementation 'com.google.net.cronet:cronet-okhttp:0.1.0'
// Ignore all org.chromium.net dependencies
annotationProcessor "io.noties:prism4j-bundler:2.0.0"
implementation "com.caverock:androidsvg:1.4"

// Test
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
}

if (hasSentryConfig) {
Expand Down
Binary file added app/libs/arm64-v8a.jar
Binary file not shown.
Binary file added app/libs/armeabi-v7a.jar
Binary file not shown.
Binary file added app/libs/cronet_impl_common_java.jar
Binary file not shown.
Binary file added app/libs/cronet_impl_native_java.jar
Binary file not shown.
Binary file added app/libs/x86.jar
Binary file not shown.
Binary file added app/libs/x86_64.jar
Binary file not shown.
36 changes: 35 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
static void enableDebugLogging(boolean);
}
-assumevalues class androidx.loader.app.LoaderManagerImpl {
static boolean DEBUG return false;
static boolean DEBUG;
}

# This is just some proguard rules testes, might do a separate lib after
Expand Down Expand Up @@ -186,3 +186,37 @@
int getSafeInsetTop();
android.graphics.Insets getWaterfallInsets();
}

# Keep all of Cronet API and google's internal classes
-keep class org.chromium.net.** { *; }
-keep class org.chromium.** { *; }
-keep class com.google.** { *; }

# Silence some warnings
-dontwarn android.os.SystemProperties
-dontwarn android.view.ThreadedRenderer
-dontwarn cyanogenmod.providers.CMSettings$Secure
-dontwarn lineageos.providers.LineageSettings$System
-dontwarn lineageos.style.StyleInterface
-dontwarn me.weishu.reflection.Reflection
-dontwarn org.lsposed.hiddenapibypass.HiddenApiBypass
-dontwarn rikka.core.res.ResourcesCompatLayoutInflaterListener
-dontwarn rikka.core.util.ResourceUtils
-dontwarn com.afollestad.materialdialogs.MaterialDialog
-dontwarn com.afollestad.materialdialogs.WhichButton
-dontwarn com.afollestad.materialdialogs.actions.DialogActionExtKt
-dontwarn com.afollestad.materialdialogs.callbacks.DialogCallbackExtKt
-dontwarn com.afollestad.materialdialogs.internal.button.DialogActionButton
-dontwarn com.afollestad.materialdialogs.internal.button.DialogActionButtonLayout
-dontwarn com.afollestad.materialdialogs.internal.main.DialogLayout
-dontwarn com.afollestad.materialdialogs.internal.main.DialogTitleLayout
-dontwarn com.afollestad.materialdialogs.internal.message.DialogContentLayout
-dontwarn com.oracle.svm.core.annotate.AutomaticFeature
-dontwarn com.oracle.svm.core.annotate.Delete
-dontwarn com.oracle.svm.core.annotate.Substitute
-dontwarn com.oracle.svm.core.annotate.TargetClass
-dontwarn com.oracle.svm.core.configure.ResourcesRegistry
-dontwarn javax.lang.model.element.Modifier
-dontwarn org.graalvm.nativeimage.ImageSingletons
-dontwarn org.graalvm.nativeimage.hosted.Feature$BeforeAnalysisAccess
-dontwarn org.graalvm.nativeimage.hosted.Feature
Loading