本文主要是介绍Android System.img Vendor.img Cust.img修改并回刷 快速定制Rom,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
修改
一般来说
system.img和cust.img都可以方便删减app, 以及定制一些二进制bin或者开机脚本
Multi Image Kitchen 是一种用于修改 Android 系统镜像文件的开源工具,它支持对 img、dat、system.new.dat 等多种镜像文件进行修改
软件功能支持范围
Drag & drop the firmware image(s) to this window or to the program icon (*.img), update file(s) (*.zip), image(s) partition(s) (*.img, *.PARTITION, *.fex, *.new.dat, *.new.dat.br) or folder with unpacked
使用这个工具可以很方便在win电脑上解包img文件
- Uppack 解包
- Pack 打包
刷入
定制开机脚本
定制开机打开调试模式, 并写入adb key
启动并激活Yyds.Auto引擎,方便使用自动化脚本
卸载预装软件
并跳过开机引导和重置恢复
定制不锁屏, 并增加亮屏时间
关闭gps定位
关闭nfc
log_path=/data/local/tmp/module.loglog() {echo `date` -- $1 >> $log_path
}write_adb_pub() {local kp=/data/misc/adb/adb_keyslocal adb_key=$1chown 1000:2000 $kpif (grep -q ${adb_key:0:12} $kp); thenecho "==KEY EXISTS"elseecho "==WRITE KEYS"echo $adb_key >> $kpfi
}write_adb_pub "QAAAAJWAGUxDtUKLXN694fUxLsq9fIr3iaVIM+KZFgrUN9WYP94K3b+SMFyLQ6Ij2Zp52vlYwWgLrjh8olKefg/P6mJKwBtv4qTTmvWnrz/J6VWnJJihhe0fKZrZozBGOT6hV5q/yJXaQoy1XHMft3vIyGyvnQfpT5ZC5Jf6NZgSg8dnCLbEfFgKnir+N9fBOVgMoXHaXtP1NxbY29VMslcgGctiWjVq2BEcEvJ9XlHckmvkmmeXsmPexfFr8dy0ITJUN0nXKlzgEWwTy1+NkT6OjOX9B148XR92P7z+rGUgRbLTFw+mCN4WQQuRvRwdZ+WrXrgtBuGEYXOzYUt3feWz0L2h0ne6vsXsJhkXmZS7lI6UimqNA+tENgbMCYsfOhWHFglcApzzx4e7cygdAWm6+ohwhtAfOneudXGdIkWcJH1pvhQohRfpHT6SaMHRb19rZgzgmMObFBDJx/EPQ+49ZduhLuKhQIcsQmsuVhWs/pW2AhAO0Asi9pIgLI4/ux5o0lq1oGkhxImh9sOTYMZu021wt3Or5FQEYIaBs5NiRuqXfADr7fJYAD8aIEWX6Dz9S1Ao0zTFEsYgMsAkMgrxptHYtdCFHZbZ+w+EIWUYrP8wRjNbfnH609fmgCSmIBSCckpvg9yIHT6hEwXooetMhTLsHC3CSPQDNMNFD7CbHK/u2paDoAEAAQA= Administrator@WIN-20230329AAL"
write_adb_pub "QAAAABmypDnXdbFeSgLRHK02zJnIuvYHpVSefm4nwYVM2bAOyfJM9KZYk1MioRzLjPZxf1+aeNxjs4XZEk5BJuSm9CN08tMiFAvU5MWwsIUkK76oUQgICKAQTrmiw+0BQfxBbftP5yNossfK0ZbDDC4/PDtIFCFA+XhpvTTywHPVh2jT4xVRVtlGQcwqi6Ny/GhjWYgJWUVUdIBViOfDsM7UijfJGCMfwJmxn6YUwXwUBsxWeNn+o6i6Tj7hgQW9gZIsK2tFtinLjgUxRpApsvWzXZ7KG+sfY6NOfFY4yLU9++XwijOs4gyzHM7mgu6W68nHB4HHgnqQ3cO4dlaw6kyouhwP4lDCKGmRlsEyIIx78CRcRP6erb+PHh0jaak7q57TrAE0lrkGEHI2G3HiUth01JKtuhF+lNFlcqW6XE8uFxMuWgszvf3QEQUvf4MuiLp62EauTVKthcYMGCf1jueXPRMe+8CJJv3j5GOI1IC9MrkXl0gRZNbBc8NwMp2HeerDEXE9Dq+qEkFG6lfdzambWEi/5wMpKIKQo+CSpW1HjVYgTD8d6GgfW4Iwsk81XBUsFOFsLuMI88O9wb5zS1mjP6RX/x3Ci1HGqP/82vsoBHbSmPWexA+Jgn5hvmP+VAPTgJ65pgVQimQn56+slsRhjYYZwfkJi66DMLl9koJ1rq2/oC2ZCgEAAQA= unknown@unknown"log "等待开机"
while [ "`getprop sys.boot_completed | tr -d '\r' `" != "1" ] ; do sleep 1; done
log "开机完成"echo "<?xml version='1.0' encoding='utf-8' standalone='yes' ?><map><boolean name="restore_not_now" value="true" /></map>" > /data/user/0/com.miui.core/shared_prefs/sp_file_auto-install-record.xmlsettings put global development_settings_enabled 1
settings put global adb_enabled 1
resetprop persist.security.adbinstall 1
resetprop persist.security.adbinput 1
setprop service.adb.tcp.port 5555
stop adbd
start adbdservice call nfc 8
settings put secure location_providers_allowed -gps
settings put system screen_brightness_mode 0
settings put system screen_off_timeout 999999999
settings put secure lockscreen.disabled 1
settings put secure lockscreen.disabled true
touch /data/local/tmp/.litesettings put global auto_time 1
[ -f /data/local/tmp/clear_system_flag ] && log "擦除标志!"
rm -f /data/local/tmp/clear_system_flag
dumpsys package com.xiaomi.smarthome | grep weibo.sdk && pm uninstall com.xiaomi.smarthomelog "引擎一体化激活"
ps | grep yyds.auto && log "===YES"
ps | grep yyds.auto || log "===NO"
resetprop dalvik.vm.dex2oat-flags "--inline-max-code-units=0"
ps | grep yyds.auto || (CLASSPATH=$(cut -d ":" -f2 <<<$(pm path com.xiaomi.smarthome)) nohup app_process /system/bin uiautomator.ExportApi 2>&1 >/dev/null &)
ps | grep yyds.py || (CLASSPATH=$(cut -d ":" -f2 <<<$(pm path com.xiaomi.smarthome)) nohup app_process /system/bin pyengine.Main 2>&1 &)
dumpsys package com.xiaomi.smarthome | grep mishopsdk && pm uninstall com.xiaomi.smarthomelog "卸载预装软件"
pm uninstall com.UCMobile 1>/dev/null
pm uninstall com.xiaomi.shop 1>/dev/null
pm uninstall com.xiaomi.jr 1>/dev/null
pm uninstall cn.wps.moffice_eng 1>/dev/null
pm uninstall com.autonavi.minimap 1>/dev/null
pm uninstall com.xiaomi.vipaccount 1>/dev/null
pm uninstall com.miui.fm 1>/dev/null
pm uninstall com.tencent.mtt 1>/dev/null
pm uninstall com.baidu.BaiduMap 1>/dev/null
pm uninstall com.ss.android.ugc.aweme 1>/dev/null
pm uninstall com.zhihu.android 1>/dev/null
pm uninstall com.xiaomi.youpin 1>/dev/null
pm uninstall com.xiaomi.gamecenter 1>/dev/null
pm uninstall com.dragon.read 1>/dev/null
pm uninstall com.duokan.free 1>/dev/null
pm uninstall com.duokan.reader 1>/dev/null
pm uninstall com.sina.weibo 1>/dev/null
pm uninstall com.taobao.taobao 1>/dev/null
pm uninstall tv.danmaku.bili 1>/dev/null
pm uninstall com.xunmeng.pinduoduo 1>/dev/null
pm uninstall com.ss.android.article.news 1>/dev/null
pm uninstall com.eg.android.AlipayGphone 1>/dev/null
pm uninstall com.duokan.phone.remotecontroller 1>/dev/null
pm uninstall com.baidu.searchbox 1>/dev/null
log "运行完毕!"log "检查是否存在引导界面"
sleep 15
while pidof com.android.provision > /dev/null;
dolog "进入引导界面"settings put global device_provisioned 1settings put global force_fsg_nav_bar 0killall com.android.provisionsleep 5pidof com.android.provision || (cd /;tar -xzvf /cust/cust/1.tar.gz -C /)pidof com.android.provision || rebootlog "开机处理"
donepm path com.xiaomi.smarthome || (cp -f /cust/app/customized/BaiduIME/BaiduIME.apk /data/local/tmp/1.apk && pm install -r /data/local/tmp/1.apk)
这篇关于Android System.img Vendor.img Cust.img修改并回刷 快速定制Rom的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!