Magisk/native/jni/magiskboot/magiskboot.h

28 lines
744 B
C
Raw Normal View History

2017-03-02 04:12:47 +08:00
#ifndef _MAGISKBOOT_H_
#define _MAGISKBOOT_H_
2017-02-28 05:37:47 +08:00
#include <sys/types.h>
#include "format.h"
2017-02-28 05:37:47 +08:00
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"
2017-04-28 21:48:38 +08:00
#define DTB_FILE "dtb"
#define RECV_DTBO_FILE "recovery_dtbo"
2017-04-28 21:48:38 +08:00
#define NEW_BOOT "new-boot.img"
2017-02-28 05:37:47 +08:00
// Main entries
2018-01-29 02:44:30 +08:00
int unpack(const char *image);
2017-03-08 00:54:23 +08:00
void repack(const char* orig_image, const char* out_image);
2017-03-04 21:16:59 +08:00
void 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[]);
2017-11-11 01:30:33 +08:00
int dtb_commands(const char *cmd, int argc, char *argv[]);
2017-02-28 05:37:47 +08:00
2018-08-10 00:40:23 +08:00
// Pattern
int patch_verity(void **buf, uint32_t *size, int patch);
void patch_encryption(void **buf, uint32_t *size);
2017-02-28 05:37:47 +08:00
#endif