Android learning Experience (MAC)---Android anti-compilation (2)

Source: Internet
Author: User

1. Introduction

This analysis is a very simple program, is a primer on the introduction of anti-compilation tutorial
Mainly learn about the use of tools, the following is downloaded from the Internet test samples

Test Sample ex_05_01_.apk
Link: http://pan.baidu.com/s/1sjOIXJn Password: 5uq4

2. First, use Dex2jar and Jd-gui to view

Reference: Android Learning Tips (8)---Mac Dex2jar and Jd-gui use

先提取apk中的classes.dex,使用dex2jar工具


使用jd-gui打开classes_dex2jar.jar查看源代码

通过源代码查看,我们可以知道,这个程序是简单的字符串比较而且由于"gogo".equals("11")必定不能相等,所以每次都是提示错误
3. Now we're going to decompile

Reference: Android Learning Tips (2)---Mac anti-compilation under Android

首先,使用apktool工具

EX05_01\smali\irdc\ex05_01路径修改EX05_01$1.smali文件

The first method of modification:

在这里会进行判断,if-eqz,如果相等,则跳转到cond_0这里修改为if-nez

The second method of modification

修改字符串"11"为"gogo",则每次判断都为正确
4. Recompile apk and sign
使用apktool工具重新编译

使用signapk.jar进行签名

5. Installation Test

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android learning Experience (MAC)---Android anti-compilation (2)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.