mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Add test cases relating to intents with the ACTION_INSTALL_PACKAGE action
This commit is contained in:
@@ -5,6 +5,8 @@ nodes
|
||||
| APKInstallation.java:29:24:29:38 | parse(...) | semmle.label | parse(...) |
|
||||
| APKInstallation.java:36:24:36:51 | fromFile(...) | semmle.label | fromFile(...) |
|
||||
| APKInstallation.java:43:31:43:48 | fromFile(...) | semmle.label | fromFile(...) |
|
||||
| APKInstallation.java:50:24:50:41 | fromFile(...) | semmle.label | fromFile(...) |
|
||||
| APKInstallation.java:57:24:57:41 | fromFile(...) | semmle.label | fromFile(...) |
|
||||
subpaths
|
||||
#select
|
||||
| APKInstallation.java:14:31:14:58 | fromFile(...) | APKInstallation.java:14:31:14:58 | fromFile(...) | APKInstallation.java:14:31:14:58 | fromFile(...) | Arbitrary Android APK installation. |
|
||||
@@ -12,3 +14,5 @@ subpaths
|
||||
| APKInstallation.java:29:24:29:38 | parse(...) | APKInstallation.java:29:24:29:38 | parse(...) | APKInstallation.java:29:24:29:38 | parse(...) | Arbitrary Android APK installation. |
|
||||
| APKInstallation.java:36:24:36:51 | fromFile(...) | APKInstallation.java:36:24:36:51 | fromFile(...) | APKInstallation.java:36:24:36:51 | fromFile(...) | Arbitrary Android APK installation. |
|
||||
| APKInstallation.java:43:31:43:48 | fromFile(...) | APKInstallation.java:43:31:43:48 | fromFile(...) | APKInstallation.java:43:31:43:48 | fromFile(...) | Arbitrary Android APK installation. |
|
||||
| APKInstallation.java:50:24:50:41 | fromFile(...) | APKInstallation.java:50:24:50:41 | fromFile(...) | APKInstallation.java:50:24:50:41 | fromFile(...) | Arbitrary Android APK installation. |
|
||||
| APKInstallation.java:57:24:57:41 | fromFile(...) | APKInstallation.java:57:24:57:41 | fromFile(...) | APKInstallation.java:57:24:57:41 | fromFile(...) | Arbitrary Android APK installation. |
|
||||
|
||||
@@ -43,4 +43,18 @@ public class APKInstallation extends Activity {
|
||||
intent.setDataAndType(Uri.fromFile(file), APK_MIMETYPE);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void installAPK5(String path) {
|
||||
File file = new File(Environment.getExternalStorageDirectory(), path);
|
||||
Intent intent = new Intent(Intent.ACTION_INSTALL_PACKAGE);
|
||||
intent.setData(Uri.fromFile(file));
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void installAPK6(String path) {
|
||||
File file = new File(Environment.getExternalStorageDirectory(), path);
|
||||
Intent intent = new Intent("android.intent.action.INSTALL_PACKAGE");
|
||||
intent.setData(Uri.fromFile(file));
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user