Android中PackageManager學習筆記(2)-PackageInfo
PackageInfo
我們通過下面的方法獲得PackageInfo物件資訊:
getInstalledPackages(int flags)
引數flags有如下的值:
GET_ACTIVITIES :值為1.如果想獲得所有<activity>標籤的資訊,需要傳入這個值.然後通過PackageInfo.
GET_GIDS:值為256.獲得group id的資訊.
GET_CONFIGURATIONS:值16384.獲得<uses-configuration>標籤和<uses-feature>標籤的資訊.
GET_INSTRUMENTATION:值16.獲得<instrumentation>標籤的資訊
GET_PERMISSIONS:值4096.獲得<permission>標籤的資訊.
GET_PROVIDERS:值8.獲得<provider>標籤的資訊
GET_RECEIVERS:值2.獲得<receive>標籤的資訊
GET_SERVICES:值4.獲得<service>標籤的資訊
GET_SIGNATURES:值64.獲得認證的資訊.
GET_UNINSTALLED_PACKAGES:值8192.如果有沒安裝的apk,一起獲得包資訊。
我想應該是你傳入相應的引數值,才能得到相應的資訊。我們先把程式碼貼上:
List<PackageInfo> list2 = packageManager.getInstalledPackages(0); if (list2.size() != 0) { for (PackageInfo info : list2) { // <application>標籤下的所有activity標籤 ActivityInfo[] activities = info.activities; if (activities != null && activities.length != 0) { for (int i = 0; i < activities.length; i++) { Log.i(TAG, "activities:" + i + "=" + activities[i]); } } ProviderInfo[] providers = info.providers; if (providers != null && providers.length != 0) { for (int i = 0; i < providers.length; i++) { Log.i(TAG, "providers:" + i + "=" + providers[i]); } } PermissionInfo[] permissions = info.permissions; if (permissions != null && permissions.length != 0) { for (int i = 0; i < permissions.length; i++) { Log.i(TAG, "permissions:" + i + "=" + permissions[i]); } } FeatureInfo[] reqFeatures = info.reqFeatures; if (reqFeatures != null && reqFeatures.length != 0) { for (int i = 0; i < reqFeatures.length; i++) { Log.i(TAG, "reqFeatures:" + i + "=" + reqFeatures[i]); } } ConfigurationInfo[] configs = info.configPreferences; if (configs != null && configs.length != 0) { for (int i = 0; i < configs.length; i++) { Log.i(TAG, "configs:" + i + "=" + configs[i]); } } ActivityInfo[] receivers = info.receivers; if (receivers != null && receivers.length != 0) { for (int i = 0; i < receivers.length; i++) { Log.i(TAG, "receivers:" + i + "=" + receivers[i]); } } InstrumentationInfo[] instrumentations = info.instrumentation; if (instrumentations != null && instrumentations.length != 0) { for (int i = 0; i < instrumentations.length; i++) { Log.i(TAG, "instrumentations:" + i + "=" + instrumentations[i]); } } String[] requestedPermissions = info.requestedPermissions; if (requestedPermissions != null && requestedPermissions.length != 0) { for (int i = 0; i < requestedPermissions.length; i++) { Log.i(TAG, "requestedPermissions:" + i + "=" + requestedPermissions[i]); } } ServiceInfo[] services = info.services; if (services != null && services.length != 0) { for (int i = 0; i < services.length; i++) { Log.i(TAG, "services:" + i + "=" + services[i]); } } Signature[] signatures = info.signatures; if (signatures != null && signatures.length != 0) { for (int i = 0; i < signatures.length; i++) { Log.i(TAG, "signatures:" + i + "=" + signatures[i]); } } int[] gids = info.gids; if(gids!=null&&gids.length!=0){ for (int i = 0; i < gids.length; i++) { Log.i(TAG, "gids:" + i + "=" + gids[i]); } } int versionCode = info.versionCode; Log.i(TAG, "versionCode: "+versionCode); String versionName = info.versionName; Log.i(TAG, "versionName: "+versionName); Log.i(TAG, "==================================="); } }
然後我們分別傳參,檢視輸出資訊.
<activity>標籤
flags = 1.
getInstalledPackages(1);
Log資訊:
03-29 09:33:59.681: I/MainActivity(2368): activities:0=ActivityInfo{4219e6b0 com.android.deskclock.DeskClock} 03-29 09:33:59.681: I/MainActivity(2368): activities:1=ActivityInfo{4219ec58 com.android.deskclock.SettingsActivity} 03-29 09:33:59.681: I/MainActivity(2368): activities:2=ActivityInfo{4219f1a8 com.android.deskclock.worldclock.CitiesActivity} 03-29 09:33:59.681: I/MainActivity(2368): activities:3=ActivityInfo{4219f710 com.android.deskclock.alarms.AlarmActivity} 03-29 09:33:59.681: I/MainActivity(2368): activities:4=ActivityInfo{4219fc68 com.android.deskclock.ScreensaverActivity} 03-29 09:33:59.681: I/MainActivity(2368): activities:5=ActivityInfo{421a01c0 com.android.deskclock.HandleApiCalls} 03-29 09:33:59.681: I/MainActivity(2368): activities:6=ActivityInfo{421a07f0 com.android.deskclock.HandleSetAlarm} 03-29 09:33:59.681: I/MainActivity(2368): activities:7=ActivityInfo{421a0e20 com.android.deskclock.ScreensaverSettingsActivity} 03-29 09:33:59.681: I/MainActivity(2368): activities:8=ActivityInfo{421a1388 com.android.deskclock.timer.TimerAlertFullScreen} 03-29 09:33:59.681: I/MainActivity(2368): activities:9=ActivityInfo{421a18f0 com.sprd.alarm.AlarmActivity} 03-29 09:33:59.681: I/MainActivity(2368): activities:10=ActivityInfo{421a1e30 com.sprd.worldclock.CityChooserActivity} 03-29 09:33:59.681: I/MainActivity(2368): activities:11=ActivityInfo{421a23e8 com.sprd.worldclock.DeleteCity} 03-29 09:33:59.681: I/MainActivity(2368): activities:12=ActivityInfo{421a2928 com.sprd.worldclock.WCReorderActivity} 03-29 09:33:59.681: I/MainActivity(2368): activities:13=ActivityInfo{421a2e78 com.sprd.timer.TimerAlertActivity} 03-29 09:33:59.681: I/MainActivity(2368): versionCode: 301 03-29 09:33:59.681: I/MainActivity(2368): versionName: 3.0.0 03-29 09:33:59.681: I/MainActivity(2368): =================================== 03-29 09:33:59.681: I/MainActivity(2368): versionCode: 19 03-29 09:33:59.681: I/MainActivity(2368): versionName: 4.4.2-W14.12.2-02 03-29 09:33:59.681: I/MainActivity(2368): =================================== 03-29 09:33:59.681: I/MainActivity(2368): activities:0=ActivityInfo{421a3e60 com.android.shell.BugreportWarningActivity} 03-29 09:33:59.681: I/MainActivity(2368): versionCode: 19 03-29 09:33:59.681: I/MainActivity(2368): versionName: 4.4.2-W14.12.2-02 03-29 09:33:59.681: I/MainActivity(2368): =================================== 03-29 09:33:59.681: I/MainActivity(2368): activities:0=ActivityInfo{421a48e8 com.android.stk1.StkMenuActivity} 03-29 09:33:59.681: I/MainActivity(2368): activities:1=ActivityInfo{421a4e38 com.android.stk1.StkInputActivity} 03-29 09:33:59.681: I/MainActivity(2368): activities:2=ActivityInfo{421a5388 com.android.stk1.StkDialogActivity} 03-29 09:33:59.681: I/MainActivity(2368): activities:3=ActivityInfo{421a58d8 com.android.stk1.ToneDialog} 03-29 09:33:59.681: I/MainActivity(2368): activities:4=ActivityInfo{421a5e20 com.android.stk1.StkMessageActivity} 03-29 09:33:59.681: I/MainActivity(2368): versionCode: 19 03-29 09:33:59.681: I/MainActivity(2368): versionName: 4.4.2-W14.12.2-02 03-29 09:33:59.681: I/MainActivity(2368): ===================================
只得到activity、versionCode、versionName屬性的值。
<service>標籤
flags=4.
getInstalledPackages(4)
Log輸出:
03-29 09:38:18.921: I/MainActivity(2534): services:0=ServiceInfo{41f8ca40 com.android.deskclock.alarms.AlarmService}
03-29 09:38:18.921: I/MainActivity(2534): services:1=ServiceInfo{41f8cf78 com.android.alarmclock.DigitalAppWidgetService}
03-29 09:38:18.921: I/MainActivity(2534): services:2=ServiceInfo{41f8d538 com.android.deskclock.Screensaver}
03-29 09:38:18.921: I/MainActivity(2534): services:3=ServiceInfo{41f8da60 com.android.deskclock.TimerRingService}
03-29 09:38:18.931: I/MainActivity(2534): services:4=ServiceInfo{41f8df90 com.android.deskclock.stopwatch.StopwatchService}
03-29 09:38:18.931: I/MainActivity(2534): services:5=ServiceInfo{41f8e4d8 com.sprd.timer.TimerAlertService}
03-29 09:38:18.931: I/MainActivity(2534): versionCode: 301
03-29 09:38:18.931: I/MainActivity(2534): versionName: 3.0.0
03-29 09:38:18.931: I/MainActivity(2534): ===================================
03-29 09:38:18.931: I/MainActivity(2534): services:0=ServiceInfo{41f8ef40 com.android.keyguard.KeyguardService}
03-29 09:38:18.931: I/MainActivity(2534): versionCode: 19
03-29 09:38:18.931: I/MainActivity(2534): versionName: 4.4.2-W14.12.2-02
03-29 09:38:18.931: I/MainActivity(2534): ===================================
03-29 09:38:18.931: I/MainActivity(2534): versionCode: 19
03-29 09:38:18.931: I/MainActivity(2534): versionName: 4.4.2-W14.12.2-02
03-29 09:38:18.931: I/MainActivity(2534): ===================================
03-29 09:38:18.931: I/MainActivity(2534): services:0=ServiceInfo{41f8fe60 com.android.stk1.StkAppService}
03-29 09:38:18.931: I/MainActivity(2534): versionCode: 19
03-29 09:38:18.931: I/MainActivity(2534): versionName: 4.4.2-W14.12.2-02
03-29 09:38:18.931: I/MainActivity(2534): ===================================
只得到service、versionCode、versionName的值。
<receiver>標籤
flags=2.
getInstalledPackages(2)
Log輸出:
03-29 09:41:21.031: I/MainActivity(2678): receivers:0=ActivityInfo{41f8dbe8 com.android.deskclock.alarms.AlarmStateManager}
03-29 09:41:21.031: I/MainActivity(2678): receivers:1=ActivityInfo{41f8e1a8 com.android.deskclock.AlarmInitReceiver}
03-29 09:41:21.031: I/MainActivity(2678): receivers:2=ActivityInfo{41f8e760 com.android.alarmclock.AnalogAppWidgetProvider}
03-29 09:41:21.031: I/MainActivity(2678): receivers:3=ActivityInfo{41f8ed20 com.android.alarmclock.DigitalAppWidgetProvider}
03-29 09:41:21.031: I/MainActivity(2678): receivers:4=ActivityInfo{41f8f2e8 com.android.alarmclock.DigitalWidgetViewsFactory}
03-29 09:41:21.031: I/MainActivity(2678): receivers:5=ActivityInfo{41f8f8b0 com.android.deskclock.timer.TimerReceiver}
03-29 09:41:21.031: I/MainActivity(2678): receivers:6=ActivityInfo{41f8fe68 com.sprd.timer.TimerReceiver}
03-29 09:41:21.031: I/MainActivity(2678): receivers:7=ActivityInfo{41f90408 com.sprd.alarmwidget.SpreadAnalogAppWidgetProvider}
03-29 09:41:21.031: I/MainActivity(2678): receivers:8=ActivityInfo{41f909d0 com.sprd.alarmwidget.SpreadAnalogAppWidgetProvider2}
03-29 09:41:21.041: I/MainActivity(2678): versionCode: 301
03-29 09:41:21.041: I/MainActivity(2678): versionName: 3.0.0
03-29 09:41:21.041: I/MainActivity(2678): ===================================
只得到receiver、versionCode、versionName的值。
<provider>標籤
flags=8.
getInstalledPackages(8)
Log輸出:
03-29 09:43:58.261: I/MainActivity(2809): providers:0=ContentProviderInfo{name=contacts;com.android.contacts className=com.android.providers.contacts.ContactsProvider2}
03-29 09:43:58.261: I/MainActivity(2809): providers:1=ContentProviderInfo{name=call_log className=com.android.providers.contacts.CallLogProvider}
03-29 09:43:58.261: I/MainActivity(2809): providers:2=ContentProviderInfo{name=com.android.voicemail className=com.android.providers.contacts.VoicemailContentProvider}
03-29 09:43:58.261: I/MainActivity(2809): providers:3=ContentProviderInfo{name=gecode_location className=com.sprd.providers.geocode.GeocodeProvider}
03-29 09:43:58.261: I/MainActivity(2809): providers:4=ContentProviderInfo{name=com.android.contacts.dumpfile className=com.android.providers.contacts.debug.DumpFileProvider}
03-29 09:43:58.261: I/MainActivity(2809): versionCode: 19
03-29 09:43:58.261: I/MainActivity(2809): versionName: 4.4.2-W14.12.2-02
03-29 09:43:58.261: I/MainActivity(2809): ===================================
只得到provider、versionCode、versionName的值。
<permission>標籤
flags=4096.
getInstalledPackages(4096)
Log輸出:
03-29 09:46:43.571: I/MainActivity(2973): permissions:0=PermissionInfo{41f633c0 com.android.email.permission.READ_ATTACHMENT}
03-29 09:46:43.571: I/MainActivity(2973): permissions:1=PermissionInfo{41f63560 com.android.email.permission.ACCESS_PROVIDER}
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:0=android.permission.RECEIVE_BOOT_COMPLETED
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:1=android.permission.ACCESS_NETWORK_STATE
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:2=android.permission.INTERNET
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:3=android.permission.VIBRATE
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:4=android.permission.WRITE_EXTERNAL_STORAGE
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:5=android.permission.GET_ACCOUNTS
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:6=android.permission.MANAGE_ACCOUNTS
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:7=android.permission.AUTHENTICATE_ACCOUNTS
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:8=android.permission.READ_SYNC_SETTINGS
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:9=android.permission.WRITE_SYNC_SETTINGS
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:10=android.permission.WRITE_CONTACTS
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:11=android.permission.READ_CONTACTS
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:12=android.permission.READ_CALENDAR
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:13=android.permission.WRITE_CALENDAR
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:14=android.permission.READ_PROFILE
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:15=android.permission.NFC
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:16=android.permission.WAKE_LOCK
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:17=android.permission.READ_PHONE_STATE
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:18=android.permission.DOWNLOAD_WITHOUT_NOTIFICATION
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:19=com.android.email.permission.READ_ATTACHMENT
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:20=android.permission.USE_CREDENTIALS
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:21=com.android.email.permission.ACCESS_PROVIDER
03-29 09:46:43.571: I/MainActivity(2973): requestedPermissions:22=android.permission.READ_EXTERNAL_STORAGE
03-29 09:46:43.571: I/MainActivity(2973): versionCode: 500060
03-29 09:46:43.571: I/MainActivity(2973): versionName: 4.4.2-W14.12.2-02
03-29 09:46:43.571: I/MainActivity(2973): ===================================
只得到了requestedPermission、permission、versionCode、versionName的值。
<instrumentation>標籤
flags=16.
getInstalledPackages(16)
Log輸出:
03-29 09:54:20.531: I/MainActivity(3178): versionCode: 19
03-29 09:54:20.531: I/MainActivity(3178): versionName: 4.4.2-W14.12.2-02
03-29 09:54:20.531: I/MainActivity(3178): ===================================
並沒有得到我們所要<instrumentation>,可能系統裡的應用配置檔案裡沒有這個標籤,那我們安裝一個自己寫的應用裡面帶有<instrumentation>.重新執行程式Log輸出:
03-29 09:57:49.721: I/MainActivity(3178): instrumentations:0=InstrumentationInfo{41f53908 com.spreadtrum.broadcast}
03-29 09:57:49.731: I/MainActivity(3178): versionCode: 1
03-29 09:57:49.731: I/MainActivity(3178): versionName: 1.0
03-29 09:57:49.731: I/MainActivity(3178): ===================================
得到了instrumentation資訊,說明系統應用裡的沒有這個標籤。
<uses-configuration>標籤&<uses-feature>標籤
flags=16384.
getInstalledPackages(16384)
Log輸出:
03-29 10:04:34.251: I/MainActivity(3634): reqFeatures:0=FeatureInfo{41f5de00 glEsVers=2.0 fl=0x1}
03-29 10:04:34.251: I/MainActivity(3634): configs:0=ConfigurationInfo{41f5ddc8 touchscreen = 0 inputMethod = 0 navigation = 0 reqInputFeatures = 0 reqGlEsVersion = 131072}
03-29 10:04:34.251: I/MainActivity(3634): versionCode: 19
03-29 10:04:34.251: I/MainActivity(3634): versionName: 4.4.2-W14.12.2-02
03-29 10:04:34.251: I/MainActivity(3634): ===================================
只得到reqFeatures、configs、versionCode、versionName資訊。
signature資訊
flags=64.
getInstalledPackages(64)
Log輸出:
03-29 10:13:49.041: I/MainActivity(3866): signatures:[email protected]
03-29 10:13:49.041: I/MainActivity(3866): versionCode: 201
03-29 10:13:49.041: I/MainActivity(3866): versionName: 2.0.1
03-29 10:13:49.041: I/MainActivity(3866): ===================================
03-29 10:13:49.041: I/MainActivity(3866): signatures:[email protected]
03-29 10:13:49.041: I/MainActivity(3866): versionCode: 1
03-29 10:13:49.041: I/MainActivity(3866): versionName: 1.0
03-29 10:13:49.041: I/MainActivity(3866): ===================================
03-29 10:13:49.041: I/MainActivity(3866): signatures:[email protected]
03-29 10:13:49.041: I/MainActivity(3866): versionCode: 1
03-29 10:13:49.041: I/MainActivity(3866): versionName: 1.0
03-29 10:13:49.041: I/MainActivity(3866): ===================================
PackageName
flags=8192.
flags=8192代表沒有安裝的包資訊,說實在的我也不理解到底啥意思。那麼我們分別傳入64和8192的引數,看看對比!我們前面的程式都沒有列印包名。所以我們把之前的程式for迴圈的程式碼塊註釋掉。加上下面的程式碼:
String packageName = info.packageName;
Log.i(TAG, "packageName: " + packageName);
傳入64,Log資訊:
03-29 10:19:08.011: I/MainActivity(4145): packageName: com.sprd.note
03-29 10:19:08.011: I/MainActivity(4145): ===================================
03-29 10:19:08.011: I/MainActivity(4145): packageName: com.android.defcontainer
03-29 10:19:08.011: I/MainActivity(4145): ===================================
03-29 10:19:08.011: I/MainActivity(4145): packageName: com.sprd.carddav_sync
03-29 10:19:08.011: I/MainActivity(4145): ===================================
03-29 10:19:08.011: I/MainActivity(4145): packageName: com.sohu.newsclient
03-29 10:19:08.011: I/MainActivity(4145): ===================================
03-29 10:19:08.011: I/MainActivity(4145): packageName: com.android.quicksearchbox
03-29 10:19:08.011: I/MainActivity(4145): ===================================
03-29 10:19:08.011: I/MainActivity(4145): packageName: com.spreadst.drag
03-29 10:19:08.011: I/MainActivity(4145): ===================================
03-29 10:19:08.011: I/MainActivity(4145): packageName: com.android.contacts
03-29 10:19:08.021: I/MainActivity(4145): ===================================
03-29 10:19:08.021: I/MainActivity(4145): packageName: com.android.phone
03-29 10:19:08.021: I/MainActivity(4145): ===================================
03-29 10:19:08.021: I/MainActivity(4145): packageName: com.sprd.monkeytest
03-29 10:19:08.021: I/MainActivity(4145): ===================================
03-29 10:19:08.021: I/MainActivity(4145): packageName: com.spreadtrum.broadcast
03-29 10:19:08.021: I/MainActivity(4145): ===================================
03-29 10:19:08.021: I/MainActivity(4145): packageName: com.android.calculator2
03-29 10:19:08.021: I/MainActivity(4145): ===================================
03-29 10:19:08.021: I/MainActivity(4145): packageName: com.android.htmlviewer
03-29 10:19:08.021: I/MainActivity(4145): ===================================
03-29 10:19:08.021: I/MainActivity(4145): packageName: com.chinaunicom.deviceregister
03-29 10:19:08.021: I/MainActivity(4145): ===================================
03-29 10:19:08.021: I/MainActivity(4145): packageName: com.android.cellbroadcastreceiver
03-29 10:19:08.021: I/MainActivity(4145): ===================================
03-29 10:19:08.031: I/MainActivity(4145): packageName: com.android.bluetooth
03-29 10:19:08.031: I/MainActivity(4145): ===================================
03-29 10:19:08.031: I/MainActivity(4145): packageName: com.android.providers.calendar
03-29 10:19:08.031: I/MainActivity(4145): ===================================
03-29 10:19:08.031: I/MainActivity(4145): packageName: com.sprd.engineermode
03-29 10:19:08.031: I/MainActivity(4145): ===================================
03-29 10:19:08.031: I/MainActivity(4145): packageName: cn.wps.moffice_eng
03-29 10:19:08.031: I/MainActivity(4145): ===================================
03-29 10:19:08.031: I/MainActivity(4145): packageName: com.android.calendar
03-29 10:19:08.031: I/MainActivity(4145): ===================================
03-29 10:19:08.031: I/MainActivity(4145): packageName: com.android.browser
03-29 10:19:08.031: I/MainActivity(4145): ===================================
03-29 10:19:08.041: I/MainActivity(4145): packageName: com.android.music
03-29 10:19:08.041: I/MainActivity(4145): ===================================
03-29 10:19:08.041: I/MainActivity(4145): packageName: com.sprd.caldav_sync
03-29 10:19:08.041: I/MainActivity(4145): ===================================
03-29 10:19:08.041: I/MainActivity(4145): packageName: com.sprd.security.manager.rdc
03-29 10:19:08.041: I/MainActivity(4145): ===================================
03-29 10:19:08.041: I/MainActivity(4145): packageName: com.android.onetimeinitializer
03-29 10:19:08.041: I/MainActivity(4145): ===================================
03-29 10:19:08.041: I/MainActivity(4145): packageName: com.android.launcher3
03-29 10:19:08.041: I/MainActivity(4145): ===================================
03-29 10:19:08.041: I/MainActivity(4145): packageName: com.android.providers.downloads.ui
03-29 10:19:08.041: I/MainActivity(4145): ===================================
03-29 10:19:08.041: I/MainActivity(4145): packageName: com.android.documentsui
03-29 10:19:08.041: I/MainActivity(4145): ===================================
03-29 10:19:08.041: I/MainActivity(4145): packageName: com.android.sharedstoragebackup
03-29 10:19:08.041: I/MainActivity(4145): ===================================
03-29 10:19:08.041: I/MainActivity(4145): packageName: com.android.camera2
03-29 10:19:08.041: I/MainActivity(4145): ===================================
03-29 10:19:08.041: I/MainActivity(4145): packageName: com.android.vpndialogs
03-29 10:19:08.041: I/MainActivity(4145): ===================================
03-29 10:19:08.041: I/MainActivity(4145): packageName: com.android.mms
03-29 10:19:08.041: I/MainActivity(4145): ===================================
03-29 10:19:08.041: I/MainActivity(4145): packageName: com.android.provision
03-29 10:19:08.041: I/MainActivity(4145): ===================================
03-29 10:19:08.041: I/MainActivity(4145): packageName: com.android.providers.media
03-29 10:19:08.041: I/MainActivity(4145): ===================================
03-29 10:19:08.041: I/MainActivity(4145): packageName: com.google.android.marvin.talkback
03-29 10:19:08.041: I/MainActivity(4145): ===================================
03-29 10:19:08.041: I/MainActivity(4145): packageName: com.android.certinstaller
03-29 10:19:08.051: I/MainActivity(4145): ===================================
03-29 10:19:08.051: I/MainActivity(4145): packageName: com.sprd.security.manager.asa
03-29 10:19:08.051: I/MainActivity(4145): ===================================
03-29 10:19:08.051: I/MainActivity(4145): packageName: com.infinit.wostore.ui
03-29 10:19:08.051: I/MainActivity(4145): ===================================
03-29 10:19:08.051: I/MainActivity(4145): packageName: com.android.dreams.phototable
03-29 10:19:08.051: I/MainActivity(4145): ===================================
03-29 10:19:08.051: I/MainActivity(4145): packageName: com.cucc.homepage
03-29 10:19:08.051: I/MainActivity(4145): ===================================
03-29 10:19:08.051: I/MainActivity(4145): packageName: com.android.settings
03-29 10:19:08.051: I/MainActivity(4145): ===================================
03-29 10:19:08.051: I/MainActivity(4145): packageName: com.sinovatech.unicom.ui
03-29 10:19:08.051: I/MainActivity(4145): ===================================
03-29 10:19:08.051: I/MainActivity(4145): packageName: com.spreadtrum.accessibilityservice
03-29 10:19:08.051: I/MainActivity(4145): ===================================
03-29 10:19:08.051: I/MainActivity(4145): packageName: com.sina.weibopro
03-29 10:19:08.051: I/MainActivity(4145): ===================================
03-29 10:19:08.051: I/MainActivity(4145): packageName: com.android.gallery3d
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.061: I/MainActivity(4145): packageName: com.android.providers.drm
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.061: I/MainActivity(4145): packageName: com.android.musicvis
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.061: I/MainActivity(4145): packageName: com.android.exchange
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.061: I/MainActivity(4145): packageName: com.android.wallpaper.livepicker
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.061: I/MainActivity(4145): packageName: com.android.resource.security
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.061: I/MainActivity(4145): packageName: com.android.packageinstaller
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.061: I/MainActivity(4145): packageName: com.sprd.videoswallpapers
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.061: I/MainActivity(4145): packageName: com.android.providers.telephony
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.061: I/MainActivity(4145): packageName: com.sprd.fileexplorer
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.061: I/MainActivity(4145): packageName: com.svox.pico
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.061: I/MainActivity(4145): packageName: com.android.noisefield
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.061: I/MainActivity(4145): packageName: com.android.email
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.061: I/MainActivity(4145): packageName: com.android.dialer
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.061: I/MainActivity(4145): packageName: com.android.modemassert
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.061: I/MainActivity(4145): packageName: com.baidu.BaiduMap
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.061: I/MainActivity(4145): packageName: com.sprd.audioprofile
03-29 10:19:08.061: I/MainActivity(4145): ===================================
03-29 10:19:08.071: I/MainActivity(4145): packageName: com.android.wallpapercropper
03-29 10:19:08.071: I/MainActivity(4145): ===================================
03-29 10:19:08.071: I/MainActivity(4145): packageName: com.android.location.fused
03-29 10:19:08.071: I/MainActivity(4145): ===================================
03-29 10:19:08.071: I/MainActivity(4145): packageName: com.android.backupconfirm
03-29 10:19:08.071: I/MainActivity(4145): ===================================
03-29 10:19:08.071: I/MainActivity(4145): packageName: com.android.magicsmoke
03-29 10:19:08.071: I/MainActivity(4145): ===================================
03-29 10:19:08.071: I/MainActivity(4145): packageName: com.android.providers.settings
03-29 10:19:08.071: I/MainActivity(4145): ===================================
03-29 10:19:08.071: I/MainActivity(4145): packageName: com.android.providers.downloads
03-29 10:19:08.071: I/MainActivity(4145): ===================================
03-29 10:19:08.071: I/MainActivity(4145): packageName: com.sprd.validationtools
03-29 10:19:08.071: I/MainActivity(4145): ===================================
03-29 10:19:08.071: I/MainActivity(4145): packageName: com.android.musicfx
03-29 10:19:08.071: I/MainActivity(4145): ===================================
03-29 10:19:08.071: I/MainActivity(4145): packageName: com.android.phasebeam
03-29 10:19:08.071: I/MainActivity(4145): ===================================
03-29 10:19:08.071: I/MainActivity(4145): packageName: com.ibm.packagemanager
03-29 10:19:08.071: I/MainActivity(4145): ===================================
03-29 10:19:08.071: I/MainActivity(4145): packageName: com.android.soundrecorder
03-29 10:19:08.071: I/MainActivity(4145): ===================================
03-29 10:19:08.071: I/MainActivity(4145): packageName: com.neusoft.td.android.wo116114
03-29 10:19:08.071: I/MainActivity(4145): ===================================
03-29 10:19:08.071: I/MainActivity(4145): packageName: com.android.inputmethod.latin
03-29 10:19:08.071: I/MainActivity(4145): ===================================
03-29 10:19:08.071: I/MainActivity(4145): packageName: com.android.proxyhandler
03-29 10:19:08.071: I/MainActivity(4145): ===================================
03-29 10:19:08.071: I/MainActivity(4145): packageName: com.sohu.inputmethod.sogou
03-29 10:19:08.071: I/MainActivity(4145): ===================================
03-29 10:19:08.071: I/MainActivity(4145): packageName: com.android.inputdevices
03-29 10:19:08.071: I/MainActivity(4145): ===================================
03-29 10:19:08.111: I/MainActivity(4145): packageName: com.android.wallpaper.holospiral
03-29 10:19:08.111: I/MainActivity(4145): ===================================
03-29 10:19:08.121: I/MainActivity(4145): packageName: com.baidu.appsearch
03-29 10:19:08.121: I/MainActivity(4145): ===================================
03-29 10:19:08.121: I/MainActivity(4145): packageName: com.android.stk
03-29 10:19:08.121: I/MainActivity(4145): ===================================
03-29 10:19:08.121: I/MainActivity(4145): packageName: com.android.providers.userdictionary
03-29 10:19:08.121: I/MainActivity(4145): ===================================
03-29 10:19:08.121: I/MainActivity(4145): packageName: com.android.inputmethod.pinyin
03-29 10:19:08.121: I/MainActivity(4145): ===================================
03-29 10:19:08.121: I/MainActivity(4145): packageName: com.android.pacprocessor
03-29 10:19:08.121: I/MainActivity(4145): ===================================
03-29 10:19:08.121: I/MainActivity(4145): packageName: com.thunderst.radio
03-29 10:19:08.121: I/MainActivity(4145): ===================================
03-29 10:19:08.131: I/MainActivity(4145): packageName: com.android.galaxy4
03-29 10:19:08.131: I/MainActivity(4145): ===================================
03-29 10:19:08.131: I/MainActivity(4145): packageName: com.ibm.activitymanager
03-29 10:19:08.131: I/MainActivity(4145): ===================================
03-29 10:19:08.131: I/MainActivity(4145): packageName: com.spreadst.s2lockscreen
03-29 10:19:08.131: I/MainActivity(4145): ===================================
03-29 10:19:08.131: I/MainActivity(4145): packageName: com.android.printspooler
03-29 10:19:08.131: I/MainActivity(4145): ===================================
03-29 10:19:08.131: I/MainActivity(4145): packageName: android
03-29 10:19:08.131: I/MainActivity(4145): ===================================
03-29 10:19:08.131: I/MainActivity(4145): packageName: com.android.providers.contacts
03-29 10:19:08.131: I/MainActivity(4145): ===================================
03-29 10:19:08.131: I/MainActivity(4145): packageName: com.asiainfo.android
03-29 10:19:08.131: I/MainActivity(4145): ===================================
03-29 10:19:08.131: I/MainActivity(4145): packageName: com.sprd.ramoptimizer
03-29 10:19:08.131: I/MainActivity(4145): ===================================
03-29 10:19:08.131: I/MainActivity(4145): packageName: com.android.externalstorage
03-29 10:19:08.131: I/MainActivity(4145): ===================================
03-29 10:19:08.131: I/MainActivity(4145): packageName: com.android.providers.applications
03-29 10:19:08.131: I/MainActivity(4145): ===================================
03-29 10:19:08.141: I/MainActivity(4145): packageName: com.mobiletools.systemhelper
03-29 10:19:08.141: I/MainActivity(4145): ===================================
03-29 10:19:08.141: I/MainActivity(4145): packageName: com.spreadst.thememanager
03-29 10:19:08.141: I/MainActivity(4145): ===================================
03-29 10:19:08.141: I/MainActivity(4145): packageName: com.android.dreams.basic
03-29 10:19:08.141: I/MainActivity(4145): ===================================
03-29 10:19:08.141: I/MainActivity(4145): packageName: com.android.systemui
03-29 10:19:08.141: I/MainActivity(4145): ===================================
03-29 10:19:08.141: I/MainActivity(4145): packageName: com.android.keychain
03-29 10:19:08.141: I/MainActivity(4145): ===================================
03-29 10:19:08.141: I/MainActivity(4145): packageName: com.spreadst.security.permission
03-29 10:19:08.141: I/MainActivity(4145): ===================================
03-29 10:19:08.141: I/MainActivity(4145): packageName: com.cucc.ireader
03-29 10:19:08.141: I/MainActivity(4145): ===================================
03-29 10:19:08.141: I/MainActivity(4145): packageName: com.sprd.practicaltools
03-29 10:19:08.141: I/MainActivity(4145): ===================================
03-29 10:19:08.141: I/MainActivity(4145): packageName: com.spreadst.lockscreen
03-29 10:19:08.141: I/MainActivity(4145): ===================================
03-29 10:19:08.141: I/MainActivity(4145): packageName: com.android.wallpaper
03-29 10:19:08.141: I/MainActivity(4145): ===================================
03-29 10:19:08.141: I/MainActivity(4145): packageName: com.android.deskclock
03-29 10:19:08.141: I/MainActivity(4145): ===================================
03-29 10:19:08.141: I/MainActivity(4145): packageName: com.android.keyguard
03-29 10:19:08.141: I/MainActivity(4145): ===================================
03-29 10:19:08.141: I/MainActivity(4145): packageName: com.android.shell
03-29 10:19:08.141: I/MainActivity(4145): ===================================
03-29 10:19:08.141: I/MainActivity(4145): packageName: com.android.stk1
03-29 10:19:08.141: I/MainActivity(4145): ===================================
傳入8192,Log輸出:
03-29 10:24:45.891: I/MainActivity(4322): packageName: com.sprd.note
03-29 10:24:45.891: I/MainActivity(4322): ===================================
03-29 10:24:45.901: I/MainActivity(4322): packageName: com.android.defcontainer
03-29 10:24:45.901: I/MainActivity(4322): ===================================
03-29 10:24:45.901: I/MainActivity(4322): packageName: com.sprd.carddav_sync
03-29 10:24:45.901: I/MainActivity(4322): ===================================
03-29 10:24:45.901: I/MainActivity(4322): packageName: com.sohu.newsclient
03-29 10:24:45.901: I/MainActivity(4322): ===================================
03-29 10:24:45.901: I/MainActivity(4322): packageName: com.android.quicksearchbox
03-29 10:24:45.901: I/MainActivity(4322): ===================================
03-29 10:24:45.901: I/MainActivity(4322): packageName: com.spreadst.drag
03-29 10:24:45.901: I/MainActivity(4322): ===================================
03-29 10:24:45.901: I/MainActivity(4322): packageName: com.android.contacts
03-29 10:24:45.901: I/MainActivity(4322): ===================================
03-29 10:24:45.901: I/MainActivity(4322): packageName: com.android.phone
03-29 10:24:45.901: I/MainActivity(4322): ===================================
03-29 10:24:45.901: I/MainActivity(4322): packageName: com.sprd.monkeytest
03-29 10:24:45.901: I/MainActivity(4322): ===================================
03-29 10:24:45.901: I/MainActivity(4322): packageName: com.spreadtrum.broadcast
03-29 10:24:45.901: I/MainActivity(4322): ===================================
03-29 10:24:45.901: I/MainActivity(4322): packageName: com.android.calculator2
03-29 10:24:45.911: I/MainActivity(4322): ===================================
03-29 10:24:45.911: I/MainActivity(4322): packageName: com.android.htmlviewer
03-29 10:24:45.911: I/MainActivity(4322): ===================================
03-29 10:24:45.911: I/MainActivity(4322): packageName: com.chinaunicom.deviceregister
03-29 10:24:45.911: I/MainActivity(4322): ===================================
03-29 10:24:45.911: I/MainActivity(4322): packageName: com.android.cellbroadcastreceiver
03-29 10:24:45.911: I/MainActivity(4322): ===================================
03-29 10:24:45.911: I/MainActivity(4322): packageName: com.android.bluetooth
03-29 10:24:45.911: I/MainActivity(4322): ===================================
03-29 10:24:45.911: I/MainActivity(4322): packageName: com.android.providers.calendar
03-29 10:24:45.911: I/MainActivity(4322): ===================================
03-29 10:24:45.911: I/MainActivity(4322): packageName: com.sprd.engineermode
03-29 10:24:45.911: I/MainActivity(4322): ===================================
03-29 10:24:45.911: I/MainActivity(4322): packageName: cn.wps.moffice_eng
03-29 10:24:45.911: I/MainActivity(4322): ===================================
03-29 10:24:45.911: I/MainActivity(4322): packageName: com.android.calendar
03-29 10:24:45.911: I/MainActivity(4322): ===================================
03-29 10:24:45.911: I/MainActivity(4322): packageName: com.android.browser
03-29 10:24:45.911: I/MainActivity(4322): ===================================
03-29 10:24:45.921: I/MainActivity(4322): packageName: com.android.music
03-29 10:24:45.921: I/MainActivity(4322): ===================================
03-29 10:24:45.921: I/MainActivity(4322): packageName: com.sprd.caldav_sync
03-29 10:24:45.921: I/MainActivity(4322): ===================================
03-29 10:24:45.921: I/MainActivity(4322): packageName: com.sprd.security.manager.rdc
03-29 10:24:45.921: I/MainActivity(4322): ===================================
03-29 10:24:45.921: I/MainActivity(4322): packageName: com.android.onetimeinitializer
03-29 10:24:45.921: I/MainActivity(4322): ===================================
03-29 10:24:45.921: I/MainActivity(4322): packageName: com.android.providers.downloads.ui
03-29 10:24:45.921: I/MainActivity(4322): ===================================
03-29 10:24:45.921: I/MainActivity(4322): packageName: com.android.launcher3
03-29 10:24:45.921: I/MainActivity(4322): ===================================
03-29 10:24:45.921: I/MainActivity(4322): packageName: com.android.documentsui
03-29 10:24:45.921: I/MainActivity(4322): ===================================
03-29 10:24:45.921: I/MainActivity(4322): packageName: com.android.sharedstoragebackup
03-29 10:24:45.921: I/MainActivity(4322): ===================================
03-29 10:24:45.921: I/MainActivity(4322): packageName: com.android.camera2
03-29 10:24:45.921: I/MainActivity(4322): ===================================
03-29 10:24:45.921: I/MainActivity(4322): packageName: com.android.vpndialogs
03-29 10:24:45.921: I/MainActivity(4322): ===================================
03-29 10:24:45.921: I/MainActivity(4322): packageName: com.android.mms
03-29 10:24:45.921: I/MainActivity(4322): ===================================
03-29 10:24:45.921: I/MainActivity(4322): packageName: com.android.provision
03-29 10:24:45.921: I/MainActivity(4322): ===================================
03-29 10:24:45.921: I/MainActivity(4322): packageName: com.android.providers.media
03-29 10:24:45.921: I/MainActivity(4322): ===================================
03-29 10:24:45.921: I/MainActivity(4322): packageName: com.google.android.marvin.talkback
03-29 10:24:45.921: I/MainActivity(4322): ===================================
03-29 10:24:45.931: I/MainActivity(4322): packageName: com.android.certinstaller
03-29 10:24:45.931: I/MainActivity(4322): ===================================
03-29 10:24:45.931: I/MainActivity(4322): packageName: com.sprd.security.manager.asa
03-29 10:24:45.931: I/MainActivity(4322): ===================================
03-29 10:24:45.931: I/MainActivity(4322): packageName: com.infinit.wostore.ui
03-29 10:24:45.931: I/MainActivity(4322): ===================================
03-29 10:24:45.931: I/MainActivity(4322): packageName: com.android.dreams.phototable
03-29 10:24:45.931: I/MainActivity(4322): ===================================
03-29 10:24:45.931: I/MainActivity(4322): packageName: com.cucc.homepage
03-29 10:24:45.931: I/MainActivity(4322): ===================================
03-29 10:24:45.931: I/MainActivity(4322): packageName: com.android.settings
03-29 10:24:45.931: I/MainActivity(4322): ===================================
03-29 10:24:45.931: I/MainActivity(4322): packageName: com.sinovatech.unicom.ui
03-29 10:24:45.931: I/MainActivity(4322): ===================================
03-29 10:24:45.931: I/MainActivity(4322): packageName: com.spreadtrum.accessibilityservice
03-29 10:24:45.931: I/MainActivity(4322): ===================================
03-29 10:24:45.931: I/MainActivity(4322): packageName: com.sina.weibopro
03-29 10:24:45.931: I/MainActivity(4322): ===================================
03-29 10:24:45.931: I/MainActivity(4322): packageName: com.android.providers.drm
03-29 10:24:45.931: I/MainActivity(4322): ===================================
03-29 10:24:45.931: I/MainActivity(4322): packageName: com.android.gallery3d
03-29 10:24:45.931: I/MainActivity(4322): ===================================
03-29 10:24:45.931: I/MainActivity(4322): packageName: com.android.musicvis
03-29 10:24:45.931: I/MainActivity(4322): ===================================
03-29 10:24:45.931: I/MainActivity(4322): packageName: com.android.exchange
03-29 10:24:45.931: I/MainActivity(4322): ===================================
03-29 10:24:45.931: I/MainActivity(4322): packageName: com.android.wallpaper.livepicker
03-29 10:24:45.931: I/MainActivity(4322): ===================================
03-29 10:24:45.931: I/MainActivity(4322): packageName: com.android.resource.security
03-29 10:24:45.931: I/MainActivity(4322): ===================================
03-29 10:24:45.931: I/MainActivity(4322): packageName: com.android.packageinstaller
03-29 10:24:45.931: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.android.providers.telephony
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.sprd.videoswallpapers
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.sprd.fileexplorer
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.svox.pico
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.android.noisefield
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.android.email
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.android.dialer
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.android.modemassert
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.sprd.audioprofile
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.android.location.fused
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.baidu.BaiduMap
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.android.wallpapercropper
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.android.backupconfirm
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.android.providers.settings
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.android.magicsmoke
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.android.providers.downloads
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.941: I/MainActivity(4322): packageName: com.sprd.validationtools
03-29 10:24:45.941: I/MainActivity(4322): ===================================
03-29 10:24:45.951: I/MainActivity(4322): packageName: com.android.musicfx
03-29 10:24:45.951: I/MainActivity(4322): ===================================
03-29 10:24:45.951: I/MainActivity(4322): packageName: com.android.phasebeam
03-29 10:24:45.951: I/MainActivity(4322): ===================================
03-29 10:24:45.951: I/MainActivity(4322): packageName: com.android.soundrecorder
03-29 10:24:45.951: I/MainActivity(4322): ===================================
03-29 10:24:45.951: I/MainActivity(4322): packageName: com.ibm.packagemanager
03-29 10:24:45.951: I/MainActivity(4322): ===================================
03-29 10:24:45.951: I/MainActivity(4322): packageName: com.neusoft.td.android.wo116114
03-29 10:24:45.951: I/MainActivity(4322): ===================================
03-29 10:24:45.951: I/MainActivity(4322): packageName: com.android.inputmethod.latin
03-29 10:24:45.951: I/MainActivity(4322): ===================================
03-29 10:24:45.951: I/MainActivity(4322): packageName: com.android.proxyhandler
03-29 10:24:45.951: I/MainActivity(4322): ===================================
03-29 10:24:45.951: I/MainActivity(4322): packageName: com.sohu.inputmethod.sogou
03-29 10:24:45.951: I/MainActivity(4322): ===================================
03-29 10:24:45.951: I/MainActivity(4322): packageName: com.android.inputdevices
03-29 10:24:45.951: I/MainActivity(4322): ===================================
03-29 10:24:45.951: I/MainActivity(4322): packageName: com.android.wallpaper.holospiral
03-29 10:24:45.951: I/MainActivity(4322): ===================================
03-29 10:24:45.951: I/MainActivity(4322): packageName: com.baidu.appsearch
03-29 10:24:45.951: I/MainActivity(4322): ===================================
03-29 10:24:45.951: I/MainActivity(4322): packageName: com.android.stk
03-29 10:24:45.951: I/MainActivity(4322): ===================================
03-29 10:24:45.951: I/MainActivity(4322): packageName: com.android.providers.userdictionary
03-29 10:24:45.951: I/MainActivity(4322): ===================================
03-29 10:24:45.951: I/MainActivity(4322): packageName: com.android.inputmethod.pinyin
03-29 10:24:45.951: I/MainActivity(4322): ===================================
03-29 10:24:45.951: I/MainActivity(4322): packageName: com.android.pacprocessor
03-29 10:24:45.951: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: com.thunderst.radio
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: com.android.galaxy4
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: com.ibm.activitymanager
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: com.spreadst.s2lockscreen
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: com.android.printspooler
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: android
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: com.android.providers.contacts
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: com.sprd.ramoptimizer
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: com.asiainfo.android
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: com.android.externalstorage
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: com.android.providers.applications
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: com.mobiletools.systemhelper
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: com.spreadst.thememanager
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: com.android.dreams.basic
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: com.android.systemui
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: com.android.keychain
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.961: I/MainActivity(4322): packageName: com.spreadst.security.permission
03-29 10:24:45.961: I/MainActivity(4322): ===================================
03-29 10:24:45.991: I/MainActivity(4322): packageName: com.cucc.ireader
03-29 10:24:45.991: I/MainActivity(4322): ===================================
03-29 10:24:45.991: I/MainActivity(4322): packageName: com.sprd.practicaltools
03-29 10:24:45.991: I/MainActivity(4322): ===================================
03-29 10:24:45.991: I/MainActivity(4322): packageName: com.spreadst.lockscreen
03-29 10:24:45.991: I/MainActivity(4322): ===================================
03-29 10:24:45.991: I/MainActivity(4322): packageName: com.android.wallpaper
03-29 10:24:45.991: I/MainActivity(4322): ===================================
03-29 10:24:45.991: I/MainActivity(4322): packageName: com.android.deskclock
03-29 10:24:45.991: I/MainActivity(4322): ===================================
03-29 10:24:45.991: I/MainActivity(4322): packageName: com.android.keyguard
03-29 10:24:45.991: I/MainActivity(4322): ===================================
03-29 10:24:45.991: I/MainActivity(4322): packageName: com.android.shell
03-29 10:24:45.991: I/MainActivity(4322): ===================================
03-29 10:24:45.991: I/MainActivity(4322): packageName: com.android.stk1
03-29 10:24:45.991: I/MainActivity(4322): ===================================
對比一下沒有區別,說明不存在沒被安裝的apk。
Group Id
flags=256.
getInstalledPackages(256);
Log輸出:
03-29 10:48:02.041: I/MainActivity(4954): gids:0=1028
03-29 10:48:02.041: I/MainActivity(4954): gids:1=1015
03-29 10:48:02.041: I/MainActivity(4954): gids:2=1023
03-29 10:48:02.041: I/MainActivity(4954): gids:3=1051
03-29 10:48:02.041: I/MainActivity(4954): gids:4=1052
03-29 10:48:02.041: I/MainActivity(4954): gids:5=3002
03-29 10:48:02.041: I/MainActivity(4954): gids:6=3001
03-29 10:48:02.041: I/MainActivity(4954): gids:7=3003
03-29 10:48:02.041: I/MainActivity(4954): versionCode: 19
03-29 10:48:02.041: I/MainActivity(4954): versionName: 4.4.2-W14.12.2-02
03-29 10:48:02.041: I/MainActivity(4954): ===================================
只獲得了gids、versionCode、versionName的資訊。
總結
獲取PackageInfo資訊的方法,參入的引數不同,得到的PackageInfo所包含的資訊也就不同。好了,PackageManager的學習就到這了,裡面還有很多內容如果以後有時間,慢慢學習。
相關推薦
Android中PackageManager學習筆記(2)-PackageInfo
PackageInfo 我們通過下面的方法獲得PackageInfo物件資訊: getInstalledPackages(int flags) 引數flags有如下的值: GET_ACTIVITIES :值為1.如果想獲得所有<activity>標籤的
Android中Telephony學習筆記(9)-Phone相關類
PhoneNumberUtils 提供多種方法工具處理電話號碼字串,工具類。 Constants FORMAT_JAPAN:日本區號列表 FORMAT_NANP:北美洲電話區號列表 FORMAT_UNKNOWN:未知地區 PAUSE TOA_International
JavaSE中Collection集合框架學習筆記(2)——拒絕重復內容的Set和支持隊列操作的Queue
%d eof 是否 face 出錯 can 3.2 lean als 前言:俗話說“金三銀四銅五”,不知道我要在這段時間找工作會不會很艱難。不管了,工作三年之後就當給自己放個暑假。 面試當中Collection(集合)是基礎重點.我在網上看了
在vs2015 中c++學習筆記(孫鑫視訊2)
//#include<cstdlib> #include<iostream> using namespace std; //父類 class Animal { public://訪問方式三種:public、private、protected Animal(i
Android學習筆記2-生命週期
元件的生命週期 應用程式元件都有一個生命週期,從響應Intent的Android例項開始到這個例項被銷燬。在這期間,他們或許有效或許無效,有效時或許對使用者可見或許不可見。下面我們就來討論四個基本元件的生命週期,包括在生命週期內的各種狀態,以及狀態之間的轉換。這幾種狀態可
深入理解Java虛擬機器學習筆記2-JVM中物件佈局
一、物件的記憶體佈局 在Hotspot中,物件在記憶體中儲存佈局可以分為三塊: 物件頭(Header) 、例項資料(Instance Data)、對齊填充(Padding) 二、物件頭 1、物件執行時資料: 雜湊嗎、GC分代年齡、鎖狀態標誌、執行緒持有的鎖、偏向執行緒I
Less學習筆記2:Less中的註釋
Less中的註釋 可是使用css中的註釋:/**/ 也可以使用 // 註釋 (// 編譯的時候會自動過濾掉) 兩者的區別: /**/ 中的註釋在編譯的是會被編譯出來的,會在編譯生成的CSS中會出現 // 是不會被編譯的,編譯時自動過濾,在編譯生成的C
流媒體學習筆記2(live555中的Session)
畢業課題打算從最原始的地方做起。好吧,那就從live555採集轉發本地攝像頭視訊開始吧。首先從原始碼開始吧,今天看了點liveMedia中的session,這裡做個總結。 整個原始碼中的繼承順序為 H264VideoFileServerMediaSubsession::Fi
React Native學習筆記2:Android環境搭建
背景 各位童鞋有木有感覺官方文件很坑啊,根據官網的描述,首先在chocolate就直接卡死了,VPN沒什麼卵用,於是逐個去官網下載,直到昨天才發現不用VPN也可以下!公司是windows環境,這裡就先用windows搭建。 因為本身是移動開發者,所以
普中PZ6806開發板 STM32學習筆記2 使用暫存器點亮一個LED
LED 模組電路 我們程式目的是要讓PC0輸出低電平。如果要閃爍,就是讓PC0在高低電平間切換。 STM32 啟動檔案 1. 開啟模板檔案 2. 開啟專案 啟動檔案的功能解析: 初始化堆疊指標S
Android學習筆記2:Hello World程式解析
《第一行程式碼——Android》郭霖著 Android Studio入門到精通 Android Studio與Eclipse的一些不同 Android Studio是基於IDEA的,IDEA 全稱IntelliJ IDEA,是java語言開發的整合環境。IDEA
Java學習筆記2:使用replaceAll()方法替換字串中的反斜槓:左斜槓(\)和右斜槓(/)
在程式設計過程中,需要將一個字串中的反斜槓(\)全部替換成(\\),很簡單的操作但是很容易報錯。 比如:String filePath = "D:\daxiang\te
Android NDK學習筆記2-環境搭建篇
第一步.安裝JDK和配置Java環境變數 Java環境配置對於每一位開發者來說早已輕車熟路,相信不需要我再詳細說明,這一過程略過,如果不瞭解的朋友可以自行百度。 第二步.下載Android NDK的安裝包 1.在Google的官方網站下載Android
Android學習筆記2 TextView圖文混排,顯示新增的圖片,三種常用方法,親測
圖文混排,文字就不說了,主要是顯示圖片的方法 1、TextView使用ImageSpan顯示圖片 ImageSpan span = new ImageSpan(this, R.drawable.ic_launcher);//載入圖片的資源 SpannableStrin
Android graphics學習筆記(2)
public final class Rect extends Object implements Parcelable public class RectF extends Object implements Parcelable Rect和RectF都是用於使用4個點(
AspectJ學習筆記2-Eclipse中AspectJ外掛AJDT的正確安裝方法
接著之前一篇日誌。這個事情也挺無語的,簡單記錄一下。 在這裡:http://www.eclipse.org/ajdt/ 可以下載最新的Eclipse Plugin,下載解壓之後,一般來說,直接把
Android學習筆記2 建立另一個activity以及實現intent訊息傳遞
學習內容來自google教程:http://developer.android.com/intl/zh-cn/training/basics/firstapp/starting-activity.html#DisplayMessage 1 在之前的MainActivity基
C#學習筆記2:C#中修飾類相關的關鍵字
修飾符用於限定型別以及型別成員的申明,C#中的修飾符按功能可分為四部分:屬性修飾符,存取修飾符,類修飾符和成員修飾符。 屬性修飾符: [Serializable]:按值將物件封送到遠端伺服器。在按值封送物件時,就會建立一個該物件的副本,並將其序列化傳送到伺服器。 任何
Android資料庫框架greenDao學習筆記 2
引言 上篇部落格中介紹了greenDao的整合方式,這篇部落格,我們介紹如何使用greenDao建立我們需要的資料表。補一張圖(來自官網),來理解greenDao,大家意會吧。 註解 先上一張圖,來對greenDao的註解有一個直觀的認識: Schema 通過在Gr
學習筆記2
建議 coo line 長度 cape 發展 div+css 加載 不兼容 雙標簽: <html><head><title><body><table><tr><td><span>