首页 文章

为什么应用程序在将其复制到/ system后不会成为系统应用程序?

提问于
浏览
2

我有一个应用程序,我需要使系统应用程序给它一些额外的权限 . 我想通过将其移至 /system/app 来做到这一点 . 我用 ES File Explorer 做到了 . 根据我的理解,应用程序必须安装在 SD Card 上,但即使它成为系统应用程序 . 以下是我的尝试(与移动或修改文件相关的任何步骤都是使用 ES File Explorer 完成的):

- Without using SD Card:

  • 我使用Android Studio运行应用程序,在设备上安装apk .

  • 我打开/ data / app并复制apk文件 .

  • 我打开/ system / app,我粘贴了apk .

  • 我重新启动设备 .

  • 我在屏幕上找到应用程序图标,我单击它,但未授予系统权限 . 注意,如果我在步骤2中使用 cut 而不是 copy ,当我重新启动设备时,我在 /system/app 中没有't find the app icon, although it'的apk .

- When using SD Card:

  • 我使用Android Studio运行应用程序,在设备上安装apk .

  • 我打开/ data / app并剪切apk文件 .

  • 我打开/ extSdcard并粘贴apk文件 .

  • 我从/ extSdCard复制apk,然后将其粘贴到/ system / app中 .

  • 我重新启动设备 . 在这种情况下,我找到了应用程序图标,但是当我打开它时,我得到了这个NullPointerException错误 .

EDIT: To solve the NullPointerException error, I long click the app icon in /system/app, select properties, click on change beside permissions, check everything under read, check only owner checkbox under write, and uncheck everything under execute, then I click OK. The problem now is after rebooting the device, I don't find the app icon, although it's apk is in /system/app and /extSdCard/android/data with size around 47 MB, but when I open the app manager from settings, I find it with sd card icon (not android app icon) and with size 0.0 B, why is this happening?

如何将应用程序正确地制作为系统应用程序?

1 回答

相关问题