Board logo

标题: [其他] 安卓魔盒1.0版 [打印本页]

作者: happy886rr    时间: 2016-11-7 12:36     标题: 安卓魔盒1.0版

本帖最后由 happy886rr 于 2016-11-27 20:57 编辑
ANDROID魔盒
下载地址:点击进入下载
-----------------------------------------------------------------------------
这是一款cmd应用,完全用cmd脚本写就,但是却拥有应用软件的特性。采用
cmd胶水语言无缝拼接java语言、C语言、sh脚本、批处理脚本。 多语种协同
作业,性能优异,功能齐全,同时内置JAVA运行时。  支持ROM解打包、apk
反编译、回编译、odex、手机root 固件提取、apk安装、开机动画、 ROM优
化...等70多项分支功能。

由于我只有安卓4.0的手机,因此在涉及到安卓5.0、6.0的版本时, 通过视窗
模拟安卓高版本系统,结合谷歌提供的源码研发出了可行的作业方案。

针对不同手机型号,如有不兼容,请自行结合魔盒脚本以及android源码适配。
同时,该工具具备在windows系统下解打包linux磁盘文件系统,   签名UNIX
时间戳等功能。
-----------------------------------------------------------------------------
  ---------------------------------------------------
  >>>细项优化
  ---------------------------------------------------
   1.照相优化  2.录像优化  3.电量优化
   4.触摸优化  5.滑动优化  6.定位加速
   7.开启虚拟按键
   8.去除虚拟按键
   9.开启 GPU渲染
   0.优化 jpg显示
-----------------------------------------------------------------------------
  ---------------------------------------------------
  >>>ROM信息
  ---------------------------------------------------
  ro.build.id                  (产品ID   
  ro.build.version.sdk         (SDK版本   :)
  ro.build.version.release     (安卓版本  :)
  ro.build.date                (创建日期  :)
  ro.product.model             (产品型号  :)
  ro.product.brand             (品牌      :)
  ro.product.name              (设备名称  :)
  ro.product.cpu.abi           (CPU指令集 :)
  ro.product.locale.language   (语言      :)
  ro.hardware                  (硬件      :)
  ro.mediatek.platform         (芯片型号  :)
  dalvik.vm.heapstartsize      (虚拟机初始:)
  dalvik.vm.heapgrowthlimit    (虚拟机增长:)
  dalvik.vm.heapsize           (虚拟机大小:)
  ro.config.notification_sound (短信铃声  :)
  ro.config.alarm_alert        (闹钟铃声  :)
  ro.config.ringtone           (来电铃声  :)
  ro.sf.lcd_density            (屏幕DPI   :)
  ro.wifi.channels             (WIFI信道  :)
  ro.sf.gsensorposition        (重力感应系:)
-----------------------------------------------------------------------------
  ---------------------------------------------------
  ADB SHELL
  ---------------------------------------------------
   01-设备列表     06-模拟终端     11-bug报告
   02-进程列表     07-CPU参数      12-电量信息
   03-磁盘分区     08-内存信息     13-电池信息
   04-进程监视     09-手机串号     14-重启设备
   05-分区信息     10-分区参数     15-recovery模式
-----------------------------------------------------------------------------
  ==================================
   ###   XDA--odex化手机工具   ###
  ==================================
   1-优化data        2-优化system  
   3-优化framework   4-优化bootstrap
   5-全部优化        6-帮助
-----------------------------------------------------------------------------
  ==================================
   ###   打包ROM目录为   ###
  ==================================
   1-标准zip格式(推荐)
   2-img格式(ext4压缩)
   3-dat格式
   4-tar格式
   5-sin格式
-----------------------------------------------------------------------------
  ==================================
   ###   集成工具   ###
  ==================================
   1-ROM集成Root
   2-ROM集成busybox
   3-ROM集成init.d支持
   4-ROM集成data支持
   5-手机获取Root
   6-手机安装busybox
   7-手机添加init.d
   8-手机添加V6优化脚本
-----------------------------------------------------------------------------
  ==================================
   ###   刷机脚本编写   ###
  ==================================
   1-创建刷机脚本
   2-在刷机脚本中添加busybox
   3-在刷机脚本中添加su
   4-在刷机脚本中添加boot.img
   5-在刷机脚本中添加recovery.img
   6-在刷机脚本中添加data
   7-从recovery文件获取挂载路径
-----------------------------------------------------------------------------
  ┌──────—─———───—┐
  丨     *Apk急速安装器*          丨
  └────────———───—┘
   -->正在安装
-----------------------------------------------------------------------------
  ┌───────────────┐
  丨      Apktool使用说明         丨
  └───────────────┘
  =============Readme===============
   1.需要Java环境;
   2.路径不应含特殊符号;
   3.系统级apk需framework-res.apk
-----------------------------------------------------------------------------
  ┌───────────────┐
  丨SignApk使用说明 (需Java环境)丨
  └───────────────┘
  =============签名密钥=============
   1 普通-testkey
   2 系统-platform
   3 shared
   4 media
   5 superuser
-----------------------------------------------------------------------------
  ┌───────────────┐
  丨Boot.img,Recovery.img 解包工具丨
  └───────────────┘
  ==================================
   全机型内核解包(兼容MTK解包)
   直接拖入批处理自动运行
   智能判断操作类型:解包或打包
-----------------------------------------------------------------------------
  ┌───────────────┐
  丨###    Ultimate旗舰功能    ###丨(自动脚本)
  ├───────────────┤
  丨    A.  7#─2#─51#           丨解包─合并odex─打包
  丨    B.  7#─91#─92#─51#     丨解包─签名优化─打包
  丨    C.  7#─3#─51#           丨解包─odex化─打包
  └───────────────┘
-----------------------------------------------------------------------------
                                                                   11/07/2016

核心代码:
  1. @echo off&title
  2. ::开启变量延迟
  3. setlocal enabledelayedexpansion
  4. ::设置颜色
  5. color 0f
  6. ::安全保护
  7. if not exist "%~dp0Tools\" (exit)
  8. ::设置ROM路径
  9. set "ROMr=!CD!\ROM"
  10. ::设置工作路径
  11. PUSHD "%~dp0Tools"
  12. ::APK安装器
  13. if "%~x1"==".apk" (
  14. mode con cols=45 lines=11
  15. echo  ┌──────—─————┐
  16. echo  丨 ^*  Apk急速安装器  ^*    丨
  17. echo  └────────————┘
  18. echo ---^>正在安装%~nx1
  19. adb install %1 >NUL && echo ---^>安装成功 || echo ---^>安装失败
  20. ping -n 2 127.0.0.1>NUL
  21. exit
  22. )
  23. ::设置窗体
  24. mode con cols=58 lines=38
  25. ::设置java环境变量
  26. :head
  27. if exist .\jre\EnableJre\ (
  28. set "JAVA_HOME=!CD!"
  29. set "PATH=!PATH!;!JAVA_HOME!\jre\bin"
  30. set "dif=内置"
  31. ) else (set "dif=系统")
  32. ::创建重要目录
  33. if not exist .\temp\ (md .\temp 1>NUL 2>NUL)
  34. if not exist !ROMr!\ (md !ROMr!)
  35. if not exist !ROMr!\ (md !ROMr!)
  36. ::操作标示
  37. for /l %%i in (0,1,9) do (
  38. set "be%%i= "
  39. set "ie%%i= "
  40. if %%i geq 2 if %%i leq 6 (set "ue%%i= ")
  41. )
  42. :main
  43. ::关闭自动脚本
  44. set NX=0
  45. cls
  46. echo ^>^>^>-----------------------------------------------------
  47. echo COPYRIGHT@2016~2018 BY HAPPY, VERSION 1.0
  48. echo --------------------------------------------------------
  49. echo ANDROID魔盒
  50. echo  ┌────────┬────────┬────────┐
  51. echo  丨反编译工具      丨模拟终端        丨内核编辑     (K)丨
  52. echo  丨  ┌ApkTool2.0.3丨   A# Adb Shell 丨   K# Kernel    丨
  53. echo  丨1#丨ApkTool1.5  丨                丨                丨
  54. echo  丨  └ShakaApk    丨备份还原        丨签名工具     (S)丨
  55. echo  丨                丨   B# BackUp    丨   S# SignApk   丨
  56. echo  丨优化工具        丨                丨                丨
  57. echo  丨   2# 合并odex  丨清空目录        丨旗舰功能     (U)丨
  58. echo  丨   3# OdexROM   丨   C# Clean     丨   U# Ultimate  丨
  59. echo  丨   4# Odex手机  丨                ├────────┘
  60. echo  丨                丨集成工具        丨
  61. echo  丨ROM工具         丨   I# Integrate 丨
  62. echo  丨   5# ROM 打包  丨                丨
  63. echo  丨   6# ROM 提取  丨JAVA切换        丨
  64. echo  丨   7# ROM 解包  丨   J# Jre^(!dif!^) 丨
  65. echo  丨   8# 无损解包  ├────────┘
  66. echo  丨   9# ROM 优化  丨
  67. echo  丨   0# ROM 信息  丨
  68. echo  丨   00 刷机脚本  丨
  69. echo  └────────┘
  70. set "cho="
  71. set /p cho=请选择:
  72. if "!cho!"=="" (goto main)
  73. goto BOX!cho:#=!
  74. exit
  75. :BOX00
  76. cls
  77. echo.
  78. echo ====================================
  79. echo  ###   刷机脚本编写   ###
  80. echo ====================================
  81. echo  1-创建刷机脚本
  82. echo  2-在刷机脚本中添加busybox !ue2!
  83. echo  3-在刷机脚本中添加su !ue3!
  84. echo  4-在刷机脚本中添加boot.img !ue4!
  85. echo  5-在刷机脚本中添加recovery.img !ue5!
  86. echo  6-在刷机脚本中添加data !ue6!
  87. echo  7-从recovery文件获取挂载路径
  88. echo.
  89. set "cho="
  90. set /p cho=请选择:
  91. if "!cho!"=="" (goto main)
  92. if  "!cho!"=="1" (
  93. if "!ue1!"=="√" (goto BOX00)
  94. if exist !ROMr!\META-INF\com\google\android\updater-script (
  95. set /p choos=是否覆盖现有脚本,^(y,n^)?:
  96. if /i "!choos!"=="n" (goto BOX00)
  97. )
  98. 7z x .\META-INF.zip -o!ROMr!\
  99. notepad !ROMr!\META-INF\com\google\android\updater-script
  100. set "ue1=√"
  101. goto BOX00
  102. )
  103. if  "!cho!"=="2" (
  104. if "!ue6!"=="√" (goto BOX00)
  105. if exist !ROMr!\data\ (
  106. echo 已经含有DATA目录
  107. pause>nul
  108. goto BOX00
  109. ) else (
  110. md !ROMr!\data\
  111. if exist !ROMr!\META-INF\com\google\android\updater-script (
  112. echo.>>!ROMr!\META-INF\com\google\android\updater-script
  113. echo ^#ROM集成data支持,请依照自己机型修改 >>!ROMr!\META-INF\com\google\android\updater-script
  114. echo format^("ext4或yaffs2或ubifs", "EMMC或MTD或UBI", "挂载路径", "0"^)^; >>!ROMr!\META-INF\com\google\android\updater-script
  115. echo mount^("ext4或yaffs2或ubifs", "EMMC或MTD或UBI", "挂载路径", "/data"^)^; >>!ROMr!\META-INF\com\google\android\updater-script
  116. echo package_extract_dir^("data", "/data"^)^; >>!ROMr!\META-INF\com\google\android\updater-script
  117. echo unmount^("/data"^)^; >>!ROMr!\META-INF\com\google\android\updater-script
  118. echo 请按照自己机型修改
  119. notepad !ROMr!\META-INF\com\google\android\updater-script
  120. set "ue6=√"
  121. ) else (
  122. echo ROM目录无刷机脚本
  123. pause>nul
  124. goto BOX00
  125. )
  126. )
  127. goto BOX00
  128. )
  129. if  "!cho!"=="3" (
  130. 7z x .\META-INF.zip -o!ROMr!\
  131. notepad !ROMr!\META-INF\com\google\android\updater-script
  132. goto BOX00
  133. )
  134. if  "!cho!"=="4" (
  135. if "!ue4!"=="√" (goto BOX00)
  136. if not exist !ROMr!\boot.img (
  137. echo ROM目录没有boot.img
  138. pause>nul
  139. goto BOX00
  140. )
  141. if exist !ROMr!\META-INF\com\google\android\updater-script (
  142. echo.>>!ROMr!\META-INF\com\google\android\updater-script
  143. ) else (
  144. echo.>!ROMr!\META-INF\com\google\android\updater-script
  145. )
  146. echo ^#添加刷写boot.img,请依照自己机型修改 >>!ROMr!\META-INF\com\google\android\updater-script
  147. echo write_raw_image^(package_extract_file^("boot.img"^), "boot"^)^; >>!ROMr!\META-INF\com\google\android\updater-script
  148. notepad !ROMr!\META-INF\com\google\android\updater-script
  149. set "ue4=√"
  150. goto BOX00
  151. )
  152. if  "!cho!"=="5" (
  153. if "!ue5!"=="√" (goto BOX00)
  154. if not exist !ROMr!\recovery.img (
  155. echo ROM目录没有recovery.img
  156. pause>nul
  157. goto BOX00
  158. )
  159. if exist !ROMr!\META-INF\com\google\android\updater-script (
  160. echo.>>!ROMr!\META-INF\com\google\android\updater-script
  161. ) else (
  162. echo.>!ROMr!\META-INF\com\google\android\updater-script
  163. )
  164. echo ^#添加刷写recovery,请依照自己机型修改 >>!ROMr!\META-INF\com\google\android\updater-script
  165. echo write_raw_image^(package_extract_file^("recovery.img"^), "recovery"^)^; >>!ROMr!\META-INF\com\google\android\updater-script
  166. notepad !ROMr!\META-INF\com\google\android\updater-script
  167. set "ue5=√"
  168. goto BOX00
  169. )
  170. if  "!cho!"=="6" (
  171. if "!ue6!"=="√" (goto BOX00)
  172. if exist !ROMr!\data\ (
  173. echo 已经含有DATA目录
  174. pause>nul
  175. goto BOX00
  176. ) else (
  177. md !ROMr!\data\
  178. if exist !ROMr!\META-INF\com\google\android\updater-script (
  179. echo.>>!ROMr!\META-INF\com\google\android\updater-script
  180. echo ^#ROM集成data支持,请依照自己机型修改 >>!ROMr!\META-INF\com\google\android\updater-script
  181. echo format^("ext4或yaffs2或ubifs", "EMMC或MTD或UBI", "挂载路径", "0"^)^; >>!ROMr!\META-INF\com\google\android\updater-script
  182. echo mount^("ext4或yaffs2或ubifs", "EMMC或MTD或UBI", "挂载路径", "/data"^)^; >>!ROMr!\META-INF\com\google\android\updater-script
  183. echo package_extract_dir^("data", "/data"^)^; >>!ROMr!\META-INF\com\google\android\updater-script
  184. echo unmount^("/data"^)^; >>!ROMr!\META-INF\com\google\android\updater-script
  185. echo 请按照自己机型修改
  186. notepad !ROMr!\META-INF\com\google\android\updater-script
  187. set "ue6=√"
  188. ) else (
  189. echo ROM目录无刷机脚本
  190. pause>nul
  191. goto BOX00
  192. )
  193. )
  194. goto BOX00
  195. )
  196. if  "!cho!"=="7" (
  197. 7z x .\META-INF.zip -o!ROMr!\
  198. notepad !ROMr!\META-INF\com\google\android\updater-script
  199. goto BOX00
  200. )
  201. goto BOX00!cho!
  202. exit
  203. pause>nul
  204. goto main
  205. :BOX0
  206. cls
  207. if not exist "!ROMr!\system\build.prop" (
  208. if exist "!ROMr!\*.zip" (
  209. 7z e !ROMr!\*.zip -r system\build.prop -o!ROMr!\ -y  1>NUL 2>NUL
  210. set BP="!ROMr!\build.prop"
  211. )
  212. if not exist "!ROMr!\build.prop" (
  213. echo 没有发现build.prop文件
  214. pause>nul
  215. goto main
  216. )
  217. ) else (
  218. set BP="!ROMr!\system\build.prop"
  219. )
  220. echo --------------ROM信息---------------
  221. for /f "tokens=1,2 delims==" %%a in ('find /v "#" ^<!BP!') do (
  222. if "%%a"=="ro.build.id" (echo 产品ID^:%%b)
  223. if "%%a"=="ro.build.version.sdk" (echo SDK版本^:%%b)
  224. if "%%a"=="ro.build.version.release" (echo 安卓版本^:%%b)
  225. if "%%a"=="ro.build.date" (echo 创建日期^:%%b)
  226. if "%%a"=="ro.product.model" (echo 产品型号^:%%b)
  227. if "%%a"=="ro.product.brand" (echo 品牌^:%%b)
  228. if "%%a"=="ro.product.name" (echo 设备名称^:%%b)
  229. if "%%a"=="ro.product.cpu.abi" (echo CPU指令集^:%%b)
  230. if "%%a"=="ro.product.locale.language" (echo 语言^:%%b)
  231. if "%%a"=="ro.hardware" (echo 硬件^:%%b)
  232. if "%%a"=="ro.mediatek.platform" (echo 芯片型号^:%%b)
  233. if "%%a"=="dalvik.vm.heapstartsize" (echo 虚拟机初始^:%%b)
  234. if "%%a"=="dalvik.vm.heapgrowthlimit" (echo 虚拟机增长^:%%b)
  235. if "%%a"=="dalvik.vm.heapsize" (echo 虚拟机大小^:%%b)
  236. if "%%a"=="ro.config.notification_sound" (echo 短信铃声^:%%b)
  237. if "%%a"=="ro.config.alarm_alert" (echo 闹钟铃声^:%%b)
  238. if "%%a"=="ro.config.ringtone" (echo 来电铃声^:%%b)
  239. if "%%a"=="ro.sf.lcd_density" (echo 屏幕DPI^:%%b)
  240. if "%%a"=="ro.wifi.channels" (echo WIFI信道^:%%b)
  241. if "%%a"=="ro.sf.gsensorposition" (echo 重力感应系^:%%b)
  242. )
  243. echo ------------------------------------
  244. echo 返回
  245. del /f /q !ROMr!\build.prop  1>NUL 2>NUL
  246. pause>nul
  247. goto main
  248. :BOX1
  249. start .\Apktool\
  250. goto main
  251. :BOX2
  252. cls
  253. if not exist !ROMr!\system\ (
  254. md !ROMr! 1>NUL 2>NUL
  255. echo.
  256. echo ====================================
  257. echo  没有找到system文件夹
  258. echo.
  259. echo  请将system文件夹复制到ROM目录
  260. echo ====================================
  261. pause>NUL
  262. exit
  263. )
  264. if not exist !ROMr!\system\framework\*.jar (
  265. echo.
  266. echo ====================================
  267. echo  没有系统framework框架
  268. echo ====================================
  269. pause>NUL
  270. goto main
  271. )
  272. rd .\temp\out /q /s 1>NUL 2>NUL
  273. del .\temp\classes.dex /q 1>NUL 2>NUL
  274. cls
  275. echo.
  276. echo ====================================
  277. echo  ###   odex合并工具   ###
  278. echo ====================================
  279. ::设置framework目录
  280. set FR=!ROMr!\system\framework
  281. ::设置app目录
  282. set APP=!ROMr!\system\app
  283. ::判断架构arm、arm64、x86
  284. if exist !FR!\arm\boot.oat (
  285. set CPUF=arm
  286. if exist "!FR!\oat\" (goto BOX2a) else (goto BOX2b)
  287. )
  288. if exist !FR!\arm64\boot.oat (
  289. set CPUF=arm64
  290. if exist "!FR!\oat\" (goto BOX2a) else (goto BOX2b)
  291. )
  292. if exist !FR!\x86\boot.oat (
  293. set CPUF=x86
  294. if exist "!FR!\oat\" (goto BOX2a) else (goto BOX2b)
  295. )
  296. echo ----------正在合并系统apk-----------
  297. for %%a in ("!APP!\*.odex") do (
  298. set er=0
  299. echo 合并%%~nxa
  300. java -jar baksmali.jar -d !FR! -o .\temp\out -x %%a >NUL || set er=1
  301. java -Xmx512M -jar smali.jar .\temp\out -o .\temp\classes.dex >NUL || set er=1
  302. rd .\temp\out /q /s
  303. 7z a !APP!\%%~na.apk .\temp\classes.dex >NUL || set er=1
  304. del .\temp\classes.dex /q
  305. if !er! equ 0 (del %%a /q & echo     ----- 成功 -----) else (echo     ----- 失败 -----)
  306. echo.
  307. )
  308. echo ----------正在合并系统框架----------
  309. for %%a in ("!FR!\*.odex") do (
  310. set er=0
  311. echo 合并%%~nxa
  312. java -jar baksmali.jar -d !FR! -o .\temp\out -x %%a >NUL || set er=1
  313. java -Xmx512M -jar smali.jar .\temp\out -o .\temp\classes.dex>NUL || set er=1
  314. rd .\temp\out /q /s
  315. 7z a !FR!\%%~na.jar .\temp\classes.dex>NUL || set er=1
  316. del .\temp\classes.dex /q
  317. if !er! equ 0 (del %%a /q & echo     ----- 成功 -----) else (echo     ----- 失败 -----)
  318. echo.
  319. )
  320. echo ------------合并odex结束------------
  321. if !NX! equ 1 (goto :EOF)
  322. pause>NUL
  323. goto main
  324. ::
  325. BOX2a
  326. ::设置boot-class目录
  327. set BC=!FR!\!CPUF!\odex
  328. echo ===================================
  329. echo 正在分解boot.oat
  330. echo ===================================
  331. echo 请稍等...
  332. java -Xmx512M -jar oat2dex.jar -o !FR!\ boot !FR!\!CPUF!\boot.oat  1>nul 2>nul
  333. echo ----------正在合并app目录----------
  334. for /f %%a in ('dir /b !APP!') do (
  335. echo 合并app下%%~na
  336. if exist "!APP!\%%a\oat\!CPUF!\%%~na.odex" (
  337. java -Xmx512M -jar oat2dex.jar -o !APP!\%%a\ !APP!\%%a\oat\!CPUF!\%%~na.odex !BC!\  1>nul 2>nul
  338. ren  !APP!\%%a\%%~na.dex classes.dex
  339. 7z a !APP!\%%a\%%~na.apk !APP!\%%a\classes.dex   1>nul 2>nul
  340. del /f /q !APP!\%%a\classes.dex   1>nul 2>nul
  341. rd /q /s !APP!\%%a\oat   1>nul 2>nul
  342. )
  343. )
  344. ::设置priv-app目录
  345. set APP=!ROM!\system\priv-app
  346. echo -------正在合并priv-app目录--------
  347. for /f %%a in ('dir /b !APP!') do (
  348. echo 合并priv-app下%%~na
  349. if exist "!APP!\%%a\oat\!CPUF!\%%~na.odex" (
  350. java -Xmx512M -jar oat2dex.jar -o !APP!\%%a\ !APP!\%%a\oat\!CPUF!\%%~na.odex !BC!\  1>nul 2>nul
  351. ren  !APP!\%%a\%%~na.dex classes.dex
  352. 7z a !APP!\%%a\%%~na.apk !APP!\%%a\classes.dex   1>nul 2>nul
  353. del /f /q !APP!\%%a\classes.dex   1>nul 2>nul
  354. rd /q /s !APP!\%%a\oat   1>nul 2>nul
  355. )
  356. )
  357. echo ---------正在合并次要框架----------
  358. for %%a in ("!FR!\oat\!CPUF!\*.odex") do (
  359. echo 合并%%~nxa
  360. java -Xmx512M -jar oat2dex.jar -o !FR!\  %%a  !BC!\  1>nul 2>nul
  361. rename !FR!\%%~na.dex    classes.dex
  362. 7z a !FR!\%%~na.jar !FR!\classes.dex  1>nul 2>nul
  363. del /f /q  !FR!\classes.dex
  364. )
  365. echo ---------正在合并核心框架----------
  366. for %%a in ("!FR!\*.dex") do (
  367. echo 合并%%~nxa
  368. if not "%%~nxa"=="framework-classes2.dex" (
  369. ren %%a    classes.dex
  370. 7z a !FR!\%%~na.jar !FR!\classes.dex  1>nul 2>nul
  371. del /f /q  !FR!\classes.dex
  372. ) else (
  373. ren %%a    classes2.dex
  374. 7z a !FR!\framework.jar !FR!\classes2.dex  1>nul 2>nul
  375. del !FR!\classes2.dex
  376. )
  377. )
  378. echo ===================================
  379. echo 正在清理oat目录
  380. echo ===================================
  381. echo 请稍等...
  382. rd /q /s !FR!\oat
  383. rd /q /s !FR!\!CPUF!
  384. pause>NUL
  385. goto main
  386. ::
  387. BOX2b
  388. echo ----------正在合并app目录----------
  389. for /f %%a in ('dir /b !APP!') do (
  390. echo 合并app下%%~na
  391. if exist "!APP!\%%a\!CPUF!\%%~na.odex" (
  392. java -Xmx512M -jar oat2dex.jar -o !APP!\%%a\ !APP!\%%a\!CPUF!\%%~na.odex !BC!\  1>nul 2>nul
  393. ren  !APP!\%%a\%%~na.dex classes.dex
  394. 7z a !APP!\%%a\%%~na.apk !APP!\%%a\classes.dex   1>nul 2>nul
  395. del /f /q !APP!\%%a\classes.dex   1>nul 2>nul
  396. rd /q /s !APP!\%%a\!CPUF!   1>nul 2>nul
  397. )
  398. )
  399. ::设置priv-app目录
  400. set APP=!ROM!\system\priv-app
  401. echo -------正在合并priv-app目录--------
  402. for /f %%a in ('dir /b !APP!') do (
  403. echo 合并priv-app下%%~na
  404. if exist "!APP!\%%a\!CPUF!\%%~na.odex" (
  405. java -Xmx512M -jar oat2dex.jar -o !APP!\%%a\ !APP!\%%a\!CPUF!\%%~na.odex !BC!\  1>nul 2>nul
  406. ren  !APP!\%%a\%%~na.dex classes.dex
  407. 7z a !APP!\%%a\%%~na.apk !APP!\%%a\classes.dex   1>nul 2>nul
  408. del /f /q !APP!\%%a\classes.dex   1>nul 2>nul
  409. rd /q /s !APP!\%%a\!CPUF!   1>nul 2>nul
  410. )
  411. )
  412. echo ---------正在合并次要框架----------
  413. for %%a in ("!FR!\!CPUF!\*.odex") do (
  414. echo 合并%%~nxa
  415. java -Xmx512M -jar oat2dex.jar -o !FR!\  %%a  !BC!\  1>nul 2>nul
  416. ren !FR!\%%~na.dex    classes.dex
  417. 7z a !FR!\%%~na.jar !FR!\classes.dex  1>nul 2>nul
  418. del /f /q  !FR!\classes.dex
  419. )
  420. echo ---------正在合并核心框架----------
  421. for %%a in ("!FR!\*.dex") do (
  422. echo 合并%%~nxa
  423. ren %%a    classes.dex
  424. 7z a !FR!\%%~na.jar !FR!\classes.dex  1>nul 2>nul
  425. del !FR!\classes.dex
  426. )
  427. echo ===================================
  428. echo 正在清理oat目录
  429. echo ===================================
  430. echo 请稍等...
  431. rd /q /s !FR!\!CPUF!
  432. pause>NUL
  433. goto main
  434. :BOX3
  435. cls
  436. if not exist !ROMr!\system\ (
  437. md !ROMr! 1>NUL 2>NUL
  438. echo.
  439. echo ====================================
  440. echo  没有找到system文件夹
  441. echo.
  442. echo  请将system文件夹复制到ROM目录
  443. echo ====================================
  444. pause>NUL
  445. exit
  446. )
  447. if exist !ROMr!\system\app\*.odex (
  448. echo.
  449. echo ====================================
  450. echo  似乎有被odex优化的迹象
  451. echo.
  452. echo ====================================
  453. pause>NUL
  454. goto main
  455. )
  456. echo ====================================
  457. echo  1.开启USB调试模式;
  458. echo.   
  459. echo  2.手机须root且允许adb连接
  460. echo ====================================
  461. echo 正在连接设备...
  462. adb kill-server 1>NUL 2>NUL
  463. adb wait-for-device && echo 成功连接设备|| echo 无法连接设备 && pause>NUL && goto main
  464. adb push .\dexopt-wrapper /data/local/tmp/dexopt-wrapper  1>NUL 2>NUL
  465. adb shell chmod 0755 /data/local/tmp/dexopt-wrapper  1>NUL 2>NUL
  466. cls
  467. echo.
  468. echo ====================================
  469. echo  ###   odex化ROM工具   ###
  470. echo ====================================
  471. echo ----------正在优化系统apk-----------
  472. rd "!ROMr!\system\framework" /q /s  1>NUL 2>NUL
  473. for  %%a in ("!ROMr!\system\app\*.apk") do (
  474. echo.
  475. echo odex化%%~nxa
  476. if exist !ROMr!\system\app\%%~na.odex (echo 已odex化,跳过) else (
  477. set er=0
  478. adb push %%a /data/local/tmp/ 1>NUL 2>NUL
  479. adb shell /data/local/tmp/dexopt-wrapper /data/local/tmp/%%~nxa /data/local/tmp/%%~na.odex 1>NUL 2>NUL
  480. adb shell rm /data/local/tmp/%%~nxa 1>NUL 2>NUL
  481. adb pull /data/local/tmp/%%~na.odex  !ROMr!\system\app 1>NUL 2>NUL || set er=1
  482. adb shell rm /data/local/tmp/%%~na.odex 1>NUL 2>NUL
  483. if !er! equ 0 (7z d %%a classes.dex -r >nul & echo     ----- 成功 -----) else (echo     ----- 失败 -----)
  484. )
  485. )
  486. echo ----------正在提取系统框架-----------
  487. md "!ROMr!\system\framework"
  488. adb pull /system/framework  !ROMr!\system\framework  1>NUL 2>NUL || echo 提取framework失败 && pause>NUL
  489. adb shell rm /data/local/tmp/dexopt-wrapper 1>NUL 2>NUL
  490. adb shell exit
  491. echo ------------odex化ROM结束------------
  492. if !NX! equ 1 (goto :EOF)
  493. pause>NUL
  494. goto main
  495. :BOX4
  496. cls
  497. echo ====================================
  498. echo  1.开启USB调试模式;
  499. echo.   
  500. echo  2.手机须root且允许adb连接;
  501. echo.   
  502. echo  3.暂不支持安卓4.4以上.
  503. echo ====================================
  504. echo 正在连接设备...
  505. adb kill-server 1>NUL 2>NUL
  506. adb wait-for-device && echo 成功连接设备|| echo 无法连接设备 && pause>NUL && goto main
  507. echo 安装dexo到设备...
  508. adb push .\tools.zip /data/local/tmp/
  509. adb push .\busybox /data/local/tmp/
  510. adb shell "su -c 'chmod 0755 /data/local/tmp/tools.zip'"
  511. adb shell "su -c 'chmod 0755 /data/local/tmp/busybox'"
  512. adb shell "su -c 'mount -o remount -o rw /system'"
  513. adb shell "su -c '/data/local/tmp/busybox cp /data/local/tmp/tools.zip /system/bin/tools.zip'"
  514. adb shell "su -c '/data/local/tmp/busybox unzip -o /data/local/tmp/tools.zip -d /system/'"
  515. echo 正在设置权限...
  516. adb shell "su -c 'chmod 0777 /system/bin/dexo'"
  517. adb shell "su -c 'chmod 0777 /system/bin/dexopt-wrapper'"
  518. adb shell "su -c 'chmod 0777 /system/xbin/zip'"
  519. adb shell "su -c 'chmod 0777 /system/xbin/zipalign'"
  520. :BOX4main
  521. cls
  522. echo.
  523. echo ====================================
  524. echo  ###   XDA--odex化手机工具   ###
  525. echo ====================================
  526. echo  1-优化data        2-优化system  
  527. echo  3-优化framework   4-优化bootstrap
  528. echo  5-全部优化        6-帮助
  529. echo.
  530. set "cho="
  531. set /p cho=请选择:
  532. cls
  533. if "!cho!"=="" (goto main)
  534. if /i "!cho!"=="1" (set cm=dat & goto BOX4main1)
  535. if /i "!cho!"=="2" (set cm=sys & goto BOX4main1)
  536. if /i "!cho!"=="3" (set cm=fr & goto BOX4main1)
  537. if /i "!cho!"=="4" (set cm=bs & goto BOX4main1)
  538. if /i "!cho!"=="5" (set cm=all & goto BOX4main1)
  539. if /i "!cho!"=="6" (set cm=h & goto BOX4main1)
  540. echo 选择错误,请重新选择
  541. pause>NUL
  542. goto BOX4main
  543. :BOX4main1
  544. adb shell "su -c 'dexo -!cm!'" && if !cho! lss 6 (echo 正在重启设备... & adb reboot & goto BOX4main)
  545. pause>NUL
  546. goto BOX4main
  547. :BOX5
  548. cls
  549. echo.
  550. echo ====================================
  551. echo  ###   打包ROM目录为   ###
  552. echo ====================================
  553. echo  1-标准zip格式^(推荐^)
  554. echo  2-img格式^(ext4压缩^)
  555. echo  3-dat格式
  556. echo  4-tar格式
  557. echo  5-sin格式
  558. echo.
  559. set "cho="
  560. set /p cho=请选择:
  561. if "!cho!"=="" (goto main)
  562. goto BOX5!cho!
  563. exit
  564. ::
  565. :BOX51
  566. cls
  567. if exist .\temp\temp.zip (del .\temp\temp.zip)
  568. if not exist !ROMr!\META-INF\com\google\android\updater-script (
  569. echo.
  570. echo ------------------------------------
  571. echo  ROM目录无刷机脚本,采取通用脚本?
  572. echo ------------------------------------
  573. echo  1.采取通用脚本
  574. echo  2.退出
  575. echo.
  576. set "cho="
  577. set /p cho=请选择:
  578. if /i "!cho!"=="1" (
  579. 7z x .\META-INF.zip -o!ROMr!\
  580. notepad !ROMr!\META-INF\com\google\android\updater-script
  581. goto BOX51
  582. )
  583. exit
  584. )
  585. echo.
  586. echo ------------------------------------
  587. echo  ^* 打包为zip格式 ^*
  588. echo ------------------------------------
  589. 7z a -tzip .\temp\temp.zip !ROMr!\*
  590. echo.
  591. echo  签名中...
  592. java -jar signapk.jar -w -v testkey.x509.pem testkey.pk8 .\temp\temp.zip !ROMr!.zip 2>NUL && del .\temp\temp.zip && echo ------------打包ROM成功------------- || echo ------------打包ROM失败-------------
  593. if !NX! equ 1 (goto :EOF)
  594. pause>NUL
  595. goto main
  596. ::
  597. :BOX52
  598. cls
  599. if exist !ROMr!\system\ (
  600. echo.
  601. echo ------------------------------------
  602. echo  ^* 打包为img格式^(ext4压缩^) ^*
  603. echo ------------------------------------
  604. echo 备注:安卓4.3以上需file_contexts
  605. echo.
  606. if exist !ROMr!\extra.inf (
  607. for /f "tokens=1,2 delims=:" %%a in ('find ":" ^<!ROMr!\extra.inf') do (
  608. if "%%a"=="Block count" (set /a blc=%%b)
  609. if "%%a"=="Block size" (set /a blz=%%b)
  610. )
  611. set /a size=!blc!*!blz!
  612. del /f /q !ROMr!\extra.inf  1>NUL 2>NUL
  613. ) else (
  614. echo EXT4分区大小M^(单位:  兆^)
  615. echo EXT4分区大小 ^(单位:字节^)
  616. set /p size=请输入:
  617. )
  618. if "!size!"=="" (
  619. echo EXT4分区大小不能为空
  620. pause>nul
  621. exit
  622. )
  623. if exist !ROMr!\file_contexts (set "FCS=-S !ROMr!\file_contexts") else (set "FCS=")
  624. make_ext4fs -a system -l !size!  !FCS! -s !ROMr!\system.img !ROMr!\system\
  625. rd !ROMr!\system /q /s  1>NUL 2>NUL
  626. echo 完毕!
  627. pause>NUL
  628. )
  629. goto main
  630. ::
  631. :BOX53
  632. cls
  633. if exist !ROMr!\system\ (
  634. echo.
  635. echo ------------------------------------
  636. echo  ^* 打包为dat格式 ^*
  637. echo ------------------------------------
  638. echo 备注:安卓4.3以上需file_contexts
  639. echo.
  640. if exist !ROMr!\extra.inf (
  641. for /f "tokens=1,2 delims=:" %%a in ('find ":" ^<!ROMr!\extra.inf') do (
  642. if "%%a"=="Block count" (set /a blc=%%b)
  643. if "%%a"=="Block size" (set /a blz=%%b)
  644. )
  645. set /a size=!blc!*!blz!
  646. del /f /q !ROMr!\extra.inf  1>NUL 2>NUL
  647. ) else (
  648. echo EXT4分区大小M^(单位:  兆^)
  649. echo EXT4分区大小 ^(单位:字节^)
  650. set /p size=请输入:
  651. )
  652. if "!size!"=="" (
  653. echo EXT4分区大小不能为空
  654. pause>nul
  655. exit
  656. )
  657. if exist !ROMr!\file_contexts (set "FCS=-S !ROMr!\file_contexts") else (set "FCS=" & echo 警告:没有file_contexts文件)
  658. make_ext4fs -a system -l !size!  !FCS! !ROMr!\system.new.img !ROMr!\system\
  659. rd !ROMr!\system /q /s  1>NUL 2>NUL
  660. CD !ROMr!\
  661. %~dp0tools\rimg2sdat.exe .\system.new.img
  662. del .\system.new.img /f /q  1>NUL 2>NUL
  663. echo.>.\system.patch.dat
  664. echo 完毕!
  665. CD %~dp0tools\
  666. pause>NUL
  667. )
  668. goto main
  669. ::
  670. :BOX54
  671. cls
  672. if exist !ROMr!\system\ (
  673. echo.
  674. echo ------------------------------------
  675. echo  ^* 打包为tar格式 ^*
  676. echo ------------------------------------
  677. echo 备注:该功能不予提供!
  678. pause>NUL
  679. )
  680. goto main
  681. ::
  682. :BOX55
  683. cls
  684. if exist !ROMr!\system\ (
  685. echo.
  686. echo ------------------------------------
  687. echo  ^* 打包为sin格式 ^*
  688. echo ------------------------------------
  689. echo 备注:该功能不予提供!
  690. pause>NUL
  691. )
  692. goto main
  693. :BOX6
  694. cls
  695. if exist !ROMr!\system\ (
  696. echo 请先清空ROM目录
  697. pause>NUL
  698. goto main
  699. )
  700. echo.
  701. echo ====================================
  702. echo  请连接手机USB调试模式;
  703. echo ====================================
  704. echo  正在连接设备...
  705. adb kill-server 1>NUL 2>NUL
  706. adb wait-for-device && echo 成功连接设备|| echo 无法连接设备 && pause>NUL && goto main
  707. cls
  708. echo.
  709. echo ====================================
  710. echo  正在从手机提取ROM...
  711. echo ====================================
  712. md !ROMr!\system
  713. adb pull /system/ !ROMr!\system || echo 提取ROM失败 && pause>NUL
  714. if !NX! equ 1 (goto :EOF)
  715. goto main
  716. :BOX7
  717. cls
  718. echo.
  719. echo ====================================
  720. echo  Imgextra快速解包
  721. echo ====================================
  722. echo  部分软链文件打包为zip包时会失效
  723. echo.
  724. for %%a in ("!ROMr!\*.*") do (
  725. if "%%~xa"==".zip" (
  726. cls
  727. echo ------------正在解包ROM-------------
  728. rd !ROMr!\system /q /s 1>NUL 2>NUL
  729. 7z x %%a -o!ROMr!\ -y 1>NUL 2>NUL
  730. echo 解包完毕
  731. del /f /q %%a  1>NUL 2>NUL
  732. )
  733. if %%~za gtr 13000000 (
  734. if "%%~xa"==".img" (
  735. cls
  736. echo ------------正在解包img-------------
  737. rd !ROMr!\system /q /s 1>NUL 2>NUL
  738. Imgextractor %%a !ROMr!\system   1>NUL 2>NUL
  739. if exist !ROMr!\system\app\*.apk (
  740. Imgextractor %%a -s >!ROMr!\extra.inf
  741. echo 解包成功
  742. del /f /q %%a  1>NUL 2>NUL
  743. ) else (echo 无法解包)
  744. )
  745. )
  746. if "%%~xa"==".sin" (
  747. cls
  748. echo ------------正在解包sin-------------
  749. rd !ROMr!\system /q /s 1>NUL 2>NUL
  750. Imgextractor %%a !ROMr!\system   1>NUL 2>NUL
  751. if exist !ROMr!\system\app\*.apk (
  752. Imgextractor %%a -s >!ROMr!\extra.inf
  753. echo 解包成功
  754. del /f /q %%a  1>NUL 2>NUL
  755. ) else (echo 无法解包)
  756. )
  757. )
  758. if exist "!ROMr!\system.new.dat" (
  759. cls
  760. echo ------------正在解包dat-------------
  761. if not exist "!ROMr!\system.transfer.list" (echo 没有 system.transfer.list)
  762. rd !ROMr!\system /q /s 1>NUL 2>NUL
  763. sdat2img !ROMr!\system.transfer.list !ROMr!\system.new.dat .\temp\system.new.img   1>NUL 2>NUL
  764. Imgextractor .\temp\system.new.img !ROMr!\system
  765. if exist !ROMr!\system\app\*.apk (
  766. Imgextractor .\temp\system.new.img -s >!ROMr!\extra.inf
  767. echo 解包成功
  768. del /f /q !ROMr!\system.new.dat  1>NUL 2>NUL
  769. del /f /q !ROMr!\system.transfer.list  1>NUL 2>NUL
  770. ) else (echo 无法解包)
  771. del /f /q .\temp\system.new.img  1>NUL 2>NUL
  772. )
  773. if !NX! equ 1 (goto :EOF)
  774. if not exist "!ROMr!\system\app\*.apk" (
  775. echo 发成错误!!!
  776. pause>nul
  777. goto main
  778. )
  779. goto BOX0
  780. :BOX8
  781. cls
  782. echo.
  783. echo ====================================
  784. echo  True无损解包
  785. echo ====================================
  786. echo  能无损解包软链文件,但解包时间漫长
  787. echo.
  788. for %%a in ("!ROMr!\*.*") do (
  789. if "%%~xa"==".zip" (
  790. cls
  791. echo ------------正在解包zip-------------
  792. rd !ROMr!\system /q /s 1>NUL 2>NUL
  793. 7z x %%a -o!ROMr!\ -y 1>NUL 2>NUL
  794. del /f /q %%a  1>NUL 2>NUL
  795. )
  796. if %%~za gtr 13000000 (
  797. if "%%~xa"==".img" (
  798. cls
  799. echo ------------正在解包img-------------
  800. rd !ROMr!\system /q /s 1>NUL 2>NUL
  801. 7z x %%a -o!ROMr!\system  1>NUL 2>NUL
  802. if exist !ROMr!\system\app\*.apk (
  803. Imgextractor %%a -s >!ROMr!\extra.inf
  804. echo 解包成功
  805. del /f /q %%a  1>NUL 2>NUL
  806. ) else (
  807. Imgextractor %%a .\temp\system.ext4 -conv   1>NUL 2>NUL
  808. 7z x .\temp\system.ext4 -o!ROMr!\system  1>NUL 2>NUL
  809. if exist !ROMr!\system\app\*.apk (
  810. Imgextractor %%a -s >!ROMr!\extra.inf
  811. echo 解包成功
  812. del /f /q %%a  1>NUL 2>NUL
  813. ) else (echo 无法解包)
  814. del /f /q .\temp\system.ext4  1>NUL 2>NUL
  815. )
  816. rd /q /s !ROMr!\system\[SYS]  1>NUL 2>NUL
  817. )
  818. )
  819. if "%%~xa"==".sin" (
  820. cls
  821. echo ------------正在解包sin-------------
  822. rd !ROMr!\system /q /s 1>NUL 2>NUL
  823. Imgextractor %%a .\temp\system.ext4 -conv   1>NUL 2>NUL
  824. 7z x .\temp\system.ext4 -o!ROMr!\system  1>NUL 2>NUL
  825. if exist !ROMr!\system\app\*.apk (
  826. Imgextractor %%a -s >!ROMr!\extra.inf
  827. echo 解包成功
  828. del /f /q %%a  1>NUL 2>NUL
  829. ) else (echo 无法解包)
  830. del /f /q .\temp\system.ext4  1>NUL 2>NUL
  831. rd /q /s !ROMr!\system\[SYS]  1>NUL 2>NUL
  832. )
  833. )
  834. if exist "!ROMr!\system.new.dat" (
  835. cls
  836. echo ------------正在解包dat-------------
  837. if not exist "!ROMr!\system.transfer.list" (echo 没有 system.transfer.list)
  838. rd !ROMr!\system /q /s 1>NUL 2>NUL
  839. sdat2img !ROMr!\system.transfer.list !ROMr!\system.new.dat .\temp\system.new.img   1>NUL 2>NUL
  840. 7z x .\temp\system.new.img -o!ROMr!\system\ 1>NUL 2>NUL
  841. if exist !ROMr!\system\app\*.apk (
  842. Imgextractor .\temp\system.new.img -s >!ROMr!\extra.inf
  843. echo 解包成功
  844. del /f /q !ROMr!\system.new.dat  1>NUL 2>NUL
  845. del /f /q !ROMr!\system.transfer.list  1>NUL 2>NUL
  846. ) else (echo 无法解包)
  847. del /f /q .\temp\system.new.img  1>NUL 2>NUL
  848. rd /q /s !ROMr!\system\[SYS]  1>NUL 2>NUL
  849. )
  850. if !NX! equ 1 (goto :EOF)
  851. if not exist "!ROMr!\system\app\*.apk" (
  852. echo 发成错误!!!
  853. pause>nul
  854. goto main
  855. )
  856. goto BOX0
  857. :BOX9
  858. if not exist "!ROMr!\system\build.prop" (
  859. echo ROM目录残缺
  860. pause>nul
  861. exit
  862. )
  863. cls
  864. echo.
  865. echo ====================================
  866. echo  ###   ROM优化工具   ###
  867. echo ====================================
  868. echo  1-签名ROM目录app
  869. echo  2-zipalign化ROM目录
  870. echo  3-更换字体
  871. echo  4-更换开机动画
  872. echo  5-细项优化
  873. echo.
  874. set "cho="
  875. set /p cho=请选择:
  876. if "!cho!"=="" (goto main)
  877. goto BOX9!cho!
  878. exit
  879. ::
  880. :BOX91
  881. cls
  882. if exist "!ROMr!\data\app\" (
  883. echo.
  884. echo ------------------------------------
  885. echo ^>^>^>遍签data\app目录
  886. echo ------------------------------------
  887. for %%a in ("!ROMr!\data\app\*.apk") do (
  888. ren %%a pre_%%~nxa
  889. java -jar signapk.jar -w -v testkey.x509.pem testkey.pk8   "!ROMr!\data\app\pre_%%~nxa"   "!ROMr!\data\app\%%~nxa"   1>NUL 2>NUL && echo -成功- %%~nxa || echo -失败- %%~nxa
  890. del "!ROMr!\data\app\pre_%%~nxa"
  891. )
  892. )
  893. if exist !ROMr!\system\app\ (
  894. echo.
  895. echo ------------------------------------
  896. echo ^>^>^>遍签system\app目录
  897. echo ------------------------------------
  898. for %%a in ("!ROMr!\system\app\*.apk") do (
  899. ren %%a pre_%%~nxa
  900. java -jar signapk.jar -w -v platform.x509.pem platform.pk8   "!ROMr!\system\app\pre_%%~nxa"   "!ROMr!\system\app\%%~nxa"   1>NUL 2>NUL && echo -成功- %%~nxa || echo -失败- %%~nxa
  901. del "!ROMr!\system\app\pre_%%~nxa"
  902. )
  903. )
  904. echo.
  905. echo 签名完毕!
  906. echo ------------------------------------
  907. if !NX! equ 1 (goto :EOF)
  908. pause>nul
  909. goto BOX9
  910. ::
  911. :BOX92
  912. cls
  913. if exist "!ROMr!\data\app\" (
  914. echo.
  915. echo ------------------------------------
  916. echo ^>^>^>zipalign化data\app目录
  917. echo ------------------------------------
  918. for %%a in ("!ROMr!\data\app\*.apk") do (
  919. ren %%a pre_%%~nxa
  920. zipalign -v 4   "!ROMr!\data\app\pre_%%~nxa"   "!ROMr!\data\app\%%~nxa"   1>NUL 2>NUL && echo -成功- %%~nxa || echo -失败- %%~nxa
  921. del "!ROMr!\data\app\pre_%%~nxa"
  922. )
  923. )
  924. if exist !ROMr!\system\app\ (
  925. echo.
  926. echo ------------------------------------
  927. echo ^>^>^>zipalign化system\app目录
  928. echo ------------------------------------
  929. for %%a in ("!ROMr!\system\app\*.apk") do (
  930. ren %%a pre_%%~nxa
  931. zipalign -v 4   "!ROMr!\system\app\pre_%%~nxa"   "!ROMr!\system\app\%%~nxa"   1>NUL 2>NUL && echo -成功- %%~nxa || echo -失败- %%~nxa
  932. del "!ROMr!\system\app\pre_%%~nxa"
  933. )
  934. )
  935. if exist !ROMr!\system\framework\ (
  936. echo.
  937. echo ------------------------------------
  938. echo ^>^>^>zipalign化system\framework目录
  939. echo ------------------------------------
  940. for %%a in ("!ROMr!\system\framework\*.apk") do (
  941. ren %%a pre_%%~nxa
  942. zipalign -v 4   "!ROMr!\system\framework\pre_%%~nxa"   "!ROMr!\system\framework\%%~nxa"   1>NUL 2>NUL && echo -成功- %%~nxa || echo -失败- %%~nxa
  943. del "!ROMr!\system\framework\pre_%%~nxa"
  944. )
  945. )
  946. echo.
  947. echo zipalign优化结束!
  948. echo ------------------------------------
  949. if !NX! equ 1 (goto :EOF)
  950. pause>nul
  951. goto BOX9
  952. ::
  953. :BOX93
  954. cls
  955. if not exist "!ROMr!\system\fonts\" (
  956. echo ROM目录残缺
  957. pause>nul
  958. exit
  959. )
  960. echo.
  961. echo ------------------------------------
  962. echo ^>^>^>替换ROM字体^(仅支持ttf格式^)
  963. echo ------------------------------------
  964. set /p Cttf=拖入中文字体:
  965. if "!Cttf!"=="" (goto BOX9) else (copy !Cttf! !ROMr!\system\fonts\DroidSansFallback.ttf)
  966. set /p Ettf=拖入英文字体:
  967. if "!Ettf!"=="" (goto BOX9) else (copy !Ettf! !ROMr!\system\fonts\Roboto-Regular.ttf)
  968. echo 完成!
  969. pause>nul
  970. goto BOX9
  971. ::
  972. :BOX94
  973. cls
  974. if not exist "!ROMr!\system\media\" (
  975. echo ROM目录残缺
  976. pause>nul
  977. exit
  978. )
  979. echo.
  980. echo ------------------------------------
  981. echo ^>^>^>更换开机动画^(仅支持zip格式^)
  982. echo ------------------------------------
  983. echo 1.使用框架动画  2.使用彩色Android
  984. echo 3.自定义        4.禁用开机动画
  985. echo.
  986. set "cho="
  987. set /p cho=请选择:
  988. if "!cho!"=="" (goto BOX9)
  989. if "!cho!"=="1" (del /f /q !ROMr!\system\media\bootanimation.zip)
  990. if "!cho!"=="2" (copy .\bootanimation.zip !ROMr!\system\media\)
  991. if "!cho!"=="3" (
  992. md .\temp\bootanimation  1>NUL 2>NUL
  993. md .\temp\bootanimation\part0  1>NUL 2>NUL
  994. md .\temp\bootanimation\part1  1>NUL 2>NUL
  995. start .\temp\bootanimation\
  996. echo ------------------------------------
  997. echo 说明:^(将图片复制到对应目录^)
  998. echo part0目录循环播放;
  999. echo part1目录播放一次
  1000. echo ------------------------------------
  1001. set /p witha=动画宽度:
  1002. set /p heiga=动画高度:
  1003. set /p fps=播放帧率:
  1004. echo !witha! !heiga! !fps!>.\temp\bootanimation\desc.txt
  1005. echo p 1 0 part1>>.\temp\bootanimation\desc.txt
  1006. echo p 0 0 part0>>.\temp\bootanimation\desc.txt
  1007. echo 正在压制...
  1008. 7z a -mx0 -tzip .\temp\bootanimation.zip .\temp\bootanimation\*   1>NUL 2>NUL
  1009. echo 正在替换...
  1010. move .\temp\bootanimation.zip !ROMr!\system\media\
  1011. rd .\temp\bootanimation /q /s  1>NUL 2>NUL
  1012. )
  1013. if "!cho!"=="4" (echo debug.sf.nobootanimation=1 >>!ROMr!\system\build.prop)
  1014. echo 完成!
  1015. pause>nul
  1016. goto BOX9
  1017. ::
  1018. :BOX95
  1019. cls
  1020. echo.
  1021. echo ------------------------------------
  1022. echo ^>^>^>细项优化
  1023. echo ------------------------------------
  1024. echo 1.照相优化!be1!  2.录像优化!be2!  3.电量优化!be3!
  1025. echo 4.触摸优化!be4!  5.滑动优化!be5!  6.定位加速!be6!
  1026. echo 7.开启虚拟按键!be7!
  1027. echo 8.去除虚拟按键!be8!
  1028. echo 9.开启 GPU渲染!be9!
  1029. echo 0.优化 jpg显示!be0!
  1030. echo.
  1031. set "cho="
  1032. set /p cho=请选择:
  1033. if "!cho!"=="" (goto BOX9)
  1034. if "!cho!"=="1" (
  1035. if "!be1!"=="√" (goto BOX95)
  1036. echo ro.media.dec.jpeg.memcap=8000000 >>!ROMr!\system\build.prop
  1037. echo ro.media.enc.hprof.vid.bps=8000000 >>!ROMr!\system\build.prop
  1038. set "be1=√"
  1039. )
  1040. if "!cho!"=="2" (
  1041. if "!be2!"=="√" (goto BOX95)
  1042. echo ro.media.capture.maxres=8m >>!ROMr!\system\build.prop
  1043. echo ro.media.capture.fast.fps=4 >>!ROMr!\system\build.prop
  1044. echo ro.media.capture.slow.fps=120 >>!ROMr!\system\build.prop
  1045. echo ro.media.panorama.defres=3264x1840 >>!ROMr!\system\build.prop
  1046. echo ro.media.panorama.frameres=1280x720 >>!ROMr!\system\build.prop
  1047. echo ro.camcorder.videoModes=true >>!ROMr!\system\build.prop
  1048. set "be2=√"
  1049. )
  1050. if "!cho!"=="3" (
  1051. if "!be3!"=="√" (goto BOX95)
  1052. echo wifi.supplicant_scan_interval=180 >>!ROMr!\system\build.prop
  1053. echo pm.sleep_mode=1 >>!ROMr!\system\build.prop
  1054. echo ro.ril.disable.power.collapse=0 >>!ROMr!\system\build.prop
  1055. set "be3=√"
  1056. )
  1057. if "!cho!"=="4" (
  1058. if "!be4!"=="√" (goto BOX95)
  1059. echo debug.performance.tuning=1 >>!ROMr!\system\build.prop
  1060. echo video.accelerate.hw=1 >>!ROMr!\system\build.prop
  1061. set "be4=√"
  1062. )
  1063. if "!cho!"=="5" (
  1064. if "!be5!"=="√" (goto BOX95)
  1065. echo windowsmgr.max_events_per_sec=150 >>!ROMr!\system\build.prop
  1066. set "be5=√"
  1067. )
  1068. if "!cho!"=="6" (
  1069. if "!be6!"=="√" (goto BOX95)
  1070. copy .\gps.conf !ROMr!\system\etc\
  1071. set "be6=√"
  1072. )
  1073. if "!cho!"=="7" (
  1074. if "!be7!"=="√" (goto BOX95)
  1075. echo qemu.hw.mainkeys=0 >>!ROMr!\system\build.prop
  1076. set "be7=√"
  1077. )
  1078. if "!cho!"=="8" (
  1079. if "!be8!"=="√" (goto BOX95)
  1080. echo qemu.hw.mainkeys=1 >>!ROMr!\system\build.prop
  1081. set "be8=√"
  1082. )
  1083. if "!cho!"=="9" (
  1084. if "!be9!"=="√" (goto BOX95)
  1085. echo debug.sf.hw=1 >>!ROMr!\system\build.prop
  1086. set "be9=√"
  1087. )
  1088. if "!cho!"=="0" (
  1089. if "!be0!"=="√" (goto BOX95)
  1090. echo ro.media.enc.jpeg.quality=100 >>!ROMr!\system\build.prop
  1091. set "be0=√"
  1092. )
  1093. goto BOX95
  1094. :BOXA
  1095. cls
  1096. echo.
  1097. echo ====================================
  1098. echo  请连接手机USB调试模式;
  1099. echo ====================================
  1100. echo  正在连接设备...
  1101. adb kill-server 1>NUL 2>NUL
  1102. adb wait-for-device 1>NUL 2>NUL
  1103. :ADB
  1104. cls
  1105. echo   ADB常用命令
  1106. echo   ___________________________________________________
  1107. echo   01-设备列表     06-模拟终端     11-bug报告
  1108. echo   02-进程列表     07-CPU参数      12-电量信息
  1109. echo   03-磁盘分区     08-内存信息     13^*电池信息
  1110. echo   04^*进程监视     09-手机串号     14-重启设备
  1111. echo   05-分区信息     10-分区参数     15-recovery模式
  1112. echo   ___________________________________________________
  1113. echo.
  1114. set "choadb="
  1115. set /p choadb=-^>选择:
  1116. cls
  1117. if "!choadb!"=="" (goto main)
  1118. if "!choadb:0=!"=="1" (adb devices)
  1119. if "!choadb:0=!"=="2" (adb shell ps)
  1120. if "!choadb:0=!"=="3" (adb shell df)
  1121. if "!choadb:0=!"=="4" (start cmd /k adb shell top -m 10)
  1122. if "!choadb:0=!"=="5" (adb shell "su -c 'cat /proc/partitions'")
  1123. if "!choadb:0=!"=="6" (start cmd /k adb shell)
  1124. if "!choadb:0=!"=="7" (adb shell cat /proc/cpuinfo)
  1125. if "!choadb:0=!"=="8" (adb shell dumpsys meminfo)
  1126. if "!choadb:0=!"=="9" (adb shell dumpsys iphonesubinfo)
  1127. if "!choadb!"=="10" (adb shell "su -c 'cat /proc/dumchar_info'")
  1128. if "!choadb!"=="11" (adb bugreport)
  1129. if "!choadb!"=="12" (adb shell dumpsys battery)
  1130. if "!choadb!"=="13" (start cmd /k adb shell "su -c 'cat /proc/kmsg|/data/local/tmp/busybox grep "batt"'")
  1131. if "!choadb!"=="14" (adb reboot)
  1132. if "!choadb!"=="15" (adb reboot recovery)
  1133. echo 返回
  1134. pause>NUL
  1135. goto ADB
  1136. :BOXB
  1137. cls
  1138. echo.
  1139. echo ====================================
  1140. echo  请连接手机USB调试模式;
  1141. echo ====================================
  1142. echo  正在连接设备...
  1143. adb kill-server 1>NUL 2>NUL
  1144. adb wait-for-device 1>NUL 2>NUL
  1145. :BOXBT
  1146. cls
  1147. echo.
  1148. echo ====================================
  1149. echo  ###   备份还原手机数据   ###
  1150. echo ====================================
  1151. echo  1.备份数据   2.备份设置
  1152. echo  *.拖入还原
  1153. echo.
  1154. set "cho="
  1155. set /p cho=-^>:
  1156. if "!cho!"=="" (goto main)
  1157. if "!cho:~-3!"==".ab" (
  1158. cls
  1159. echo.
  1160. echo ====================================
  1161. echo  1.请关注你的手机屏幕
  1162. echo.
  1163. echo  2.触摸“相应位置”
  1164. echo ====================================
  1165. adb restore !cho! 1>NUL 2>NUL
  1166. goto BOXBT
  1167. )
  1168. del .\temp\backup.ab 1>NUL 2>NUL
  1169. if "!cho!"=="1" (
  1170. set dat=!date:~0,10!
  1171. set dat=!dat:/=-!
  1172. set timeh=!time:~0,2!
  1173. set timem=!time:~3,2!
  1174. set times=!time:~6,2!
  1175. set dtm=Date!dat!Time!timeh!°!timem!′!times!″
  1176. cls
  1177. echo.
  1178. echo ====================================
  1179. echo  1.请关注你的手机屏幕
  1180. echo.
  1181. echo  2.触摸“相应位置”
  1182. echo.
  1183. echo  ^(仅限备份allowbackup="true"的应用^)
  1184. echo ====================================
  1185. adb backup -apk -noshared -nosystem -all -f ".\temp\backup.ab" 1>NUL 2>NUL
  1186. move .\temp\backup.ab ..\App!dtm!.ab 1>NUL 2>NUL && echo  备份成功 || echo  备份失败
  1187. del .\temp\backup.ab 1>NUL 2>NUL
  1188. pause>nul
  1189. goto BOXBT
  1190. )
  1191. if "!cho!"=="2" (
  1192. set dat=!date:~0,10!
  1193. set dat=!dat:/=-!
  1194. set timeh=!time:~0,2!
  1195. set timem=!time:~3,2!
  1196. set times=!time:~6,2!
  1197. set dtm=Date!dat!Time!timeh!°!timem!′!times!″
  1198. cls
  1199. echo.
  1200. echo ====================================
  1201. echo  1.请关注你的手机屏幕
  1202. echo.
  1203. echo  2.触摸“相应位置”
  1204. echo ====================================
  1205. adb backup -noapk -noshared -nosystem -all -f backup.ab 1>NUL 2>NUL
  1206. move .\temp\backup.ab ..\Settings!dtm!.ab 1>NUL 2>NUL && echo  备份成功 || echo  备份失败
  1207. del .\temp\backup.ab 1>NUL 2>NUL
  1208. pause>nul
  1209. goto BOXBT
  1210. )
  1211. goto BOXBT
  1212. :BOXC
  1213. echo 正在清空目录请稍等...
  1214. rd .\Apktool /q /s
  1215. rd .\Kernel /q /s
  1216. rd .\SignApk /q /s
  1217. rd .\temp /q /s
  1218. 7z x .\Shadow.zip -o.\  1>NUL 2>NUL
  1219. rd !ROMr! /q /s
  1220. md !ROMr!
  1221. goto main
  1222. :BOXI
  1223. cls
  1224. echo.
  1225. echo ====================================
  1226. echo  ###   集成工具   ###
  1227. echo ====================================
  1228. echo  1-ROM集成Root !ie1!
  1229. echo  2-ROM集成busybox !ie2!
  1230. echo  3-ROM集成init.d支持 !ie3!
  1231. echo  4-ROM集成data支持 !ie4!
  1232. echo  5-手机获取Root
  1233. echo  6-手机安装busybox
  1234. echo  7-手机添加init.d
  1235. echo  8-手机添加V6优化脚本
  1236. echo.
  1237. set "cho="
  1238. set /p cho=请选择:
  1239. echo.
  1240. if "!cho!"=="" (goto main)
  1241. goto BOXI!cho!
  1242. exit
  1243. ::
  1244. :BOXI1
  1245. if "!ie1!"=="√" (goto BOXI)
  1246. if exist !ROMr!\system\bin\ (
  1247. copy .\su !ROMr!\system\bin\su
  1248. copy .\SuperSU.apk !ROMr!\system\app\SuperSU.apk
  1249. del !ROMr!\system\app\SuperSU.odex 1>nul 2>nul
  1250. set "ie1=√"
  1251. ) else (
  1252. echo ROM目录残缺
  1253. pause>nul
  1254. )
  1255. if !NX! equ 1 (goto :EOF)
  1256. goto BOXI
  1257. ::
  1258. :BOXI2
  1259. if "!ie2!"=="√" (goto BOXI)
  1260. if exist !ROMr!\system\xbin\ (
  1261. copy .\busybox !ROMr!\system\xbin\busybox
  1262. set "ie2=√"
  1263. ) else (
  1264. echo ROM目录残缺
  1265. pause>nul
  1266. )
  1267. if !NX! equ 1 (goto :EOF)
  1268. goto BOXI
  1269. ::
  1270. :BOXI3
  1271. if "!ie3!"=="√" (goto BOXI)
  1272. if exist !ROMr!\system\etc\ (
  1273. if exist !ROMr!\system\etc\init.d (
  1274. echo 已经含有INIT.D目录
  1275. pause>nul
  1276. goto BOXI
  1277. ) else (
  1278. if exist !ROMr!\system\etc\install-recovery.sh (
  1279. echo #^^!/system/bin/sh>>!ROMr!\system\etc\install-recovery.sh
  1280. ) else (
  1281. echo #^^!/system/bin/sh>!ROMr!\system\etc\install-recovery.sh
  1282. )
  1283. echo # init.d support>>!ROMr!\system\etc\install-recovery.sh
  1284. echo busybox run-parts /system/etc/init.d>>!ROMr!\system\etc\install-recovery.sh
  1285. md !ROMr!\system\etc\init.d
  1286. copy .\busybox !ROMr!\system\xbin\busybox
  1287. set "ie3=√"
  1288. )
  1289. ) else (
  1290. echo ROM目录残缺
  1291. pause>nul
  1292. )
  1293. if !NX! equ 1 (goto :EOF)
  1294. goto BOXI
  1295. ::
  1296. :BOXI4
  1297. if "!ie4!"=="√" (goto BOXI)
  1298. if exist !ROMr!\data\ (
  1299. echo 已经含有DATA目录
  1300. pause>nul
  1301. goto BOXI
  1302. ) else (
  1303. md !ROMr!\data\
  1304. if exist !ROMr!\META-INF\com\google\android\updater-script (
  1305. echo.>>!ROMr!\META-INF\com\google\android\updater-script
  1306. echo ^#ROM集成data支持,请依照自己机型修改 >>!ROMr!\META-INF\com\google\android\updater-script
  1307. echo format^("ext4或yaffs2或ubifs", "EMMC或MTD或UBI", "挂载路径", "0"^)^; >>!ROMr!\META-INF\com\google\android\updater-script
  1308. echo mount^("ext4或yaffs2或ubifs", "EMMC或MTD或UBI", "挂载路径", "/data"^)^; >>!ROMr!\META-INF\com\google\android\updater-script
  1309. echo package_extract_dir^("data", "/data"^)^; >>!ROMr!\META-INF\com\google\android\updater-script
  1310. echo unmount^("/data"^)^; >>!ROMr!\META-INF\com\google\android\updater-script
  1311. echo 请按照自己机型修改
  1312. notepad !ROMr!\META-INF\com\google\android\updater-script
  1313. set "ie4=√"
  1314. ) else (
  1315. echo ROM目录无刷机脚本
  1316. pause>nul
  1317. goto BOXI
  1318. )
  1319. )
  1320. if !NX! equ 1 (goto :EOF)
  1321. goto BOXI
  1322. ::
  1323. :BOXI5
  1324. cls
  1325. echo.
  1326. echo ====================================
  1327. echo  手机开启USB调试自动连接;
  1328. echo ====================================
  1329. echo  正在连接设备...
  1330. adb kill-server
  1331. adb wait-for-device
  1332. adb push su /data/local/tmp/.
  1333. adb restore fakebackup.ab
  1334. cls
  1335. echo.
  1336. echo ====================================
  1337. echo  1.请关注你的手机屏幕
  1338. echo.
  1339. echo  2.点击“恢复我的数据”
  1340. echo ====================================
  1341. setlocal disabledelayedexpansion
  1342. adb shell "while ! ln -s /data/local.prop /data/data/com.android.settings/a/file99; do :; done" > NUL
  1343. setlocal enabledelayedexpansion
  1344. echo 重新启动...
  1345. adb reboot
  1346. ping -n 50 127.0.0.1>NUL
  1347. echo 写入su  ...
  1348. adb shell "mount -o remount,rw /system"
  1349. adb shell "dd if=/data/local/tmp/su of=/system/bin/su"
  1350. adb shell "chmod 06755 /system/bin/su"
  1351. adb install -r SuperSU.apk
  1352. adb shell "rm /data/local.prop"
  1353. adb shell "rm -r /data/data/com.android.settings/a"
  1354. adb shell "sync;sync;sync;"
  1355. echo 再次重启...
  1356. adb reboot
  1357. echo 请查看Root权限
  1358. pause>NUL
  1359. goto BOXI
  1360. ::
  1361. :BOXI6
  1362. cls
  1363. echo.
  1364. echo ====================================
  1365. echo  1.开启USB调试模式;
  1366. echo.   
  1367. echo  2.手机须root且允许adb连接
  1368. echo ====================================
  1369. echo  正在连接设备...
  1370. adb kill-server 1>NUL 2>NUL
  1371. adb wait-for-device 1>NUL 2>NUL
  1372. adb push .\busybox /mnt/sdcard/busybox
  1373. adb shell "su -c 'mount -o remount,rw /system'"
  1374. adb shell "su -c 'dd if=/mnt/sdcard/busybox of=/system/xbin/busybox'"
  1375. adb shell "su -c 'chmod 0755 /system/xbin/busybox'"
  1376. adb shell "su -c 'busybox --install -s /system/xbin'"
  1377. echo  命令执行完毕.
  1378. pause>NUL
  1379. goto BOXI
  1380. ::
  1381. :BOXI7
  1382. cls
  1383. echo.
  1384. echo ====================================
  1385. echo  1.开启USB调试模式;
  1386. echo.   
  1387. echo  2.手机须root且允许adb连接;
  1388. echo.   
  1389. echo  3.手机须有busybox
  1390. echo ====================================
  1391. echo  正在连接设备...
  1392. adb kill-server 1>NUL 2>NUL
  1393. adb wait-for-device 1>NUL 2>NUL
  1394. adb push .\term-init.sh /sdcard/term-init.sh
  1395. adb shell "su -c 'sh /sdcard/term-init.sh'"
  1396. pause>NUL
  1397. goto BOXI
  1398. ::
  1399. :BOXI8
  1400. cls
  1401. echo.
  1402. echo ====================================
  1403. echo  1.开启USB调试模式;
  1404. echo.   
  1405. echo  2.手机须root且允许adb连接;
  1406. echo.   
  1407. echo  3.手机须busybox和init.d支持
  1408. echo ====================================
  1409. echo  正在连接设备...
  1410. adb kill-server 1>NUL 2>NUL
  1411. adb wait-for-device 1>NUL 2>NUL
  1412. adb push .\V6_SuperCharger.sh /sdcard/V6_SuperCharger.sh
  1413. adb shell "su -c 'sh /sdcard/V6_SuperCharger.sh'"
  1414. echo  命令执行完毕.
  1415. pause>NUL
  1416. goto BOXI
  1417. :BOXJ
  1418. cls
  1419. echo.
  1420. echo ====================================
  1421. echo  ###   Java运行时设置   ###
  1422. echo ====================================
  1423. echo  1.启用内置Jre    2.启用系统Jre
  1424. echo.
  1425. set "cho="
  1426. set /p cho=请选择:
  1427. if "!cho!"=="" (goto main)
  1428. if "!cho!"=="1" (
  1429. if exist .\jre\ (
  1430. if exist .\jre\EnableJre\ (goto main)
  1431. md .\jre\EnableJre   1>NUL 2>NUL
  1432. ) else (
  1433. echo 没有内置JRE
  1434. pause>NUL
  1435. )
  1436. )
  1437. if "!cho!"=="2" (rd .\jre\EnableJre   1>NUL 2>NUL)
  1438. goto head
  1439. :BOXK
  1440. cls
  1441. echo.
  1442. echo ====================================
  1443. echo  ###   Kernel内核编辑工具   ###
  1444. echo ====================================
  1445. echo  1-编辑boot.img
  1446. echo  2-编辑recovery.img
  1447. echo  3-快捷编辑
  1448. echo.
  1449. set "cho="
  1450. set /p cho=请选择:
  1451. if "!cho!"=="" (goto main)
  1452. if "!cho!"=="1" (
  1453. if exist !ROMr!\boot.img (
  1454. echo ------------------------------------
  1455. echo 正在解包boot.img...
  1456. CALL .\Kernel\Edit_Krenel.bat !ROMr!\boot.img   1>NUL 2>NUL
  1457. pushd "%~dp0tools"
  1458. if  exist .\Kernel\boot\rmdisk\default.prop (
  1459. start .\Kernel\boot\
  1460. notepad .\Kernel\boot\rmdisk\default.prop
  1461. echo 正在打包boot.img...
  1462. CALL .\Kernel\Edit_Krenel.bat boot   1>NUL 2>NUL
  1463. pushd "%~dp0tools"
  1464. if exist .\Kernel\new_boot.img (
  1465. move .\Kernel\new_boot.img !ROMr!\boot.img
  1466. )
  1467. rd .\Kernel\boot /q /s  1>NUL 2>NUL
  1468. ) else (echo 无法正确解包!)
  1469. echo ------------------------------------
  1470. ) else (
  1471. echo ROM目录没有boot.img
  1472. )
  1473. echo 请返回
  1474. pause>nul
  1475. goto BOXK
  1476. )
  1477. if "!cho!"=="2" (
  1478. if exist !ROMr!\recovery.img (
  1479. echo ------------------------------------
  1480. echo 正在解包recovery.img...
  1481. CALL .\Kernel\Edit_Krenel.bat !ROMr!\recovery.img   1>NUL 2>NUL
  1482. pushd "%~dp0tools"
  1483. if  exist .\Kernel\recovery\rmdisk\init.rc (
  1484. start .\Kernel\recovery\
  1485. notepad .\Kernel\recovery\rmdisk\init.rc
  1486. echo 正在打包recovery.img...
  1487. CALL .\Kernel\Edit_Krenel.bat recovery   1>NUL 2>NUL
  1488. pushd "%~dp0tools"
  1489. if exist .\Kernel\new_recovery.img (
  1490. move .\Kernel\new_recovery.img !ROMr!\recovery.img
  1491. )
  1492. rd .\Kernel\recovery /q /s  1>NUL 2>NUL
  1493. ) else (echo 无法正确解包!)
  1494. echo ------------------------------------
  1495. ) else (
  1496. echo ROM目录没有recovery.img
  1497. )
  1498. echo 请返回
  1499. pause>nul
  1500. goto BOXK
  1501. )
  1502. if "!cho!"=="3" (start .\Kernel\)
  1503. goto BOXK
  1504. :BOXS
  1505. start .\SignApk\
  1506. goto main
  1507. :BOXU
  1508. ::打开自动脚本
  1509. set NX=1
  1510. cls
  1511. echo.
  1512. echo ┌───────────────┐
  1513. echo 丨###    Ultimate旗舰功能    ###丨^(全自动脚本^)
  1514. echo ├───────────────┤
  1515. echo 丨    A.  7#─2#─51#           丨解包─合并odex─打包
  1516. echo 丨    B.  7#─91#─92#─51#     丨解包─签名优化─打包
  1517. echo 丨    C.  7#─3#─51#           丨解包─odex化─打包
  1518. echo └───────────────┘
  1519. echo.
  1520. set "cho="
  1521. set /p cho=请选择:
  1522. if "!cho!"=="" (goto main)
  1523. goto BOXU!cho!
  1524. exit
  1525. ::
  1526. :BOXUA
  1527. cls
  1528. echo ┌───────────────┐
  1529. echo 丨 AutoScript  7#─2#─51#      丨
  1530. echo └───────────────┘
  1531. CALL :BOX7
  1532. CALL :BOX2
  1533. CALL :BOX51
  1534. pause>nul
  1535. goto main
  1536. ::
  1537. :BOXUB
  1538. cls
  1539. echo ┌───────────────┐
  1540. echo 丨 AutoScript  7#─91#─92#─51#丨
  1541. echo └───────────────┘
  1542. CALL :BOX7
  1543. CALL :BOX91
  1544. CALL :BOX92
  1545. CALL :BOX51
  1546. pause>nul
  1547. goto main
  1548. ::
  1549. :BOXUC
  1550. cls
  1551. echo ┌───────────────┐
  1552. echo 丨 AutoScript  7#─3#─51#      丨
  1553. echo └───────────────┘
  1554. CALL :BOX7
  1555. CALL :BOX3
  1556. CALL :BOX51
  1557. pause>nul
  1558. goto main
复制代码

作者: codegay    时间: 2016-11-7 17:42

视窗模拟。。作业方案。。。你是台湾的啊?
作者: 523066680    时间: 2016-11-7 18:03

回复 2# codegay


    如果台湾估计会统一用繁体吧
作者: happy886rr    时间: 2016-11-7 18:43

本帖最后由 happy886rr 于 2016-11-7 19:03 编辑

回复 2# codegay
视窗代指微软的图形操作系统,话说微软和苹果也是抄袭施乐的图形界面。比尔盖茨只有命令行的思维,乔布斯也不是搞编程的,所以今天的窗体界面都有一个共同的祖师爷施乐。要知道那是上世纪70年代,真正的dos时代,我也很遗憾没能出生在那个时代,直接被视窗和谐了。

这些窗体思维都基于整学的运算。比如:
1+3+5=9
1+3+5+7=16
1+3+5+7+9=25
这是计算机快速画圆的基石,也是批处理快速计算一个数的平方根的基石,同时也是其他图形变换的数学本质。

最后你会发现,操作系统、应用程序、脚本其实只在做一件事,那就是在算数。
作者: SJDB-BayMAX    时间: 2016-11-12 11:53

佩服!希望继续努力




欢迎光临 批处理之家 (http://bathome.net./) Powered by Discuz! 7.2