forked from dsixda/Android-Kitchen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_no_update_script
More file actions
executable file
·109 lines (91 loc) · 2.85 KB
/
check_no_update_script
File metadata and controls
executable file
·109 lines (91 loc) · 2.85 KB
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
############################################################################
#
# Copyright (c) 2012 - 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.
#
############################################################################
temp=`ls WORKING_* 2>/dev/null`
res=$?
if [ "$res" == "2" ]
then
echo "No working folder found!"
exit 0
else
cd WORKING_*
fi
if [ ! -d META-INF/com/google/android ]
then
echo "No META-INF/com/google/android folder found, creating it."
mkdir -p META-INF/com/google/android
echo
fi
cd META-INF/com/google/android
if [ -e update-script ]
then
echo "Found update-script"
cd ../../../../..
else
if [ -e updater-script ]
then
cd ../../../../..
echo
echo "======================================================="
echo
echo "Found an updater-script but not an update-script. For"
echo "compatibility with the kitchen scripts, only update-"
echo "scripts are used in the kitchen (see the kitchen's FAQ"
echo "at xda-developers.com for a detailed explanation)."
echo
echo "The kitchen will attempt to convert your updater-script"
echo "into an update-script file using the old (or similar)"
echo "syntax of an update-script, which makes it easier for"
echo "the kitchen to make changes for different devices. When"
echo "the ROM is built, it will be converted back."
echo
echo "WARNING:"
echo "If you are using a custom ROM (ZIP) that was made"
echo "without the kitchen, then the conversion may not be"
echo "100%. The kitchen will make a backup of this file"
echo "as META-INF/com/google/android/updater-script.orig."
echo
echo "Choose an option number:"
echo
echo " 1 = Convert it to update-script (Amend format)"
echo " 2 = Do nothing, keep updater-script (Edify format)"
echo
echo
echo -n "? (default=1) "
read enter_option
if [ "$enter_option" != "2" ]
then
scripts/convert_updater_script no_help
scripts/fix_update_script
else
echo
echo "NOTE: You can build or de-odex your ROM, but most other"
echo "options will not work. You can choose to convert your"
echo "updater-script later from the Advanced Options menu."
echo
exit 1
fi
else
cd ../../../../..
echo "Did not find an update-script, creating one."
cd WORKING_*
cp ../tools/update_files/update-script META-INF/com/google/android/
cd ..
scripts/fix_update_script
scripts/fix_update_script_with_features
cd WORKING_*
bb=`find system -name busybox`
cd ..
if [ "$bb" != "" ]
then
scripts/add_busybox_to_update_script override
fi
echo
fi
fi