{"id":106,"date":"2025-08-11T00:12:58","date_gmt":"2025-08-10T16:12:58","guid":{"rendered":"https:\/\/www.ani-nya.com\/wordpress\/?p=106"},"modified":"2025-08-11T00:12:58","modified_gmt":"2025-08-10T16:12:58","slug":"android-%e6%8a%98%e8%85%be%e7%ac%94%e8%ae%b0","status":"publish","type":"post","link":"https:\/\/www.ani-nya.com\/wordpress\/archives\/106","title":{"rendered":"Android \u6298\u817e\u7b14\u8bb0"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>\u89e3\u538b\u7cfb\u7edf\u5305 <\/p>\n\n\n\n<p>\u89e3\u538bpayload \u4f7f\u7528payloaddumper python\u6216\u8005\u53ef\u6267\u884c\u90fd\u53ef\u4ee5 <\/p>\n\n\n\n<p>\u89e3\u538bsuper\u5206\u533a \u5982\u679c\u662f\u591a\u4e2a\u6587\u4ef6 \uff08_sparsechunk.*\uff09 \u8981simg2img \u76f4\u63a5\u52a0*\u901a\u914d\u7b26 \u7136\u540elpunpack cat\u5408\u5e76\u4e4b\u540e\u7684\u6587\u4ef6\u4f1a\u51fa\u95ee\u9898 <\/p>\n\n\n\n<p>2\u3001\u89e3\u5305modem\/radio \u4f7f\u7528file\u547d\u4ee4\u68c0\u67e5\u6587\u4ef6\u5934 \u5982\u679c\u662fext fat\u4e4b\u7c7b\u7684\u76f4\u63a5\u6302\u8f7d ubuntu\u4e0b\u5b89\u88c5gnome\u7684\u78c1\u76d8\u8f6f\u4ef6 disks \u4e4b\u7c7b\u7684 \u53f3\u952e\u5c31\u80fd\u6302\u8f7d \u5982\u679c\u4e0d\u662f\u6807\u51c6\u7684img \u53cc\u51fb\u4e0d\u53ef\u4ee5\u6302 \u5219mkdir \/mnt\/\u6587\u4ef6\u5939 mount \u955c\u50cf \/mnt\/\u6587\u4ef6\u5939 \u5982\u679c\u662fspilit image \u5c31\u8981\u7528simg2img \u987a\u4fbfmoto\u6709\u4e2a\u7279\u6b8a\u7684\u5de5\u5177 https:\/\/gist.github.com\/adithya2306\/88e8fc468695bcdaa8b880ba4bd01420#file-unpack-moto-img-py <\/p>\n\n\n\n<p>3\u3001\u89e3\u5305boot.img<\/p>\n\n\n\n<p> \/\/\u66f4\u65b0\uff1a \u5176\u4ed6\u90fd\u662f\u6e23\u6e23 \u76f4\u63a5\u7528magiskboot \u7f16\u8bd1magisk\u6e90\u7801 <\/p>\n\n\n\n<p>\u5728 native\/obj\/debug-nolibc\/local\/ \u4e0b\u9762 MagiskBoot - Boot Image Modification Tool <\/p>\n\n\n\n<p>Usage: magiskboot [args...] <\/p>\n\n\n\n<p>Supported actions: \u00a0unpack [-n] [-h] \u00a0\u00a0<\/p>\n\n\n\n<p>\u00a0Unpack to its individual components, each component to \u00a0\u00a0\u00a0a file with its corresponding file name in the current directory. \u00a0\u00a0<\/p>\n\n\n\n<p>\u00a0Supported components: kernel, kernel_dtb, ramdisk.cpio, second, \u00a0\u00a0\u00a0dtb, extra, and recovery_dtbo. \u00a0\u00a0\u00a0<\/p>\n\n\n\n<p>By default, each component will be decompressed on-the-fly. \u00a0\u00a0\u00a0<\/p>\n\n\n\n<p>If '-n' is provided, all decompression operations will be skipped; \u00a0\u00a0<\/p>\n\n\n\n<p>\u00a0each component will remain untouched, dumped in its original format. \u00a0\u00a0<\/p>\n\n\n\n<p>\u00a0If '-h' is provided, the boot image header information will be \u00a0\u00a0\u00a0dumped to the file 'header', which can be used to modify header \u00a0\u00a0\u00a0configurations during repacking. \u00a0\u00a0\u00a0Return values: \u00a0\u00a0\u00a00:valid \u00a0\u00a0\u00a01:error \u00a0\u00a02:chromeos \u00a0repack [-n] [outbootimg] \u00a0<\/p>\n\n\n\n<p>\u00a0\u00a0Repack boot image components using files from the current directory \u00a0\u00a0\u00a0to [outbootimg], or 'new-boot.img' if not specified. Current directory \u00a0\u00a0\u00a0should only contain required files for [outbootimg], or incorrect \u00a0\u00a0\u00a0[outbootimg] may be produced. \u00a0\u00a0\u00a0 is the original boot image used to unpack the components. \u00a0\u00a0\u00a0By default, each component will be automatically compressed using its \u00a0\u00a0\u00a0corresponding format detected in . If a component file \u00a0\u00a0\u00a0in the current directory is already compressed, then no addition \u00a0\u00a0\u00a0compression will be performed for that specific component. \u00a0\u00a0\u00a0If '-n' is provided, all compression operations will be skipped. \u00a0\u00a0\u00a0If env variable PATCHVBMETAFLAG is set to true, all disable flags in \u00a0\u00a0\u00a0the boot image's vbmeta header will be set. \u00a0verify [x509.pem] \u00a0\u00a0\u00a0Check whether the boot image is signed with AVB 1.0 signature. \u00a0\u00a0\u00a0Optionally provide a certificate to verify whether the image is \u00a0\u00a0\u00a0signed by the public key certificate. \u00a0\u00a0<\/p>\n\n\n\n<p>\u00a0Return value: \u00a0\u00a0\u00a00:valid \u00a0\u00a0\u00a01:error \u00a0sign [name] [x509.pem pk8] \u00a0\u00a0\u00a0Sign with AVB 1.0 signature. \u00a0\u00a0\u00a0Optionally provide the name of the image (default: '\/boot'). \u00a0\u00a0\u00a0Optionally provide the certificate\/private key pair for signing. \u00a0\u00a0\u00a0If the certificate\/private key pair is not provided, the AOSP \u00a0\u00a0\u00a0verity key bundled in the executable will be used. \u00a0extract [partition] [outfile] \u00a0\u00a0\u00a0Extract [partition] from to [outfile]. \u00a0\u00a0\u00a0If [outfile] is not specified, then output to '[partition].img'. \u00a0\u00a0\u00a0If [partition] is not specified, then attempt to extract either \u00a0\u00a0\u00a0'init_boot' or 'boot'. Which partition was chosen can be determined \u00a0\u00a0\u00a0by whichever 'init_boot.img' or 'boot.img' exists. \u00a0\u00a0\u00a0 can be '-' to be STDIN. \u00a0hexpatch \u00a0\u00a0\u00a0Search in , and replace it with \u00a0cpio [commands...] \u00a0\u00a0\u00a0Do cpio commands to (modifications are done in-place). \u00a0\u00a0\u00a0Each command is a single argument; add quotes for each command. \u00a0\u00a0\u00a0See \"cpio --help\" for supported commands. \u00a0dtb [args...] \u00a0\u00a0\u00a0Do dtb related actions to . \u00a0\u00a0\u00a0See \"dtb --help\" for supported actions. \u00a0split [-n] \u00a0\u00a0\u00a0Split image.*-dtb into kernel + kernel_dtb. \u00a0\u00a0\u00a0If '-n' is provided, decompression operations will be skipped; \u00a0\u00a0\u00a0the kernel will remain untouched, split in its original format. \u00a0sha1 \u00a0\u00a0\u00a0Print the SHA1 checksum for \u00a0cleanup \u00a0\u00a0\u00a0Cleanup the current working directory \u00a0compress[=format] [outfile] \u00a0\u00a0\u00a0Compress with [format] to [outfile]. \u00a0\u00a0\u00a0\/[outfile] can be '-' to be STDIN\/STDOUT. \u00a0\u00a0\u00a0If [format] is not specified, then gzip will be used. \u00a0\u00a0\u00a0If [outfile] is not specified, then will be replaced \u00a0\u00a0\u00a0with another file suffixed with a matching file extension. \u00a0\u00a0\u00a0Supported formats: gzip zopfli xz lzma bzip2 lz4 lz4_legacy lz4_lg \u00a0 \u00a0decompress [outfile] \u00a0\u00a0\u00a0Detect format and decompress to [outfile]. \u00a0\u00a0\u00a0\/[outfile] can be '-' to be STDIN\/STDOUT. \u00a0\u00a0\u00a0If [outfile] is not specified, then will be replaced \u00a0\u00a0\u00a0with another file removing its archive format file extension. \u00a0\u00a0\u00a0Supported formats: gzip zopfli xz lzma bzip2 lz4 lz4_legacy lz4_lg <\/p>\n\n\n\n<p>\u517c\u5bb9\u6027\u6781\u5f3a\uff01 \u80fd\u5237magisk\u7684\u673a\u5b50\u7ea6\u7b49\u4e8e\u80fd\u7528<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u538b\u7cfb\u7edf\u5305 \u89e3\u538bpayload \u4f7f\u7528payloaddumper python\u6216\u8005\u53ef\u6267\u884c\u90fd\u53ef\u4ee5 \u89e3\u538bsuper\u5206\u533a \u5982\u679c\u662f\u591a\u4e2a\u6587\u4ef6  &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-106","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.ani-nya.com\/wordpress\/wp-json\/wp\/v2\/posts\/106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ani-nya.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ani-nya.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ani-nya.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ani-nya.com\/wordpress\/wp-json\/wp\/v2\/comments?post=106"}],"version-history":[{"count":3,"href":"https:\/\/www.ani-nya.com\/wordpress\/wp-json\/wp\/v2\/posts\/106\/revisions"}],"predecessor-version":[{"id":109,"href":"https:\/\/www.ani-nya.com\/wordpress\/wp-json\/wp\/v2\/posts\/106\/revisions\/109"}],"wp:attachment":[{"href":"https:\/\/www.ani-nya.com\/wordpress\/wp-json\/wp\/v2\/media?parent=106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ani-nya.com\/wordpress\/wp-json\/wp\/v2\/categories?post=106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ani-nya.com\/wordpress\/wp-json\/wp\/v2\/tags?post=106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}