android 加密导出apk

在导出apk加密程序时,只需将项目中project.properties的proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt注释取消即可

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-19

若引用第三方jar程序将报错,此时要打开sdk所在目录sdk\tools\proguard下的proguard-android.txt文件,加入两行代码

-ignorewarnings
-libraryjars lib/ksoap2-android-assembly-2.5.4-jar-with-dependencies.jar (jar包路径)

修改后文件如下

# This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html

-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
-ignorewarnings
# Optimization is turned off by default. Dex does not like code run
# through the ProGuard optimize and preverify steps (and performs some
# of these optimizations on its own).
-dontoptimize
-dontpreverify
# Note that if you want to enable optimization, you cannot just
# include optimization flags in your own project configuration file;
# instead you will need to point to the
# "proguard-android-optimize.txt" file instead of this one from your
# project.properties file.

-keepattributes *Annotation*
-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService

# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
-keepclasseswithmembernames class * {
native <methods>;
}

# keep setters in Views so that animations can still work.
# see http://proguard.sourceforge.net/manual/examples.html#beans
-keepclassmembers public class * extends android.view.View {
void set*(***);
*** get*();
}

# We want to keep methods in Activity that could be used in the XML attribute onClick
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}

# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}

-keepclassmembers class **.R$* {
public static <fields>;
}

# The support library contains references to newer platform versions.
# Don‘t warn about those in case this app is linking against an older
# platform version. We know about them, and they are safe.
-dontwarn android.support.**

时间: 2024-12-09 23:01:13

android 加密导出apk的相关文章

Android Studio 导出APK

(1)Android Studio菜单Build->Generate Signed APK     (2)弹出窗口 (3)创建密钥库及密钥,创建后会自动选择刚创建的密钥库和密钥(已拥有密钥库跳过) 点击“Create new...”按钮创建密钥库 Key store path:密钥库文件的地址 Password/Confirm:密钥库的密码 Key: Alias:密钥名称 Password/Confirm:密钥密码 Validity(years):密钥有效时间 First and Last Na

Eclipse导出APK文件报错 android lint problem

今天准备用Eclipse导出APK文件上传各大安卓应用商店,结果发现血红一片. 继续导出,报错如下: 百度了一下,发现是android lint problem错误 Lint经常会扫描出一些必需要修复的错误(issue).但是这些issue一旦结合实际的上下文,或许实际上不是真正的problem.如果你结合上下文进行分析,确定该issue不是一个problem的话,它可以对此进行标记,以便lint不再继续keep pointing it out. 将"Run full error check w

如何防止Android反编译apk,爱加密进行安卓加密保护!

近年来,针对网购.交友网站,发送伪装成"样品"或"私照"的钓鱼.木马链接类诈骗逐渐增多:套取个人信息类诈骗手法有所升级,如借卡转账.机票退订等,要求提供银行卡卡号.身份证号及短信验证码:大家熟悉的网络买卖,买家可能"易容",网上的店铺也可能是"僵尸".尤其是近日<E天下>头条报道<小心!不明链接勿乱按>后,引来众多读者反馈:骗子是怎样伪装的呢?常用的伎俩有哪些?现在,爱加密就来为大家一一揭晓,帮助大家在

防止Android手游apk遭破解, 爱加密安卓App加固保安全!

现如今手机App的开发者无论是个人还是企业,在开发过程中,许多App应用开发商的技术不够成熟,因此在App中会留有漏洞.再加上有些市场对恶意App无法进行识别!导致许多垃圾的应用程序非常容易出现在用户的手机上,如果只是伤害手机系统,那问题还不那么严重.但是威胁到个人信息和财产安全,结果就损失惨重,所以提醒大家下载App应用时多注意点. 目前手游App很火,用户量很多,但是想找到一款免费的手游并不容易.很多手游要么就是一大堆植入的广告,要么就是挂着免费的幌子,下载后一打开还要收费的.而游戏本身的体

如何保障移动开发者apk安全,实施Android加密App防护!

据信息安全研究人员已经发现了一种新的Android恶意软件.这种木马会对用户手机中的照片.视频和文档进行加密,并要求用户支付赎金才能恢复.业内人士认为,这一恶意软件集成了社交工程.密 码学技术和互联网架构,未来可能成为一类更严重.更广泛的威胁.此前,第一个短信吸费的Android木马也诞生于东欧地区. 这款恶意软件会扫描用户手机的SD卡,关注扩展名为jpeg.jpg.png.bmp.gif.pdf.doc.docx.txt.avi.mkv.3gp和mp4的文件,随后使用高级加密标准对这些文件进行

unity配置Android SDK,并构建导出apk格式

1.点击 Edit  -->   preferences出现如图界面 2.在Android中SDK选项中放入Android SDK:JDK选项中放入Java JDK.(下载地址:http://tools.android-studio.org/index.php/sdk) 3.点击关闭,unity中的Android就配置好了. 4.编写好程序构建导出apk格式:File -->Build Settings出现如下界面, 5.点击4的红圈处,出现如图属性,将上方名称对应填到下方packageNam

Android Studio 导出未签名 apk

According to Android: Build Unsigned APK with Gradle you can simply build your application with gradle. In order to do that: click on the drop down menu on the toolbar at the top (usually with android icon and name of your application) select Edit co

Unity Android加密DLL笔记

unity mono 地址:https://github.com/Unity-Technologies/mono 下载与unity版本对应的unity mono. brew安装:http://brew.sh/index_zh-cn.html mono需要autoconf automake libtool pkg-config这些工具. brew install autoconf automake libtool pkg-config. mono下/mono/metadata/image.c里mo

Android中的Apk的加固(加壳)原理解析和实现

Android中的Apk的加固(加壳)原理解析和实现 标签: android 2015-09-13 13:58 42287人阅读 评论(49) 收藏 举报 本文章已收录于:  Android知识库  分类: Android(140)  版权声明:本文为博主原创文章,未经博主允许不得转载. 目录(?)[+] 一.前言 今天又到周末了,憋了好久又要出博客了,今天来介绍一下Android中的如何对Apk进行加固的原理.现阶段.我们知道Android中的反编译工作越来越让人操作熟练,我们辛苦的开发出一个