Skip to content

Commit 7bc0417

Browse files
committed
v0.3.5
1 parent 08bea42 commit 7bc0417

File tree

11 files changed

+50
-91
lines changed

11 files changed

+50
-91
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
# 0.3.5
2+
3+
- Fixed Magisk install issue
4+
- Added MMAR V2 to the default repos

Cargo.lock

Lines changed: 3 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "mmrl"
33
description = "MMRL comes now as command line interface, with multi module install support!"
4-
version = "0.3.4"
4+
version = "0.3.5"
55
edition = "2021"
66
author = "Der_Googler"
77

@@ -25,7 +25,6 @@ regex = "1.10.2"
2525
async-recursion = "1.0.5"
2626
openssl = { version = "0.10.45", features = ["vendored"] }
2727
url = "2.2"
28-
git2 = "0.18.1"
2928
walkdir = "2.4.0"
3029

3130
[dependencies.confy]

module/module.prop

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
id=mmrl
22
name=MMRL CLI
3-
version=0.3.4
4-
versionCode=034
3+
version=0.3.5
4+
versionCode=035
55
author=Der_Googler
6-
description=MMRL Command Line Interface is a free tool to install Magisk/KernelSU modules. Build on 2024-06-22 with Rust 1.78.0.
6+
description=MMRL Command Line Interface is a free tool to install Magisk/KernelSU modules. Build on 2024-06-24 with Rust 1.78.0.
77
updateJson=https://raw.githubusercontent.com/DerGoogler/MMRL-CLI/master/module/update.json

module/system/usr/share/mmrl/config/mmrl/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const info = include("info.json")
2929

3030
export default () => {
3131
const [repos, setRepos] = useNativeFileStorage("/data/adb/mmrl/repos.json", [
32-
"https://raw.githubusercontent.com/ya0211/magisk-modules-alt-repo/main/json/modules.json",
32+
"https://magisk-modules-alt-repo.github.io/json-v2/json/modules.json",
3333
"https://gr.dergoogler.com/gmr/json/modules.json"
3434
], { loader: "json" })
3535

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"version": "0.3.4",
3-
"versionCode": "034",
2+
"version": "0.3.5",
3+
"versionCode": "035",
44
"author": "Der_Googler",
55
"rustVersion": "1.78.0",
6-
"buildDate": "2024-06-22"
6+
"buildDate": "2024-06-24"
77
}

module/update.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"version": "0.3.4",
3-
"versionCode": "034",
4-
"zipUrl": "https://github.com/DerGoogler/MMRL-CLI/releases/download/v0.3.4/mmrl-0.3.4-module-aarch64.zip",
2+
"version": "0.3.5",
3+
"versionCode": "035",
4+
"zipUrl": "https://github.com/DerGoogler/MMRL-CLI/releases/download/v0.3.5/mmrl-0.3.5-module-aarch64.zip",
55
"changelog": "https://raw.githubusercontent.com/DerGoogler/MMRL-CLI/master/CHANGELOG.md"
66
}

src/android_root.rs

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ pub fn get_downloads_dir() -> String {
1818
};
1919
}
2020

21+
pub fn is_mmrl() -> bool {
22+
return match env::var("MMRL_INTR") {
23+
Ok(val) => true,
24+
Err(e) => false,
25+
};
26+
}
27+
2128
#[cfg(target_os = "android")]
2229
pub fn get_downloads_dir() -> String {
2330
return match env::var("EXTERNAL_STORAGE") {
@@ -81,32 +88,41 @@ pub fn has_apatch_su() -> bool {
8188
return mount_detect(&Searcher::new(r"(APD|APatch)"));
8289
}
8390

84-
pub fn get_root_manager() -> String {
91+
pub fn get_root_manager() -> &'static str {
8592
if has_magisk_su() {
86-
return String::from("Magisk");
93+
return "Magisk";
8794
} else if has_kernel_su() {
88-
return String::from("KernelSU");
95+
return "KernelSU";
8996
} else if has_apatch_su() {
90-
return String::from("APatchSU");
97+
return "APatchSU";
9198
} else {
92-
return String::from("Unknown");
99+
return "Unknown";
93100
}
94101
}
95102

96103
pub fn get_install_cli(path: &str) -> (&str, Vec<&str>) {
97-
let msu = "/system/bin/magisk";
104+
let msu = "/data/adb/magisk/magisk64";
98105
let ksu = "/data/adb/ksu/bin/ksud";
99106
let asu = "/data/adb/ap/bin/apd";
100107

101-
if Path::new(msu).exists() {
102-
return (msu, vec!["--install-module", path]);
103-
} else if Path::new(ksu).exists() {
104-
return (ksu, vec!["module", "install", path]);
105-
} else if Path::new(asu).exists() {
106-
return (asu, vec!["module", "install", path]);
107-
} else {
108-
println!("! Unable to determine install cli");
109-
exit(0)
108+
match get_root_manager() {
109+
"Magisk" => {
110+
return (msu, vec!["--install-module", path]);
111+
}
112+
"KernelSU" => {
113+
return (ksu, vec!["module", "install", path]);
114+
}
115+
"APatchSU" => {
116+
return (asu, vec!["module", "install", path]);
117+
}
118+
"Unknown" => {
119+
println!("! Unable to determine install cli");
120+
exit(0)
121+
}
122+
_ => {
123+
println!("! Unable to determine install cli");
124+
exit(0)
125+
}
110126
}
111127
}
112128

src/cmd/install.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ use reqwest::Client;
99
use std::io::{BufRead, BufReader, Error, ErrorKind};
1010
use std::process::{exit, Command, Stdio};
1111

12-
const METHOD_STORED: Option<zip::CompressionMethod> = Some(zip::CompressionMethod::Stored);
13-
1412
#[async_recursion]
1513
pub async fn install(
1614
client: Client,

src/cmd/repo.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use serde_json::Value;
22
use std::fs::OpenOptions;
33
use std::io::{self, Read, Seek, Write};
4-
use std::path::Path;
54
use std::process::exit;
65

76
use crate::repo::{find_module, Module};

0 commit comments

Comments
 (0)