Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android14上使用插件, 报错"java.lang.SecurityException: Writable dex file '/data/user/0/a.b.c/files/plugins/plugin-manager.apk' is not allowed." #1344

Closed
YeJiashen opened this issue Aug 7, 2024 · 1 comment · Fixed by #1357
Labels
PR welcome 欢迎贡献代码

Comments

@YeJiashen
Copy link

我们的项目将targetSdk升级到Android14后, 发现使用插件时报了如上错误, 官网要求使用动态代码加载时必须要将动态加载的文件设置为只读, 这块Shadow插件是否针对这种场景进行了适配呢?

https://developer.android.com/about/versions/14/behavior-changes-14?hl=zh-cn#safer-dynamic-code-loading

WX20240807-163923

@bellyjuice
Copy link

同问

@shifujun shifujun added the PR welcome 欢迎贡献代码 label Dec 11, 2024
AntonioShare added a commit to AntonioShare/Shadow that referenced this issue Dec 24, 2024
Fixed the issue causing crashes due to writable dex files on Android 14.
Tencent#1344
AntonioShare added a commit to AntonioShare/Shadow that referenced this issue Dec 24, 2024
Fixed the issue causing crashes due to writable dex files on Android 14.
Tencent#1344
AntonioShare added a commit to AntonioShare/Shadow that referenced this issue Dec 24, 2024
Fixed the issue causing crashes due to writable dex files on Android 14.
Tencent#1344
shifujun added a commit to AntonioShare/Shadow that referenced this issue Dec 24, 2024
由于插件apk都是BasePluginManager负责解压缩的,所以它应该负责它们禁止可写。

但是PluginManager本身的apk更新应该由更新文件的代码本身禁止文件可写入。

Tencent#1344
shifujun added a commit that referenced this issue Dec 24, 2024
由于插件apk都是BasePluginManager负责解压缩的,所以它应该负责它们禁止可写。

但是PluginManager本身的apk更新应该由更新文件的代码本身禁止文件可写入。

#1344
VeroZ1 pushed a commit to VeroZ1/Shadow that referenced this issue Dec 24, 2024
由于插件apk都是BasePluginManager负责解压缩的,所以它应该负责它们禁止可写。

但是PluginManager本身的apk更新应该由更新文件的代码本身禁止文件可写入。

Tencent#1344

(cherry picked from commit f345894)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR welcome 欢迎贡献代码
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants