diff --git a/README.md b/README.md index cb40859..6cb8d2f 100644 --- a/README.md +++ b/README.md @@ -30,3 +30,15 @@ License === Licensed under the Apache License, Version 2.0 (the "License") Some code borrowed from strazzere(https://github.com/strazzere/android-unpacker/tree/master/native-unpacker) + + +//LiuYiAdd +在.mk目录下执行ndk-build即可编译代码。 +tools是另外添加的工具,jadx可用以打开dex文件参看源码。 + +参考文档: +drizzleDumper的原理分析和使用说明 http://blog.csdn.net/qq1084283172/article/details/53561622 + http://blog.csdn.net/p2011211616/article/details/75304095 + +常见app加固厂商脱壳方法研究 http://www.mottoin.com/89035.html +fork: http://blog.csdn.net/a332324956/article/details/9114919 \ No newline at end of file diff --git a/drizzleDumper.c b/drizzleDumper.c index 45ace86..e1028b9 100755 --- a/drizzleDumper.c +++ b/drizzleDumper.c @@ -3,6 +3,7 @@ * file: drizzleDumper.c */ +#include #include "drizzleDumper.h" int main(int argc, char *argv[]) { @@ -233,16 +234,21 @@ int find_magic_memory(uint32_t clone_pid, int memory_fd, memory_region *memory , { char *buffer = malloc(len); ssize_t readlen = read(memory_fd, buffer, len); - printf("meminfo: %s ,len: %d ,readlen: %d, start: %x\n",mem_info, len, readlen, memory->start); + //printf("meminfo: %s ,len: %d ,readlen: %d, start: %x\n",mem_info, len, readlen, memory->start); + + if(buffer[1] == 'E' && buffer[2] == 'L' && buffer[3] == 'F') { free(buffer); continue; } - if(buffer[0] == 'd' && buffer[1] == 'e' && buffer[2] == 'x' && buffer[3] == '\n' && buffer[4] == '0' && buffer[5] == '3') + + + //if(buffer[0] == 'd' && buffer[1] == 'e' && buffer[2] == 'x' && buffer[3] == '\n' && buffer[4] == '0' && buffer[5] == '3') + if(buffer[0] == 'd' && buffer[1] == 'e' && buffer[2] == 'x' && buffer[4] == '0' && buffer[5] == '3') { - printf(" [+] find dex, len : %d , info : %s\n" , readlen , mem_info); + printf(" [+] 1find dex, len : %d , info : %s\n" , readlen , mem_info); DexHeader header; char real_lenstr[10]={0}; memcpy(&header , buffer ,sizeof(DexHeader)); @@ -253,7 +259,8 @@ int find_magic_memory(uint32_t clone_pid, int memory_fd, memory_region *memory , if(dump_memory(buffer , len , each_filename) == 1) { - printf(" [+] dex dump into %s\n", each_filename); + printf(" [+] 1dex dump into %s\n", each_filename); + ret++;//liuyi,防止dump成功任然重复扫描 free(buffer); continue; } @@ -278,9 +285,10 @@ int find_magic_memory(uint32_t clone_pid, int memory_fd, memory_region *memory , char *buffer = malloc(len); ssize_t readlen = read(memory_fd, buffer, len); - if(buffer[0] == 'd' && buffer[1] == 'e' && buffer[2] == 'x' && buffer[3] == '\n' && buffer[4] == '0' && buffer[5] == '3') + //if(buffer[0] == 'd' && buffer[1] == 'e' && buffer[2] == 'x' && buffer[3] == '\n' && buffer[4] == '0' && buffer[5] == '3') + if(buffer[0] == 'd' && buffer[1] == 'e' && buffer[2] == 'x' && buffer[4] == '0' && buffer[5] == '3') { - printf(" [+] Find dex! memory len : %d \n" , readlen); + printf(" [+] 2Find dex! memory len : %d \n" , readlen); DexHeader header; char real_lenstr[10]={0}; memcpy(&header , buffer ,sizeof(DexHeader)); @@ -290,9 +298,10 @@ int find_magic_memory(uint32_t clone_pid, int memory_fd, memory_region *memory , if(dump_memory(buffer , len , each_filename) == 1) { - printf(" [+] dex dump into %s\n", each_filename); + printf(" [+] 2dex dump into %s\n", each_filename); + ret++;//liuyi,防止dump成功任然重复扫描 free(buffer); - continue; //如果本次成功了,就不尝试其他方法了 + continue; //如果本次成功了,就不尝试其他方法了 } else { diff --git a/drizzleDumper.h b/drizzleDumper.h index ce65a3c..09cd63d 100755 --- a/drizzleDumper.h +++ b/drizzleDumper.h @@ -15,7 +15,7 @@ #include #include #include -#include +//#include #ifdef HAVE_STDINT_H #include /* C99 */ diff --git a/libs/armeabi/drizzleDumper b/libs/armeabi/drizzleDumper deleted file mode 100755 index 4439284..0000000 Binary files a/libs/armeabi/drizzleDumper and /dev/null differ diff --git a/libs/x86/drizzleDumper b/libs/x86/drizzleDumper deleted file mode 100755 index 604b196..0000000 Binary files a/libs/x86/drizzleDumper and /dev/null differ diff --git a/obj/local/armeabi/drizzleDumper b/obj/local/armeabi/drizzleDumper deleted file mode 100755 index baeee82..0000000 Binary files a/obj/local/armeabi/drizzleDumper and /dev/null differ diff --git a/obj/local/armeabi/objs/drizzleDumper/drizzleDumper.o b/obj/local/armeabi/objs/drizzleDumper/drizzleDumper.o deleted file mode 100644 index 167b2cd..0000000 Binary files a/obj/local/armeabi/objs/drizzleDumper/drizzleDumper.o and /dev/null differ diff --git a/obj/local/armeabi/objs/drizzleDumper/drizzleDumper.o.d b/obj/local/armeabi/objs/drizzleDumper/drizzleDumper.o.d deleted file mode 100644 index 9560767..0000000 --- a/obj/local/armeabi/objs/drizzleDumper/drizzleDumper.o.d +++ /dev/null @@ -1,190 +0,0 @@ -obj/local/armeabi/objs/drizzleDumper/drizzleDumper.o: drizzleDumper.c \ - drizzleDumper.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/stdlib.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/cdefs.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/cdefs_elf.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/android/api-level.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/string.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/malloc.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/alloca.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/strings.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/types.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/stdint.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/_types.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/machine/_types.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/posix_types.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/stddef.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/compiler.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/posix_types.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/types.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/types.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/machine/kernel.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/sysmacros.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/memory.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/stdio.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/dirent.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/fcntl.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/fcntl.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/fcntl.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm-generic/fcntl.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/unistd.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/select.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/time.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/time.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/signal.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/limits.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/limits.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/limits.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/machine/internal_types.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/machine/limits.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/syslimits.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/page.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/signal.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm-generic/signal.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/siginfo.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm-generic/siginfo.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/sysconf.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/capability.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/pathconf.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/errno.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/errno.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/errno.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm-generic/errno.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm-generic/errno-base.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/ptrace.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/ptrace.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/ptrace.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/wait.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/resource.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/resource.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/resource.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm-generic/resource.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/wait.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/user.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/user.h - -drizzleDumper.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/stdlib.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/cdefs.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/cdefs_elf.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/android/api-level.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/string.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/malloc.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/alloca.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/strings.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/types.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/stdint.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/_types.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/machine/_types.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/posix_types.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/stddef.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/compiler.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/posix_types.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/types.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/types.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/machine/kernel.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/sysmacros.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/memory.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/stdio.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/dirent.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/fcntl.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/fcntl.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/fcntl.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm-generic/fcntl.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/unistd.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/select.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/time.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/time.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/signal.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/limits.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/limits.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/limits.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/machine/internal_types.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/machine/limits.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/syslimits.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/page.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/signal.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm-generic/signal.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/siginfo.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm-generic/siginfo.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/sysconf.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/capability.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/pathconf.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/errno.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/errno.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/errno.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm-generic/errno.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm-generic/errno-base.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/ptrace.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/ptrace.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/ptrace.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/wait.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/sys/resource.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/resource.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/resource.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm-generic/resource.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/wait.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/linux/user.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-3/arch-arm/usr/include/asm/user.h: diff --git a/obj/local/x86/drizzleDumper b/obj/local/x86/drizzleDumper deleted file mode 100755 index b2c7e9d..0000000 Binary files a/obj/local/x86/drizzleDumper and /dev/null differ diff --git a/obj/local/x86/objs/drizzleDumper/drizzleDumper.o b/obj/local/x86/objs/drizzleDumper/drizzleDumper.o deleted file mode 100644 index 44dbaee..0000000 Binary files a/obj/local/x86/objs/drizzleDumper/drizzleDumper.o and /dev/null differ diff --git a/obj/local/x86/objs/drizzleDumper/drizzleDumper.o.d b/obj/local/x86/objs/drizzleDumper/drizzleDumper.o.d deleted file mode 100644 index f73e45e..0000000 --- a/obj/local/x86/objs/drizzleDumper/drizzleDumper.o.d +++ /dev/null @@ -1,205 +0,0 @@ -obj/local/x86/objs/drizzleDumper/drizzleDumper.o: drizzleDumper.c \ - drizzleDumper.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/stdlib.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/cdefs.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/cdefs_elf.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/android/api-level.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/string.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/malloc.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/alloca.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/strings.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/types.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/stdint.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/_types.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/machine/_types.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/posix_types.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/stddef.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/compiler.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/posix_types.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/posix_types_32.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/types.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/types.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/machine/kernel.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/sysmacros.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/memory.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/stdio.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/dirent.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/fcntl.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/fcntl.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/fcntl.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm-generic/fcntl.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/unistd.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/select.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/time.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/time.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/signal.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/limits.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/limits.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/limits.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/machine/internal_types.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/machine/limits.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/syslimits.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/page.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/page_32.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/signal.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm-generic/signal.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/sigcontext.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/siginfo.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm-generic/siginfo.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/sysconf.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/capability.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/pathconf.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/errno.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/errno.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/errno.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm-generic/errno.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm-generic/errno-base.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/ptrace.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/ptrace.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/ptrace.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/ptrace-abi.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/wait.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/resource.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/resource.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/resource.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm-generic/resource.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/wait.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/user.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/user.h \ - /Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/user_32.h - -drizzleDumper.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/stdlib.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/cdefs.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/cdefs_elf.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/android/api-level.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/string.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/malloc.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/alloca.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/strings.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/types.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/stdint.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/_types.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/machine/_types.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/posix_types.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/stddef.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/compiler.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/posix_types.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/posix_types_32.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/types.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/types.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/machine/kernel.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/sysmacros.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/memory.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/stdio.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/dirent.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/fcntl.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/fcntl.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/fcntl.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm-generic/fcntl.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/unistd.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/select.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/time.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/time.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/signal.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/limits.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/limits.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/limits.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/machine/internal_types.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/machine/limits.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/syslimits.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/page.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/page_32.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/signal.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm-generic/signal.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/sigcontext.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/siginfo.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm-generic/siginfo.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/sysconf.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/capability.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/pathconf.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/errno.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/errno.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/errno.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm-generic/errno.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm-generic/errno-base.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/ptrace.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/ptrace.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/ptrace.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/ptrace-abi.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/wait.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/sys/resource.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/resource.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/resource.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm-generic/resource.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/wait.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/linux/user.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/user.h: - -/Users/drizzle/Library/Android/android-ndk-r9/platforms/android-9/arch-x86/usr/include/asm/user_32.h: diff --git a/tools/jadx/LICENSE b/tools/jadx/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/tools/jadx/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/tools/jadx/NOTICE b/tools/jadx/NOTICE new file mode 100644 index 0000000..5c0b69a --- /dev/null +++ b/tools/jadx/NOTICE @@ -0,0 +1,213 @@ +The majority of jadx is written and copyrighted by me (Skylot) +and released under the Apache 2.0 license (see LICENSE file for full license text): + +******************************************************************************* +Copyright 2015, Skylot + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +******************************************************************************* + + +Various portions of the code including dx library are taken from +the Android Open Source Project, and are used in accordance with +the following license: + +******************************************************************************* +Copyright (C) 2007 The Android Open Source Project + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +******************************************************************************* + + +Other binary libraries used in 'jadx' +===================================== + +JCommander library (http://jcommander.org/) released under the following license: + +******************************************************************************* +Copyright 2012, Cedric Beust + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +******************************************************************************* + + +SLF4J source code and binaries are distributed under the following license: + +******************************************************************************* +Copyright (c) 2004-2011 QOS.ch + All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +******************************************************************************* + + +Logback source code and binaries are dual-licensed under the EPL v1.0 and the LGPL 2.1, or more formally: + +******************************************************************************* +Logback: the reliable, generic, fast and flexible logging framework. +Copyright (C) 1999-2012, QOS.ch. All rights reserved. + +This program and the accompanying materials are dual-licensed under +either the terms of the Eclipse Public License v1.0 as published by +the Eclipse Foundation + + or (per the licensee's choosing) + +under the terms of the GNU Lesser General Public License version 2.1 +as published by the Free Software Foundation. +******************************************************************************* + + +ASM library: + +******************************************************************************* +Copyright (c) 2000-2011 INRIA, France Telecom +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. +******************************************************************************* + + + +Jadx-gui components +=================== + +RSyntaxTextArea library (https://github.com/bobbylight/RSyntaxTextArea) +licensed under modified BSD license: + +******************************************************************************* +Copyright (c) 2012, Robert Futrell +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the author nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +******************************************************************************* + + +Concurrent Trees (https://code.google.com/p/concurrent-trees/) +licenced under Apache License 2.0: + +******************************************************************************* +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +******************************************************************************* + + +Image Viewer (https://github.com/kazocsaba/imageviewer) + +******************************************************************************* +Copyright (c) 2008-2012 Kazó Csaba + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +******************************************************************************* + +JFontChooser Component - http://sourceforge.jp/projects/jfontchooser/ + +Icons copied from several places: + - Eclipse Project (JDT UI) - licensed under EPL v1.0 (http://www.eclipse.org/legal/epl-v10.html) + - famfamfam silk icon set (http://www.famfamfam.com/lab/icons/silk/) - licensed + under Creative Commons Attribution 2.5 License (http://creativecommons.org/licenses/by/2.5/) diff --git a/tools/jadx/README.md b/tools/jadx/README.md new file mode 100644 index 0000000..3170e13 --- /dev/null +++ b/tools/jadx/README.md @@ -0,0 +1,93 @@ +## JADX + +[![Build Status](https://travis-ci.org/skylot/jadx.png?branch=master)](https://travis-ci.org/skylot/jadx) +[![Build Status](https://drone.io/github.com/skylot/jadx/status.png)](https://drone.io/github.com/skylot/jadx/latest) +[![Coverage Status](https://coveralls.io/repos/skylot/jadx/badge.png)](https://coveralls.io/r/skylot/jadx) +[![Coverity Scan Build Status](https://scan.coverity.com/projects/2166/badge.svg)](https://scan.coverity.com/projects/2166) +[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) + +**jadx** - Dex to Java decompiler + +Command line and GUI tools for produce Java source code from Android Dex and Apk files + +![jadx-gui screenshot](http://skylot.github.io/jadx/jadx-gui.png) + +### Downloads +- [unstable](https://drone.io/github.com/skylot/jadx/files) +- from [github](https://github.com/skylot/jadx/releases) +- from [sourceforge](http://sourceforge.net/projects/jadx/files/) + + +### Building from source + git clone https://github.com/skylot/jadx.git + cd jadx + ./gradlew dist + +(on Windows, use `gradlew.bat` instead of `./gradlew`) + +Scripts for run jadx will be placed in `build/jadx/bin` +and also packed to `build/jadx-.zip` + + +### Run +Run **jadx** on itself: + + cd build/jadx/ + bin/jadx -d out lib/jadx-core-*.jar + #or + bin/jadx-gui lib/jadx-core-*.jar + + +### Usage +``` +jadx[-gui] [options] (.dex, .apk, .jar or .class) +options: + -d, --output-dir - output directory + -j, --threads-count - processing threads count + -r, --no-res - do not decode resources + -s, --no-src - do not decompile source code + -e, --export-gradle - save as android gradle project + --show-bad-code - show inconsistent code (incorrectly decompiled) + --no-replace-consts - don't replace constant value with matching constant field + --escape-unicode - escape non latin characters in strings (with \u) + --deobf - activate deobfuscation + --deobf-min - min length of name + --deobf-max - max length of name + --deobf-rewrite-cfg - force to save deobfuscation map + --deobf-use-sourcename - use source file name as class name alias + --cfg - save methods control flow graph to dot file + --raw-cfg - save methods control flow graph (use raw instructions) + -f, --fallback - make simple dump (using goto instead of 'if', 'for', etc) + -v, --verbose - verbose output + -h, --help - print this help +Example: + jadx -d out classes.dex +``` + +### Troubleshooting +##### Out of memory error: + - Reduce processing threads count (`-j` option) + - Increase maximum java heap size: + * command line (example for linux): + `JAVA_OPTS="-Xmx4G" jadx -j 1 some.apk` + * edit 'jadx' script (jadx.bat on Windows) and setup bigger heap size: + `DEFAULT_JVM_OPTS="-Xmx2500M"` + + +### Contribution + +To support this project you can: + - Post thoughts about new features/optimizations that important to you + - Submit bug using one of following patterns: + * Java code examples which decompiles incorrectly + * Error log and link to _public available_ apk file or app page on Google play + +And any other comments will be very helpfull, +because at current stage of development it is very time consuming +to **find** new bugs, design and implement new features. +Also I need to **prioritize** these task for complete most important at first. + +--------------------------------------- +*Licensed under the Apache 2.0 License* + +*Copyright 2015 by Skylot* diff --git a/tools/jadx/bin/jadx b/tools/jadx/bin/jadx new file mode 100644 index 0000000..813c9dc --- /dev/null +++ b/tools/jadx/bin/jadx @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## jadx start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and JADX_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="jadx" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/.." >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/lib/jadx-cli-0.6.1.jar:$APP_HOME/lib/android-5.1.jar:$APP_HOME/lib/dx-1.10.jar:$APP_HOME/lib/slf4j-api-1.7.10.jar:$APP_HOME/lib/jadx-core-0.6.1.jar:$APP_HOME/lib/jcommander-1.47.jar:$APP_HOME/lib/logback-classic-1.1.2.jar:$APP_HOME/lib/commons-io-2.4.jar:$APP_HOME/lib/asm-5.0.3.jar:$APP_HOME/lib/annotations-12.0.jar:$APP_HOME/lib/cloning-1.9.2.jar:$APP_HOME/lib/logback-core-1.1.2.jar:$APP_HOME/lib/objenesis-2.1.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And JADX_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $JADX_OPTS + + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" jadx.cli.JadxCLI "$@" diff --git a/tools/jadx/bin/jadx-gui b/tools/jadx/bin/jadx-gui new file mode 100644 index 0000000..3e7fa82 --- /dev/null +++ b/tools/jadx/bin/jadx-gui @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## jadx-gui start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and JADX_GUI_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="jadx-gui" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/.." >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/lib/jadx-gui-0.6.1.jar:$APP_HOME/lib/android-5.1.jar:$APP_HOME/lib/dx-1.10.jar:$APP_HOME/lib/jfontchooser-1.0.5.jar:$APP_HOME/lib/slf4j-api-1.7.10.jar:$APP_HOME/lib/jadx-core-0.6.1.jar:$APP_HOME/lib/jadx-cli-0.6.1.jar:$APP_HOME/lib/rsyntaxtextarea-2.5.8.jar:$APP_HOME/lib/gson-2.3.1.jar:$APP_HOME/lib/image-viewer-1.2.3.jar:$APP_HOME/lib/commons-io-2.4.jar:$APP_HOME/lib/asm-5.0.3.jar:$APP_HOME/lib/annotations-12.0.jar:$APP_HOME/lib/cloning-1.9.2.jar:$APP_HOME/lib/jcommander-1.47.jar:$APP_HOME/lib/logback-classic-1.1.2.jar:$APP_HOME/lib/objenesis-2.1.jar:$APP_HOME/lib/logback-core-1.1.2.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And JADX_GUI_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $JADX_GUI_OPTS + + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" jadx.gui.JadxGUI "$@" diff --git a/tools/jadx/bin/jadx-gui.bat b/tools/jadx/bin/jadx-gui.bat new file mode 100644 index 0000000..fcea770 --- /dev/null +++ b/tools/jadx/bin/jadx-gui.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem jadx-gui startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and JADX_GUI_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME%.. + +@rem Find javaw.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=javaw.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/javaw.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\lib\jadx-gui-0.6.1.jar;%APP_HOME%\lib\android-5.1.jar;%APP_HOME%\lib\dx-1.10.jar;%APP_HOME%\lib\jfontchooser-1.0.5.jar;%APP_HOME%\lib\slf4j-api-1.7.10.jar;%APP_HOME%\lib\jadx-core-0.6.1.jar;%APP_HOME%\lib\jadx-cli-0.6.1.jar;%APP_HOME%\lib\rsyntaxtextarea-2.5.8.jar;%APP_HOME%\lib\gson-2.3.1.jar;%APP_HOME%\lib\image-viewer-1.2.3.jar;%APP_HOME%\lib\commons-io-2.4.jar;%APP_HOME%\lib\asm-5.0.3.jar;%APP_HOME%\lib\annotations-12.0.jar;%APP_HOME%\lib\cloning-1.9.2.jar;%APP_HOME%\lib\jcommander-1.47.jar;%APP_HOME%\lib\logback-classic-1.1.2.jar;%APP_HOME%\lib\objenesis-2.1.jar;%APP_HOME%\lib\logback-core-1.1.2.jar + +@rem Execute jadx-gui +start "jadx-gui" /B "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %JADX_GUI_OPTS% -classpath "%CLASSPATH%" jadx.gui.JadxGUI %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable JADX_GUI_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%JADX_GUI_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/tools/jadx/bin/jadx.bat b/tools/jadx/bin/jadx.bat new file mode 100644 index 0000000..c6cc40d --- /dev/null +++ b/tools/jadx/bin/jadx.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem jadx startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and JADX_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME%.. + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\lib\jadx-cli-0.6.1.jar;%APP_HOME%\lib\android-5.1.jar;%APP_HOME%\lib\dx-1.10.jar;%APP_HOME%\lib\slf4j-api-1.7.10.jar;%APP_HOME%\lib\jadx-core-0.6.1.jar;%APP_HOME%\lib\jcommander-1.47.jar;%APP_HOME%\lib\logback-classic-1.1.2.jar;%APP_HOME%\lib\commons-io-2.4.jar;%APP_HOME%\lib\asm-5.0.3.jar;%APP_HOME%\lib\annotations-12.0.jar;%APP_HOME%\lib\cloning-1.9.2.jar;%APP_HOME%\lib\logback-core-1.1.2.jar;%APP_HOME%\lib\objenesis-2.1.jar + +@rem Execute jadx +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %JADX_OPTS% -classpath "%CLASSPATH%" jadx.cli.JadxCLI %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable JADX_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%JADX_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/tools/jadx/lib/android-5.1.jar b/tools/jadx/lib/android-5.1.jar new file mode 100644 index 0000000..68b8a55 Binary files /dev/null and b/tools/jadx/lib/android-5.1.jar differ diff --git a/tools/jadx/lib/annotations-12.0.jar b/tools/jadx/lib/annotations-12.0.jar new file mode 100644 index 0000000..7f8b362 Binary files /dev/null and b/tools/jadx/lib/annotations-12.0.jar differ diff --git a/tools/jadx/lib/asm-5.0.3.jar b/tools/jadx/lib/asm-5.0.3.jar new file mode 100644 index 0000000..573535b Binary files /dev/null and b/tools/jadx/lib/asm-5.0.3.jar differ diff --git a/tools/jadx/lib/cloning-1.9.2.jar b/tools/jadx/lib/cloning-1.9.2.jar new file mode 100644 index 0000000..983d33f Binary files /dev/null and b/tools/jadx/lib/cloning-1.9.2.jar differ diff --git a/tools/jadx/lib/commons-io-2.4.jar b/tools/jadx/lib/commons-io-2.4.jar new file mode 100644 index 0000000..90035a4 Binary files /dev/null and b/tools/jadx/lib/commons-io-2.4.jar differ diff --git a/tools/jadx/lib/dx-1.10.jar b/tools/jadx/lib/dx-1.10.jar new file mode 100644 index 0000000..727999d Binary files /dev/null and b/tools/jadx/lib/dx-1.10.jar differ diff --git a/tools/jadx/lib/gson-2.3.1.jar b/tools/jadx/lib/gson-2.3.1.jar new file mode 100644 index 0000000..250132c Binary files /dev/null and b/tools/jadx/lib/gson-2.3.1.jar differ diff --git a/tools/jadx/lib/image-viewer-1.2.3.jar b/tools/jadx/lib/image-viewer-1.2.3.jar new file mode 100644 index 0000000..073f756 Binary files /dev/null and b/tools/jadx/lib/image-viewer-1.2.3.jar differ diff --git a/tools/jadx/lib/jadx-cli-0.6.1.jar b/tools/jadx/lib/jadx-cli-0.6.1.jar new file mode 100644 index 0000000..2475b93 Binary files /dev/null and b/tools/jadx/lib/jadx-cli-0.6.1.jar differ diff --git a/tools/jadx/lib/jadx-core-0.6.1.jar b/tools/jadx/lib/jadx-core-0.6.1.jar new file mode 100644 index 0000000..967837a Binary files /dev/null and b/tools/jadx/lib/jadx-core-0.6.1.jar differ diff --git a/tools/jadx/lib/jadx-gui-0.6.1.jar b/tools/jadx/lib/jadx-gui-0.6.1.jar new file mode 100644 index 0000000..b37b144 Binary files /dev/null and b/tools/jadx/lib/jadx-gui-0.6.1.jar differ diff --git a/tools/jadx/lib/jcommander-1.47.jar b/tools/jadx/lib/jcommander-1.47.jar new file mode 100644 index 0000000..efc728a Binary files /dev/null and b/tools/jadx/lib/jcommander-1.47.jar differ diff --git a/tools/jadx/lib/jfontchooser-1.0.5.jar b/tools/jadx/lib/jfontchooser-1.0.5.jar new file mode 100644 index 0000000..3a9779f Binary files /dev/null and b/tools/jadx/lib/jfontchooser-1.0.5.jar differ diff --git a/tools/jadx/lib/logback-classic-1.1.2.jar b/tools/jadx/lib/logback-classic-1.1.2.jar new file mode 100644 index 0000000..9230b2a Binary files /dev/null and b/tools/jadx/lib/logback-classic-1.1.2.jar differ diff --git a/tools/jadx/lib/logback-core-1.1.2.jar b/tools/jadx/lib/logback-core-1.1.2.jar new file mode 100644 index 0000000..391da64 Binary files /dev/null and b/tools/jadx/lib/logback-core-1.1.2.jar differ diff --git a/tools/jadx/lib/objenesis-2.1.jar b/tools/jadx/lib/objenesis-2.1.jar new file mode 100644 index 0000000..7c1e983 Binary files /dev/null and b/tools/jadx/lib/objenesis-2.1.jar differ diff --git a/tools/jadx/lib/rsyntaxtextarea-2.5.8.jar b/tools/jadx/lib/rsyntaxtextarea-2.5.8.jar new file mode 100644 index 0000000..9f250ed Binary files /dev/null and b/tools/jadx/lib/rsyntaxtextarea-2.5.8.jar differ diff --git a/tools/jadx/lib/slf4j-api-1.7.10.jar b/tools/jadx/lib/slf4j-api-1.7.10.jar new file mode 100644 index 0000000..744e9ec Binary files /dev/null and b/tools/jadx/lib/slf4j-api-1.7.10.jar differ