forked from dsixda/Android-Kitchen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchoose_single_deodex
More file actions
executable file
·88 lines (62 loc) · 1.56 KB
/
choose_single_deodex
File metadata and controls
executable file
·88 lines (62 loc) · 1.56 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
############################################################################
#
# 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.
#
############################################################################
clear
echo
api_level=`scripts/get_api_level`
cd WORKING_*
grep_cmd=`find . | grep \\.odex$ | sort -f`
if [ "$grep_cmd" == "" ]
then
echo "Error: No files found!"
cd ..
scripts/press_enter
exit 0
fi
count=0
rm -f ../temp.list
echo >> ../temp.list
echo "All ODEX files:" >> ../temp.list
echo >> ../temp.list
for filename in $grep_cmd
do
count=$(($count+1))
# Store file names in an array
file_array[$count]=$filename
echo " ($count) $filename" >> ../temp.list
done
more ../temp.list
rm -f ../temp.list
echo
echo -n "Enter file number (0 = cancel): "
read enterNumber
if [ "$enterNumber" == "0" ]
then
cd ..
exit 0
# Verify input is a number
elif [ "`echo $enterNumber | sed 's/[0-9]*//'`" == "" ]
then
file_chosen=${file_array[$enterNumber]}
if [ "$file_chosen" == "" ]
then
cd ..
exit 0
fi
cd ..
version=`scripts/get_smali_version`
cd WORKING_*
cp -f ../tools/deodex_files/baksmali-$version.jar baksmali.jar
cp -f ../tools/deodex_files/smali-$version.jar smali.jar
../scripts/do_deodex_file $api_level $file_chosen system/framework
result=$?
rm -f *smali.jar
fi
cd ..
scripts/press_enter