Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | BootImageObj |
Macros | |
#define | BOOT_MAGIC "ANDROID!" |
#define | BOOT_MAGIC_SIZE 8 |
#define | BOOT_NAME_SIZE 16 |
#define | BOOT_ARGS_SIZE 512 |
#define | BOOT_EXTRA_ARGS_SIZE 1024 |
#define | ADD_REMAINDER(val, aln) ((val) + ((aln) != 0 ? ((val) % (aln)) : 0)) |
#define | ROUND_DOWN(val, aln) ((aln) != 0 ? (((val) / (aln)) * (aln)) : (val)) |
Typedefs | |
typedef struct boot_img_hdr | BootImage |
Functions | |
RZ_PACKED (struct boot_img_hdr { ut8 magic[BOOT_MAGIC_SIZE];ut32 kernel_size;ut32 kernel_addr;ut32 ramdisk_size;ut32 ramdisk_addr;ut32 second_size;ut32 second_addr;ut32 tags_addr;ut32 page_size;ut32 unused[2];ut8 name[BOOT_NAME_SIZE];ut8 cmdline[BOOT_ARGS_SIZE];ut32 id[8];ut8 extra_cmdline[BOOT_EXTRA_ARGS_SIZE];}) | |
static int | bootimg_header_load (BootImageObj *obj, Sdb *db) |
static Sdb * | get_sdb (RzBinFile *bf) |
static bool | load_buffer (RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb *sdb) |
static void | destroy (RzBinFile *bf) |
static ut64 | baddr (RzBinFile *bf) |
static RzList * | strings (RzBinFile *bf) |
static RzBinInfo * | info (RzBinFile *bf) |
static bool | check_buffer (RzBuffer *buf) |
static RzList * | entries (RzBinFile *bf) |
static RzList * | sections (RzBinFile *bf) |
Variables | |
RzBinPlugin | rz_bin_plugin_bootimg |
RZ_API RzLibStruct | rizin_plugin |
Definition at line 17 of file bin_bootimg.c.
#define BOOT_ARGS_SIZE 512 |
Definition at line 14 of file bin_bootimg.c.
#define BOOT_EXTRA_ARGS_SIZE 1024 |
Definition at line 15 of file bin_bootimg.c.
#define BOOT_MAGIC "ANDROID!" |
Definition at line 11 of file bin_bootimg.c.
#define BOOT_MAGIC_SIZE 8 |
Definition at line 12 of file bin_bootimg.c.
#define BOOT_NAME_SIZE 16 |
Definition at line 13 of file bin_bootimg.c.
Definition at line 18 of file bin_bootimg.c.
typedef struct boot_img_hdr BootImage |
Definition at line 1 of file bin_bootimg.c.
Definition at line 114 of file bin_bootimg.c.
References BootImageObj::bi, rz_bin_object_t::bin_obj, and rz_bin_file_t::o.
|
static |
Definition at line 51 of file bin_bootimg.c.
References BootImageObj::bi, BOOT_ARGS_SIZE, BOOT_EXTRA_ARGS_SIZE, BOOT_NAME_SIZE, BootImageObj::buf, free(), i, n, rz_buf_read_at(), rz_buf_size(), rz_str_ndup(), sdb_num_set(), sdb_set(), and ut64().
Referenced by load_buffer().
Definition at line 149 of file bin_bootimg.c.
References r, rz_buf_read_at(), and autogen_x86imm::tmp.
|
static |
Definition at line 108 of file bin_bootimg.c.
References rz_bin_object_t::bin_obj, BootImageObj::buf, rz_bin_file_t::o, rz_buf_free(), and RZ_FREE.
Definition at line 155 of file bin_bootimg.c.
References BootImageObj::bi, rz_bin_object_t::bin_obj, free(), NULL, rz_bin_file_t::o, rz_bin_addr_t::paddr, rz_list_append(), rz_list_newf(), RZ_NEW0, and rz_bin_addr_t::vaddr.
Definition at line 78 of file bin_bootimg.c.
References rz_bin_object_t::bin_obj, BootImageObj::kv, NULL, and rz_bin_file_t::o.
Definition at line 123 of file bin_bootimg.c.
References rz_bin_info_t::arch, rz_bin_info_t::big_endian, rz_bin_object_t::bin_obj, rz_bin_info_t::bits, rz_bin_info_t::dbg_info, rz_bin_info_t::file, rz_bin_file_t::file, rz_bin_info_t::has_pi, rz_bin_info_t::has_va, rz_bin_info_t::lang, rz_bin_info_t::machine, NULL, rz_bin_file_t::o, rz_bin_info_t::os, rz_bin_info_t::rclass, RZ_NEW0, strdup(), rz_bin_info_t::subsystem, and rz_bin_info_t::type.
|
static |
Definition at line 88 of file bin_bootimg.c.
References rz_bin_object_t::bin_obj, bootimg_header_load(), BootImageObj::buf, free(), BootImageObj::kv, rz_buf_ref(), RZ_NEW0, sdb_new0(), and sdb_ns_set().
RZ_PACKED | ( | struct boot_img_hdr { ut8 magic[BOOT_MAGIC_SIZE];ut32 kernel_size;ut32 kernel_addr;ut32 ramdisk_size;ut32 ramdisk_addr;ut32 second_size;ut32 second_addr;ut32 tags_addr;ut32 page_size;ut32 unused[2];ut8 name[BOOT_NAME_SIZE];ut8 cmdline[BOOT_ARGS_SIZE];ut32 id[8];ut8 extra_cmdline[BOOT_EXTRA_ARGS_SIZE];} | ) |
References BOOT_ARGS_SIZE, BOOT_EXTRA_ARGS_SIZE, BOOT_MAGIC_SIZE, and BOOT_NAME_SIZE.
Definition at line 176 of file bin_bootimg.c.
References ADD_REMAINDER, BootImageObj::bi, rz_bin_object_t::bin_obj, rz_list_t::free, free(), rz_bin_section_t::name, NULL, rz_bin_file_t::o, rz_bin_section_t::paddr, rz_bin_section_t::perm, ROUND_DOWN, rz_list_append(), rz_list_new(), RZ_NEW0, RZ_PERM_R, RZ_PERM_RX, rz_bin_section_t::size, strdup(), ut64(), rz_bin_section_t::vaddr, and rz_bin_section_t::vsize.
RZ_API RzLibStruct rizin_plugin |
Definition at line 260 of file bin_bootimg.c.
RzBinPlugin rz_bin_plugin_bootimg |
Definition at line 243 of file bin_bootimg.c.