Does Android Keep the .Apk Files? If So Where

Does Android keep the .apk files? if so where?

Preinstalled applications are in /system/app folder. User installed applications are in /data/app. I guess you can't access unless you have a rooted phone.
I don't have a rooted phone here but try this code out:

public class Testing extends Activity {
private static final String TAG = "TEST";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
File appsDir = new File("/data/app");

String[] files = appsDir.list();

for (int i = 0 ; i < files.length ; i++ ) {
Log.d(TAG, "File: "+files[i]);

}
}

It does lists the apks in my rooted htc magic and in the emu.

Where can I find the .apk file on my device, when I download any app and install?

There is an app in google play known as MyAppSharer. Open the app, search for the app that you have installed, check apk and select share. The app would take some time and build the apk. You can then close the app. The apk of the file is located in /sdcard/MyAppSharer

This does not require rooting your phone and works only for apps that are currently installed on your phone

How to find the apk path on android?

check in data/data/com.myappnamefoler.net

How do I get the APK of an installed app without root access?

Accessing /data/app is possible without root permission; the permissions on that directory are rwxrwx--x. Execute permission on a directory means you can access it, however lack of read permission means you cannot obtain a listing of its contents -- so in order to access it you must know the name of the file that you will be accessing. Android's package manager will tell you the name of the stored apk for a given package.

To do this from the command line, use adb shell pm list packages to get the list of installed packages and find the desired package.

With the package name, we can get the actual file name and location of the APK using adb shell pm path your-package-name.

And knowing the full directory, we can finally pull the adb using adb pull full/directory/of/the.apk. The APK file gets stored to the directory from which you run your console.

Credit to @tarn for pointing out that under Lollipop, the apk path will be /data/app/your-package-name-1/base.apk

Where is my APK stored when i run program on a android device?

In your Eclipse, it will be under the /bin folder.

In your device, your app will be in /data/app folder.

Does Android keep the .apk files? if so where?

Try this code in your app:

public class Testing extends Activity {
private static final String TAG = "TEST";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
File appsDir = new File("/data/app");

String[] files = appsDir.list();

for (int i = 0 ; i < files.length ; i++ ) {
Log.d(TAG, "File: "+files[i]);

}
}

Is there a way to specify a minimum storage space required for installing app with OBB extension?

No, this is not possible. But even if it was, there wouldn't be way of preventing the user of using more space between install and first run of your app.

Where does Eclipse put your apk files (that you're developing and testing)?

Go to your application floder. It must be in the workspace of eclipse. Inside application, there is bin folder. The apk is generated inside bin/ folder.

In the phone, pre installed apks are kept in system/app folder and installed applications are kept in data/app folder. Your phone should be rooted to access this folder.

But you can write small code to see what apks are present in this folder:

File apkDir = new File("/data/app");
String[] apkFiles = apkDir.list();

for (int i = 0 ; i < files.length ; i++ ) {
Log.d(TAG, "File: "+files[i]);
}

Hope this helps

Is there a way to recover an apk app

Your best bet would be to download the APK from the device using "adb shell pm path [package-name]" to see where the APK is installed, then "adb pull [path]" to download the file on your disk.

Then use a program such as dex2jar to get the class files, and another Java decompiler to get something as close to the source code.

Getting back the XML resources is a bit more tricky. All I can think of is running "aapt dump xmltree [your-app.apk] [path-of-xml]" to get a dump of what your XML resource looks like, but you'd still have to build XML from that manually.

Hopefully you didn't have native code (.so files), otherwise you're probably screwed.



Related Topics



Leave a reply



Submit