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