Loading ...

dex2jar

Package

  • dex2jar - Tools to work with android .dex and java .class files

Usage

D2J APK-Sign

d2j-apk-sign -- Sign an android apk file use a test certificate.
usage: d2j-apk-sign [options] <apk>
options:
-f,--force force overwrite
-h,--help Print this help message
-o,--output <out-apk-file> output .apk file, default is $current_dir/[apk-nam
e]-signed.apk
-t,--tiny use tiny sign
version: v2.4

D2J Baskmali

d2j-baksmali -- disassembles and/or dumps a dex file
usage: d2j-baksmali [options] <dex>
options:
-b,--no-debug-info [not impl] don't write out debug info (.local, .p
aram, .line, etc.)
-f,--force force overwrite
-h,--help Print this help message
-l,--use-locals output the .locals directive with the number of n
on-parameter registers, rather than the .register
-o,--output <out> output dir of .smali files, default is $current_d
ir/[jar-name]-out/
-p,--no-parameter-registers use the v<n> syntax instead of the p<n> syntax fo
r registers mapped to method parameters
version: v2.4
online help: https://sourceforge.net/p/dex2jar/wiki/Smali

D2J Class Version Switch

Usage: clz-version-switch version old.jar new.jar

D2J Decrypt String Version Switch

d2j-decrypt-string -- Decrypt in class file
usage: d2j-decrypt-string [options] <jar>
options:
-cp,--classpath <cp> add extra lib to classpath
-d,--delete delete the method which can decrypt the st
ings
-da,--deep-analyze use dex2jar IR to static analyze and find
more values like byte[]
-f,--force force overwrite
-h,--help Print this help message
-m,--methods <cfg> a file contain a list of methods, each lin
e like: La/b;->decrypt(III)Ljava/lang/Stri
ng;
-mn,--decrypt-method-name <name> the owner of the method which can decrypt
the stings, the method's signature must be
static (parameter-type)Ljava/lang/String;
. Please use -pt,--parameter-type to set t
he argument descrypt.
-mo,--decrypt-method-owner <owner> the owner of the method which can decrypt
the stings, example: java.lang.String
-o,--output <out> output of .jar files, default is $current_
dir/[jar-name]-decrypted.jar
-pd,--parameters-descriptor <type> the descriptor for the method which can de
crypt the stings, example1: Ljava/lang/Str
ing; example2: III, default is Ljava/lang/
String;
-t,--arg-types <type> comma-separated list of types:boolean,byte
,short,char,int,long,float,double,string.
Default is string
-v,--verbose show more on output
version: v2.4
online help:
https://sourceforge.net/p/dex2jar/wiki/DecryptStrings
https://bitbucket.org/pxb1988/dex2jar/wiki/DecryptStrings

D2J Dex Recompute Checksum

d2j-dex-recompute-checksum -- recompute crc and sha1 of dex.
usage: d2j-dex-recompute-checksum [options] dex
options:
-f,--force force overwrite
-h,--help Print this help message
-o,--output <out-dex-file> output .dex file, default is [dex-name]-rechecksum
.dex
version: v2.4

D2J Dex Weaver

d2j-dex-weaver -- replace invoke in dex
usage: d2j-dex-weaver [options] dex
options:
-c,--config <config> config file
-h,--help Print this help message
-o,--output <out-dex-file> output .dex file
-s,--stub-dex <stub> stub dex
version: v2.4
online help: https://sourceforge.net/p/dex2jar/wiki/DexWeaver

D2J Dex2jar

d2j-dex2jar -- convert dex to jar
usage: d2j-dex2jar [options] <file0> [file1 ... fileN]
options:
--skip-exceptions skip-exceptions
-d,--debug-info translate debug info
-e,--exception-file <file> detail exception file, default is $current_dir/[fi
le-name]-error.zip
-f,--force force overwrite
-h,--help Print this help message
-n,--not-handle-exception not handle any exceptions thrown by dex2jar
-nc,--no-code
-o,--output <out-jar-file> output .jar file, default is $current_dir/[file-na
me]-dex2jar.jar
-os,--optmize-synchronized optimize-synchronized
-p,--print-ir print ir to System.out
-r,--reuse-reg reuse register while generate java .class file
-s same with --topological-sort/-ts
-ts,--topological-sort sort block by topological, that will generate more
readable code, default enabled
version: reader-v2.4, translator-v2.4, ir-v2.4

D2J Invoke

Usage: java [options] <mainclass> [args...]
(to execute a class)
or java [options] -jar <jarfile> [args...]
(to execute a jar file)
or java [options] -m <module>[/<mainclass>] [args...]
java [options] --module <module>[/<mainclass>] [args...]
(to execute the main class in a module)
or java [options] <sourcefile> [args]
(to execute a single source-file program)
Arguments following the main class, source file, -jar <jarfile>,
-m or --module <module>/<mainclass> are passed as the arguments to
main class.
where options include:
-zero to select the "zero" VM
-dcevm to select the "dcevm" VM
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
--class-path <class search path of directories and zip/jar files>
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
-p <module path>
--module-path <module path>...
A : separated list of elements, each element is a file path
to a module or a directory containing modules. Each module is either
a modular JAR or an exploded-module directory.
--upgrade-module-path <module path>...
A : separated list of elements, each element is a file path
to a module or a directory containing modules to replace
upgradeable modules in the runtime image. Each module is either
a modular JAR or an exploded-module directory.
--add-modules <module name>[,<module name>...]
root modules to resolve in addition to the initial module.
<module name> can also be ALL-DEFAULT, ALL-SYSTEM,
ALL-MODULE-PATH.
--enable-native-access <module name>[,<module name>...]
modules that are permitted to perform restricted native operations.
<module name> can also be ALL-UNNAMED.
--list-modules
list observable modules and exit
-d <module name>
--describe-module <module name>
describe a module and exit
--dry-run create VM and load main class but do not execute main method.
The --dry-run option may be useful for validating the
command-line options such as the module system configuration.
--validate-modules
validate all modules and exit
The --validate-modules option may be useful for finding
conflicts and other errors with modules on the module path.
-D<name>=<value>
set a system property
-verbose:[class|module|gc|jni]
enable verbose output for the given subsystem
-version print product version to the error stream and exit
--version print product version to the output stream and exit
-showversion print product version to the error stream and continue
--show-version
print product version to the output stream and continue
--show-module-resolution
show module resolution output during startup
-? -h -help
print this help message to the error stream
--help print this help message to the output stream
-X print help on extra options to the error stream
--help-extra print help on extra options to the output stream
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:jdwp
see also -agentlib:jdwp=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
HiDPI scaled images are automatically supported and used
if available. The unscaled image filename, e.g. image.ext,
should always be passed as the argument to the -splash option.
The most appropriate scaled image provided will be picked up
automatically.
See the SplashScreen API documentation for more information
@argument files
one or more argument files containing options
--disable-@files
prevent further argument file expansion
--enable-preview
allow classes to depend on preview features of this release
To specify an argument for a long option, you can use --<name>=<value> or
--<name> <value>.

D2J Jar Access

d2j-jar-access -- add or remove class/method/field access in jar file
usage: d2j-jar-access [options] <jar>
options:
-ac,--add-class-access <ACC> add access from class
-af,--add-field-access <ACC> add access from field
-am,--add-method-access <ACC> add access from method
-f,--force force overwrite
-h,--help Print this help message
-o,--output <out-dir> output dir of .j files, default is $current_
dir/[jar-name]-access.jar
-rc,--remove-class-access <ACC> remove access from class
-rd,--remove-debug remove debug info
-rf,--remove-field-access <ACC> remove access from field
-rm,--remove-method-access <ACC> remove access from method
version: v2.4

D2J Jar Weaver

d2j-jar-weaver -- replace invoke in jar
usage: d2j-jar-weaver [options] jar
options:
-c,--config <config> config file
-h,--help Print this help message
-o,--output <out-jar-file> output .jar file
-s,--stub-jar <stub> stub jar
version: v2.4
online help: https://sourceforge.net/p/dex2jar/wiki/JarWeaver

D2J Jar2Dex

d2j-jar2dex -- Convert jar to dex by invoking dx.
usage: d2j-jar2dex [options] <dir>
options:
-f,--force force overwrite
-h,--help Print this help message
-o,--output <out-dex-file> output .dex file, default is $current_dir/[jar-nam
e]-jar2dex.dex
version: v2.4

D2J Jar2Jasmin

d2j-jar2jasmin -- Disassemble .class in jar file to jasmin file
usage: d2j-jar2jasmin [options] <jar>
options:
-d,--debug disassemble debug info
-e,--encoding <enc> encoding for .j files, default is UTF-8
-f,--force force overwrite
-h,--help Print this help message
-o,--output <out-dir> output dir of .j files, default is $current_dir/[jar-na
me]-jar2jasmin/
version: v2.4
online help: https://sourceforge.net/p/dex2jar/wiki/Jasmin

D2J Jasmin2Jar

d2j-jasmin2jar -- Assemble .j files to .class file
usage: d2j-jasmin2jar [options] <jar>
options:
--no-compute-max
-cv,--class-version <arg> default .class version, [1~9], default 8 for JA
VA8
-d,--dump dump to stdout
-e,--encoding <enc> encoding for .j files, default is UTF-8
-f,--force force overwrite
-g,--autogenerate-linenumbers autogenerate-linenumbers
-h,--help Print this help message
-o,--output <out-jar-file> output .jar file, default is $current_dir/[jar-
name]-jasmin2jar.jar
version: v2.4
online help: https://sourceforge.net/p/dex2jar/wiki/Jasmin

D2J Smali

d2j-smali -- assembles a set of smali files into a dex file
usage: d2j-smali [options] [--] [<smali-file>|folder]*
options:
-- read smali from stdin
-a,--api-level <API_LEVEL> [not impl] The numeric api-level of the file to
generate, e.g. 14 for ICS. If not specified, it
defaults to 14 (ICS).
-h,--help Print this help message
-o,--output <FILE> the name of the dex file that will be written. T
he default is out.dex
-v,--version prints the version then exits
-x,--allow-odex-instructions [not impl] allow odex instructions to be compile
d into the dex file. Only a few instructions are
supported - the ones that can exist in a dead c
ode path and not cause dalvik to reject the clas
s
version: v2.4
online help: https://sourceforge.net/p/dex2jar/wiki/Smali

D2J Std-Zip

d2j-std-zip -- clean up apk to standard zip
usage: d2j-std-zip [options] <zip>
options:
-h,--help Print this help message
-o,--output <out> The output file
version: v2.4

Install dex2jar
sudo apt install dex2jar
Remove dex2jar

sudo apt remove dex2jar

Don’t Want to Miss Anything?

Sign up for Newsletters

* Yes, I agree to the terms and privacy policy
Top