Perfect proguard support

37 views
Skip to first unread message

Mingfai

unread,
Jun 16, 2013, 2:07:26 PM6/16/13
to tran...@googlegroups.com
hi,

I created a new project and add stuff to play with Transfuse. In the process, I keep testing proguard obfuscation. I package apk and open with apktool to verify.

Basically, except those Android framework classes(e.g. Activity, Service), everything else are obfuscated. The framework classes does just construct and invoke my real coded classes. Reverse engineers will take forever to figure out how my app work. 

There is no need to "keep" (-keep) any Transfuse class, only need to suppress warning (-dontwarn) for a few packages.

John mentioned in the Hangout on Air that Transfuse is not depended in runtime and all the stuff can be sent through proguard. (http://youtu.be/K7HneIGZDwA?t=1h8m35s) I can confirm it is the case.

Really awesome. :-)

regards,
mingfai

John Ericksen

unread,
Jun 16, 2013, 4:04:31 PM6/16/13
to tran...@googlegroups.com
Great to hear Mingfai.  You should only have to keep the transfuse-api classes.  In terms of Proguard, these should all be linked statically (ie: not through reflection) to the endpoints of your application, so it's a perfect scenario for Proguard obfuscation and my hope is that you don't have to define many proguard rules if any.  How large is your resulting apk?

John

Mingfai

unread,
Jun 17, 2013, 4:09:33 AM6/17/13
to tran...@googlegroups.com
(re-send to group)

"-keep" in proguard means keep it in the same name (as an entry point), So even if proguard rename/obfuscate the Transfuse API, it still work. Most of my dependency are obfuscated, so it's harder for ppl to figure out what third party lib I use. 

I guess as long as we don't use full class name as a string, proguard can rename/obfuscate it. but i'm no proguard expert. I guess, in general, except those classes directly referenced in AndroidManifest.xml, or required by the lib, the rest can be obfuscated/renamed.

It's not easy to measure the additional size of the Transfuse. My project includes a lot of third party lib and the apk size cover those lib. it's too convenient to add lib in Maven and I can't live without open source lib :-) 

I added proguard configuration to my hello-transfuse, the original apk is 73042, and the optimized & obfuscated apk is 49269 in size. The size drops to 2/3.



On Mon, Jun 17, 2013 at 4:04 AM, John Ericksen <johnc...@gmail.com> wrote:
Great to hear Mingfai.  You should only have to keep the transfuse-api classes.  In terms of Proguard, these should all be linked statically (ie: not through reflection) to the endpoints of your application, so it's a perfect scenario for Proguard obfuscation and my hope is that you don't have to define many proguard rules if any.  How large is your resulting apk?

John

--
You received this message because you are subscribed to the Google Groups "Transfuse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to transfuse+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages