[android-developers] Re: how to read the app package under /data/app

2009-10-29 Thread Zhihong GUO
Hi all, I just find a solution on get app package binary: first, the manifest.xml should have permission: INSTALL_PACKAGE then: PackageManager pm = this.getPackageManager(); Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);

[android-developers] Re: how to read the app package under /data/app

2009-10-29 Thread vovkab
Because in /data/app they added automaticaly, and to keep file names clear, they uses package name as file name. Any way you can get all files in data/app and system/app: for (int i = 0 ;i count; i++){ File f = new File(appList.get (i).activityInfo.applicationInfo.sourceDir); if (f !=

[android-developers] Re: how to read the app package under /data/app

2009-10-29 Thread Dianne Hackborn
The contents of /data/app and /system are private implementation details of the platform and you should never touch them directly or make assumptions about what they contain. The PackageManager is the API for accessing all information about installed applications. Please don't directly access

[android-developers] Re: how to read the app package under /data/app

2009-10-28 Thread Zhihong GUO
Can you give some example code on how to get the file name of the current wallpaper? Thanks 2009/10/27 vovkab vov...@gmail.com Yes you can. Just read it with File apkfile = new File(/data/app/com.package.name); On 27 окт, 11:43, Zhihong GUO gzhh...@gmail.com wrote: Hi All, I want

[android-developers] Re: how to read the app package under /data/app

2009-10-28 Thread vovkab
Seems like, you don't know what you need. Use WallpaperManager to get wallpapper. Why you need filename from package o_O? On 28 окт, 10:46, Zhihong GUO gzhh...@gmail.com wrote: Can you give some example code on how to get the file name of the current wallpaper? Thanks 2009/10/27 vovkab

[android-developers] Re: how to read the app package under /data/app

2009-10-27 Thread RichardC
You can't -- RichardC On Oct 27, 8:43 am, Zhihong GUO gzhh...@gmail.com wrote: Hi All, I want to read out the binary content of the .apk packages installed in /data/app. Not only the package information, but the content of the package itselt. How can I do that. Thanks a lot, James

[android-developers] Re: how to read the app package under /data/app

2009-10-27 Thread vovkab
Yes you can. Just read it with File apkfile = new File(/data/app/com.package.name); On 27 окт, 11:43, Zhihong GUO gzhh...@gmail.com wrote: Hi All, I want to read out the binary content of the .apk packages installed in /data/app. Not only the package information, but the content of the

[android-developers] Re: how to read the app package under /data/app

2009-10-27 Thread Zhihong GUO
but how can I get the com.package.name. It seems that you can't get all of the files' name by listFile() method. 2009/10/27 vovkab vov...@gmail.com Yes you can. Just read it with File apkfile = new File(/data/app/com.package.name); On 27 окт, 11:43, Zhihong GUO gzhh...@gmail.com wrote: