-
Notifications
You must be signed in to change notification settings - Fork 582
/
menu
executable file
·123 lines (102 loc) · 2.88 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
############################################################################
#
# Copyright (c) 2013 - dsixda ([email protected])
#
# Android Kitchen is 100% free. This script file is intended for personal
# and/or educational use only. It may not be duplicated for monetary
# benefit or any other purpose without the permission of the developer.
#
############################################################################
version=0.224
if [ ! -e menu ]
then
echo
echo "Ensure you run this file from the SAME folder as where it was"
echo "installed, otherwise the kitchen will have problems running the"
echo "scripts. After you 'cd' to the correct folder, start the kitchen"
echo "with the ./menu command, NOT with any other command or method!"
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 "Error: Folder '$check_dir' not found"
error_found=1
fi
done
if [ $error_found == 1 ]
then
echo
echo "Ensure you have installed the folders for the kitchen correctly."
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
echo "> MAIN MENU"
echo
echo " 1 - Set up working folder from ROM"
echo " 2 - Add root permissions"
echo " 3 - Add BusyBox"
echo " 4 - Disable boot screen sounds"
echo " 5 - Zipalign all *.apk files to optimize RAM usage"
echo " 6 - Change wipe status of ROM"
echo " 7 - Change name of ROM"
echo " 8 - Show working folder information"
echo
echo " 0 - ADVANCED OPTIONS"
echo " 00 - LEGACY OPTIONS (old and rarely used)"
echo " 99 - Build ROM from working folder"
echo
echo " u - Kitchen Info/Update/Donate"
echo " x - Exit"
echo
echo
echo -n "Enter option: "
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 "Goodbye."; echo; exit 1;;
*) echo "Invalid option"; continue;;
esac
fi
scripts/press_enter
done