方法:adb shell pm dump packages > Desktop/log2.txt
包名为"android"的apk属于平台apk,肯定是系统签名(平台签名),首先看一下包名为"android"的apk的签名信息:
Package [android] (ad28bfa):
userId=1000
sharedUser=SharedUserSetting{769a3df android.uid.system/1000}
pkg=Package{6103b22 android}
codePath=/system/framework/framework-res.apk
resourcePath=/system/framework/framework-res.apk
legacyNativeLibraryDir=/system/lib64/framework-res
primaryCpuAbi=arm64-v8a
secondaryCpuAbi=null
versionCode=30 minSdk=30 targetSdk=30
versionName=11
splits=[base]
apkSigningVersion=3
applicationInfo=ApplicationInfo{6103b22 android}
flags=[ SYSTEM PERSISTENT ALLOW_BACKUP ]
privateFlags=[ PRIVATE_FLAG_ACTIVITIES_RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION ALLOW_AUDIO_PLAYBACK_CAPTURE DEFAULT_TO_DEVICE_PROTECTED_STORAGE DIRECT_BOOT_AWARE PRIVILEGED PRIVATE_FLAG_ALLOW_NATIVE_HEAP_POINTER_TAGGING ]
forceQueryable=true
queriesPackages=[]
dataDir=/data/system
supportsScreens=[small, medium, large, xlarge, resizeable, anyDensity]
timeStamp=2021-07-12 23:27:41
firstInstallTime=2021-07-12 23:27:41
lastUpdateTime=2021-07-12 23:27:41
signatures=PackageSignatures{539b9b3 version:3, signatures:[a0521abc], past signatures:[]}
installPermissionsFixed=true
pkgFlags=[ SYSTEM PERSISTENT ALLOW_BACKUP ]
declared permissions:
android.permission.READ_CONTACTS: prot=dangerous, INSTALLED
android.permission.WRITE_CONTACTS: prot=dangerous, INSTALLED
........
User 0: ceDataInode=4316 installed=true hidden=false suspended=false distractionFlags=0 stopped=false notLaunched=false enabled=0 instant=false virtual=false
overlay paths:
/product/overlay/NavigationBarModeGestural/NavigationBarModeGesturalOverlay.apk
从上面信息可以看到,签名信息:signatures:[a0521abc] ,然后在 log2.txt 文件全局搜索“a0521abc”,可以列出所有系统签名的应用