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


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