Skip to content

Commit

Permalink
Remove dtb command from magiskboot
Browse files Browse the repository at this point in the history
  • Loading branch information
yujincheng08 committed Sep 11, 2024
1 parent abaff72 commit c419659
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 326 deletions.
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

0 comments on commit c419659

Please sign in to comment.