proguard

Proguard error while evaluating instruction

♀尐吖头ヾ 提交于 2019-12-05 09:15:07
I upgrade my android project to 24 SDK version. But I got error in Proguard path of build: Unexpected error while evaluating instruction: Class = [com/google/android/gms/iid/zzd] Method = [zzeC(Ljava/lang/String;)V] Instruction = [11] invokevirtual #50 Exception = [java.lang.ArrayIndexOutOfBoundsException] (1) Unexpected error while performing partial evaluation: Class = [com/google/android/gms/iid/zzd] Method = [zzeC(Ljava/lang/String;)V] Exception = [java.lang.ArrayIndexOutOfBoundsException] (1) Warning: Exception while processing task java.io.IOException: java.lang

Setting up ProGuard with Android Library Projects

懵懂的女人 提交于 2019-12-05 08:34:44
问题 I'm trying to setup proguard for my Android project. My application project has very little code in it, but references a library project which has the vast majority of the code and any other external jars. That being said, I'm not sure how to setup proguard to take this into account. Right now my proguard config file is just the Android example from the ProGuard site. I've been searching around, but haven't found a lot or any documentation on using proguard with library projects, just jars. I

AndroidL 开机展示Keyguard锁屏机制初探

China☆狼群 提交于 2019-12-05 08:24:02
目录 目录 锁屏时序图 开机启动到PhoneWindowManager的systemReady方法 锁屏加载流程 PhoneWindowManager KeyguardServiceDelegate KeyguardServiceWrapper KeyguardService KeyguardViewMediator onSystemReady onKeyguardLocked showLocked handleShow 重点一 重点二 StatusBarKeyguardViewManager show reset showBouncerOrKeyguard 锁屏时序图 研究了将近两天的Android5.1 Keyguard锁屏机制,不得不说,各种饶。这里先把锁屏流程时序图贡献给大家: 使用的是线编辑工具ProcessOn,用来编辑时序图效果看起来不是太好。不过没有太大关系,这个时序图只是为了方便我们能清晰的对锁屏流程有个大致的了解,接下来,我会详细的分析每个类的具体流程。 声明:本文基于AndroidLollipop 5.1.1_r6版本进行的源码分析。 开机启动到PhoneWindowManager的systemReady方法 准备先从开机启动到PhoneWindowManager类的systemReady方法调用开始介绍。开机启动流程其实也很复杂

Proguard makes reflection with the R class in android application no longer work

元气小坏坏 提交于 2019-12-05 08:08:15
I have activated proguard in my project since I am trying to release this on Google Play. Even though proguard-android.txt has -keepclassmembers class **.R$* { public static <fields>; } which means it should not obfuscate the R.raw class that I need, I find that when running this code import headwayEnt.Blackhole_Darksun.R; private static final String RES_PATH = "headwayEnt.Blackhole_Darksun.R"; public static int getFileHandle(String fileName, String path) { String fullPath = RES_PATH + '$' + path; if (subClass == null) { Class<headwayEnt.Blackhole_Darksun.R> c = null; try { c = (Class<R>)Class

Android proguard Javascript Interface problem

可紊 提交于 2019-12-05 07:44:36
My project after obfuscation with proguard fail with javascriptinterface Here is the link with some suggestions for proguard configuration but it dosn't work in my case http://groups.google.com/group/android-developers/browse_thread/thread/f889e846fbf7ec3f?pli=1 So the calls from Javascript loose binding to the associated Java methods My proguard configuration regarding that -keep public class com.trans_code.android.JavascriptCallback -keep public class * implements com.trans_code.android.JavascriptCallback -keepclassmembers class * implements com.trans_code.android.JavascriptCallback {

Proguard and XStream with omitField() on Android

泪湿孤枕 提交于 2019-12-05 07:20:50
问题 I was using XStream for deserialization of xml in my Android app, and now I'm struggling to add Proguard (obfuscator) to the mix. Here's the runtime exception I run into (full: pastebin): WARN/System.err(6209): net.lp.collectionista.util.a.g: XStream could not parse the response WARN/System.err(6209): at net.lp.collectionista.a.s.a(Collectionista:215) ... WARN/System.err(6209): Caused by: com.thoughtworks.xstream.converters.ConversionException: id : id in loader dalvik.system.PathClassLoader[

MixPanelAPI NoClassDefFoundError

丶灬走出姿态 提交于 2019-12-05 06:16:03
问题 I'm struggling with java.lang.NoClassDefFoundError when invoking com.mixpanel.android.mpmetrics.MixpanelAPI It is because I run proguard (I have to). However I added proguard exclusion: -keep public class com.mixpanel.android.mpmetrics.** or -keep public class com.mixpanel.android.mpmetrics.MixpanelAPI { *; } but it doesn't help. Notice worth mentioning is that I get MixpanelAPI lib in that way: compile "com.mixpanel.android:mixpanel-android:4.0.0@aar" So it's aar , not standard jar . How to

Proguard Breaks Android WebView, Why?

℡╲_俬逩灬. 提交于 2019-12-05 06:11:22
I have a WebView in my activity, and using Proguard for obfuscation seems to break my WebView and i don't understand why. The code is pretty simple, I have the HTML file in my res/raw directory, here is the code that loads it fine when debugging. WebView mv = (WebView)findViewById(R.id.webView1); mv.loadUrl("file:///android_res/raw/wesite.html"); As soon as I create the apk for release, running it through proguard it doesn't work, i just get the cannot load page. I haven't added anything to the proguard config file as yet. biddulph.r Proguard obfuscates directories so if you are looking for

APP加固新方向——混淆和瘦身

落爺英雄遲暮 提交于 2019-12-05 05:56:52
在阿里云云栖社区举办的在线培训中,来自阿里移动安全部的陵轩带来了题为《 APP加固新方向——混淆和瘦身》的精彩分享。本次分享的主要内容包括 APP 加固的发展历程以及阿里内部对移动安全加固最新的研究——混淆和 APK 优化瘦身。 直播回顾视频: https://yq.aliyun.com/edu/lesson/play/393 以下内容是根据直播和PPT整理。 加固的意义 从安卓2.x版本起,加固技术就逐渐火了起来。最初,只有一些创业型公司涉及加固领域;随着安卓应用的逐渐升温,诸如阿里、腾讯、百度等大型互联网公司逐渐涉及该领域。 那么为什么要对APP进行加固呢?主要原因有三点:首先安卓的APP应用通常采用Java语言编写的,开发门槛低,容易被反编译(解释性语言的弊端);其次安卓市场比较混乱且可自签名,进而导致大量应用被二次打包,植入广告、木马;同时,手机Root后,黑客可利用Hook等技术手段可对应用进行动态攻击,获取应用的核心逻辑。综合这三点来看,安卓应用的安全系数是非常低的,因此APP加固就有了意义:应用加固之后可以有效减少反编译、二次打包、植入广告木马等操作。 传统加固 第一代加固技术采用的是Dex加密存储,解密时落地;落地之后通过自定义的DexClassLoader将解密出的Dex加载到内存中,然后程序运行该文件(Dex是APK的Java代码经过编译后生成的文件

Proguard - also use proguard files from modules

妖精的绣舞 提交于 2019-12-05 05:32:58
My projects build.gradle looks like following: android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig { applicationId "..." minSdkVersion 15 targetSdkVersion 22 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile project(':androKnife') } And my androKnife module does have it's own proguard file. How can I make my main project use this file as well? Is there some way to auto merge all proguard files of all modules, if I compile a project? Is