Android Question Prevent APK from Unauthorised Reading

DawningTruth

Active Member
Licensed User
To my understanding an Android APK is inherently insecure and can be read by anyone.

This is problematic as we want to keep our code secret as it uses some clever tricks we do not want copied. Further, we need to embed encryption keys in our APK which we don't want read.

Any thoughts on how best to protect the APK in 2020?
 

KZero

Active Member
Licensed User
Longtime User
there is many ways to protect your APK against manipulations

the easiest way is to use Obfuscation in B4A when releasing your APK
that will make the function and variable names harder to trace and understand

you can perform an integrity check to check if the APK is modified using this code
https://www.b4x.com/android/forum/threads/clasess-dex-integrity-check.40133/

if you are looking for a harder way you can encrypt your classes with a professional app such as DexProtector (a bit expensive) , it's compatible with B4A apps
 
Upvote 0

DawningTruth

Active Member
Licensed User
Thx @KZero, that DexProtector tool looks very powerful. In your experience, how hard is it for a hacker to crack the standard Obfuscation in B4A?
 
Last edited:
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
This may help.

Regards,

Anand
 
Upvote 0

DawningTruth

Active Member
Licensed User
This may help.

Regards,

Anand
Thx @AnandGupta that clarifies :)
 
Upvote 0

DawningTruth

Active Member
Licensed User
This may help.

Regards,

Anand
Thx @AnandGupta that clarifies :)
 
Upvote 0
Top