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

插件包放在/data/local/tmp/目录下是有什么讲究吗? #48

Closed
nullptrx opened this issue Jul 14, 2019 · 3 comments
Closed

插件包放在/data/local/tmp/目录下是有什么讲究吗? #48

nullptrx opened this issue Jul 14, 2019 · 3 comments

Comments

@nullptrx
Copy link

是否正式上线包也建议放于该目录

@shifujun
Copy link
Collaborator

确实有讲究。这个tmp目录是一个Android系统的特殊目录。这个目录的特点是adb可以直接push写入。app都能读取,但不能写入。同时这个目录还是手机的内置存储,可以直接用DexClassLoader加载这个目录中的apk,而sdcard不行。所以,如果我们用adb push到sdcard上,想动态加载还要将apk再复制到应用的data目录才行。

正是环境肯定没法用这个目录,因为应用没有这个目录的写入权限。建议应用把插件包下载到宿主的data私有目录中,以保证数据安全,其他应用不能篡改。

@nullptrx
Copy link
Author

嗯 好的 谢谢

@qualcommcd
Copy link

good,thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants