twrp 刷机包 刷入magisk.zip 构造原理 关键词:META-INF update-binary updater-script

https://blog.csdn.net/yuleslie/article/details/8718385

 

 

#MAGISK
############################################
#
# Magisk Flash Script (updater-script)
# by topjohnwu
#
############################################

##############
# Preparation
##############

COMMONDIR=$INSTALLER/common
APK=$COMMONDIR/magisk.apk
CHROMEDIR=$INSTALLER/chromeos
 
 
 
 
 
 
 
#!/system/bin/sh
###########################################################################################
#
# Magisk Boot Image Patcher
# by topjohnwu
#
# Usage: boot_patch.sh <bootimage>
#
# The following flags can be set in environment variables:
# KEEPVERITY, KEEPFORCEENCRYPT, RECOVERYMODE
#
# This script should be placed in a directory with the following files:
#
# File name          Type      Description
#
# boot_patch.sh      script    A script to patch boot image for Magisk.
#                  (this file) The script will use binaries and files in its same directory
#                              to complete the patching process
# util_functions.sh  script    A script which hosts all functions required for this script
#                              to work properly
# magiskinit         binary    The binary to replace /init; magisk binary embedded
# magiskboot         binary    A tool to manipulate boot images
# chromeos           folder    This folder includes all the utilities and keys to sign
#                  (optional)  chromeos boot images. Currently only used for Pixel C
#
###########################################################################################
 
 
 
 

https://bbs.ihei5.com/thread-399952-1-1.html

经典案例2:安装刷机包(即所谓的刷ROM、刷机、卡刷)

    需要大家注意的是,TWRP Recovery仅能够识别标准格式的ROM,即标准压缩算法的zip格式刷机包。由于Motorola发布的官方固件同样采用zip进行压缩,但它并不是刷机包,不能用TWRP来刷。判断一个zip包是不是能够用Recovery来刷入,我们只需要在电脑上,用压缩软件打开这个*.zip,只要里边有META-INF这个文件夹,那它就是刷机包,可以用recovery来刷入

1,我们首先需要将刷机包放入内置存储里。(放入内置存储只是一个简单的方法,也可以使用adb sideload、外置U盘来刷入)
2,点“安装刷机包”[Install]菜单。
3,默认位置可能是/目录,我们需要找到内置存储/sdcard/的位置。
posted @ 2024-05-29 15:57  hrdom  阅读(182)  评论(0编辑  收藏  举报