Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

build.gradle is secured from decompilation?

It is very easy to decompile the code and code is not secured even with the Proguard.

What I required is to secure "key" in the app. Is build.gradle secured ? can it be decompiled ?

buildConfigField "String", "Key", "\"1234567890\""

Update

as per commonsware's answer I got that it's not secured ? is there any other way I can manage this ?

like image 837
Vishal Khakhkhar Avatar asked May 14 '15 13:05

Vishal Khakhkhar


People also ask

How can I find the Gradle file after decompiling an apk?

you can't . when you compile apk it will merge all the file into single file . An APK file contains all of that program's code (such as . dex files), resources, assets, certificates, and manifest file.

Where is build Gradle file in apk?

Located in the project/module directory of the project this Gradle script is where all the dependencies are defined and where the SDK versions are declared. This script has many functions in the project which include additional build types and override settings in the main/app manifest or top-level build. gradle file.

What happens when Gradle build?

Gradle builds the complete dependency graph before any task is executed. This lies at the heart of Gradle and makes many things possible which would not be possible otherwise. Your build scripts configure this dependency graph. Therefore they are strictly speaking build configuration scripts.


1 Answers

Is build.gradle secured ?

build.gradle is not packaged into the APK.

The specific Gradle for Android statement you have in your question is adding a field to the code-generated BuildConfig Java class. This is handled like any other Java class from a code obfuscation standpoint.

like image 137
CommonsWare Avatar answered Oct 10 '22 04:10

CommonsWare