Solving Exception

. 2 min read

Apktool is one of the de-facto tool for Android application reversing.
In the process of penetration testing at Attify, we faced an issue while reversing new Android apps. In most of the cases, the apps that were build using build-tools version 21.x raised few exceptions.
After a little research, we found that apktool was failing to decode arsc file because of large StringPools and even raised IO exception reading few header files.

The exception pointed to brut.androlib.AndroidlibException : Issue 664.

[![Screen Shot 2014-12-21 at 4.16.26 AM](]( : [](
The official apktool sources provided with apktool-rc2 version as a patch for above mentioned issue but somehow the workaround failed to work at our end and generated new types of exceptions. Same was the case with rc3 version.

Well, this blog post is regarding how we solved the issue of apktool, so we won’t be discussing exceptions here in depth.

Without getting much into details of exception and issues, lets focus on how we solved it.

We built apktool from its source which is present at its official website.
You can get the source code here.

**Following are the steps : **

-Download the source code and extract its content.
-Traverse into the extracted folder. The contents should be as shown below:

Screen Shot 2014-12-21 at 3.24.58 AM

-Build source,

./gradlew build fatJar

Once the build is successful, traverse to libs folder


-Rename the file from apktool-.jar to apktool.jar

-Give execute permission to apktool.jar

sudo chmod +x apktool.jar

-Place the apktool.jar  to ‘bin‘  directory along with apktool config file.  (Note: bin folder location may depend on operating systems used.)
For example, here is the command for Mac OS X.

sudo mv apktool.jar /usr/bin/

You can now continue to enjoy with your reversing and auditing fun. 🙂

Get IoT Security Training

IoT Pentesting Exploitation Training


Android android application security android hands on security and exploitation training android security Apktool application auditing application security auditing appsec usa appwatch attify attify badge attify training binwalk blackberry pentesting blackhat ble BLE hacking and exploitation BLE sniffing box brut Exception chroot cloud based mobile application security scanner consulting CTF Damn Vulnerable iOS App devops dumping memory embedded hacking exploitation exploiting smart devices Firmware hacking frida hackfest hacking smart devices how to secure iot device IDA internet of things Internet of Things Security ios application security ios security iot iot device IoT Exploitation iot hacking iot pentest iot pentesting iot security iot security training iotsecurity jtag jtag debugging mobile app mobile application security mobile application security testing mobile security ninja recon technique offensive iot exploitation ola cabs owasp owasp appsec penetration testing pentesting pentesting mobile apps powerofcommunity PrinterSecurity qemu quizup radio communication protocol radio coomunication Reversing sdr secure coding guidelines security security issue security services security training security vulnerability smart devices social networking spi threat modeling training uart vulnerability writeups xposed hooking zigbee zigbee exploitation zigbee security zwave firmware reverse engineering firmware emulation firmware analysis toolkit firmadyne getting started with firmware hacking iot penetration testing iot attacks recent iot attacks cyber attacks iot hacks biggest iot attacks of all time hacked smart devices iot bots, malwares latest iot attacks BtleJuice bleah retail iot challenges in iot retail security issues faced by e-retailers network security in retail DDoS attacks phishing attacks how retail can prevent cyber attacks security challenges in retail IoT Flare-on radio waves hacking arduino nano how to hack radio waves analog modulation digital modulation capture radio traffic bluetooth technology BLE vulnerabilities BLE attacks BLE dangers BLE security issues exploiting ble how to exploit ble tools to exploit ble privacy protection iot threats protect against iot threats dangers of iot smart user security how to protect iot devices monitor iot devices internet security safety measures to protect privacy healthcare iot iot threats to healthcare industry how can healthcare fight iot threats healthcare cyber security prevent cyber attacks on healthcare measures to prevent cyber attacks on healthcare organisations steps to prevent iot attacks on healthcare healthcare business protection against iot threats security in healthcare iot recent cyber attacks recent ARM attacks ARM course ARM Training ARM binaries Exploit ARM devices IoT hacks on ARM devices ARM gadgets learn ARM exploitation Mirai Botnet vulnerable ARM devices arm ARM exploitation book ARM exploitation video training guide to ARM exploitation cybersecurity why you should be a cybersecurity expert professional expert career in cybersecurity why choose career in cybersecurity growth potential penetration testers hackers profession What is a Mirai Botnet? virus How Mirai botnet infects your device Understanding Mirai Botnet How Mirai works setup mirai history IoT Devices What is mirai botnet? IP cameras security cameras CCTV cameras hacked security IP cameras surveillance cameras hijacked vulnerabilities in internet connected cameras recent security camera attacks vulnerabilities discovered in popular IoT IP cameras IoT security guidelines Mozilla NIST GSMA best security practices automotive security V2V V2I Car security ECU hacking GozNym Bank account hack customer privacy banking malware