├── .gitattributes
├── .gitignore
├── README
├── docs
└── donate.html
├── make_key.sh
├── other
├── 7za
├── aaparser
├── aapt
├── adb
├── apktool
├── apktool.jar
├── baksmali.jar
├── dex2jar
│ ├── dex2jar
│ └── lib
│ │ ├── asm-LICENSE.txt
│ │ ├── asm-all-3.3.1.jar
│ │ ├── commons-cli-1.2.jar
│ │ ├── commons-io-LICENSE.txt
│ │ ├── commons-io-NOTICE.txt
│ │ ├── commons-lite-1.10.jar
│ │ ├── dex-ir-1.7.jar
│ │ ├── dex-reader-1.10.jar
│ │ ├── dex-tools-0.0.0.5.jar
│ │ ├── dex-translator-0.0.9.9.jar
│ │ ├── dx-NOTICE
│ │ ├── dx.jar
│ │ ├── jasmin-p2.5.jar
│ │ ├── license-jasmin.txt
│ │ └── p-rename-1.1.jar
├── jd-gui
├── jd-view
├── optipng
├── perm
├── signapk.jar
├── smali.jar
├── template.zip
├── testkey.pk8
└── testkey.x509.pem
├── script.sh
└── setup.sh
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #################
2 | ## Eclipse
3 | #################
4 |
5 | *.pydevproject
6 | .project
7 | .metadata
8 | bin/
9 | tmp/
10 | *.tmp
11 | *.bak
12 | *.swp
13 | *~.nib
14 | local.properties
15 | .classpath
16 | .settings/
17 | .loadpath
18 |
19 | # External tool builders
20 | .externalToolBuilders/
21 |
22 | # Locally stored "Eclipse launch configurations"
23 | *.launch
24 |
25 | # CDT-specific
26 | .cproject
27 |
28 | # PDT-specific
29 | .buildpath
30 |
31 |
32 | #################
33 | ## Visual Studio
34 | #################
35 |
36 | ## Ignore Visual Studio temporary files, build results, and
37 | ## files generated by popular Visual Studio add-ons.
38 |
39 | # User-specific files
40 | *.suo
41 | *.user
42 | *.sln.docstates
43 |
44 | # Build results
45 |
46 | [Dd]ebug/
47 | [Rr]elease/
48 | x64/
49 | build/
50 | [Bb]in/
51 | [Oo]bj/
52 |
53 | # MSTest test Results
54 | [Tt]est[Rr]esult*/
55 | [Bb]uild[Ll]og.*
56 |
57 | *_i.c
58 | *_p.c
59 | *.ilk
60 | *.meta
61 | *.obj
62 | *.pch
63 | *.pdb
64 | *.pgc
65 | *.pgd
66 | *.rsp
67 | *.sbr
68 | *.tlb
69 | *.tli
70 | *.tlh
71 | *.tmp
72 | *.tmp_proj
73 | *.log
74 | *.vspscc
75 | *.vssscc
76 | .builds
77 | *.pidb
78 | *.log
79 | *.scc
80 |
81 | # Visual C++ cache files
82 | ipch/
83 | *.aps
84 | *.ncb
85 | *.opensdf
86 | *.sdf
87 | *.cachefile
88 |
89 | # Visual Studio profiler
90 | *.psess
91 | *.vsp
92 | *.vspx
93 |
94 | # Guidance Automation Toolkit
95 | *.gpState
96 |
97 | # ReSharper is a .NET coding add-in
98 | _ReSharper*/
99 | *.[Rr]e[Ss]harper
100 |
101 | # TeamCity is a build add-in
102 | _TeamCity*
103 |
104 | # DotCover is a Code Coverage Tool
105 | *.dotCover
106 |
107 | # NCrunch
108 | *.ncrunch*
109 | .*crunch*.local.xml
110 |
111 | # Installshield output folder
112 | [Ee]xpress/
113 |
114 | # DocProject is a documentation generator add-in
115 | DocProject/buildhelp/
116 | DocProject/Help/*.HxT
117 | DocProject/Help/*.HxC
118 | DocProject/Help/*.hhc
119 | DocProject/Help/*.hhk
120 | DocProject/Help/*.hhp
121 | DocProject/Help/Html2
122 | DocProject/Help/html
123 |
124 | # Click-Once directory
125 | publish/
126 |
127 | # Publish Web Output
128 | *.Publish.xml
129 | *.pubxml
130 | *.publishproj
131 |
132 | # NuGet Packages Directory
133 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line
134 | #packages/
135 |
136 | # Windows Azure Build Output
137 | csx
138 | *.build.csdef
139 |
140 | # Windows Store app package directory
141 | AppPackages/
142 |
143 | # Others
144 | sql/
145 | *.Cache
146 | ClientBin/
147 | [Ss]tyle[Cc]op.*
148 | ~$*
149 | *~
150 | *.dbmdl
151 | *.[Pp]ublish.xml
152 | *.pfx
153 | *.publishsettings
154 |
155 | # RIA/Silverlight projects
156 | Generated_Code/
157 |
158 | # Backup & report files from converting an old project file to a newer
159 | # Visual Studio version. Backup files are not needed, because we have git ;-)
160 | _UpgradeReport_Files/
161 | Backup*/
162 | UpgradeLog*.XML
163 | UpgradeLog*.htm
164 |
165 | # SQL Server files
166 | App_Data/*.mdf
167 | App_Data/*.ldf
168 |
169 | #############
170 | ## Windows detritus
171 | #############
172 |
173 | # Windows image file caches
174 | Thumbs.db
175 | ehthumbs.db
176 |
177 | # Folder config file
178 | Desktop.ini
179 |
180 | # Recycle Bin used on file shares
181 | $RECYCLE.BIN/
182 |
183 | # Mac crap
184 | .DS_Store
185 |
186 |
187 | #############
188 | ## Python
189 | #############
190 |
191 | *.py[cod]
192 |
193 | # Packages
194 | *.egg
195 | *.egg-info
196 | dist/
197 | build/
198 | eggs/
199 | parts/
200 | var/
201 | sdist/
202 | develop-eggs/
203 | .installed.cfg
204 |
205 | # Installer logs
206 | pip-log.txt
207 |
208 | # Unit test / coverage reports
209 | .coverage
210 | .tox
211 |
212 | #Translations
213 | *.mo
214 |
215 | #Mr Developer
216 | .mr.developer.cfg
217 |
218 | #############
219 | ## Python
220 | #############
221 |
222 | script_OLD.sh
223 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | I am currently working on a major update to the apk manager application as well and changing the name to APK Multi-Tool with some new added features and also to fix some issues with some code errors.
2 |
3 | I am also changing a lot of the features as well since a lot of the code has been outdated for a while.
4 | I have updated all the files and modified Apk manager's Scripts to fix many user reported bugs from Daneshm90 apk manager which he had written a simple script to ease the process of editing apks. Got a lot of downloads so thought its in demand
5 | Whether you're doing basic image editing or editing the smali or xml files, on average u have to use (Brut.all or JF's smali/baksmali) awesome tool to extract the apk, edit it, then sign the apk and then adb push/install it. This process is quite tiresome if you are testing a method that needs fine tweaking.
6 | This script should make the process a LOT smoother.
7 | Theres an option of compiling/signing/installing all in one step
8 |
9 | Thanks:
10 | Goes to Daneshm90 the Original Writer of APK Manager
11 | Goes to Brut.all for his awesome tool.
12 | Goes to JF for ofcourse, smali/baksmali
13 |
14 |
15 | Features:
16 | - Added framework dependent decompiling (For non propietary rom apks). (Option 10). Checks whether the dependee apk u selected is correct.
17 | - Allows multiple projects to be modified, switch to and from.
18 | - Allows to modify system apk's using apktool but ensures maximum compatibility in terms of signature / manifest.xml
19 | - Batch optimize apk (Zipalign,optipng,or both)
20 | - Batch Ogg optimization
21 | - Batch install apk from script (option 16)
22 | - Compression level selector (monitor status above menu)
23 | - Error detection. Checks if error occurred anytime u perform a task, and reports it
24 | - Extract, Zip apk's.
25 | - Incorporates brut.all's apktool
26 | - Improved syntax of questions/answers
27 | - Logging on/off has been removed. Instead a log.txt is created which logs the activities of the script organized using time/date headers
28 | - Optimize pngs (ignores .9.pngs)
29 | - Pull apk from phone into modding environment.
30 | - Push to specific location on phone
31 | - Quick sign an apk (Batch mode supported)
32 | - Read log (Option 21)
33 | - Sign apks
34 | - Supports batch installation, so if u drag multiple apks into the script (not while its running) it will install them all for u. U can ofcourse drag a single apk as well
35 | - User can change the max java heap size (only use if certain large apks get stuck when decompiling/compiling apks) (Option 16)
36 | - U can now set this script as ur default application for apks. When u do, if u double click any apk it will install it for u.
37 | - Zipalign apks
38 | - Much Much More.
39 |
40 |
41 | Requirements:
42 | Java 1.7
43 | Adb
44 |
45 |
46 | Installing APK Multi-Tool Itself
47 | Instructions (Linux):
48 | - Create a folder in your sdk called "APK-Multi-Tool" and put the contents of the extracted APK-Multi-Tool into it or Rename the extracted APK-Multi-Tool folder to just APK-Multi-Tool and put it into the sdk folder.
49 | - Go to the the "sdk/APK-Multi-Tool" folder and rename "Script.sh" to "script.sh".
50 | - Go into the "other" folder, right click on one executable file at a time, select properties, go to "permissions" in the new window and check the "allow file to be run as a program" box (do this with all the executables/.exe's).
51 | - Open a terminal in the APK-Multi-Tool folder (or type in terminal: cd "PATH TO THE script.sh"). Type in:
52 | chmod 755 script.sh
53 | - chmod 755 all files inside other folder. (thanks for the tip bkmo )
54 | - Install "sox": Open the software center of the linux service and searched for sox. Once installed you will have SOX working
55 | - To add the path to your folder open up a terminal and type in:
56 | sudo su
57 | PATH=$PATH:/THE PATH TO YOUR "SCRIPT.SH"
58 | (for me this looks like the following)
59 | PATH=$PATH:/home/username/sdk/APK-Multi-Tool
60 | - Export PATH:Open up a terminal in the APK-Multi-Tool folder (or type in terminal: cd "PATH TO THE script.sh") and type in:
61 | export PATH={PATH}:/PATH TO Your SDK/sdk/platform-tools/adb
62 | (for me this looks like the following)
63 | export PATH={PATH}:/home/username/sdk/platform-tools
64 | ("username" is the user name that appears on your computer).
65 | - Now open a terminal in the APK-Multi-Tool folder (or type in terminal: cd "PATH TO THE script.sh") and type in:
66 | ./script.sh
67 | - You should now have a running APK-Multi-Tool.
68 |
69 |
70 | Instructions (Linux):
71 | - Place apk in appropriate folder (Any filename will work, if running for first time folders will not be there, you must run and then the folders will be created)
72 | - Open terminal in the APK-Multi-Tool folder (or type in terminal: cd "PATH TO THE script.sh")
73 | - Run script by typing:
74 | ./script.sh
75 | - Minimize the script
76 | - Edit files inside the out folder
77 | - Maximize the script
78 |
79 | - Note: .jar files need to be renamed to .apk, then put in modding folder
80 |
81 | Got problems ?
82 |
83 | 1. Make sure your path has no spaces
84 | 2. Your filename has no wierd characters
85 | 3. Java/adb are in your path
86 | 4. It's not a proprietary rom's apk (aka Sense,Motorola,Samsung) (If u are, then use option 11 and drag the required framework, eg com.htc.resources, twframework-res...etc)
87 | 5. It's not a themed apk (if it is, expect .9 png errors, use as close to stock as possible)
88 | 6. Look at the log to know whats happening
89 | 7. If all else fails, post as much info as possible and we will try to assist you.
90 |
--------------------------------------------------------------------------------
/docs/donate.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | APK Multi-Tools
4 |
16 |
17 |
18 |
19 |
20 | Welcome to APK Multi-Tool
Forumly known as APK Manager
21 |
22 |
23 |
24 |
32 |
35 | Since the Creation of APK Multi-Tool There has been Over 5 Million downloads and I have not gotten a single Donation for my hard work as one person.
Right now I Am having realy bad money problems and is in danger of lossing my house right now.
Please click the donate buttom below and donate something if you feel to do so as a little will go a long ways and It will help me know and also give me the drive to improve the applicaiton and help out more with investing more time in fixing bugs with the applcation as I Am giving this away free of charge.
There has been countless hours invested into this project and I feel burnt out and I hate to sound like I Am begging for donations and I do not believe that everyone SHOULD DONATE. I just Feel that a small thank you in Money Form will go a long ways as I need a New WINDOWS MACHINE as well as a new LINUX BOX for futher Developement as my wife tends to take the laptop to work with her so I Am unable to do much work on the project as I have to talk her into leaving the computer at times so that I can fix bugs as well as repair other issues that are reported.
36 |
44 |
45 |
--------------------------------------------------------------------------------
/make_key.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [ ! -f $(which openssl) ]; then
4 | echo "You need openssl to do this"
5 | exit
6 | fi
7 |
8 | if [ -z $1 ]; then
9 | echo "Usage: $0 "
10 | echo ""
11 | echo "Will generate .pem .pk8 .x509.pem"
12 | exit
13 | fi
14 | openssl genrsa -3 -out $1.pem 2048
15 | openssl req -new -x509 -key $1.pem -out $1.x509.pem -days 10000 \
16 | -subj "/C=TW/ST=Taiwan/L=Taipei/O=APK Repacker/OU=APKRP/CN=email@mail.mail"
17 | openssl pkcs8 -in $1.pem -topk8 -outform DER -out $1.pk8 -nocrypt
18 |
19 | #echo "Please enter the password for this key:"
20 | #openssl pkcs8 -in $1.pem -topk8 -outform DER -out $1.pk8 -passout stdin
21 |
--------------------------------------------------------------------------------
/other/7za:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/7za
--------------------------------------------------------------------------------
/other/aaparser:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | #
3 | # APK Parser for extracting launchable-activity & package name from APKs
4 | # version 1.0
5 | #
6 |
7 | if [[ -n $1 ]]; then
8 | checkParameter=$1
9 | ERROR=0
10 | if [[ "${checkParameter:0:1}" == "-" ]]; then
11 | optn=$1
12 | if [[ -n $2 ]]; then
13 | APK_FILE=$2
14 | else
15 | ERROR=1
16 | fi
17 | else
18 | APK_FILE=$1
19 | if [[ -n $2 ]]; then
20 | optn=$2
21 | fi
22 | fi
23 | if [[ -f $APK_FILE ]]; then
24 | appPackage=$(aapt d badging "$APK_FILE" | grep "package: name=" | cut -d "'" -f2)
25 | if [[ $appPackage != "" ]]; then
26 | appActivity=$(aapt d badging "$APK_FILE" | grep "launchable-activity: name=" | cut -d "'" -f2)
27 | if [[ -z $appActivity ]]; then
28 | appActivity=""
29 | fi
30 | else
31 | ERROR=3
32 | fi
33 | else
34 | if [[ $1 == "--help" ]]; then
35 | ERROR=4
36 | else
37 | ERROR=2
38 | fi
39 | fi
40 | # Parameter Parsing
41 | limit=${#optn}
42 | cnt=0
43 | while [[ cnt -lt $limit ]]; do
44 | case "${optn:$cnt:1}" in
45 | *i* ) packInfo=1 ;;
46 | *p* ) additionalInfo=1 ;;
47 | *l* ) packNameLower=1 ;;
48 | *m* ) singleLine=1 ;;
49 | esac
50 | cnt=$((cnt+1))
51 | done
52 | else
53 | ERROR=1
54 | fi
55 |
56 | if [[ $ERROR == 1 || $ERROR == 4 ]]; then
57 | echo "APK Parser v1.0"
58 | if [[ $ERROR == 1 ]]; then
59 | echo "Wrong usage."
60 | fi
61 | echo
62 | echo "Usage:"
63 | echo " aaparser [-p|l|c] FILE"
64 | echo " Extract package name & launchable-activity from FILE."
65 | echo
66 | echo " FILE must be an APK."
67 | echo
68 | echo " -p Print an additional Content Info (PackageName/LaunchableActivity)"
69 | echo " -l Show Package Name in lowercase and in underscore domain separation"
70 | echo " -m Single line output (PackageName/LaunchableActivity)"
71 | echo " (Overrides other parameters)"
72 | echo " -i Show package information"
73 | echo " (com.example.app format)"
74 | echo
75 | echo " --help Show this text."
76 | echo
77 | fi
78 |
79 | if [[ $ERROR == 2 ]]; then
80 | echo "ERROR: $1 is not a valid APK."
81 | echo
82 | fi
83 |
84 | if [[ $ERROR == 3 ]]; then
85 | echo
86 | fi
87 |
88 | if [[ $ERROR == 0 ]]; then
89 | if [[ $singleLine == 1 ]]; then
90 | for activitey in $appActivity
91 | do
92 | echo "${appPackage}/${activitey}"
93 | done
94 | else
95 | echo "Package Name:"
96 | echo "$appPackage"
97 | if [[ "$packNameLower" == "1" ]]; then
98 | fileName="${appPackage//"."/_}"
99 | echo "${fileName,,}"
100 | fi
101 | if [[ "$packInfo" != "1" ]]; then
102 | echo
103 | echo "Launchable Activities:"
104 | echo "$appActivity"
105 | echo
106 | if [[ "$additionalInfo" == "1" ]]; then
107 | echo "Content Info:"
108 | for activitey in $appActivity
109 | do
110 | echo "${appPackage}/${activitey}"
111 | done
112 | echo
113 | fi
114 | fi
115 | fi # END $singleLine == 1
116 | fi # END $ERROR == 0
117 |
118 | exit
119 |
--------------------------------------------------------------------------------
/other/aapt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/aapt
--------------------------------------------------------------------------------
/other/adb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/adb
--------------------------------------------------------------------------------
/other/apktool:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (C) 2007 The Android Open Source Project
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This script is a wrapper for smali.jar, so you can simply call "smali",
18 | # instead of java -jar smali.jar. It is heavily based on the "dx" script
19 | # from the Android SDK
20 |
21 | # Set up prog to be the path of this script, including following symlinks,
22 | # and set up progdir to be the fully-qualified pathname of its directory.
23 | prog="$0"
24 | while [ -h "${prog}" ]; do
25 | newProg=`/bin/ls -ld "${prog}"`
26 | echo ${newProg}
27 |
28 |
29 | newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
30 | if expr "x${newProg}" : 'x/' >/dev/null; then
31 | prog="${newProg}"
32 | else
33 | progdir=`dirname "${prog}"`
34 | prog="${progdir}/${newProg}"
35 | fi
36 | done
37 | oldwd=`pwd`
38 | progdir=`dirname "${prog}"`
39 | cd "${progdir}"
40 | progdir=`pwd`
41 | prog="${progdir}"/`basename "${prog}"`
42 | cd "${oldwd}"
43 |
44 |
45 | jarfile=apktool.jar
46 | libdir="$progdir"
47 | if [ ! -r "$libdir/$jarfile" ]
48 | then
49 | echo `basename "$prog"`": can't find $jarfile"
50 | exit 1
51 | fi
52 |
53 | javaOpts=""
54 |
55 | # If you want DX to have more memory when executing, uncomment the following
56 | # line and adjust the value accordingly. Use "java -X" for a list of options
57 | # you can pass here.
58 | #
59 | javaOpts="-Xmx256M"
60 |
61 | # Alternatively, this will extract any parameter "-Jxxx" from the command line
62 | # and pass them to Java (instead of to dx). This makes it possible for you to
63 | # add a command-line parameter such as "-JXmx256M" in your ant scripts, for
64 | # example.
65 | while expr "x$1" : 'x-J' >/dev/null; do
66 | opt=`expr "$1" : '-J\(.*\)'`
67 | javaOpts="${javaOpts} -${opt}"
68 | shift
69 | done
70 |
71 | if [ "$OSTYPE" = "cygwin" ] ; then
72 | jarpath=`cygpath -w "$libdir/$jarfile"`
73 | else
74 | jarpath="$libdir/$jarfile"
75 | fi
76 |
77 | # add current location to path for aapt
78 | PATH=$PATH:`pwd`;
79 | export PATH;
80 | exec java $javaOpts -jar "$jarpath" "$@"
--------------------------------------------------------------------------------
/other/apktool.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/apktool.jar
--------------------------------------------------------------------------------
/other/baksmali.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/baksmali.jar
--------------------------------------------------------------------------------
/other/dex2jar/dex2jar:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # dex2jar - Tools to work with android .dex and java .class files
5 | # Copyright (c) 2009-2012 Panxiaobo
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing, software
14 | # distributed under the License is distributed on an "AS IS" BASIS,
15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | # See the License for the specific language governing permissions and
17 | # limitations under the License.
18 | #
19 |
20 | # copy from $Tomcat/bin/startup.sh
21 | # resolve links - $0 may be a softlink
22 | PRG="$0"
23 | while [ -h "$PRG" ] ; do
24 | ls=`ls -ld "$PRG"`
25 | link=`expr "$ls" : '.*-> \(.*\)$'`
26 | if expr "$link" : '/.*' > /dev/null; then
27 | PRG="$link"
28 | else
29 | PRG=`dirname "$PRG"`/"$link"
30 | fi
31 | done
32 | PRGDIR=`dirname "$PRG"`
33 | #
34 |
35 | _classpath="."
36 | for k in "$PRGDIR"/lib/*.jar
37 | do
38 | _classpath="${_classpath}:${k}"
39 | done
40 | java -Xms512m -Xmx1024m -classpath "${_classpath}" "com.googlecode.dex2jar.tools.Dex2jarCmd" $@
41 |
--------------------------------------------------------------------------------
/other/dex2jar/lib/asm-LICENSE.txt:
--------------------------------------------------------------------------------
1 |
2 | ASM: a very small and fast Java bytecode manipulation framework
3 | Copyright (c) 2000-2005 INRIA, France Telecom
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions
8 | are met:
9 | 1. Redistributions of source code must retain the above copyright
10 | notice, this list of conditions and the following disclaimer.
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in the
13 | documentation and/or other materials provided with the distribution.
14 | 3. Neither the name of the copyright holders nor the names of its
15 | contributors may be used to endorse or promote products derived from
16 | this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 | THE POSSIBILITY OF SUCH DAMAGE.
29 |
--------------------------------------------------------------------------------
/other/dex2jar/lib/asm-all-3.3.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/dex2jar/lib/asm-all-3.3.1.jar
--------------------------------------------------------------------------------
/other/dex2jar/lib/commons-cli-1.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/dex2jar/lib/commons-cli-1.2.jar
--------------------------------------------------------------------------------
/other/dex2jar/lib/commons-io-LICENSE.txt:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
204 |
--------------------------------------------------------------------------------
/other/dex2jar/lib/commons-io-NOTICE.txt:
--------------------------------------------------------------------------------
1 | Apache Commons IO
2 | Copyright 2002-2010 The Apache Software Foundation
3 |
4 | This product includes software developed by
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 |
--------------------------------------------------------------------------------
/other/dex2jar/lib/commons-lite-1.10.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/dex2jar/lib/commons-lite-1.10.jar
--------------------------------------------------------------------------------
/other/dex2jar/lib/dex-ir-1.7.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/dex2jar/lib/dex-ir-1.7.jar
--------------------------------------------------------------------------------
/other/dex2jar/lib/dex-reader-1.10.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/dex2jar/lib/dex-reader-1.10.jar
--------------------------------------------------------------------------------
/other/dex2jar/lib/dex-tools-0.0.0.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/dex2jar/lib/dex-tools-0.0.0.5.jar
--------------------------------------------------------------------------------
/other/dex2jar/lib/dex-translator-0.0.9.9.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/dex2jar/lib/dex-translator-0.0.9.9.jar
--------------------------------------------------------------------------------
/other/dex2jar/lib/dx-NOTICE:
--------------------------------------------------------------------------------
1 |
2 | Copyright (c) 2005-2008, The Android Open Source Project
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 |
7 | Unless required by applicable law or agreed to in writing, software
8 | distributed under the License is distributed on an "AS IS" BASIS,
9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | See the License for the specific language governing permissions and
11 | limitations under the License.
12 |
13 |
14 | Apache License
15 | Version 2.0, January 2004
16 | http://www.apache.org/licenses/
17 |
18 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
19 |
20 | 1. Definitions.
21 |
22 | "License" shall mean the terms and conditions for use, reproduction,
23 | and distribution as defined by Sections 1 through 9 of this document.
24 |
25 | "Licensor" shall mean the copyright owner or entity authorized by
26 | the copyright owner that is granting the License.
27 |
28 | "Legal Entity" shall mean the union of the acting entity and all
29 | other entities that control, are controlled by, or are under common
30 | control with that entity. For the purposes of this definition,
31 | "control" means (i) the power, direct or indirect, to cause the
32 | direction or management of such entity, whether by contract or
33 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
34 | outstanding shares, or (iii) beneficial ownership of such entity.
35 |
36 | "You" (or "Your") shall mean an individual or Legal Entity
37 | exercising permissions granted by this License.
38 |
39 | "Source" form shall mean the preferred form for making modifications,
40 | including but not limited to software source code, documentation
41 | source, and configuration files.
42 |
43 | "Object" form shall mean any form resulting from mechanical
44 | transformation or translation of a Source form, including but
45 | not limited to compiled object code, generated documentation,
46 | and conversions to other media types.
47 |
48 | "Work" shall mean the work of authorship, whether in Source or
49 | Object form, made available under the License, as indicated by a
50 | copyright notice that is included in or attached to the work
51 | (an example is provided in the Appendix below).
52 |
53 | "Derivative Works" shall mean any work, whether in Source or Object
54 | form, that is based on (or derived from) the Work and for which the
55 | editorial revisions, annotations, elaborations, or other modifications
56 | represent, as a whole, an original work of authorship. For the purposes
57 | of this License, Derivative Works shall not include works that remain
58 | separable from, or merely link (or bind by name) to the interfaces of,
59 | the Work and Derivative Works thereof.
60 |
61 | "Contribution" shall mean any work of authorship, including
62 | the original version of the Work and any modifications or additions
63 | to that Work or Derivative Works thereof, that is intentionally
64 | submitted to Licensor for inclusion in the Work by the copyright owner
65 | or by an individual or Legal Entity authorized to submit on behalf of
66 | the copyright owner. For the purposes of this definition, "submitted"
67 | means any form of electronic, verbal, or written communication sent
68 | to the Licensor or its representatives, including but not limited to
69 | communication on electronic mailing lists, source code control systems,
70 | and issue tracking systems that are managed by, or on behalf of, the
71 | Licensor for the purpose of discussing and improving the Work, but
72 | excluding communication that is conspicuously marked or otherwise
73 | designated in writing by the copyright owner as "Not a Contribution."
74 |
75 | "Contributor" shall mean Licensor and any individual or Legal Entity
76 | on behalf of whom a Contribution has been received by Licensor and
77 | subsequently incorporated within the Work.
78 |
79 | 2. Grant of Copyright License. Subject to the terms and conditions of
80 | this License, each Contributor hereby grants to You a perpetual,
81 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
82 | copyright license to reproduce, prepare Derivative Works of,
83 | publicly display, publicly perform, sublicense, and distribute the
84 | Work and such Derivative Works in Source or Object form.
85 |
86 | 3. Grant of Patent License. Subject to the terms and conditions of
87 | this License, each Contributor hereby grants to You a perpetual,
88 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
89 | (except as stated in this section) patent license to make, have made,
90 | use, offer to sell, sell, import, and otherwise transfer the Work,
91 | where such license applies only to those patent claims licensable
92 | by such Contributor that are necessarily infringed by their
93 | Contribution(s) alone or by combination of their Contribution(s)
94 | with the Work to which such Contribution(s) was submitted. If You
95 | institute patent litigation against any entity (including a
96 | cross-claim or counterclaim in a lawsuit) alleging that the Work
97 | or a Contribution incorporated within the Work constitutes direct
98 | or contributory patent infringement, then any patent licenses
99 | granted to You under this License for that Work shall terminate
100 | as of the date such litigation is filed.
101 |
102 | 4. Redistribution. You may reproduce and distribute copies of the
103 | Work or Derivative Works thereof in any medium, with or without
104 | modifications, and in Source or Object form, provided that You
105 | meet the following conditions:
106 |
107 | (a) You must give any other recipients of the Work or
108 | Derivative Works a copy of this License; and
109 |
110 | (b) You must cause any modified files to carry prominent notices
111 | stating that You changed the files; and
112 |
113 | (c) You must retain, in the Source form of any Derivative Works
114 | that You distribute, all copyright, patent, trademark, and
115 | attribution notices from the Source form of the Work,
116 | excluding those notices that do not pertain to any part of
117 | the Derivative Works; and
118 |
119 | (d) If the Work includes a "NOTICE" text file as part of its
120 | distribution, then any Derivative Works that You distribute must
121 | include a readable copy of the attribution notices contained
122 | within such NOTICE file, excluding those notices that do not
123 | pertain to any part of the Derivative Works, in at least one
124 | of the following places: within a NOTICE text file distributed
125 | as part of the Derivative Works; within the Source form or
126 | documentation, if provided along with the Derivative Works; or,
127 | within a display generated by the Derivative Works, if and
128 | wherever such third-party notices normally appear. The contents
129 | of the NOTICE file are for informational purposes only and
130 | do not modify the License. You may add Your own attribution
131 | notices within Derivative Works that You distribute, alongside
132 | or as an addendum to the NOTICE text from the Work, provided
133 | that such additional attribution notices cannot be construed
134 | as modifying the License.
135 |
136 | You may add Your own copyright statement to Your modifications and
137 | may provide additional or different license terms and conditions
138 | for use, reproduction, or distribution of Your modifications, or
139 | for any such Derivative Works as a whole, provided Your use,
140 | reproduction, and distribution of the Work otherwise complies with
141 | the conditions stated in this License.
142 |
143 | 5. Submission of Contributions. Unless You explicitly state otherwise,
144 | any Contribution intentionally submitted for inclusion in the Work
145 | by You to the Licensor shall be under the terms and conditions of
146 | this License, without any additional terms or conditions.
147 | Notwithstanding the above, nothing herein shall supersede or modify
148 | the terms of any separate license agreement you may have executed
149 | with Licensor regarding such Contributions.
150 |
151 | 6. Trademarks. This License does not grant permission to use the trade
152 | names, trademarks, service marks, or product names of the Licensor,
153 | except as required for reasonable and customary use in describing the
154 | origin of the Work and reproducing the content of the NOTICE file.
155 |
156 | 7. Disclaimer of Warranty. Unless required by applicable law or
157 | agreed to in writing, Licensor provides the Work (and each
158 | Contributor provides its Contributions) on an "AS IS" BASIS,
159 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
160 | implied, including, without limitation, any warranties or conditions
161 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
162 | PARTICULAR PURPOSE. You are solely responsible for determining the
163 | appropriateness of using or redistributing the Work and assume any
164 | risks associated with Your exercise of permissions under this License.
165 |
166 | 8. Limitation of Liability. In no event and under no legal theory,
167 | whether in tort (including negligence), contract, or otherwise,
168 | unless required by applicable law (such as deliberate and grossly
169 | negligent acts) or agreed to in writing, shall any Contributor be
170 | liable to You for damages, including any direct, indirect, special,
171 | incidental, or consequential damages of any character arising as a
172 | result of this License or out of the use or inability to use the
173 | Work (including but not limited to damages for loss of goodwill,
174 | work stoppage, computer failure or malfunction, or any and all
175 | other commercial damages or losses), even if such Contributor
176 | has been advised of the possibility of such damages.
177 |
178 | 9. Accepting Warranty or Additional Liability. While redistributing
179 | the Work or Derivative Works thereof, You may choose to offer,
180 | and charge a fee for, acceptance of support, warranty, indemnity,
181 | or other liability obligations and/or rights consistent with this
182 | License. However, in accepting such obligations, You may act only
183 | on Your own behalf and on Your sole responsibility, not on behalf
184 | of any other Contributor, and only if You agree to indemnify,
185 | defend, and hold each Contributor harmless for any liability
186 | incurred by, or claims asserted against, such Contributor by reason
187 | of your accepting any such warranty or additional liability.
188 |
189 | END OF TERMS AND CONDITIONS
190 |
191 |
--------------------------------------------------------------------------------
/other/dex2jar/lib/dx.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/dex2jar/lib/dx.jar
--------------------------------------------------------------------------------
/other/dex2jar/lib/jasmin-p2.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/dex2jar/lib/jasmin-p2.5.jar
--------------------------------------------------------------------------------
/other/dex2jar/lib/license-jasmin.txt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 1996-2004, Jon Meyer
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without modification, are permitted provided
6 | * that the following conditions are met:
7 | *
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions
9 | * and the following disclaimer.
10 | *
11 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
12 | * and the following disclaimer in the documentation and/or other materials provided with the
13 | * distribution.
14 | *
15 | * Neither the name of the Jon Meyer nor the names of its contributors may be used to
16 | * endorse or promote products derived from this software without specific prior written permission.
17 | *
18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
19 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
21 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
24 | * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 | *
27 | * Jasmin was written by Jon Meyer, www.cybergrain.com
28 | * The Jasmin website is jasmin.sourceforge.net.
29 | */
30 |
--------------------------------------------------------------------------------
/other/dex2jar/lib/p-rename-1.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/dex2jar/lib/p-rename-1.1.jar
--------------------------------------------------------------------------------
/other/jd-gui:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/jd-gui
--------------------------------------------------------------------------------
/other/jd-view:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | pth=$(pwd)
3 | cd "$pth/other/"
4 | nohup "./jd-gui" "$pth/projects/$1.jar" &
5 | clear
6 | sleep 0.05
7 |
--------------------------------------------------------------------------------
/other/optipng:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/optipng
--------------------------------------------------------------------------------
/other/perm:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | echo "Fixing Permissions..."
3 |
4 | chmod 775 ./other/apktool.jar
5 | chmod 775 ./other/signapk.jar
6 | chmod 775 ./other/7za
7 | chmod 775 ./other/aaparser
8 | chmod 775 ./other/aapt
9 | chmod 775 ./other/apktool
10 | chmod 775 ./other/jd-gui
11 | chmod 775 ./other/jd-view
12 | chmod 775 ./other/optipng
13 | chmod 775 ./other/testkey.pk8
14 | chmod 775 ./other/testkey.x509.pem
15 | chmod 664 ./other/template.zip
16 |
17 | chmod 775 ./other/dex2jar/lib
18 | chmod 775 ./other/dex2jar/dex2jar
19 |
20 | chmod 775 ./other/dex2jar/lib/asm-all-3.3.1.jar
21 | chmod 775 ./other/dex2jar/lib/commons-cli-1.2.jar
22 | chmod 775 ./other/dex2jar/lib/commons-lite-1.10.jar
23 | chmod 775 ./other/dex2jar/lib/dex-ir-1.7.jar
24 | chmod 775 ./other/dex2jar/lib/dex-reader-1.10.jar
25 | chmod 775 ./other/dex2jar/lib/dex-tools-0.0.0.5.jar
26 | chmod 775 ./other/dex2jar/lib/dex-translator-0.0.9.9.jar
27 | chmod 775 ./other/dex2jar/lib/dx.jar
28 | chmod 775 ./other/dex2jar/lib/jasmin-p2.5.jar
29 | chmod 775 ./other/dex2jar/lib/p-rename-1.1.jar
30 | chmod 664 ./other/dex2jar/lib/asm-LICENSE.txt
31 | chmod 664 ./other/dex2jar/lib/commons-io-LICENSE.txt
32 | chmod 664 ./other/dex2jar/lib/commons-io-NOTICE.txt
33 | chmod 664 ./other/dex2jar/lib/dx-NOTICE
34 | chmod 664 ./other/dex2jar/lib/license-jasmin.txt
35 |
36 | echo "New File Permissions:"
37 | ls -lR ./*
--------------------------------------------------------------------------------
/other/signapk.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/signapk.jar
--------------------------------------------------------------------------------
/other/smali.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/smali.jar
--------------------------------------------------------------------------------
/other/template.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/template.zip
--------------------------------------------------------------------------------
/other/testkey.pk8:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/APK-Multi-Tool/APK-Multi-Tool-Linux/f37333643f277c2f76fb58759a4e0a8575936dbd/other/testkey.pk8
--------------------------------------------------------------------------------
/other/testkey.x509.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIEqDCCA5CgAwIBAgIJAJNurL4H8gHfMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD
3 | VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4g
4 | VmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UE
5 | AxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe
6 | Fw0wODAyMjkwMTMzNDZaFw0zNTA3MTcwMTMzNDZaMIGUMQswCQYDVQQGEwJVUzET
7 | MBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4G
8 | A1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9p
9 | ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZI
10 | hvcNAQEBBQADggENADCCAQgCggEBANaTGQTexgskse3HYuDZ2CU+Ps1s6x3i/waM
11 | qOi8qM1r03hupwqnbOYOuw+ZNVn/2T53qUPn6D1LZLjk/qLT5lbx4meoG7+yMLV4
12 | wgRDvkxyGLhG9SEVhvA4oU6Jwr44f46+z4/Kw9oe4zDJ6pPQp8PcSvNQIg1QCAcy
13 | 4ICXF+5qBTNZ5qaU7Cyz8oSgpGbIepTYOzEJOmc3Li9kEsBubULxWBjf/gOBzAzU
14 | RNps3cO4JFgZSAGzJWQTT7/emMkod0jb9WdqVA2BVMi7yge54kdVMxHEa5r3b97s
15 | zI5p58ii0I54JiCUP5lyfTwE/nKZHZnfm644oLIXf6MdW2r+6R8CAQOjgfwwgfkw
16 | HQYDVR0OBBYEFEhZAFY9JyxGrhGGBaR0GawJyowRMIHJBgNVHSMEgcEwgb6AFEhZ
17 | AFY9JyxGrhGGBaR0GawJyowRoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UE
18 | CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMH
19 | QW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAG
20 | CSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJAJNurL4H8gHfMAwGA1Ud
21 | EwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAHqvlozrUMRBBVEY0NqrrwFbinZa
22 | J6cVosK0TyIUFf/azgMJWr+kLfcHCHJsIGnlw27drgQAvilFLAhLwn62oX6snb4Y
23 | LCBOsVMR9FXYJLZW2+TcIkCRLXWG/oiVHQGo/rWuWkJgU134NDEFJCJGjDbiLCpe
24 | +ZTWHdcwauTJ9pUbo8EvHRkU3cYfGmLaLfgn9gP+pWA7LFQNvXwBnDa6sppCccEX
25 | 31I828XzgXpJ4O+mDL1/dBd+ek8ZPUP0IgdyZm5MTYPhvVqGCHzzTy3sIeJFymwr
26 | sBbmg2OAUNLEMO6nwmocSdN2ClirfxqCzJOLSDE4QyS9BAH6EhY6UFcOaE0=
27 | -----END CERTIFICATE-----
28 |
--------------------------------------------------------------------------------
/script.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | # Apk Multi-Tools 1.0 (C) 2012 by Gerald Wayne Baggett JR {Raziel23x}
3 | # Ported to Linux by farmatito 2010
4 | # Changelog for linux version:
5 | # v 0.1 Initial version
6 | current=`pwd`
7 |
8 | # 0) Pull APK
9 | ap () {
10 | if [[ $(adb devices | grep "device" -c) -gt "1" ]] ; then
11 | echo "Enter APK remote file location:"
12 | echo "i.e. /system/app/launcher.apk"
13 | echo
14 | printf "Input: "
15 | read INPUT
16 | APK_FILE=`basename $INPUT`
17 | adb pull "$INPUT" "place-apk-here-for-modding/$APK_FILE"
18 | if [ "$?" -ne "0" ] ; then
19 | echo "Error: while pulling $APK_FILE"
20 | fi
21 | if [[ -f "place-apk-here-for-modding/$APK_FILE" ]] ; then
22 | echo "$APK_FILE copied."
23 | fileName=${APK_FILE%*.apk}
24 | fi
25 | else
26 | echo ; echo "Error. No device connected."
27 | fi
28 | }
29 |
30 | # 1) Extract APK
31 | ex () {
32 | echo
33 | if [[ -n $fileName ]] ; then
34 | cd other
35 | rm -f "../place-apk-here-for-modding/$fileName-signed.apk"
36 | rm -f "../place-apk-here-for-modding/$fileName-unsigned.apk"
37 | rm -rf "../projects/$fileName.apk"
38 | if [ ! -d "../projects/$fileName.apk" ] ; then
39 | mkdir "../projects/$fileName.apk"
40 | fi
41 | clear
42 | # Must be -o"../projects" and not -o "../projects"
43 | 7za x -o"../projects/$fileName.apk" ../place-apk-here-for-modding/$fileName.apk
44 | cd ..
45 | else
46 | actvfile ; retval=$? ; if [[ $retval == 0 ]]; then ex ; fi
47 | fi
48 | }
49 |
50 | # 2) Optimize APK PNGs
51 | opt () {
52 | echo
53 | if [[ -n $fileName || -f ../projects/$fileName.apk/res ]] ; then
54 | cd other
55 | find "../projects/$fileName.apk/res" -name *.png | while read PNG_FILE ;
56 | do
57 | if [ `echo "$PNG_FILE" | grep -c "\.9\.png$"` -eq 0 ] ; then
58 | optipng -o99 "$PNG_FILE"
59 | fi
60 | done
61 | clear
62 | echo
63 | echo "PNGs optimized."
64 | cd ..
65 | else
66 | echo "Error. Check active APK file and if APK is extracted."
67 | fi
68 | }
69 |
70 | pack () {
71 | cd other
72 | 7za a -tzip "../place-apk-here-for-modding/$fileName-unsigned.apk" ../projects/$fileName.apk/* -mx"$clvl"
73 | cd ..
74 | }
75 |
76 | oa () {
77 | rm -rf "projects/$fileName.apk/META-INF"
78 | pack
79 | }
80 |
81 | # 3) Zip APK
82 | zip () {
83 | if [[ -n $fileName ]] ; then
84 | echo "Enter APK type:"
85 | echo "---------------"
86 | PS3=$(echo ; echo "Enter selection: ")
87 | select mode in "System APK" "Regular APK" ; do
88 | case "$mode" in
89 | "System APK" ) pack ; break ;;
90 | "Regular APK" ) oa ; break ;;
91 | *) echo ; echo "Invalid input." ;;
92 | esac
93 | done
94 | clear ; echo ; echo "File: $fileName.apk zipped."
95 | else
96 | actvfile ; retval=$? ; if [[ $retval == 0 ]]; then zip ; fi
97 | fi
98 | }
99 |
100 | # 4) Sign APK
101 | si () {
102 | echo
103 | if [[ -n $fileName ]] ; then
104 | cd other
105 | INFILE="../place-apk-here-for-modding/$fileName-unsigned.apk"
106 | projectsFILE="../place-apk-here-for-modding/$fileName-signed.apk"
107 | if [ -e "$INFILE" ] ; then
108 | #echo "java -jar signapk.jar -w testkey.x509.pem testkey.pk8 $INFILE $projectsFILE"
109 | java -jar signapk.jar -w testkey.x509.pem testkey.pk8 "$INFILE" "$projectsFILE"
110 | if [ "x$?" = "x0" ] ; then
111 | rm -f "$INFILE"
112 | fi
113 | echo "Done."
114 | else
115 | echo "Warning: cannot find file '$INFILE'"
116 | fi
117 | cd ..
118 | else
119 | actvfile ; retval=$? ; if [[ $retval == 0 ]]; then si ; fi
120 | fi
121 | }
122 |
123 | # 5) Zipalign
124 | zipa () {
125 | echo
126 | if [[ -n $fileName ]] ; then
127 | for STRING in "unsigned" "signed"
128 | do
129 | if [ -f "place-apk-here-for-modding/$fileName-$STRING.apk" ] ; then
130 | zipalign -fv 4 "place-apk-here-for-modding/$fileName-$STRING.apk" "place-apk-here-for-modding/$fileName-$STRING-aligned.apk"
131 | if [ "x$?" = "x0" ] ; then
132 | mv -f "place-apk-here-for-modding/$fileName-$STRING-aligned.apk" "place-apk-here-for-modding/$fileName-$STRING.apk"
133 | fi
134 | else
135 | echo "Zipalign: Cannot find file 'place-apk-here-for-modding/$fileName-$STRING.apk'"
136 | fi
137 | done
138 | clear ; echo ; echo "Done."
139 | else
140 | actvfile ; retval=$? ; if [[ $retval == 0 ]]; then zipa ; fi
141 | fi
142 | }
143 |
144 | # 6) Install APK
145 | ins () {
146 | clear
147 | echo
148 | if [[ $(adb devices | grep "device" -c) -gt "1" ]] ; then
149 | echo "Install APK: $fileName.apk (y/N)?"
150 | read INPUT
151 | if [ x$INPUT -e "xy" || x$INPUT -e "xY" ] ; then
152 | #echo "adb install -r place-apk-here-for-modding/$fileName-signed.apk"
153 | adb install -r "place-apk-here-for-modding/$fileName-signed.apk"
154 | fi
155 | else
156 | echo "Error. No device connected."
157 | fi
158 | }
159 |
160 | # 7) Zip / Sign / Install APK
161 | alli () {
162 | if [[ -n $fileName ]] && [[ $(adb devices | grep "device" -c) -gt "1" ]] ; then
163 | echo "Enter APK type:"
164 | echo "---------------"
165 | PS3=$(echo ; echo "Enter selection: ")
166 | select mode in "System APK" "Regular APK" ; do
167 | case "$mode" in
168 | "System APK" ) pack ; ins ; break ;;
169 | "Regular APK" ) oa ; pack ; si ; ins ; break ;;
170 | *) echo ; echo "Invalid input." ;;
171 | esac
172 | done
173 | else
174 | echo ; echo "Error. Check active APK file and make sure device is connected."
175 | fi
176 | }
177 |
178 | # 8)
179 | apu () {
180 | if [[ -n $fileName ]] && [[ $(adb devices | grep "device" -c) -gt "1" ]] ; then
181 | echo "Enter remote APK location."
182 | echo "i.e. /system/app/launcher.apk "
183 | echo
184 | printf "Input: "
185 | read INPUT
186 | adb root
187 | adb remount
188 | adb shell cp $INPUT $INPUT.backup
189 | adb push "place-apk-here-for-modding/$fileName-unsigned.apk" "$INPUT"
190 | adb shell chmod 644 $INPUT
191 | else
192 | echo "Error. Check active APK file and make sure device is connected."
193 | fi
194 | }
195 |
196 | # 9)
197 | de () {
198 | if [[ -n $fileName ]] ; then
199 | cd other
200 | rm -f "../place-apk-here-for-modding/$fileName-signed.apk"
201 | rm -f "../place-apk-here-for-modding/$fileName-unsigned.apk"
202 | rm -rf "../projects/$fileName.apk"
203 | java -jar apktool.jar d ../place-apk-here-for-modding/$fileName.apk -o "../projects/$fileName.apk"
204 | cd ..
205 | else
206 | echo
207 | actvfile ; retval=$? ; if [[ $retval == 0 ]]; then de ; fi
208 | fi
209 | }
210 |
211 | # 10)
212 | co () {
213 | cochk
214 | if [[ -n $fileName ]] ; then
215 | cd other
216 | baseAPK=`basename $fileName`
217 | java -jar apktool.jar b "../projects/$fileName.apk" -o "../place-apk-here-for-modding/$fileName-unsigned.apk"
218 | cd ..
219 | else
220 | actvfile ; retval=$? ; if [[ $retval == 0 ]]; then co ; fi
221 | fi
222 | retainorigfiles
223 | }
224 |
225 | cochk () {
226 | echo "Enter APK type:"
227 | echo "---------------"
228 | PS3=$(echo ; echo "Enter selection: ")
229 |
230 | select comptype in "System APK" "Regular APK" ; do
231 | case "$comptype" in
232 | "System APK"|"Regular APK" ) break ;; # valid input.
233 | *) echo ; echo "Invalid input." ;;
234 | esac
235 | done
236 | }
237 |
238 | retainorigfiles () {
239 | echo
240 | if [[ $comptype == 1 ]]; then
241 | echo "Aside from APK signatures, copy unmodified files "
242 | else
243 | printf "Copy unmodified files "
244 | fi
245 | printf "to compiled APK to reduce errors (Y/n)? "
246 | read INPUT
247 | if [[ x$INPUT == "xY" || x$INPUT == "xy" || x$INPUT == "x" ]] ; then
248 | cd other
249 | rm -rf ../keep
250 | 7za x -o"../keep" ../place-apk-here-for-modding/$fileName.apk
251 | if [[ $comptype == 2 ]] ; then
252 | rm -rf ../keep/META-INF
253 | fi
254 | echo
255 | echo "Delete all modified files in the /keep directory."
256 | echo "If you modified an XML file, delete the resources.arsc file."
257 | echo "Press Enter key to continue."
258 | read DUMMY
259 | 7za a -tzip "../place-apk-here-for-modding/$fileName-unsigned.apk" ../keep/* -mx"$clvl" -r
260 | rm -rf ../keep
261 | cd ..
262 | fi
263 | clear
264 | echo
265 | echo "Done"
266 | }
267 |
268 | # 11)
269 | all () {
270 | co
271 | si
272 | ins
273 | }
274 |
275 | # 12)
276 | bopt () {
277 | cd other
278 | mkdir -p "../place-apk-here-to-batch-optimize/original"
279 | find "../place-apk-here-to-batch-optimize" -name *.apk | while read APK_FILE ;
280 | do
281 | echo "Optimizing $APK_FILE"
282 | # Extract
283 | 7za x -o"../place-apk-here-to-batch-optimize/original" "../place-apk-here-to-batch-optimize/$APK_FILE"
284 | # PNG
285 | find "../place-apk-here-to-batch-optimize/original" -name *.png | while read PNG_FILE ;
286 | do
287 | if [ `echo "$PNG_FILE" | grep -c "\.9\.png$"` -eq 0 ] ; then
288 | optipng -o99 "$PNG_FILE"
289 | fi
290 | done
291 | # TODO optimize .ogg files
292 | # Re-compress
293 | 7za a -tzip "../place-apk-here-to-batch-optimize/temp.zip" ../place-apk-here-to-batch-optimize/original/* -mx"$clvl"
294 | FILE=`basename "$APK_FILE"`
295 | DIR=`dirname "$APK_FILE"`
296 | mv -f "../place-apk-here-to-batch-optimize/temp.zip" "$DIR/optimized-$FILE"
297 | rm -rf ../place-apk-here-to-batch-optimize/original/*
298 | done
299 | rm -rf "../place-apk-here-to-batch-optimize/original"
300 | cd ..
301 | }
302 |
303 | # 13)
304 | asi () {
305 | echo
306 | cd other
307 | find "../place-apk-here-for-signing" -name *.apk | while read PLACE-APK-HERE-FOR-SIGNING ;
308 | do
309 | java -jar signapk.jar -w testkey.x509.pem testkey.pk8 $PLACE-APK-HERE-FOR-SIGNING ${PLACE-APK-HERE-FOR-SIGNING%.*}-signed.apk
310 | echo "${PLACE-APK-HERE-FOR-SIGNING%.*}-signed.apk - Done."
311 | done
312 | cd ..
313 | }
314 |
315 | # 14)
316 | ogg () {
317 | cd other
318 | mkdir -p "../place-ogg-here"
319 | find "../place-ogg-here/" -name *.ogg | while read OGG_FILE ;
320 | do
321 | FILE=`basename "$OGG_FILE"`
322 | DIR=`dirname "$OGG_FILE"`
323 | printf "%s" "Optimizing: $FILE"
324 | sox "$OGG_FILE" -C 0 "$DIR/optimized-$FILE"
325 | if [ "x$?" = "x0" ] ; then
326 | printf "\n"
327 | else
328 | printf "...%s\n" "Failed"
329 | fi
330 | done
331 | }
332 |
333 | # 15)
334 | selt () {
335 | cd place-apk-here-for-modding
336 | echo
337 | echo "Listing APK files:"
338 | echo "------------------"
339 | PS3=$(echo ""; echo "Choose APK: ")
340 | fileList=$(find . -type f -name "*.apk")
341 | # Clean up list.
342 | fileList=${fileList/\.\//}
343 |
344 | if [[ -z $fileList ]] ; then
345 | clear
346 | echo ; echo "No APK files found. Please check the place-apk-here-for-modding directory."
347 | return 1
348 | else
349 | select fileName in $fileList; do
350 | if [[ -n "$fileName" ]] ; then
351 | fileName=${fileName%.*}
352 | if [[ $1 == "s1" ]]; then clear ; fi
353 | echo ; echo "Selected: $fileName.apk" ; break
354 | return 0
355 | else
356 | echo ; echo "Error. Wrong input."
357 | return 1
358 | fi
359 | done
360 | fi
361 |
362 |
363 | cd ..
364 | }
365 |
366 | actvfile () {
367 | echo "No active APK file set."
368 | printf "Set active APK file? (Y/n): "
369 | read INPUT
370 | if [[ x$INPUT == "xy" || x$INPUT == "xY" || x$INPUT == "x" ]]; then
371 | selt ; retval=$? ; if [[ $retval == 1 ]]; then
372 | echo "Operation aborted."
373 | return 1
374 | else
375 | return 0
376 | fi
377 | else
378 | clear ; echo ; echo "Operation aborted."
379 | return 1
380 | fi
381 | }
382 |
383 | # 16)
384 | frm () {
385 | echo
386 | rm -rf $HOME/apktool
387 | cd other
388 | printf "Pull framework-res.apk from an ADB device (Y/n)? "
389 | read INPUT
390 | if [[ x$INPUT == "xY" || x$INPUT == "xy" || x$INPUT == "x" ]] ; then
391 | if [[ $(adb devices | grep "device" -c) -gt "1" ]] ; then
392 | echo
393 | echo "Pulling framework-res.apk from device."
394 | adb pull /system/framework/framework-res.apk ./framework-res.apk
395 | else
396 | echo "Error. No device connected."
397 | fi
398 | else
399 | localMode="true"
400 | fi
401 |
402 | if [[ -f ./framework-res.apk ]]; then
403 | if [[ $localMode == "true" ]]; then
404 | echo "Local framework-res.apk found."
405 | fi
406 | echo
407 | echo $(java -jar apktool.jar "if" ./framework-res.apk) | grep "Framework installed"
408 | clear
409 | echo
410 | if [ $? -eq 0 ] ; then
411 | echo "Done importing framework-res.apk"
412 | else
413 | echo "Error. Import failed."
414 | fi
415 | fi
416 | cd ..
417 | }
418 |
419 | # 17)
420 | clr () {
421 | printf "Do you want to clean your current projects (y/N)? "
422 | read INPUT
423 | if [[ "x$INPUT" = "xy" || "x$INPUT" = "xY" ]] ; then
424 | rm -rf place-apk-here-for-signing
425 | rm -rf projects
426 | rm -rf place-apk-here-to-batch-optimize
427 | mkdir place-apk-here-for-signing
428 | mkdir place-apk-here-to-batch-optimize
429 | echo "Projects cleared."
430 | echo
431 | printf "Clear place-apk-here-for-modding directory (y/N)? "
432 | read INPUT
433 | if [[ "x$INPUT" = "xy" || "x$INPUT" = "xY" ]] ; then
434 | echo "Directory place-apk-here-for-modding cleared."
435 | rm -rf place-apk-here-for-modding
436 | mkdir place-apk-here-for-modding
437 | fileName=""
438 | fi
439 | echo
440 | printf "Delete framework-res.apk import (y/N)? "
441 | read INPUT
442 | if [[ "x$INPUT" = "xy" || "x$INPUT" = "xY" ]] ; then
443 | echo "File framework-res.apk deleted."
444 | rm -rf $HOME/apktool
445 | fi
446 | else
447 | echo "Canceled."
448 | fi
449 | }
450 |
451 | # 20)
452 | setclv () {
453 | echo "Current compression level: $clvl"
454 | printf "Enter new compression level (Value 0-9): "
455 | read INPUT
456 | echo
457 | case "$INPUT" in
458 | 0|1|2|3|4|5|6|7|8|9 )
459 | clvl=$INPUT
460 | sed -i "1s/compressionLevel=.*/compressionLevel=$INPUT/g" "$confFile"
461 | echo "Compression level set at: $clvl"
462 | ;;
463 |
464 | *) echo "Invalid value."
465 | ;;
466 | esac
467 | }
468 |
469 | # 00)
470 | quit () {
471 | exit 0
472 | }
473 |
474 | apren () {
475 | echo
476 | mkdir -p "apk-rename"
477 | if [[ ! -z $1 ]]; then
478 | apkclean $1
479 | fi
480 | clear ; echo ; echo "Done."
481 | }
482 |
483 | apkclean () {
484 | cd other
485 | echo Renaming APKs...
486 | if [[ ! -z $1 ]]; then
487 | dir=$1
488 | find $dir -type f -name "*.apk" | while read APK_FILE ;
489 | do
490 | labl=$(aapt d badging "$APK_FILE" | grep "application: label=" | cut -d "'" -f2)
491 | labl=${labl//"&"/"-"}
492 | if [[ ! -z $labl ]]; then
493 | vers=$(aapt d badging "$APK_FILE" | grep "versionName=" | cut -d "'" -f6)
494 | else
495 | echo "ERROR: (File) ${APK_FILE//"../apk-rename/"/}"
496 | fi
497 | if [[ "$APK_FILE" != "${dir}${labl} $vers.apk" && -n $labl ]] ; then
498 | mv -nf "$APK_FILE" "$dir$labl $vers.apk"
499 | echo "Renamed `basename "$APK_FILE"` to $labl $vers.apk"
500 | fi
501 | done
502 | fi
503 | cd ..
504 | }
505 |
506 | devback () {
507 | mkdir -p "apk-backup"
508 | if [[ $(adb devices | grep "device" -c) -gt "1" ]] ; then
509 | echo
510 | echo "Pulling all APKs from device /data/app/..."
511 | echo "(WARNING: This operation can take a long time depending"
512 | echo " on the number of installed APKs)" ; echo
513 |
514 | adb pull "/data/app/" "./apk-backup/"
515 | echo
516 | apkclean "../apk-backup/"
517 | else
518 | echo ; echo "Error. No device connected."
519 | fi
520 |
521 | clear ; echo ; echo "Done."
522 | }
523 |
524 | devres () {
525 | if [[ $(adb devices | grep "device" -c) -gt "1" ]] ; then
526 | echo
527 | echo "Installing all APKs in ./apk-backup/ to device..."
528 | echo "(WARNING: This operation can take a long time depending"
529 | echo " on the number of APKs)" ; echo
530 |
531 | echo
532 | echo -n "Use Whitelist.txt as filter? (Y/n): "
533 | read USE_LIST
534 |
535 | case "$USE_LIST" in
536 | "" | "Y" | "y" ) LISTMODE="y"
537 | ;;
538 | esac
539 |
540 | echo
541 |
542 | totalapp=$(ls ./apk-backup/ | grep ".apk" -c)
543 | progress=1
544 | find "./apk-backup/" -type f -name "*.apk" | while read APK_FILE ;
545 | do
546 | CURRENTAPK=${APK_FILE##.*/}
547 | echo "App #$progress of $totalapp"
548 | if [[ $(cat ./apk-backup/Whitelist.txt | grep -c "$CURRENTAPK") != "0" && "$LISTMODE" == "y" ]] ; then
549 | adb install -r "$APK_FILE"
550 | else
551 | echo "$CURRENTAPK is not allowed. Check Whitelist.txt."
552 | fi
553 | progress=$((progress+1))
554 | echo
555 | done
556 | else
557 | echo ; echo "Error. No device connected."
558 | fi
559 |
560 | clear ; echo ; echo "Done."
561 | }
562 |
563 | mkzip () {
564 | if [[ -f "./other/template.zip" ]]; then
565 | if [[ -d "./zip-temp" ]]; then
566 | echo ; printf "Clean zip-temp directory? (y/N): "
567 | read PRMPT
568 | case $PRMPT in
569 | Y|y ) rm -rf "./zip-temp" ; mkdir -p "zip-temp"
570 | hidden=$(7za x -o"./zip-temp" "./other/template.zip")
571 | ;;
572 | esac
573 | else
574 | mkdir -p "zip-temp"
575 | hidden=$(7za x -o"./zip-temp" "./other/template.zip")
576 | fi
577 | echo
578 | echo "Modify contents of the zip-temp directory to match update.zip contents."
579 | echo "Edit /zip-temp/META-INF/com/google/android/updater-script to your requirements."
580 | echo ; printf "Enter custom update.zip name (Default: update.zip): "
581 | read zipName
582 | echo ; printf "Append zip creation timestamp? (Y/n): "
583 | read zipTime
584 | echo ; printf "Press ENTER to begin update.zip creation..."
585 | read DUMMY
586 | case $zipName in
587 | "" | " " | "." | "/" | "\\" | "|" ) zipName="update" ;;
588 | esac
589 | case $zipTime in
590 | "n" | "N" ) zipName="$zipName" ;;
591 | * ) zipName="${zipName}-$(date +%Y%m%d-%H%M)" ;;
592 | esac
593 | echo ; echo "Compressing update.zip..."
594 | 7za a -tzip "./projects/$zipName.zip" ./zip-temp/* -mx"$clvl" -r-
595 | echo ; echo "Signing $zipName.zip..."
596 | java -jar "./other/signapk.jar" -w "./other/testkey.x509.pem" "./other/testkey.pk8" "./projects/$zipName.zip" "./projects/$zipName-signed.zip"
597 | rm -f "./projects/$zipName.zip"
598 | clear ; echo ; printf "Done."
599 | if [[ -f "./projects/$zipName-signed.zip" ]]; then
600 | printf " Created: /projects/$zipName-signed.zip\n"
601 | fi
602 | fi
603 | }
604 |
605 | pushzip () {
606 | if [[ $(adb devices | grep "device" -c) -gt "1" ]] ; then
607 | cd "./projects"
608 | echo
609 | echo "Listing ZIP files:"
610 | echo "------------------"
611 | PS3=$(echo ""; echo "Choose ZIP: ")
612 | fileList=$(find -type f -name "*.zip")
613 | # Clean up list.
614 | fileList=${fileList//"./"/}
615 |
616 | if [[ -z $fileList ]] ; then
617 | clear
618 | echo ; echo "No ZIP files found. Please check the projects directory."
619 | else
620 | select zipName in $fileList; do
621 | if [[ -n "$zipName" ]] ; then
622 | zipName=${zipName%.*}
623 | echo ; echo "Pushing $zipName.zip to device /sdcard/"
624 | adb push "./$zipName.zip" "/sdcard/"
625 | clear ; echo ; echo "Done." ; break
626 | else
627 | echo ; echo "Error. Wrong input."
628 | fi
629 | done
630 | fi
631 | cd ..
632 | else
633 | echo ; echo "Error. No device connected."
634 | fi
635 | }
636 |
637 | cls2jar () {
638 | echo
639 | # Check if an active APK is set.
640 | if [[ -n $fileName ]] ; then
641 |
642 | cd other
643 | 7za e "../place-apk-here-for-modding/$fileName.apk" -ir\!"classes.dex" -o"../projects/" -y
644 | safeName=${fileName//" "/"-"}
645 | mv "../projects/classes.dex" "../projects/$safeName.dex"
646 | cd ..
647 | cd projects
648 | ../other/dex2jar/dex2jar "$safeName.dex"
649 | if [[ $safeName != $fileName ]]; then
650 | mv -uf "$safeName.dex" "$fileName.dex"
651 | fi
652 | mv -uf "$safeName-dex2jar.jar" "$fileName.jar"
653 | cd ..
654 |
655 | clear ; echo ; echo "Created /projects/$fileName.jar"
656 | else
657 | actvfile ; retval=$? ; if [[ $retval == 0 ]]; then cls2jar ; fi
658 | fi
659 | }
660 |
661 | viewjar () {
662 | echo
663 | # Check if an active APK is set.
664 | if [[ -n $fileName ]] ; then
665 | if [[ -f "./projects/$fileName.jar" ]]; then
666 | # Execute jd-gui as a parallel process
667 | gnome-terminal -x ./other/jd-view $fileName
668 |
669 | clear ; echo ; echo "Viewing file: $fileName.jar"
670 | else
671 | echo "File: /projects/$fileName.jar does not exist. Please extract from APK."
672 | fi
673 | else
674 | actvfile ; retval=$? ; if [[ $retval == 0 ]]; then viewjar ; fi
675 | fi
676 | }
677 |
678 | crtdirs () {
679 | mkdir -p place-apk-here-for-modding
680 | mkdir -p apk-rename
681 | mkdir -p place-apk-here-for-signing
682 | mkdir -p place-apk-here-to-batch-optimize
683 | mkdir -p place-ogg-here
684 | echo
685 | echo "Done."
686 | }
687 |
688 | showpkg () {
689 | if [[ -n $fileName ]] ; then
690 | ./other/aaparser -i "./place-apk-here-for-modding/$fileName.apk"
691 | else
692 | actvfile ; retval=$? ; if [[ $retval == 0 ]]; then clear ; showpkg ; fi
693 | fi
694 | }
695 |
696 | fixperm () {
697 | ./other/perm
698 | clear
699 | echo ; echo "Done. Scroll up to see changes."
700 | }
701 |
702 | restart () {
703 | echo
704 | echo "############################### Apk Multi-Tools ################################"
705 | echo
706 | echo "- Simple Tasks (Image editing, etc.) ------------------------------------------"
707 | echo " 1 Extract APK 2 Optimize APK Images "
708 | echo " 3 Zip APK "
709 | echo " 7 One-step Zip-Sign-Install"
710 | echo
711 | echo "- Advanced Tasks (XML, Smali, etc.) -------------------------------------------"
712 | echo " 9 Decompile APK 10 Compile APK "
713 | echo " 11 One-step Compile-Sign-Install"
714 | echo
715 | echo "- Common Tasks ----------------------------------------------------------------"
716 | echo " 0 ADB Pull 8 ADB Push "
717 | echo " 4 Sign APK 6 Install APK "
718 | echo " 5 Zipalign APK "
719 | echo
720 | echo "- Batch Operations ------------------------------------------------------------"
721 | echo " 12 Batch Optimize APK 13 Batch Sign APK "
722 | echo " 14 Batch Optimize OGG files"
723 | echo
724 | echo "- Distribution & Update.zip Creation ------------------------------------------"
725 | echo " 41 Create Update.zip 42 Push Update.zip to device "
726 | echo
727 | echo "- Decompile Classes.dex & View Decompiled Code --------------------------------"
728 | echo " 51 Decompile Classes.dex 52 View Decompiled Code "
729 | echo
730 | echo "- ADB Device & APK Management -------------------------------------------------"
731 | echo " 30 Backup Device Installed APKs 31 Batch Rename APK "
732 | echo " 32 Batch Install APK (apk-backup)"
733 | echo
734 | echo "-------------------------------------------------------------------------------"
735 | echo " 20 Set Active APK"
736 | echo " 21 Import framework-res.apk (Perform apktool.jar if framework-res.apk)"
737 | echo " 22 Clear Project Files"
738 | echo " 23 Set Compression Level (Current compression level: $clvl)"
739 | echo " 24 Create all missing directories"
740 | echo " 25 Show APK package information"
741 | echo " 99 Fix Tools permissions"
742 | echo " 00 Quit"
743 | echo "-------------------------------------------------------------------------------"
744 | printf " Active APK File: "
745 | if [[ -n $fileName ]] ; then
746 | printf "$fileName.apk"
747 | else
748 | printf "NONE"
749 | fi
750 | printf "\n"
751 | echo "-------------------------------------------------------------------------------"
752 | echo
753 | printf "%s" "Enter selection: "
754 | read ANSWER
755 | reset
756 | case "$ANSWER" in
757 | 0) ap ;;
758 | 1) ex ;;
759 | 2) opt ;;
760 | 3) zip ;;
761 | 4) si ;;
762 | 5) zipa ;;
763 | 6) ins ;;
764 | 7) alli ;;
765 | 8) apu ;;
766 | 9) de ;;
767 | 10) co ;;
768 | 11) all ;;
769 | 12) bopt ;;
770 | 13) asi ;;
771 | 14) ogg ;;
772 | 20) selt "s1" ;; # Set via menu
773 | 21) frm ;;
774 | 22) clr ;;
775 | 23) setclv ;;
776 | 24) crtdirs ;;
777 | 25) showpkg ;;
778 | 30) devback ;;
779 | 31) apren "../apk-rename/" ;;
780 | 32) devres ;;
781 | 41) mkzip ;;
782 | 42) pushzip ;;
783 | 51) cls2jar ;;
784 | 52) viewjar ;;
785 | 99) fixperm ;;
786 | "00"|"exit") quit ;;
787 | *)
788 | echo "Unknown command: '$ANSWER'"
789 | ;;
790 | esac
791 | }
792 |
793 | # Start ----------------------------------------
794 | echo "Starting APK Multi-Tools..."
795 | # Terminal Dimensions
796 | printf '\033[8;48;80t'
797 | PATH="$PATH:$PWD/other"
798 | reset
799 |
800 | echo -n "Loading defaults & preferences... "
801 | # Defaults
802 | IFS=$(echo -en "\n\b") # Support for filenames with white spaces.
803 | fileName="" # Active APK File
804 | confFile=settings.conf # Config File
805 |
806 | # Config File Check
807 | if [[ ! -f ./$confFile ]]; then
808 | clvl="3" # Compression Level - Default value
809 | echo "compressionLevel=3" >> settings.conf
810 | else
811 | setprs=$(sed -n "1p" "$confFile")
812 | clvl=${setprs##*=}
813 | fi
814 | echo "Done."
815 | # clear
816 | export PATH
817 | #echo $PATH
818 | echo -n "Checking required binaries & files... "
819 | # Test for needed programs and warn if missing
820 | ERROR="0"
821 | for PROGRAM in "optipng" "7za" "java" "sudo" "adb" "aapt" "sox"
822 | do
823 | which "$PROGRAM" > /dev/null
824 | if [ "x$?" = "x1" ] ; then
825 | ERROR="1"
826 | echo ; echo ; echo "The program $PROGRAM is missing or is not in your PATH."
827 | echo ; echo "Please install it or fix your PATH variable"
828 | fi
829 | done
830 | if [ "x$ERROR" = "x1" ] ; then
831 | exit 1
832 | fi
833 | echo "Done."
834 | # Create place-apk-here-for-modding directory if missing
835 | if [[ ! -d ./place-apk-here-for-modding ]]; then
836 | mkdir -p ./place-apk-here-for-modding
837 | fi
838 |
839 | echo -n "Initializing ADBD... "
840 | # adbd=$(adb start-server) # Start ADB Daemon
841 | echo "Done."
842 |
843 | # clear
844 | reset
845 | while [ "1" = "1" ] ;
846 | do
847 | restart
848 | done
849 | exit 0
850 |
--------------------------------------------------------------------------------
/setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # init
3 | function pause(){
4 | read -p "$*"
5 | }
6 | current=`pwd`
7 |
8 | menu(){
9 | echo
10 | echo "****************************** Apk Multi-Tools *****************************"
11 | echo "----------------------------------------------------------------------------"
12 | echo " 1 set permissions/paths - do this 1st"
13 | echo " 2 Create Folders - do this 2nd"
14 | echo " 3 Quit"
15 | echo "****************************************************************************"
16 | echo
17 | printf "%s" "Please make your decision: "
18 | read ANSWER
19 |
20 | case "$ANSWER" in
21 | 1) perm ;;
22 | 2) folder ;;
23 | 3) quit ;;
24 | *)
25 | echo "Unknown command: '$ANSWER'";;
26 | esac
27 | }
28 |
29 | perm(){
30 | cd other
31 | chmod 755 7za
32 | chmod 755 aapt
33 | chmod 755 apktool
34 | chmod 755 apktool.jar
35 | chmod 755 baksmali.jar
36 | chmod 755 optipng
37 | chmod 755 signapk.jar
38 | chmod 755 smali.jar
39 | cd $current
40 | chmod 755 script.sh
41 | echo "Done setting permissions"
42 | cd $current
43 | echo "Please make sure to install SOX, if you are on debian/ubuntu open terminal"
44 | echo " and type in"
45 | echo " sudo su"
46 | echo "apt-get install sox"
47 | echo " this will install sox other wise use your software install program to install sox"
48 | echo "once sox is installed you need to add script to your path"
49 | echo " you can do this by opening a new terminal window and type"
50 | echo " sudo su"
51 | echo "gedit /.bashrc and enter this at the bottom of the file"
52 | echo " PATH=$PATH:$current"
53 | pause 'Press Enter to continue...'
54 | echo "Done setting up basics"
55 | menu
56 | }
57 |
58 | folder(){
59 | mkdir "place-apk-here-for-modding"
60 | mkdir "place-apk-here-for-signing"
61 | mkdir "place-apk-here-to-batch-optimize"
62 | mkdir "place-jar-here-for-modding"
63 | mkdir "place-ogg-here"
64 | mkdir "projects"
65 | echo "Done Creating Folders"
66 | menu
67 | }
68 |
69 | quit(){
70 | exit 0
71 | }
72 | menu
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------