Current location - Quotes Website - Signature design - How to prevent Android app from decompiling?
How to prevent Android app from decompiling?
APK is regarded as a compressed format file on PC and an executable format file on mobile phone. The two formats also have different reading requirements for it, so we use this difference to realize pseudo-encryption. For PC, pseudo-encrypted APK can't be unpacked and decompiled, but for android system, it won't affect the normal installation and operation at all (systems before 4.2).

Pseudo-encryption principle: read the bytes of APK and find the last 5 bytes of 4 consecutive bytes, marked as "P K 0 1 02". If it is 0, it means no encryption; if it is 1, it means encryption (false encryption is forcibly changed to 1, and anti-false encryption only changes 1 to 0).

2

The comparison chart before and after pseudo encryption is as follows:

Before pseudo-encryption:

three

After pseudo-encryption:

end

Use third-party platform encryption

The steps are as follows:

Login/Registration → Upload APK→ Wait for system encryption → Download APK after completion → Sign APK→ Finish!

2

As a third-party platform in the mobile security industry, Ai encryption provides professional reinforcement protection schemes for Android APP mobile applications, including DEX file protection, resource file protection, XML main file protection, anti-secondary packaging protection, so file protection, memory protection and advanced confusion. Protect the Android App from being decompiled and cracked, and safeguard the vital interests of developers and friends!