diff --git a/src/mvt/android/artifacts/dumpsys_packages.py b/src/mvt/android/artifacts/dumpsys_packages.py index 81da22e..a18d4f4 100644 --- a/src/mvt/android/artifacts/dumpsys_packages.py +++ b/src/mvt/android/artifacts/dumpsys_packages.py @@ -71,6 +71,7 @@ class DumpsysPackagesArtifact(AndroidArtifact): "timestamp": "", "first_install_time": "", "last_update_time": "", + "installer": "", "permissions": list(), "requested_permissions": list(), } @@ -126,6 +127,8 @@ class DumpsysPackagesArtifact(AndroidArtifact): details["version_code"] = line.split("=", 1)[1].strip() elif line.strip().startswith("timeStamp="): details["timestamp"] = line.split("=")[1].strip() + elif line.strip().startswith("installerPackageName="): + details["installer"] = line.split("=", 1)[1].strip() elif line.strip().startswith("firstInstallTime="): details["first_install_time"] = line.split("=")[1].strip() elif line.strip().startswith("lastUpdateTime="): diff --git a/tests/android_bugreport/test_bugreport.py b/tests/android_bugreport/test_bugreport.py index 2bfaef5..75df106 100644 --- a/tests/android_bugreport/test_bugreport.py +++ b/tests/android_bugreport/test_bugreport.py @@ -54,6 +54,8 @@ class TestBugreportAnalysis: == "com.samsung.android.provider.filterprovider" ) assert m.results[1]["package_name"] == "com.instagram.android" + assert m.results[0]["installer"] == "" + assert m.results[1]["installer"] == "com.android.vending" assert len(m.results[0]["permissions"]) == 4 assert len(m.results[1]["permissions"]) == 32