- Hacking Android
- Srinivasa Rao Kotipalli Mohammed A. Imran
- 629字
- 2021-07-14 10:56:07
Setting up an AVD
To get hands-on experience of most of the concepts in this book, readers must have an emulator or a real Android device (preferably a rooted device) up and running. So, let's see how to create an emulator using the setup we have from the previous installation:
- Click the AVD Manager icon at the top of the Android Studio interface, shown in the following image:
- This will open the following window. There is one emulator by default, which was created during Android Studio's installation process:
- Click the Create Virtual Device button in the bottom-left corner of the previous window. This will display the following window:
- Now, choose your device. I chose a device with the following specs, to create an emulator of a small size:
- Click Next and you will see the following window. If you check Show downloadable system Images, you will see more options for your system images. We can leave it to the default of x86 for now.
Note
SDK Manager helps us to manage all system images and SDKs installed on the system.
- Finally, give your AVD a name and click Finish. In our case, we named it Lab Device:
- Once you are done with the previous steps, you should see an additional virtual device, shown here:
- Select the emulator of your choice and click the Play button to start the emulator:
When it's ready, you should see an emulator, as shown here:

Real device
It is recommended you have a real device along with an emulator to follow some of the concepts shown in this book.
The authors have used the following device for some of their demonstrations with real devices: Sony Xperia model c1504, rooted:

Apktool
Apktool is one of the most important tools that must be included in an Android penetration tester's arsenal. We will use this tool later for Android application reverse engineering, and for creating malware by infecting legitimate apps.
Download the latest version of Apktool from the following link (please download Apktool 2.0.2 or later to avoid some issues that exist in older versions):
http://ibotpeaches.github.io/Apktool/
We downloaded and saved it in the C:\APKTOOL
directory, as shown in the following screenshot:

Now, we can go ahead and launch Apktool, using the following command to see the available options:
java –jar apktool_2.0.2.jar --help

This completes the setup of Apktool. We will explore Apktool further in future chapters.
Dex2jar/JD-GUI
Dex2jar and JD-GUI are two different tools that are often used for reverse engineering Android apps. Dex2jar converts .dex
files to .jar
. JD-GUI is a Java decompiler that can decompile .jar
files to the original Java source.
Download both the tools from the links provided. No installation is required for these tools, as they are executables:
http://sourceforge.net/projects/dex2jar/

Burp Suite
Burp Suite is without a doubt one of the most important tools for any penetration testing engagement. Android apps are not an exemption. This section shows how we can set up Burp Suite to view the HTTP traffic from an emulator:
- Download the latest version of Burp Suite from the official website:
- To launch Burp Suite, double-click on the downloaded file, or simply run the following command, assuming that the downloaded file is in the current working directory:
- The preceding command launches Burp Suite and you should see the following screen:
- Now we need to configure Burp by navigating to Proxy | Options. The default configuration looks like this:
- We have to click the Edit button to check the Invisible option. We can do this by clicking the Edit button, navigating to Request handling and then checking Support invisible proxying (enable only if needed). This is shown in the following figure:
- Now, let's start our emulator in order to configure it to send its traffic through Burp Suite.
- Django:Web Development with Python
- PostgreSQL 11從入門到精通(視頻教學版)
- Mastering AndEngine Game Development
- C++ 從入門到項目實踐(超值版)
- Python數據分析從0到1
- Integrating Facebook iOS SDK with Your Application
- JavaScript動態網頁編程
- 并行編程方法與優化實踐
- 奔跑吧 Linux內核
- UX Design for Mobile
- Socket.IO Cookbook
- Mastering Clojure
- 美麗洞察力:從化妝品行業看顧客需求洞察
- Java Web應用開發
- JSP大學實用教程