Skip to content

Commit

Permalink
0.3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
DerGoogler committed Jun 29, 2024
1 parent 912bd25 commit 0dcb367
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 27 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# 0.3.7
# 0.3.8

- Fixed ModConf error
- Auto find root cli's
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "mmrl"
description = "MMRL comes now as command line interface, with multi module install support!"
version = "0.3.7"
version = "0.3.8"
edition = "2021"
author = "Der_Googler"

Expand Down
7 changes: 3 additions & 4 deletions build-module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,16 @@ cat <<EOF >system/usr/share/mmrl/config/mmrl/info.json
EOF

cp ../CHANGELOG.md .
cp ../target/aarch64-linux-android/release/mmrl system/usr/share/mmrl/bin/mmrl
cp ../target/aarch64-linux-android/release/mmrl system/bin/mmrl

FILE_NAME="$NAME-$VER-module-aarch64.zip"

# convert files before zipping
dos2unix \
META-INF/com/google/android/update-binary \
META-INF/com/google/android/updater-script \
system/bin/mmrl \
*.sh

zip -r "../target/$FILE_NAME" ./* -x "system/usr/share/mmrl/bin/placeholder"
zip -r "../target/$FILE_NAME" ./* -x "system/bin/placeholder"

rm -rf "system/usr/share/mmrl/bin/mmrl" "CHANGELOG.md"
rm -rf "system/bin/mmrl" "CHANGELOG.md"
6 changes: 3 additions & 3 deletions module/module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=mmrl
name=MMRL CLI
version=0.3.7
versionCode=037
version=0.3.8
versionCode=038
author=Der_Googler
description=MMRL Command Line Interface is a free tool to install Magisk/KernelSU modules. Build on 2024-06-27 with Rust 1.78.0.
description=MMRL Command Line Interface is a free tool to install Magisk/KernelSU modules. Build on 2024-06-29 with Rust 1.78.0.
updateJson=https://raw.githubusercontent.com/DerGoogler/MMRL-CLI/master/module/update.json
File renamed without changes.
6 changes: 3 additions & 3 deletions module/system/usr/share/mmrl/config/mmrl/info.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "0.3.7",
"versionCode": "037",
"version": "0.3.8",
"versionCode": "038",
"author": "Der_Googler",
"rustVersion": "1.78.0",
"buildDate": "2024-06-27"
"buildDate": "2024-06-29"
}
6 changes: 3 additions & 3 deletions module/update.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "0.3.7",
"versionCode": "037",
"zipUrl": "https://github.com/DerGoogler/MMRL-CLI/releases/download/v0.3.7/mmrl-0.3.7-module-aarch64.zip",
"version": "0.3.8",
"versionCode": "038",
"zipUrl": "https://github.com/DerGoogler/MMRL-CLI/releases/download/v0.3.8/mmrl-0.3.8-module-aarch64.zip",
"changelog": "https://raw.githubusercontent.com/DerGoogler/MMRL-CLI/master/CHANGELOG.md"
}
13 changes: 6 additions & 7 deletions src/android_root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ use std::{

use ini::Ini;

pub static ANDROID_PATH: &'static str =
"$PATH:/system/bin:/system/xbin:/sbin:/data/adb/ksu/bin:/data/adb/ap/bin:/data/adb/magisk";

#[cfg(target_os = "linux")]
pub fn get_downloads_dir() -> String {
return match env::var("HOME") {
Expand Down Expand Up @@ -101,19 +104,15 @@ pub fn get_root_manager() -> &'static str {
}

pub fn get_install_cli(path: &str) -> (&str, Vec<&str>) {
let msu = "/data/adb/magisk/magisk64";
let ksu = "/data/adb/ksu/bin/ksud";
let asu = "/data/adb/ap/bin/apd";

match get_root_manager() {
"Magisk" => {
return (msu, vec!["--install-module", path]);
return ("magisk", vec!["--install-module", path]);
}
"KernelSU" => {
return (ksu, vec!["module", "install", path]);
return ("ksud", vec!["module", "install", path]);
}
"APatchSU" => {
return (asu, vec!["module", "install", path]);
return ("apd", vec!["module", "install", path]);
}
"Unknown" => {
println!("! Unable to determine install cli");
Expand Down
6 changes: 4 additions & 2 deletions src/cmd/install.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
extern crate serde;
extern crate serde_ini;

use crate::android_root::{get_downloads_dir, get_install_cli};
use crate::android_root::{get_downloads_dir, get_install_cli, ANDROID_PATH};
use crate::repo::{find_module, find_version, get_id_details, Module};
use crate::utils::{confirm, download_from_url, get_last, is_url};
use async_recursion::async_recursion;
use reqwest::Client;
use std::io::{BufRead, BufReader, Error, ErrorKind};
use std::io::{BufRead, BufReader, Error, ErrorKind, Read};
use std::process::{exit, Command, Stdio};

#[async_recursion]
Expand Down Expand Up @@ -83,6 +83,7 @@ pub async fn install(

let stdout = Command::new(bin)
.args(args)
.env("PATH", ANDROID_PATH)
.stdout(Stdio::piped())
.spawn()
.unwrap()
Expand Down Expand Up @@ -115,6 +116,7 @@ pub async fn install_local(yes: bool, id: String) -> () {

let stdout = Command::new(bin)
.args(args)
.env("PATH", ANDROID_PATH)
.stdout(Stdio::piped())
.spawn()
.unwrap()
Expand Down
3 changes: 2 additions & 1 deletion src/cmd/upself.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::android_root::{get_downloads_dir, get_install_cli};
use crate::android_root::{get_downloads_dir, get_install_cli, ANDROID_PATH};
use crate::exit;
use crate::utils::{confirm, download_from_url};
use reqwest::Client;
Expand Down Expand Up @@ -26,6 +26,7 @@ pub async fn upself(client: Client, version: String, yes: bool) {

let stdout = Command::new(bin)
.args(args)
.env("PATH", ANDROID_PATH)
.stdout(Stdio::piped())
.spawn()
.unwrap()
Expand Down

0 comments on commit 0dcb367

Please sign in to comment.