forked from pwelyn/Android-Kitchen
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmenu
executable file
·124 lines (103 loc) · 2.98 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
123
#!/bin/bash
############################################################################
#
# Copyright (c) 2013 - dsixda (dislam@rocketmail.com)
# Copyright (c) 2014 - 越狱 (http://weibo.com/206021119)
#
# Android 厨房是100%免费。此脚本文件仅供个人或学习使用
# by hwh132 pwelyn-越狱 汉化
#
############################################################################
version=0.227
if [ ! -e menu ]
then
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 Kitchen $version - by dsixda (xda-developers.com)"
echo "============================================================"
echo " Android Kitchen中文汉化by hwh132 越狱, 新功能添加by 越狱"
echo "============================================================"
echo
echo "> 主菜单"
echo
echo " 1 - 从 ROM 文件导入到 Working 文件夹(分解ROM包)"
echo " 2 - 添加 ROOT 权限"
echo " 3 - 添加 BusyBox 支持"
echo " 4 - 禁用 开机音乐"
echo " 5 - Zipalign 所有 *.apk 文件优化内存使用"
echo " 6 - 更改 ROM 的 wipe 状态"
echo " 7 - 更改 ROM 名称"
echo " 8 - 显示 Working 文件夹的信息"
echo
echo " 0 - 高级选项"
echo " 00 - 传统选项 (旧的和较少用到的选项)"
echo " 99 - 从 Working 文件夹生成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 "再见."; echo; exit 1;;
*) echo "无效的选项"; continue;;
esac
fi
scripts/press_enter
done