Android 折腾笔记

admin 发布于 2025-08-11 56 次阅读


解压系统包

解压payload 使用payloaddumper python或者可执行都可以

解压super分区 如果是多个文件 (_sparsechunk.*) 要simg2img 直接加*通配符 然后lpunpack cat合并之后的文件会出问题

2、解包modem/radio 使用file命令检查文件头 如果是ext fat之类的直接挂载 ubuntu下安装gnome的磁盘软件 disks 之类的 右键就能挂载 如果不是标准的img 双击不可以挂 则mkdir /mnt/文件夹 mount 镜像 /mnt/文件夹 如果是spilit image 就要用simg2img 顺便moto有个特殊的工具 https://gist.github.com/adithya2306/88e8fc468695bcdaa8b880ba4bd01420#file-unpack-moto-img-py

3、解包boot.img

//更新: 其他都是渣渣 直接用magiskboot 编译magisk源码

在 native/obj/debug-nolibc/local/ 下面 MagiskBoot - Boot Image Modification Tool

Usage: magiskboot [args...]

Supported actions:  unpack [-n] [-h]   

 Unpack to its individual components, each component to    a file with its corresponding file name in the current directory.   

 Supported components: kernel, kernel_dtb, ramdisk.cpio, second,    dtb, extra, and recovery_dtbo.    

By default, each component will be decompressed on-the-fly.    

If '-n' is provided, all decompression operations will be skipped;   

 each component will remain untouched, dumped in its original format.   

 If '-h' is provided, the boot image header information will be    dumped to the file 'header', which can be used to modify header    configurations during repacking.    Return values:    0:valid    1:error   2:chromeos  repack [-n] [outbootimg]  

  Repack boot image components using files from the current directory    to [outbootimg], or 'new-boot.img' if not specified. Current directory    should only contain required files for [outbootimg], or incorrect    [outbootimg] may be produced.     is the original boot image used to unpack the components.    By default, each component will be automatically compressed using its    corresponding format detected in . If a component file    in the current directory is already compressed, then no addition    compression will be performed for that specific component.    If '-n' is provided, all compression operations will be skipped.    If env variable PATCHVBMETAFLAG is set to true, all disable flags in    the boot image's vbmeta header will be set.  verify [x509.pem]    Check whether the boot image is signed with AVB 1.0 signature.    Optionally provide a certificate to verify whether the image is    signed by the public key certificate.   

 Return value:    0:valid    1:error  sign [name] [x509.pem pk8]    Sign with AVB 1.0 signature.    Optionally provide the name of the image (default: '/boot').    Optionally provide the certificate/private key pair for signing.    If the certificate/private key pair is not provided, the AOSP    verity key bundled in the executable will be used.  extract [partition] [outfile]    Extract [partition] from to [outfile].    If [outfile] is not specified, then output to '[partition].img'.    If [partition] is not specified, then attempt to extract either    'init_boot' or 'boot'. Which partition was chosen can be determined    by whichever 'init_boot.img' or 'boot.img' exists.     can be '-' to be STDIN.  hexpatch    Search in , and replace it with  cpio [commands...]    Do cpio commands to (modifications are done in-place).    Each command is a single argument; add quotes for each command.    See "cpio --help" for supported commands.  dtb [args...]    Do dtb related actions to .    See "dtb --help" for supported actions.  split [-n]    Split image.*-dtb into kernel + kernel_dtb.    If '-n' is provided, decompression operations will be skipped;    the kernel will remain untouched, split in its original format.  sha1    Print the SHA1 checksum for  cleanup    Cleanup the current working directory  compress[=format] [outfile]    Compress with [format] to [outfile].    /[outfile] can be '-' to be STDIN/STDOUT.    If [format] is not specified, then gzip will be used.    If [outfile] is not specified, then will be replaced    with another file suffixed with a matching file extension.    Supported formats: gzip zopfli xz lzma bzip2 lz4 lz4_legacy lz4_lg    decompress [outfile]    Detect format and decompress to [outfile].    /[outfile] can be '-' to be STDIN/STDOUT.    If [outfile] is not specified, then will be replaced    with another file removing its archive format file extension.    Supported formats: gzip zopfli xz lzma bzip2 lz4 lz4_legacy lz4_lg

兼容性极强! 能刷magisk的机子约等于能用

此作者没有提供个人介绍。
最后更新于 2025-08-11