Android development environment tutorial! Have you learned about mobile adaptation? Zhihu has won thousands of praises

Overview

I thought for a long time how to make the title of the article less pessimistic, but all kinds of copywriting are constantly being denied in my mind, either it is not so eye-catching, or the intention does not match. Finally, after thinking about it, this title really fits my recent insights.

I hope that after reading the article, friends who feel the same can think more about it.

Recently, due to the epidemic situation, I believe that many domestic friends have gradually begun to understand the experience of working at home. Basically, work from home is a relatively common phenomenon in IT companies in the United States. In general, large factories will be classified as No Meeting Day one day every week, saying that it is just a non-meeting day, but it is usually regarded as a work-from-home day by everyone. If you don’t have a meeting, then there is no difference between me at home and in the office.

It is precisely because I have more free time, so I have more time to read articles. I’m a person who doesn’t like reading books and prefers to read fragmented articles. It’s okay to look through the Nuggets and look through Android Weekly, which is my first choice when I go to the toilet.

But what makes me sad is that many Android technology bloggers disappeared in just one month or two . Click on their personal homepage and you will find that the last update may have been months or even a year ago. Roughly thinking that it is because of the epidemic, in fact, think about it, this matter is in line with the development law of technology.

Today this article mainly explains:

APK file decompilation

  • What is decompilation
  • How to prevent decompilation
  • Basic structure of APK file

Principles of APK Reinforcement

  • APK reinforcement overall architecture
  • The basic process of APK packaging
  • The meaning of Dex files

AES encryption project combat

  • APK reinforcement project actual combat
  • APK unpacking technology combat

1. APK file decompilation

1. What is decompilation
  • Definition: The process of
    using a compiler to generate a target program from a source program written in a source language
2. How to decompile?

First understand the file structure of apk

2. Reinforcement plan ideas

A programmer’s story:

After working hard to find a partner, he was found to be a dominatrix after marriage. She slept on her stomach when she slept at night, which caused the programmer to be unable to wash her feet. However, this programmer works very hard. In addition to going to work, he can also do some outsourcing and earn some extra money. So he thought of handing in the salary card, and put the extra money earned in his own small vault. Lived a life of sex since then

An encrypted story:

The purpose of protecting the core dex file is achieved by exposing the non-core dex file.

3. Basic principles

3.1 Apk packaging process

Packing is to add a protective shell on the basis of the original apk. If the dex file is modified, it needs to be repackaged, otherwise the apk cannot be installed. This requires us to learn in detail how the apk is packaged

3.2 What is a Dex file

The purpose of reinforcement is to protect the dex, directly speaking, it is to operate the dex file. You must know what the dex file is and whether you can directly use the knife

3.3 Dex file loading process

The packed file cannot be used directly. The dex file is encrypted, so we need to decrypt it. How to load the decrypted dex file?

3.4 How is the APK file produced?

image.png

4. Reinforce the overall framework


So here comes the question:

  • How to achieve the encryption effect?
  • Why are there two series of dex?
  • Where did the shell dex come from?
  • How does the shell dex protect the source dex?
  • How to sign?
  • How to run the new dex (how to unpack)?
4.1 Encryption process

4.2 How to sign APK files


4.3 How to run APK file (unpacking)

4.4 How to formulate certain classes in main dex
  • multiDexKeepFile: Manually add the class to be placed in Main.dex
com.umeng.analytics.Abb.class
  • multiDexKeepProguard: Use Proguard to manually add the classes to be placed in Main.dex
-keep public class com.tencent.bugly.**{*;}

to sum up

First of all, I feel that my own foundation is not enough. Major manufacturers seem to like to ask about these underlying principles.

Another part of the reason is that the information has not been read. On the one hand, I can easily deal with it after a few days before the test with that information (I still want to thank the information here, really good), so I feel good about myself. The information didn't go deep into it.

The previous preparation only involved Java, Android, computing networks, data structures and algorithms, and it was difficult for interviewers to investigate other basic courses.

The next step is to check for omissions and make targeted reviews.

In the end, the set of materials must be read this time. It is really too comprehensive. All the knowledge points are covered. There are knowledge points for almost all the problems I encountered in the interview! Here is also free to share with you, I hope you will not make the same mistakes as me! ! ! Be sure to finish it!


How to get: Click on my GitHub

%80%E5%8F%91%E4%B8%8D%E4%BC%9A%E8%BF%99%E4%BA%9B%EF%BC%9F%E5%A6%82%E4%BD%95%E9%9D%A2%E8%AF%95%E6%8B%BF%E9%AB%98%E8%96%AA%EF%BC%81.md)

Guess you like

Origin blog.csdn.net/a120464/article/details/113978667