1.設備先安裝我提供的app【EasyControler】
2.設備--設置--關于手機--版本號(滑動到最下方)---連續點擊六下打開 開發者模式
3.設置--系統--開發者模式--開發者選項 --打開usb調試
4.設置--安全設備管理應用--easycontrol的開關打開
5.將設備連接電腦 打開cmd命令框 輸入指令:adb shell dpm set-device-owner com.easycontrol.emm/com.easycontrol.emm.receiver.DeviceOwnerReceiver
6.設備重啟 重啟后打開easycontrol的app (如果開機后彈出xxx停止運行,將設備多重啟幾次) 打開app后 app首頁顯示正常的序列號,說明app正常運行
7.將設備的序列號導入到平臺 設備聯網 即可完成綁定
C:\Users\xxxxx>adb shell dpm set-device-owner com.easycontrol.emm/com.easycontrol.emm.receiver.DeviceOwnerReceiver
Success: Device owner set to package com.easycontrol.emm/.receiver.DeviceOwnerReceiver
Active admin set to component com.easycontrol.emm/.receiver.DeviceOwnerReceiver
報錯原因:
11-07 10:23:11.591 5673 5690 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
11-07 10:23:11.591 5673 5690 E AndroidRuntime: Process: com.android.permissioncontroller, PID: 5673
11-07 10:23:11.591 5673 5690 E AndroidRuntime: java.lang.IllegalArgumentException: com.android.permissioncontroller: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_M
UTABLE be specified when creating a PendingIntent.
11-07 10:23:11.591 5673 5690 E AndroidRuntime: Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be
used with inline replies or bubbles.
11-07 10:23:11.591 5673