导航:首页 > 操作系统 > 安卓如何不让自己的包被混淆

安卓如何不让自己的包被混淆

发布时间:2022-09-03 19:24:41

㈠ 安卓开发加密res文件夹里的东西怎么混淆

代码混淆是apk加固的一个重要部分,res文件混淆也是代码混淆的其中一个工作,主要是混淆res文件夹下的layout的xml文件,混淆后如果打开就是乱码。

㈡ 对已经混淆的android代码,如何进行反编译

android代码混淆是指安卓开发者或者组织为了防止自己的产品敏感信息或者技术机密被人破解,而在生成apk文件的时候,通过设置一些替换规则,使java文件中指定的代码类的名字或者成员名字变为没有任何意义的字母,然后编译成class文件的过程。

已经混淆过的android代码反编译出来的都是一些没有任何意义的名字,是很难读懂的。没有好的办法。

㈢ 安卓开发对apk进行混淆,混淆后老是abcd的,能不能设置成其他内容

防逆向:通过对代码进行隐藏以及加密处理,使攻击者无法对二进制代码进行反编译,获得源代码或代码运行逻辑。

为了预防APK包被篡改的风险,可以把APP上传到腾讯御安全加固打个包,再放到服务器上给用户下载,更安全一些。

㈣ Android-android 怎么实现只混淆自己的代码,而不混淆第3方jar包

为了解决第三方包不被混淆,第三方包在混淆后,运行的时候会挂掉。我的错误是java.lang.ExceptionInInitializerError

[java] E/AndroidRuntime( 9608):
java.lang.ExceptionInInitializerError
E/AndroidRuntime( 9608): at
a.a.b.f.<init>(Unknown Source)
E/AndroidRuntime( 9608): at
a.a.b.e.<init>(Unknown Source)
E/AndroidRuntime( 9608): at
a.a.c.dg.b(Unknown Source)
E/AndroidRuntime( 9608): at
a.a.c.dg.a(Unknown Source)
E/AndroidRuntime( 9608): at
a.a.c.b.a(Unknown Source)
E/AndroidRuntime( 9608): at
a.a.c.ad.a(Unknown Source)

………………………………………………………………………………中间部分省略
最终我通过 加LOG的调试方法定位到是由于第三方jar包被混淆后的原因导致的。

解决方法:
在proguard-android.txt文件最后加入了-keep class org.jsoup.**这样一句代码,就是保持这个类不被混淆

附上proguard-android.txt源文件[html] # This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html

-dontusemixedcaseclassnames
-
-verbose

# 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.**

-keep class org.jsoup.**

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

-dontusemixedcaseclassnames
-
-verbose

# 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.**

-keep class org.jsoup.**

㈤ Android如何保持指定类不被混淆

包名 package com.example.test
类名 public class WebAppInterface{}
加上完整的包名才行。
-keep class com.example.test.WebAppInterface {*;}

㈥ android代码混淆时,如何防止第三方jar包被

rules文件加上类似: -keep public class * extends android.app.Fragment
可以选择不混淆哪些类

㈦ 安卓代码混淆怎么快速混淆实体类

我觉得一般实体的变量名不混淆就可以了, 一般反射操作实体都是通过Field操作变量, java 里面setXXX/getXXX 和XXX没有直接的联系, setXXX完全可以在set YYY

回答不容易,希望能帮到您,满意请帮忙采纳一下,谢谢 !

㈧ 安卓的apk文件加密保护如何做最近经常遇到apk被破解的情况!!求大神指点

遇到apk被破解的情况,现在很常见啊!推荐你一个apk应用加密服务平台,加密过程不需要应用改动任何源代码,兼容性和运行效率也不会受到任何影响。是移动互联网行业权威的移动应用安全服务提供商,现爱加密已经为3000多家移动应用开发者提供安全保护服务,保护App数量超过6000个,并与史上最坑爹的游戏、WiFi伴侣、兜兜公交、铜板街、Cindy历险记、美食杰、3D宝软桌面等多款知名应用合作,建议你去爱加密官网看看!

㈨ 安卓编程 如何进行代码混淆

安卓在eclipse中的ADT已经改变原有的模式了,你在项目文件中找到这两个文件,一般在项目根目录里。

如果有回答不当之处,还望见谅。

㈩ Android如何保持指定类不被混淆

包名 package com.example.test
类名 public class WebAppInterface{}
加上完整的包名才行。
-keep class com.example.test.WebAppInterface {*;}

阅读全文

与安卓如何不让自己的包被混淆相关的资料

热点内容
秦九昭算法v0怎么求 浏览:382
斗鱼java 浏览:894
程序员对老师的感谢 浏览:27
什么app能查看银行卡照片 浏览:22
win7pdf虚拟打印 浏览:330
程序员喜欢的女生条件 浏览:123
阿里云服务器ip搭建教程 浏览:85
解压和拉伸这一动画的原理是什么 浏览:740
tbc战士的命令怒吼 浏览:481
idea快捷键看源码 浏览:976
手机碎屏解压工具 浏览:245
jsonrpcphp使用 浏览:566
网上求职系统源码 浏览:699
pdf数字不显示 浏览:890
convertwordtopdf 浏览:253
程序编译基本单位 浏览:23
python分析图片角度 浏览:64
阿里云服务器能复制数据吗 浏览:562
python拼音转换文字 浏览:563
动画遗传算法 浏览:63