Magisk/native/jni/magiskboot/magiskboot.h

25 lines
858 B
C
Raw Normal View History

2019-02-24 23:09:34 -05:00
#pragma once
2017-02-28 05:37:47 +08:00
#include <sys/types.h>
2019-03-07 21:32:01 -05:00
#define HEADER_FILE "header"
2017-04-28 21:48:38 +08:00
#define KERNEL_FILE "kernel"
#define RAMDISK_FILE "ramdisk.cpio"
#define SECOND_FILE "second"
2017-10-07 22:08:10 +08:00
#define EXTRA_FILE "extra"
2019-03-13 16:51:22 -04:00
#define KER_DTB_FILE "kernel_dtb"
#define RECV_DTBO_FILE "recovery_dtbo"
2019-03-13 16:51:22 -04:00
#define DTB_FILE "dtb"
2017-04-28 21:48:38 +08:00
#define NEW_BOOT "new-boot.img"
int unpack(const char *image, bool nodecomp = false, bool hdr = false);
2019-10-09 16:01:21 -04:00
void repack(const char* src_img, const char* out_img, bool nocomp = false);
int split_image_dtb(const char *filename);
int hexpatch(const char *image, const char *from, const char *to);
2017-12-21 03:36:18 +08:00
int cpio_commands(int argc, char *argv[]);
2019-09-20 03:53:58 -04:00
int dtb_commands(int argc, char *argv[]);
2017-02-28 05:37:47 +08:00
2019-09-26 03:14:56 -04:00
char *patch_verity(const void *buf, uint32_t &size, bool inplace = false);
2019-09-26 03:49:05 -04:00
void patch_encryption(void *buf, uint32_t &size);
bool check_env(const char *name);