Is there a way to install apps by copying it to /data/app
To install app with adb I use
adb push app.apk /data/app
And then app installs.
But when I just copy file with RootExplorer to /data/app, it copies, but don't install.开发者_StackOverflow社区 It just lies there.
Is there a way to install apps with Terminal Emulator for example?
Actually, the way to install apps is:
adb install app.apk
If you want to do it programmatically, you will have to use an Intent
like this:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/app.apk")),"application/vnd.android.package-archive");
startActivity(intent);
In the case above, the apk is in the SDCard directory.
精彩评论