2

Generally we can get source code from the android installation package as shown in this reference link.

But, is it possible to secure the actual program code (source code) from a reverse engineer ?

Community
  • 1
  • 1
Venkat
  • 3,447
  • 6
  • 42
  • 61
  • _Source code_ or _compiled code_ or _obfuscated code_ are just different forms of same piece of information, if you can create one form from another, then be sure some one else can do the reverse.However, you can make the reverse process difficult by _deliberately confusing_ anyone who tries, hence obfuscation is your best bet. In short: use Proguard tool. – S.D. Nov 09 '12 at 06:56

2 Answers2

3

The code that you write is converted into class files then dex files, so directly viewing the code is not possible. but however dex compilers can be used to de-compile the source code but that requires some good knowledge so for that you have to obfuscate the code. Google by default provides proguard so that you can protect the code

you can read about proguard from here

In simple words you cannot hide the source code, but just add this line proguard.config=proguard.cfg to your project.properties file so making it difficult to be decoded . You can check here for an example

Girish Nair
  • 5,148
  • 5
  • 40
  • 61
0

No, because the android system has to be able to read it in order to run it. You can obfuscate it with tools like Proguard to make it harder to decompile, but there's no way to make it completely impossible.

Techwolf
  • 1,228
  • 13
  • 32