adb shell am start -a android.intent.action.VIEW -t "application/vnd.android.package-archive"
Intent intent = new Intent(); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); //Action intent.setAction(Intent.ACTION_VIEW); //data 和 MIME Type intent.setDataAndType(Uri.fromFile("/sdcard/a.apk"), "application/vnd.android.package-archive"); //startActivity startActivity(intent);
![]() | 1 gaoshiba OP md,每次搞半天不会,提个问立马就搞出来。。 adb shell am start -a android.intent.action.VIEW -t "application/vnd.android.package-archive" -d "cont ent://xxxxxxxxxxxxxxxxx" 这样就行了。。 |