Current location - Quotes Website - Personality signature - How to sign and encrypt Android
How to sign and encrypt Android

Foreword:

After we finish writing our app, we still need to do two things: signature and encryption

Signature:

< p>1>Why sign?

It is mainly to ensure the security of the application. Why do you say that? So, let’s first assume that Android does not have the concept of signature.

Under this premise, let’s give an example to illustrate the importance of signature. For example, I wrote a myApp and installed it on my mobile phone. ,

At the same time, I installed another yourApp. When installing yourApp, I suddenly found that myApp was overwritten. Why? Because the package name of yourApp

is the same as the package name of myApp, then the security of the app written by the developer is not guaranteed. In other words, any

package name The same app can overwrite another app, and we know that it is very easy to obtain the package name of an application, so the concept of signature will follow. It is to ensure the security of the app, because only the developer knows the signature. Even if others know the package name of this application, but do not know the signature of this application, they still cannot overwrite it, so this This is the role of signatures in Android. At the same time,

We also need to remind our developers here that once the app is launched, the signature of the app must be saved, otherwise when upgrading again, < /p>

There is no way to overwrite it. It is best to make another copy of the signature and give it to your boss;

2>How to sign?

In android studio, select Build -----> ?Generate Signed APK... ?

Fill in the corresponding options (Note: If there is no key store, you can do it yourself Create a new one) -----> ?Next -----> ?

In this dialog box, select Finish for Build Type to complete the signature; ?

Note: (Signed apk generation directory)

The apk file after we signed it can be seen in the picture above. Don’t find the wrong signed application,

In this example , the directory is: C:\Users\DAI\Desktop

Encryption:

1>Why is encryption required?

In short, it is to prevent our apk from being cracked by others;

2>How to encrypt it?

Refer to the online practice, which is: use "Love Encryption" to achieve an encryption of the APK we wrote

Note: Our APK is encrypted on Love Encryption After that, its official website also clearly stated that it needs to be signed again, otherwise, the APK cannot run.

The signing tool has been provided on the official website of "?Love Encryption";

< p>In this way, when we crack our encrypted APK, we can find that the source code cannot be obtained directly! ! !

Read the full text