proguard

Android & Proguard?

假装没事ソ 提交于 2019-11-30 07:36:52
I am trying to use progurard with my android applications. The proguardGui accepts an input, and an output, the input requires a jar file. but the APK file for android doesn't contain any jar? I tried passing the apk file, and also the dex file inside the apx, but proguard doesn't accept them as an input. proguard only accepts jars, ears, wars, zips so how can i use the proguard gui with my android application? I detailed complete instructions on how to do it here: http://www.androidengineer.com/2010/07/optimizing-obfuscating-and-shrinking.html Basically, you have to first set up an Ant build

Obfuscated code

╄→гoц情女王★ 提交于 2019-11-30 07:27:06
I was asked to crate a simple app for android. The first one in fact that I'll be paid for, so I really don't want to screw it up :). One of the requirements was that the code must be obfuscated. I learned the general idea of obfuscating, but I don't want to make any silly mistakes. What precisely do I have to do to make the code obfuscated? Does exporting it as release do the job, or some other steps are required? Any remarks are also appreciated. PS. I'm using Eclipse if it matters. EDIT From the article suggested in the anwsers: To enable ProGuard so that it runs as part of an Ant or

Proguard won't keep a class member's enums

喜欢而已 提交于 2019-11-30 07:21:43
问题 I'm working on a library that is distributed as a java jar, and I'm running proguard on it in such a way as to only leave the required interfaces exposed. I have a configuration class with a bunch of member variables and some enum defines. My proguard script preserves the member variables fine, however, the enum definitions are being obfuscated. I've tried everything I can think of to force proguard to retain these internally defined and public enums, but I can't get it to work. Right now I'm

Aapt_rules.txt not found when building apk in android studio

非 Y 不嫁゛ 提交于 2019-11-30 06:41:59
When running proguard to build my apk file, I get the following error: Warning:Exception while processing task java.io.FileNotFoundException: C:\Users\Josh\Documents\AdscendUnityPlugin2.1.3\AdscendUnityPlugin2.1.3\HelloUnity\Export\HelloUnity\build\intermediates\proguard-rules\debug\aapt_rules.txt (The system cannot find the path specified) My gradle file: // GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.0' } } allprojects { repositories { jcenter()

Android ProGuard - only obfuscation

假如想象 提交于 2019-11-30 06:23:12
问题 Is it possible to use ProGuard for only obfuscation. I don't want ProGuard to remove any classes from my projects. My intention to use ProGuard is only for obfuscation so as to prevent reverse engineering. 回答1: Yes, by specifying -dontshrink -dontoptimize You can find details on all configuration options in the ProGuard manual. Note that shrinking and optimization may help preventing reverse engineering a bit. 来源: https://stackoverflow.com/questions/6633411/android-proguard-only-obfuscation

[Android]混淆代码后生成带签名的apk

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 06:17:17
Android从2.3的SDK开始,将ProGuard混淆代码的功能加入了进来。 我们可以从android sdk的tools目录下看到有一个proguard目录。说明具有了代码混淆的功能。 至于如何进行代码的混淆。我们需要做的很简单: 1、在用eclipse生成的android工程中都有一个project.properties文件,我们需要在该文件中增加下面一行代码: proguard.config=proguard.cfg 如图所示: 2、写混淆脚本proguard.cfg 我测试用的混淆脚本非常简单,只加了优化功能。如图所示: 对于proguard.cfg脚本的详细介绍参见: http://blog.csdn.net/laoyao_moyan/article/details/7353768 我们可以看到混淆android代码非常容易,但是需要注意的是:在eclipse下通过Run执行来生成的bin目录下的apk文件并没有被混淆,只有通过加入证书发布的apk才会混淆。 下面,我们来看看如何打包签名apk。 1、生成keystore; 在生成签名apk前,我们需要keystore,这个keystore可以用jdk下的keytool工具生成。 在cmd下,用命令行生成keystore如图所示: 按照上图中的命令,输入需要输入的内容。 其中,-alias android

NameNotFoundException webview

落爺英雄遲暮 提交于 2019-11-30 06:10:07
问题 I am getting errors from Crashlytics that indicates that some devices are missing com.google.android.webview. How is that even possible? java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp.app/com.myapp.ReaderActivity}: android.view.InflateException: Binary XML file line #29: Error inflating class com.myapp.MyWebView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360

Proguard vs Annotations

匆匆过客 提交于 2019-11-30 06:01:50
I have an app that uses ActiveAndroid, a database ORM library, that relies on annotations. @Table(name="test") public class DatabaseItem extends ActiveRecordBase<DatabaseItem> { public DatabaseItem(Context context) { super(context); // TODO Auto-generated constructor stub } @Column(name="counter") public int counter; } How do I get Proguard working nicely with this? Currently, I get errors about not finding a column name by ActiveAndroid when using Proguard. I guess it somehow mangles the annotation. My relevant Proguard configuration: #ActiveAndroid -keep public class com.activeandroid.**

Ignore external libraries with Android proguard

佐手、 提交于 2019-11-30 05:21:34
问题 I want to use Proguard mainly for obfuscation reasons. I have a problem with proguard in Android. I used simpleframework to parse XML; its external. In proguard cfg: -keepattributes *Annotation*,EnclosingMethod -keep public class org.simpleframework.**{ *; } -keep public class org.simpleframework.xml.**{ *; } -keep public class org.simpleframework.xml.core.**{ *; } -keep public class org.simpleframework.xml.util.**{ *; } -keep public class org.simpleframework.xml.stream.**{ *; } -keep public

Using Proguard to remove unused classes in Google Play Services library

旧街凉风 提交于 2019-11-30 05:17:32
问题 I'm trying to get rid of unused classes from Google Play Services library. I've created brand new android project with single empty activity. The project does not use anything from Google Play Services library. So I would expect, that when I build release (which includes running proguard in my configuration) I will see no difference in binary size comparing building with/without play-services dependency. But actually, I see ~700 KB difference in apk size. I've found relatively complex