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
how to find my android application's storing path of apk file
finally i'd found the right answer that works in this purpose, thanks to @Kanak for her help :)
PackageManager pm = getPackageManager();
String uri = null;
for (ApplicationInfo app : pm.getInstalledApplications(0)) {
if(!((app.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) == 1))
if(!((app.flags & ApplicationInfo.FLAG_SYSTEM) == 1)){
uri=app.sourceDir;
if(uri.contains("com.example.test"))
break;
}
}
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.setType("image/*");
intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File(uri)));
startActivity(intent);
Getting my own .apk file name
what about getPackageResourcePath()
and
getPackageArchiveInfo(archiveFilePath, flags)
Related Topics
How Do Cursorloader Automatically Updates the View Even If the App Is Inactive
Android Device Is Not Connected to Usb for Debugging (Android Studio)
Android 4.4 Giving Err_Cache_Miss Error in Onreceivederror for Webview Back
Using an Android Library Project Activity Within Another Project
Mediametadataretriever.Getframeattime() Returns Only First Frame
Moving from One Activity to Another Activity in Android
Include Stetho Only in the Debug Build Variant
Strange Behavior of Android Videoview - "Can't Play Video"
How to Change Color of the Toggle Button
Swiperefreshlayout + Webview When Scroll Position Is at Top
Creating a Dialogpreference from Xml
Cardview Inside Recyclerview Has Extra Margins
Android Broadcastreceiver for Volume Key Up and Down
Can't Handle Both Click and Touch Events Simultaneously
Android Emulator - Trouble Creating User Accounts
Okhttp Library - Networkonmainthreadexception on Simple Post
Broadcast on Contact Add/Change
Having Issue on Real Device Using Vector Image in Android. Svg-Android