如何访问在Android /数据/应用程序,/ proc中正常应用程序 [英] how to access /data/app,/proc on Android for normal App

查看:211
本文介绍了如何访问在Android /数据/应用程序,/ proc中正常应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你知道如何访问应用程序/数据/应用程序,/ proc中? 如果没有根的Andoird手机。

Do you know how to access /data/app, /proc in the app? Without root the Andoird phone.

我finkd网络医生能做到这一点。 http://download.drweb.com/android/?lng=en 它是如何做到这一点?

I finkd Dr. Web can do this. http://download.drweb.com/android/?lng=en How does it achieve this?

推荐答案

您将有大部分是读访问,但不能写入权限。

You will have read access to most of it, but not write access.

Runtime.getRuntime().exec("ls -l /proc");

会给你的文件夹的内容,例如。你想达到什么目的?

will give you the folder contents, for example. What do you want to achieve?

只有系统的应用程序可以访问 /数据/应用程序,所以除非你获得从谷歌这样的键,你的运气了(至少,对于非根电话)。

Only system apps have access to /data/app, so unless you obtain such key from Google, you're out of luck (at least, for non-rooted phones).

要查找安装的应用程序,最好的办法是使用类PackageManager

To search for installed apps, your best bet is to use class PackageManager :

public abstract List<ApplicationInfo> getInstalledApplications (int flags)

检查API <一href="http://developer.android.com/reference/android/content/pm/PackageManager.html#getInstalledApplications%28int%29"相对=nofollow>这里

PS:这个问题来之前,我并没有对如何得到任何线索(如果有的话可能)系统的应用程序键(至少,我不知道怎么签订APK,可以接受的市场这样的关键)。

PS: before the question comes, I don't have any clue on how to get (if ever possible) a system app key (at least, I don't know how to sign an apk that can be acceptable for the market with such key).

这篇关于如何访问在Android /数据/应用程序,/ proc中正常应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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