Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dtb command from magiskboot #8385

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
7 changes: 0 additions & 7 deletions native/src/Cargo.lock

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

1 change: 0 additions & 1 deletion native/src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ rsa = "0.10.0-pre.2"
#x509-cert = "0.3"
der = "0.8.0-rc.0"
bytemuck = "1.16"
fdt = "0.1"
const_format = "0.2"

[workspace.dependencies.argh]
Expand Down
1 change: 0 additions & 1 deletion native/src/boot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ p521 = { workspace = true }
rsa = { workspace = true, features = ["sha2"] }
x509-cert = { workspace = true }
der = { workspace = true, features = ["derive", "pem"] }
fdt = { workspace = true }
bytemuck = { workspace = true, features = ["derive", "min_const_generics"] }
num-traits = { workspace = true }
307 changes: 0 additions & 307 deletions native/src/boot/dtb.rs

This file was deleted.

3 changes: 0 additions & 3 deletions native/src/boot/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@

pub use base;
use cpio::cpio_commands;
use dtb::dtb_commands;
use patch::hexpatch;
use payload::extract_boot_from_payload;
use sign::{get_sha, sha1_hash, sha256_hash, sign_boot_image, verify_boot_image, SHA};
use std::env;

mod cpio;
mod dtb;
mod patch;
mod payload;
// Suppress warnings in generated code
Expand Down Expand Up @@ -63,7 +61,6 @@ pub mod ffi {
cert: *const c_char,
key: *const c_char,
) -> Vec<u8>;
unsafe fn dtb_commands(argc: i32, argv: *const *const c_char) -> bool;
}
}

Expand Down
1 change: 0 additions & 1 deletion native/src/boot/magiskboot.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ void repack(const char *src_img, const char *out_img, bool skip_comp = false);
int verify(const char *image, const char *cert);
int sign(const char *image, const char *name, const char *cert, const char *key);
int split_image_dtb(const char *filename, bool skip_decomp = false);
int dtb_commands(int argc, char *argv[]);

static inline bool check_env(const char *name) {
using namespace std::string_view_literals;
Expand Down
6 changes: 0 additions & 6 deletions native/src/boot/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ Supported actions:
Each command is a single argument; add quotes for each command.
See "cpio --help" for supported commands.

dtb <file> <action> [args...]
Do dtb related actions to <file>.
See "dtb --help" for supported actions.

split [-n] <file>
Split image.*-dtb into kernel + kernel_dtb.
If '-n' is provided, decompression operations will be skipped;
Expand Down Expand Up @@ -214,8 +210,6 @@ int main(int argc, char *argv[]) {
return hexpatch(byte_view(argv[2]), byte_view(argv[3]), byte_view(argv[4])) ? 0 : 1;
} else if (argc > 2 && action == "cpio") {
return rust::cpio_commands(argc - 2, argv + 2) ? 0 : 1;
} else if (argc > 2 && action == "dtb") {
return rust::dtb_commands(argc - 2, argv + 2) ? 0 : 1;
} else if (argc > 2 && action == "extract") {
return rust::extract_boot_from_payload(
argv[2],
Expand Down
Loading