Is it possible to secure an apk file by encrypting it to prevent decompilation. I just want to prevent the hackers from editing the source code of apk and re-uploading it to www.attacker-websites.com.
Suggestions are also appreciated.
Is it possible to secure an apk file by encrypting it to prevent decompilation. I just want to prevent the hackers from editing the source code of apk and re-uploading it to www.attacker-websites.com.
Suggestions are also appreciated.
well there is not standard way to prevent hackers as its there job to find a way around. Many people use dex2jar to get the source code by De-compiling apk file. but usually any code inside a thread like Async task is not De-compiled, you can't stop hackers from stealing code but you can make there job hard by using threads.
If you encrypt an APK, the system must have a key to decrypt it so that it can run. However, the attacker could root the device to obtain the key and then decrypt it. After the app is decrypted, Java is not difficult to reverse engineer. Unfortunately, there is no fool-proof way of preventing the reverse engineering of Android apps. The best option is currently to make the attacker's life miserable by using obfuscation (even though this goes against Kerckhoffs's principle). Tools such as ProGuard help to make your application more difficult to reverse engineer (but again, not impossible).
In short, unfortunately encrypting the APK will not be advantageous when the attackers likely have root access to their device and can find the key.