Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
DerGoogler authored Jan 30, 2025
1 parent 9490f58 commit cddc595
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/.vitepress/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ function sidebarGuide() {
text: 'Guide',
items: [
{ text: 'What is MMRL', link: '/guide/' },
{ text: 'Anti-Features', link: '/guide/antifeatures' },
{ text: 'Repositories', link: '/guide/i' },
{ text: 'Repositories', link: '/guide/repositories' },
{
text: 'WebUI',
Expand Down
27 changes: 27 additions & 0 deletions docs/guide/antifeatures.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Anti-Features in MMRL

MMRL supports like in F-Droid Anti-Features to mark module you may not like

Those Anti-Features can only be set from `track.json`.

```json
"antifeatures": ["Ads"]
```

## List

| Name | ID | Description |
|---------------------------|-------------------|------------------------------------------------------------------------------------------------------------------------------|
| Ads | `Ads` | Advertising |
| Tracking | `Tracking` | Tracks and/or reports your activity to somewhere, even when it can be turned off |
| Non-Free Network Services | `NonFreeNet` | Promotes or depends entirely on a non-changeable or non-free network service |
| Non-Free Addons | `NonFreeAdd` | Promotes other non-libre module or plugins |
| Non-Free Dependencies | `NonFreeDep` | Needs a non-libre module to work (e.g. Google Maps, Market) |
| NSFW | `NSFW` | Contains content that the user may not want to be publicized or visible everywhere |
| Upstream Non-Free | `UpstreamNonFree` | Upstream source code is not libre, and this version has those parts replaced or rewritten |
| Non-Free Assets | `NonFreeAssets` | Non-libre media in things that are not code (e.g. images, sound, music, 3D-models, or video) |
| Known Vulnerability | `KnownVuln` | Known security vulnerability |
| No Source Since | `NoSourceSince` | Source code no longer available, making new releases impossible |
| Obfuscation | `Obfuscation` | Module includes obfuscated code |
| Unasked removal | `UnaskedRemoval` | Module removes app, permissions and other modules without approval. This does not include modules that disable other modules |
| Large Language Model | `LLM` | The module maybe written partially or fully by an LLM |
74 changes: 74 additions & 0 deletions docs/guide/installer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Installer API

You can control some parts of the terminal. The API is listed below

Optionally you can append `> /dev/null 2>&1` to the `am` commands to hide the output while installing modules

## Clear Terminal

Clears the terminal. No arguments can be passed

```shell
am broadcast -a com.dergoogler.mmrl.CLEAR_TERMINAL
```

## Set last line

This command could be more useful. It can replace the latest line of the terminal.
With this you could build progress bars

```shell
ui_print "- I'm going to be replaced"

am broadcast -a com.dergoogler.mmrl.SET_LAST_LINE --es text "- Replaced"
```

## Remove last line

This command removes the last line of the terminal. No arguments can be passed

```shell
am broadcast -a com.dergoogler.mmrl.REMOVE_LAST_LINE
```


## Environment

### Check if installing in MMRL

```shell
if [ ! -z $MMRL ]; then
ui_print "Installing in MMRL"
fi
```

### Check for bulk modules

```shell
findRequire() {
local id="$1" # Get the ID passed to the function

# Check if the ID exists in BULK_MODULES
local id_in_bulk=$(echo "$BULK_MODULES" | grep -qw "$id" && echo "true" || echo "false")

# Check if the directory exists
local id_dir_exists=$( [ -d "/data/adb/modules/$id" ] && echo "true" || echo "false" )

# Return true only if both conditions are met
if [ "$id_in_bulk" = "true" ] || [ "$id_dir_exists" = "true" ]; then
echo "true"
else
echo "false"
fi
}

# This is set by MMRL! Don't touch it!
BULK_MODULES="module1 module2 acp"

# Test with ID "acp"
if [ "$(findRequire acp)" = "true" ]; then
echo "acp is in BULK_MODULES or /data/adb/modules/acp exists"
else
echo "acp is missing from BULK_MODULES or its directory doesn't exist"
fi
```

0 comments on commit cddc595

Please sign in to comment.