Olá pessoal, nesta postagem vou apresentar a vocês a ferramenta apktool.
O apktool é uma ferramenta para engenharia reversa de aplicativos Android fechados e binários de terceiros. Ele pode decodificar recursos para um formato quase original e reconstruí-los depois de fazer algumas modificações; Torna possível depurar o código smali, passo a passo. Também torna o trabalho com o aplicativo mais fácil devido à estrutura de arquivos e à automação de algumas tarefas repetitivas, como construção de arquivos, etc.
Como funciona o apktool?
root@kali:~# apktool Apktool v1.5.2 - a tool for reengineering Android apk files Copyright 2010 Ryszard Wiśniewski <brut.alll@gmail.com> with smali v1.4.1, and baksmali v1.4.1 Updated by @iBotPeaches <connor.tumbleson@gmail.com> Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0) Usage: apktool [-q|--quiet OR -v|--verbose] COMMAND [...] COMMANDs are: d[ecode] [OPTS] <file.apk> [<dir>] Decode <file.apk> to <dir>. OPTS: -s, --no-src Do not decode sources. -r, --no-res Do not decode resources. -d, --debug Decode in debug mode. Check project page for more info. -b, --no-debug-info Baksmali -- don't write out debug info (.local, .param, .line, etc.) -f, --force Force delete destination directory. -t <tag>, --frame-tag <tag> Try to use framework files tagged by <tag>. --frame-path <dir> Use the specified directory for framework files --keep-broken-res Use if there was an error and some resources were dropped, e.g.: "Invalid config flags detected. Dropping resources", but you want to decode them anyway, even with errors. You will have to fix them manually before building. b[uild] [OPTS] [<app_path>] [<out_file>] Build an apk from already decoded application located in <app_path>. It will automatically detect, whether files was changed and perform needed steps only. If you omit <app_path> then current directory will be used. If you omit <out_file> then <app_path>/dist/<name_of_original.apk> will be used. OPTS: -f, --force-all Skip changes detection and build all files. -d, --debug Build in debug mode. Check project page for more info. -a, --aapt Loads aapt from specified location. if|install-framework <framework.apk> [<tag>] --frame-path [<location>] Install framework file to your system. For additional info, see: http://code.google.com/p/android-apktool/ For smali/baksmali info, see: http://code.google.com/p/smali/
Usando o apktool
root@kali:~# apktool d NomeDoApp.apk I: Baksmaling... I: Loading resource table... I: Loaded. I: Decoding AndroidManifest.xml with resources... I: Loading resource table from file: /root/apktool/framework/1.apk I: Loaded. I: Regular manifest package... I: Decoding file-resources... I: Decoding values */* XMLs... I: Done. I: Copying assets and libs...
Baixando o apktool
Vocês podem fazer o download nesses links: apktool Homepage ou Kali apktool Repo.
Caso tenha o Kali Linux instalado, nem precisa baixar, ele já vem nativo no sistema operacional.
Espero que tenham gostado, qualquer duvida é só deixar o seu comentário!
Obrigado e até logo! 😀