失败运行的应用程序的根 [英] Failed running an app as root

查看:213
本文介绍了失败运行的应用程序的根的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了我想要去能够navegate /修改某些系统文件夹文件管理一个(例如, /数据/ )。我复制我的apk到/ system / app中,给了644权限的apk文件,并重新启动。然而,我的应用程序仍然运行没有root权限(拒绝简单地访问 /数据)。我使用的CyanogenMod 11。

I made a filemanager that I want go be able to navegate/modify some system folders (say, /data/). I copied my apk to /system/app, gave 644 permission to the apk file, and rebooted. Yet, my app is still run without root privileges (deny simple access to /data). I'm using Cyanogenmod 11.

任何线索?

谢谢!

升。

推荐答案

要澄清,该应用程序在是/系统/应用程序文件夹不运行它。 Android是基于Linux,所以有根访问权限意味着您的应用程序能够运行shell命令的<一个href=\"https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=define+root+linux\"相对=nofollow> root用户。

To clarify, the app being in the /system/app folder does not run it as root. Android is linux based, so having root access means that your app is able to run shell commands as the root user.

一般来说一个应用程序在是/系统/应用程序文件夹使所有申报权限提供给它,(例如,声明 WRITE_SECURE_SETTINGS 只做对系统应用的任何东西),然后在code,这是只提供给系统的应用程序现在可你们为好。

Generally speaking an app being in the /system/app folder makes all declared permissions available to it, (for example, declaring WRITE_SECURE_SETTINGS only does anything for system apps), and then the code that was only available to system apps is now available to yours as well.

有关的可靠性,您应该使用shell命令,其中可能任何的通常不可用。不要使用的java.io.File 到通常限于访问文件。

For reliability, you should use shell commands where possible for anything that's normally unavailable. Do not use java.io.File to access files that are normally restricted.

我会建议使用 RootTools ,因为它使运行shell命令以root身份容易得多。在这个 linux命令第3页小抄可能会涵盖你所需要的一切。

I would recommend using RootTools as it makes running shell commands as root much easier. The first 3 pages on this linux command cheat sheet will probably cover everything you need.

这篇关于失败运行的应用程序的根的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆