0

Please Let me know Pro-guard in android applications is Essential or not before releasing in app store.

in some sources are mentioned using pro-guard in android applications, may create problem in application.

Link Source

Benefit

Reduced APK size
Improve performance
Obfuscation

Drawback

Potential misconfiguration
Additional testing required
Stack traces are difficult to read with obfuscated method names

The major drawback is that your app might crash when misconfigured.

Kumar
  • 969
  • 2
  • 22
  • 56

2 Answers2

1

The most important benefit of Proguard in my opinion is the obfuscation.

The gain in performance should be very limited. The reduction of APK size is also minor in most cases: the size of the Dalvik code in an APK is usually way inferior to the size of images and other assets.

Bottom line: Proguard is essential for your app if you want to make reverse engineering more difficult (i.e. prevent other programmers from stealing and reusing parts of your code that you consider valuable).

Sébastien
  • 13,831
  • 10
  • 55
  • 70
  • It may affect the Application (Crash).? – Kumar Oct 16 '15 at 06:22
  • @Kumar Yes, a misconfigured Proguard can lead your app to crash (basically if Proguard has removed a class that is in fact used in the app). This is why the article you mention states that "Additional testing is required" – Sébastien Oct 16 '15 at 06:26
  • any other alternate solutions for Protecting our apk from reverse engineers and Obfuscation? – Kumar Oct 16 '15 at 06:30
  • 1
    I don't know an alternative and would not advise looking for one. Proguard is a good tool, and most Android developers use it. – Sébastien Oct 16 '15 at 06:33
  • ok, in Proguard-projects.txt how to add a class want to protect? – Kumar Oct 16 '15 at 06:35
  • You 're going to have to read some Proguard documentation or tutorial if you want to integrate it correctly – Sébastien Oct 18 '15 at 06:21
  • notably, proguard only makes it /harder/ to reverse engineer; if you are used to reading poorly written Java, seeing methods renamed to b, c, d && can actually /improve/ readability. like Sebastien said, it also does little to help w. yr apk size it will prevent casual "hackers" from reverse engineering your code, but really, shouldn't you be iterating towards something better anyway? If you have anything truly important, like crypto keys, write it in native c and grab it through the JNI. – anthropic android Sep 15 '16 at 03:24
1

I'd say it depends on how important those benefits are to you. I was specifically asked to reduce the size of my APK, so I had to turn it on. This meant I had to take all the tests again and to tinker with the proguard configuration to get the optimal size, but in the end the customer was a lot more satisfied, so it was worth it.

panonski
  • 555
  • 5
  • 10
  • How much size did you save? Did you use many external libraries? – Sébastien Oct 16 '15 at 06:27
  • ya iam having more than 5 external libraries – Kumar Oct 16 '15 at 06:28
  • I cut down the size by 40%. I did use many external libraries, so obviously that was what has made the size reduction significant. – panonski Oct 16 '15 at 06:29
  • @panonski cut down size is not a big issue for me because it contains 6mb apk only so,it will not affect my App? – Kumar Oct 16 '15 at 06:33
  • 1
    I am not that experienced, but I'd say it's not just the number of MB, but the relation between the size and functionality. If all your app does is display a clock, then 6MB is way too much. I'd suggest you check out some existing apps that have a functionality similar to yours and see what their .APK size is. If you're anywhere near them, you're good. If your APK file is much larger than theirs, it's proguard time! – panonski Oct 16 '15 at 06:37