linux ndk编译so,有的APP NDK 编译的SO文件 无法调用 PackageManager

反馈BUG之前,先issue里面搜看看有没有别人已经反馈过,重复的不予处理!!

问题描述

最近下了一个不可描述APP,实机是能运行的,不过在VXP里则报如下错误

07-14 15:48:28.672 13477 13477 E test2:fake_dlfcn: /system/lib/libart.so not found in my userspace

07-14 15:48:28.750 602 602 E SELinux : avc: denied { find } for service=persistent_data_block pid=13477 uid=10195 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:persistent_data_block_service:s0 tclass=service_manager permissive=0

07-14 15:48:28.750 13477 13477 W MethodInvocationStub: Unable to build HookDelegate: BinderInvocationStub.

07-14 15:48:28.772 13477 13477 W MethodInvocationStub: The Hook(finishActivity, com.lody.virtual.client.hook.proxies.am.ActivityTaskManagerStub$3) you added has been in existence.

07-14 15:48:28.774 13477 13477 I TransactionHandlerStub: inject transaction handler.

07-14 15:48:28.775 13477 13477 I TransactionHandlerStub: executor's handler: android.app.TransactionHandlerProxy@820b2dd

07-14 15:48:28.786 13477 13477 I TransactionHandlerProxy: getActivityClient : android.os.BinderProxy@3a2307f

07-14 15:48:28.790 13477 13477 I TransactionHandlerProxy: restart process, return

07-14 15:48:28.794 13477 13477 I VClientImpl: Binding application com.test.data, (com.test.data)

07-14 15:48:28.808 13477 13477 W System.err: java.lang.reflect.InvocationTargetException

07-14 15:48:28.808 13477 13477 W System.err: at java.lang.reflect.Method.invoke(Native Method)

07-14 15:48:28.808 13477 13477 W System.err: at mirror.RefStaticMethod.call(RefStaticMethod.java:119)

07-14 15:48:28.808 13477 13477 W System.err: at com.lody.virtual.client.env.SpecialComponentList.(SpecialComponentList.java:77)

07-14 15:48:28.808 13477 13477 W System.err: at com.lody.virtual.client.env.SpecialComponentList.isConflictingInstrumentation(SpecialComponentList.java:92)

07-14 15:48:28.808 13477 13477 W System.err: at com.lody.virtual.client.VClientImpl.bindApplicationNoCheck(VClientImpl.java:322)

07-14 15:48:28.808 13477 13477 W System.err: at com.lody.virtual.client.VClientImpl.bindApplication(VClientImpl.java:218)

07-14 15:48:28.808 13477 13477 W System.err: at com.lody.virtual.client.VClientImpl.bindApplicationForActivity(VClientImpl.java:213)

07-14 15:48:28.808 13477 13477 W System.err: at android.app.TransactionHandlerProxy.handleLaunchActivity(TransactionHandlerProxy.java:149)

07-14 15:48:28.808 13477 13477 W System.err: at android.app.TransactionHandlerProxy.handleLaunchActivity(TransactionHandlerProxy.java:146)

07-14 15:48:28.808 13477 13477 W System.err: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)

07-14 15:48:28.808 13477 13477 W System.err: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)

07-14 15:48:28.808 13477 13477 W System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)

07-14 15:48:28.808 13477 13477 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)

07-14 15:48:28.809 13477 13477 W System.err: at android.os.Handler.dispatchMessage(Handler.java:107)

07-14 15:48:28.809 13477 13477 W System.err: at android.os.Looper.loop(Looper.java:214)

07-14 15:48:28.809 13477 13477 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7356)

07-14 15:48:28.809 13477 13477 W System.err: at java.lang.reflect.Method.invoke(Native Method)

07-14 15:48:28.809 13477 13477 W System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)

07-14 15:48:28.809 13477 13477 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

07-14 15:48:28.809 13477 13477 W System.err: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.PackageManager android.app.Application.getPackageManager()' on a null object reference

07-14 15:48:28.809 13477 13477 W System.err: at android.webkit.WebViewFactory.isWebViewSupported(WebViewFactory.java:111)

07-14 15:48:28.809 13477 13477 W System.err: at android.webkit.WebViewFactory.getUpdateService(WebViewFactory.java:474)

07-14 15:48:28.809 13477 13477 W System.err: ... 19 more

07-14 15:48:28.810 13477 13477 W System.err: java.lang.NullPointerException: null receiver

07-14 15:48:28.810 13477 13477 W System.err: at java.lang.reflect.Method.invoke(Native Method)

07-14 15:48:28.810 13477 13477 W System.err: at mirror.RefMethod.call(RefMethod.java:63)

07-14 15:48:28.810 13477 13477 W System.err: at com.lody.virtual.client.env.SpecialComponentList.(SpecialComponentList.java:77)

07-14 15:48:28.810 13477 13477 W System.err: at com.lody.virtual.client.env.SpecialComponentList.isConflictingInstrumentation(SpecialComponentList.java:92)

07-14 15:48:28.810 13477 13477 W System.err: at com.lody.virtual.client.VClientImpl.bindApplicationNoCheck(VClientImpl.java:322)

07-14 15:48:28.810 13477 13477 W System.err: at com.lody.virtual.client.VClientImpl.bindApplication(VClientImpl.java:218)

07-14 15:48:28.810 13477 13477 W System.err: at com.lody.virtual.client.VClientImpl.bindApplicationForActivity(VClientImpl.java:213)

07-14 15:48:28.810 13477 13477 W System.err: at android.app.TransactionHandlerProxy.handleLaunchActivity(TransactionHandlerProxy.java:149)

07-14 15:48:28.810 13477 13477 W System.err: at android.app.TransactionHandlerProxy.handleLaunchActivity(TransactionHandlerProxy.java:146)

07-14 15:48:28.810 13477 13477 W System.err: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)

07-14 15:48:28.810 13477 13477 W System.err: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)

07-14 15:48:28.810 13477 13477 W System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)

07-14 15:48:28.810 13477 13477 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)

07-14 15:48:28.810 13477 13477 W System.err: at android.os.Handler.dispatchMessage(Handler.java:107)

07-14 15:48:28.810 13477 13477 W System.err: at android.os.Looper.loop(Looper.java:214)

07-14 15:48:28.810 13477 13477 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7356)

07-14 15:48:28.810 13477 13477 W System.err: at java.lang.reflect.Method.invoke(Native Method)

07-14 15:48:28.810 13477 13477 W System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)

07-14 15:48:28.810 13477 13477 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

07-14 15:48:28.811 13477 13477 I VClientImpl: Xposed is enabled.

07-14 15:48:28.812 13477 13477 D NativeEngine: DexOrJarPath = /data/user/0/io.va.exposed/virtual/data/app/com.test.data/base.apk, OutputPath = null.

07-14 15:48:28.808 13477 13477 W m.test.data: type=1400 audit(0.0:360): avc: granted { execute } for path="/data/data/io.va.exposed/virtual/data/app/com.test.data/oat/arm/base.odex" dev="sda13" ino=2024095 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file

07-14 15:48:28.815 13477 13477 D NativeEngine: DexOrJarPath = /data/user/0/io.va.exposed/virtual/data/app/com.test.data/base.apk, OutputPath = null.

07-14 15:48:28.817 13477 13477 W o.va.exposed:p: ClassLoaderContext classpath size mismatch. expected=0, found=1 (PCL[] | PCL[/data/user/0/io.va.exposed/virtual/data/app/com.test.data/base.apk*3789797101])

07-14 15:48:28.817 13477 13477 W o.va.exposed:p: Found duplicate classes, falling back to extracting from APK : /data/user/0/io.va.exposed/virtual/data/app/com.test.data/base.apk

07-14 15:48:28.817 13477 13477 W o.va.exposed:p: NOTE: This wastes RAM and hurts startup performance.

07-14 15:48:28.817 13477 13477 W o.va.exposed:p: Found duplicated class when checking oat files: 'LMTT/ThirdAppInfoNew;' in /data/user/0/io.va.exposed/virtual/data/app/com.test.data/base.apk and /data/user/0/io.va.exposed/virtual/data/app/com.test.data/base.apk

07-14 15:48:28.817 13477 13477 W o.va.exposed:p:

07-14 15:48:29.079 13477 13477 W o.va.exposed:p: JIT profile information will not be recorded: profile file does not exits.

07-14 15:48:29.079 13477 13477 W o.va.exposed:p: JIT profile information will not be recorded: profile file does not exits.

07-14 15:48:29.101 13477 13477 I ExposedBridge: com.test.data is not a Xposed module, do not init epic.force

07-14 15:48:29.102 13477 13477 D ExposedBridge: xposed installer's modules not exist, ignore.

07-14 15:48:29.102 13477 13477 I ExposedBridge: module:/data/user/0/io.va.exposed/virtual/data/app/de.robv.android.xposed.installer/base.apk is disabled, ignore

07-14 15:48:29.102 13477 13477 D ExposedBridge: xposed installer's modules not exist, ignore.

07-14 15:48:29.102 13477 13477 I ExposedBridge: module:/data/user/0/io.va.exposed/virtual/data/app/com.test.data/base.apk is disabled, ignore

07-14 15:48:29.104 13477 13477 I MultiDex: VM with version 2.1.0 has multidex support

07-14 15:48:29.104 13477 13477 I MultiDex: Installing application

07-14 15:48:29.104 13477 13477 I MultiDex: VM has multidex support, MultiDex support library is disabled.

07-14 15:48:29.102 13477 13477 W m.test.data: type=1400 audit(0.0:362): avc: granted { execute } for path="/data/data/io.va.exposed/virtual/data/app/com.test.data/lib/libnative-lib.so" dev="sda13" ino=2024087 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file

07-14 15:48:29.113 13477 13477 I o.va.exposed:p: System.exit called, status: -1112314295

07-14 15:48:29.113 13477 13477 I AndroidRuntime: VM exiting with result code -1112314295, cleanup skipped.

07-14 15:48:29.126 1371 7490 I ActivityManager: Process io.va.exposed:p0 (pid 13477) has died: fore TOP

它在onCreate的时候 调用里 一个native静态方法,用于校验包的SHA值,

public class App extends MultiDexApplication {

@override

public void onCreate(){

super.onCreate();

....

sign.check(this);

}

}

看smali 和ida 的伪代码,它传入了一个Context 到 native 方法 然后尝试调用 PackageManager 时 传入的 Context 是NULL导致的?

希望大神帮忙。

v4 = ((int (__fastcall *)(JNIEnv *))(*a1)->GetObjectClass)(a1);

v5 = v4;

v6 = ((int (__fastcall *)(JNIEnv *, int, const char *, const char *))(*v2)->GetMethodID)(

v2,

v4,

"getPackageManager",

"()Landroid/content/pm/PackageManager;");

v7 = _JNIEnv::CallObjectMethod(v2, v3, v6);

复现步骤

(请分步骤描述如何复现这个BUG,非毕现BUG请给出如何能大概率复现的步骤)

环境

机型:K20Pro MIUI12 / Pixel 2XL ASOP10 / MEIZU 16s Android 9

系统版本:

ROM版本:

Xposed 插件以及插件版本:

VirtualXposed版本:0.18.2

补充

(别的需要描述的内容)

写完之后,请自己再读一遍自己写的,如果你自己都读不懂,就不用说修复了

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/265355.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

微信小程序--页面传参

场景&#xff1a; A页面字段---传递到-->B页面 A页面wxml: wx:for----习惯用<block> 设置所点击的值----data-xxx 获取所点击的值---e.currentTarget.dataset.xxx wx:for-index---下标 wx:for-item---对象 <view wx:if"{{open}}"> <block wx:for&…

U-Boot顶层Makefile分析

参考&#xff1a;U-Boot顶层Makefile介绍 作者&#xff1a;一只青木呀 发布时间&#xff1a; 2020-10-22 16:22:17 网址&#xff1a;https://blog.csdn.net/weixin_45309916/article/details/109218569 目录0、学习目的1、准备好uboot源码2、分析顶层Makefile2.1、版本号2.2、M…

思科路由器的硬件组成

思科路由器的硬件组成常建议常建议CCNA的学员们&#xff0c;除了能灵活配置与应用思科的路由器和交换机以外&#xff0c;还需要掌握对路由器与交换机的常规维护工作&#xff0c;比如IOS的安装与升级&#xff0c;这个过程好比为一台全新的计算机安装操作系统&#xff0c;在此之前…

linux gone kde 图形程序 兼容,Oracle8i HowTo

现在假设你要在Linux上安装Oracle服务器,请先过以下5关&#xff1a;系统要求规划硬盘创建用户创建目录设置参数1.系统要求前提条件是能够安装运行Linux&#xff0c;然后应满足以下硬件要求&#xff1a;内存 RequirementsMemory  最小要求128 MB RAM.更多(256MB)内存可以提…

U-Boot启动流程详解

参考&#xff1a;U-Boot顶层目录链接脚本文件&#xff08;u-boot.lds&#xff09;介绍 作者&#xff1a;一只青木呀 发布时间&#xff1a; 2020-10-23 13:52:23 网址&#xff1a;https://blog.csdn.net/weixin_45309916/article/details/109240625 目录链接脚本 u-boot.lds 详解…

CF765F Souvenirs 解题报告

CF765F Souvenirs 题意翻译 给出\(n(2 \le n \le 10^5 )\) &#xff0c;一个长为\(n\)的序列\(a&#xff08;0 \le a_i \le 10^9 )\)。 给出\(m(1\le m \le 2*10^5 )\)&#xff0c;接下来\(m\)组询问。 每组询问给出一个\(l,r(1\le l < r\le n )\)&#xff0c;代表询问最小的…

grunt使用小记之开篇:grunt概述

Grunt是什么&#xff1f; Grunt是一个自动化的项目构建工具。如果你需要重复的执行像压缩&#xff0c;编译&#xff0c;单元测试&#xff0c;代码检查以及打包发布的任务。那么你可以使用Grunt来处理这些任务&#xff0c;你所需要做的只是配置好Grunt&#xff0c;这样能很大程度…

linux下使用nginx搭建集群,CentOS(linux) 下Nginx的安装(Nginx+Tomcat集群第一步)

CentOS(linux) 下Nginx的安装(NginxTomcat集群)CentOS 7.4(腾讯云)pcre库zlib库opensslNginx服务器安装gcc g开发类库yum -y install gcc automake autoconf libtool makeyum install gcc gcc-cwget https://ftp.pcre.org/pub/pcre/pcre-8.42.tar.gz解压pcre库tar -zxvf pcre-8…

Mybatis中 sequence不能自增长

解决方案&#xff1a; 参考&#xff1a; http://leeyee.github.io/blog/2013/08/22/mybatis-auto-increment-primary-key/ <insert id"addSupplier" parameterType"com.pinganfu.GouTong.common.dal.model.SmsSupplierDO" > <selectKey resultT…

在线生成透明ICO图标神器

此神器的链接为&#xff1a;http://ico.duduxuexi.com/ 大家可以将这个网址收藏好&#xff0c;本人亲测十分好用&#xff01;对我们的ios,安卓以及windows开发都有极大的好处。转载于:https://www.cnblogs.com/geeksongs/p/10040935.html

Vim的使用和快捷键介绍

参考&#xff1a;Linux–Vim的使用以及快捷键大全 作者&#xff1a;一只青木呀 发布时间&#xff1a; 2020-07-12 12:43:19 网址&#xff1a;https://blog.csdn.net/weixin_45309916/article/details/107297756 目录安装vim三种常用的模式三种常用模式的切换vim 快捷键1.一般模…

手机当电脑麦克风 linux,WO Mic让手机成为电脑的无线麦克风

WO Mic 是一款可以让 Android 手机成为电脑无线麦克风的应用&#xff0c;支持 windows 和 Linux&#xff0c;除了 WiFi&#xff0c;还能使用蓝牙以及 USB 数据线(只有安卓支持数据线连接)。官方下载页面如下&#xff1a;一、windows下安装连接windows主机上需要安装客户端和驱动…

如何编写 Cloud9 JavaScript IDE 的功能扩展

上周末我们在JSConf.eu发布了 Cloud9 IDE &#xff0c;同时发布了对应的GitHub项目。在4天时间里该项目得到340个人的关注和将近50个fork。Cloud9的口号是由"由Javascripters 为Javascripters创建的IED"&#xff0c;这口号有点递归&#xff0c;它意味着你可以hack这个…

make工具和Makefile基础语法(含有交叉编译、pthread_create()的处理)

目录含有交叉编译、pthread_create()处理初次使用1、编写Makefile文件2、make3、make cleanMakefile基本语法1、Makefile规则格式2、变量3、变量赋值符&#xff08;、:、?、&#xff09;4、模式规则&#xff08;通配符&#xff09;5、自动化变量6、伪目标7、条件判断8、函数使…

Object对象

原文地址&#xff1a;https://wangdoc.com/javascript/ JavaScript原生提供Object对象。JavaScript的所有其他对象都继承自Object对象&#xff0c;即都是Object的实例。Object对象的原生方法分为两类&#xff1a;Object本身的方法与Object的实例方法。Object对象本身的方法 所谓…

树莓派超声波模块测距

参考&#xff1a;树莓派超声波模块测距及C语言demo 作者&#xff1a;一只青木呀 发布时间&#xff1a; 2020-07-22 16:54:16 网址&#xff1a;https://blog.csdn.net/weixin_45309916/article/details/107516949 前面这篇博文已经讲过了&#xff1a;树莓派外设开发基础&#xf…

spring cloud (一、服务注册demo_eureka)

首先我的博客记理论知识很少&#xff0c;大家对spring boot、spring cloud 、分布式 、微服务什么的一点概念都没有的还请先去百度看看理论&#xff0c;知道了是做什么用的&#xff0c;然后再写下demo ,这样学起来才没有那么迷糊&#xff01; 我一般写下的demo都是我踩了很多坑…

JavaFX 的 UI 控件集 ControlsFX

出处&#xff1a;http://www.oschina.net/p/controlsfx JavaFX 的 UI 控件集 ControlsFX ControlsFX 开源项目旨在为 JavaFX 开发提供更多的 UI 控件和其他工具。 该项目主要针对JavaFX 8.0&#xff08;捆绑在JDK 8中&#xff09;&#xff0c;考虑到JavaFX中已经包含了一些控件…

c语言link错误什么原因,C语言 OpenCV错误:“LINK:致命错误LNK1104:无法打开文件’opencv_core231d.lib’”...

我正在尝试在visual studio opencv中编译一个简单的代码,但是遇到了这个错误.码&#xff1a;#include #include using namespace cv;int main ( int argc, char **argv ){Mat im_gray;Mat img_bw;Mat img_final;Mat im_rgb imread("001.jpg");cvtColor(im_rgb,im_gr…

shell 脚本编写使用

目录一、什么是shell 脚本二、shell 脚本写法三、shell 脚本语法1、第一个 shell 脚本2、read命令3、数值计算4、test命令5、中括号判断符6、默认变量7、条件判断8、函数9、循环一、什么是shell 脚本 终端中输入一系列命令完成一些操作&#xff0c;但是我们一条一条输入命令&a…