Skip to content

Commit cddc595

Browse files
authored
update
1 parent 9490f58 commit cddc595

File tree

3 files changed

+103
-0
lines changed

3 files changed

+103
-0
lines changed

docs/.vitepress/locales/en.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ function sidebarGuide() {
4848
text: 'Guide',
4949
items: [
5050
{ text: 'What is MMRL', link: '/guide/' },
51+
{ text: 'Anti-Features', link: '/guide/antifeatures' },
52+
{ text: 'Repositories', link: '/guide/i' },
5153
{ text: 'Repositories', link: '/guide/repositories' },
5254
{
5355
text: 'WebUI',

docs/guide/antifeatures.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Anti-Features in MMRL
2+
3+
MMRL supports like in F-Droid Anti-Features to mark module you may not like
4+
5+
Those Anti-Features can only be set from `track.json`.
6+
7+
```json
8+
"antifeatures": ["Ads"]
9+
```
10+
11+
## List
12+
13+
| Name | ID | Description |
14+
|---------------------------|-------------------|------------------------------------------------------------------------------------------------------------------------------|
15+
| Ads | `Ads` | Advertising |
16+
| Tracking | `Tracking` | Tracks and/or reports your activity to somewhere, even when it can be turned off |
17+
| Non-Free Network Services | `NonFreeNet` | Promotes or depends entirely on a non-changeable or non-free network service |
18+
| Non-Free Addons | `NonFreeAdd` | Promotes other non-libre module or plugins |
19+
| Non-Free Dependencies | `NonFreeDep` | Needs a non-libre module to work (e.g. Google Maps, Market) |
20+
| NSFW | `NSFW` | Contains content that the user may not want to be publicized or visible everywhere |
21+
| Upstream Non-Free | `UpstreamNonFree` | Upstream source code is not libre, and this version has those parts replaced or rewritten |
22+
| Non-Free Assets | `NonFreeAssets` | Non-libre media in things that are not code (e.g. images, sound, music, 3D-models, or video) |
23+
| Known Vulnerability | `KnownVuln` | Known security vulnerability |
24+
| No Source Since | `NoSourceSince` | Source code no longer available, making new releases impossible |
25+
| Obfuscation | `Obfuscation` | Module includes obfuscated code |
26+
| Unasked removal | `UnaskedRemoval` | Module removes app, permissions and other modules without approval. This does not include modules that disable other modules |
27+
| Large Language Model | `LLM` | The module maybe written partially or fully by an LLM |

docs/guide/installer.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Installer API
2+
3+
You can control some parts of the terminal. The API is listed below
4+
5+
Optionally you can append `> /dev/null 2>&1` to the `am` commands to hide the output while installing modules
6+
7+
## Clear Terminal
8+
9+
Clears the terminal. No arguments can be passed
10+
11+
```shell
12+
am broadcast -a com.dergoogler.mmrl.CLEAR_TERMINAL
13+
```
14+
15+
## Set last line
16+
17+
This command could be more useful. It can replace the latest line of the terminal.
18+
With this you could build progress bars
19+
20+
```shell
21+
ui_print "- I'm going to be replaced"
22+
23+
am broadcast -a com.dergoogler.mmrl.SET_LAST_LINE --es text "- Replaced"
24+
```
25+
26+
## Remove last line
27+
28+
This command removes the last line of the terminal. No arguments can be passed
29+
30+
```shell
31+
am broadcast -a com.dergoogler.mmrl.REMOVE_LAST_LINE
32+
```
33+
34+
35+
## Environment
36+
37+
### Check if installing in MMRL
38+
39+
```shell
40+
if [ ! -z $MMRL ]; then
41+
ui_print "Installing in MMRL"
42+
fi
43+
```
44+
45+
### Check for bulk modules
46+
47+
```shell
48+
findRequire() {
49+
local id="$1" # Get the ID passed to the function
50+
51+
# Check if the ID exists in BULK_MODULES
52+
local id_in_bulk=$(echo "$BULK_MODULES" | grep -qw "$id" && echo "true" || echo "false")
53+
54+
# Check if the directory exists
55+
local id_dir_exists=$( [ -d "/data/adb/modules/$id" ] && echo "true" || echo "false" )
56+
57+
# Return true only if both conditions are met
58+
if [ "$id_in_bulk" = "true" ] || [ "$id_dir_exists" = "true" ]; then
59+
echo "true"
60+
else
61+
echo "false"
62+
fi
63+
}
64+
65+
# This is set by MMRL! Don't touch it!
66+
BULK_MODULES="module1 module2 acp"
67+
68+
# Test with ID "acp"
69+
if [ "$(findRequire acp)" = "true" ]; then
70+
echo "acp is in BULK_MODULES or /data/adb/modules/acp exists"
71+
else
72+
echo "acp is missing from BULK_MODULES or its directory doesn't exist"
73+
fi
74+
```

0 commit comments

Comments
 (0)