-
Notifications
You must be signed in to change notification settings - Fork 1
/
menu
123 lines (102 loc) · 3 KB
/
menu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#!/bin/bash
############################################################################
#
# 本定制工具完全免费,DsiXDA版权所有,由MAL神族-沉默之星完成汉化翻译。
#
# 理论上支持所有民间刷机包的定制,完美支持HTC的所有民间和官方刷机包!
#
# 欢迎光临全球最大中兴社区:神族论坛(http://bbs.malshenzu.com/)
#
############################################################################
version=0.224
if [ ! -e menu ]
then
echo
echo "确保你是从这个文件所在文件夹运行,"
echo "否则厨房将会在运行脚本的时候出现问题。"
echo "当你使用 'cd' 到正确的文件夹, 用 ./menu 命令"
echo "运行厨房工具, 不要尝试其它的命令或方法!"
exit 0
fi
dir_list=( original_update scripts tools )
error_found=0
for check_dir in ${dir_list[@]}
do
if [ ! -e $check_dir ]
then
echo "错误: '$check_dir' 文件夹找不到"
error_found=1
fi
done
if [ $error_found == 1 ]
then
echo
echo "确保你已正确安装了厨房文件夹。"
exit 0
fi
chmod 755 scripts/*
scripts/check_install_dir
if [ "$?" == "1" ]
then
exit 0
fi
scripts/init_kitchen
scripts/check_binaries
if [ "$?" == "1" ]
then
exit 0
fi
while :
do
clear
echo
echo "============================================================"
echo " Android 厨房 $version - DsiXDA (MAL神族-沉默之星 汉化)"
echo "============================================================"
echo
echo "> 主菜单"
echo
echo " 1 - 导入 ROM 文件到工作文件夹"
echo " 2 - 添加 root 最高权限"
echo " 3 - 添加 BusyBox 指令集"
echo " 4 - 关闭开机画面音乐"
echo " 5 - 对所有 Apk 文件进行 Zipalign 操作,优化内存占用"
echo " 6 - 更改 ROM 的 Wipe 操作状态"
echo " 7 - 更改 ROM 显示名称"
echo " 8 - 显示工作文件夹信息"
echo
echo " 0 - 高级操作菜单"
echo " 00 - 遗留选项 (旧的和很少使用的)"
echo " 99 - 从工作文件夹建立 ROM 刷机包"
echo
echo " u - 更新/关于厨房"
echo " x - 退出"
echo
echo
echo -n "请输入选择项: "
read opt
if [ "$opt" != "x" ] && [ "$opt" != "u" ] && [ "$opt" != "1" ]
then
scripts/check_multiple_working
fi
if [ "$?" != "1" ]
then
case $opt in
1) clear; scripts/check_rom; continue;;
2) scripts/do_root; continue;;
3) scripts/add_busybox show_help;;
4) scripts/disable_sounds;;
5) scripts/do_zipalign;;
6) scripts/change_wipe;;
7) scripts/change_rom_name;;
8) scripts/show_rom_info;;
0) scripts/menu_advanced $version; continue;;
00) scripts/menu_legacy $version; continue;;
99) scripts/build_rom;;
u) scripts/about $version; continue;;
x) scripts/init_kitchen; clear; echo; echo "再见,欢迎光临神族论坛(http://bbs.malshenzu.com/),神族与你共进步!"; echo; exit 1;;
*) echo "错误选项"; continue;;
esac
fi
scripts/press_enter
done