adb를 통해 앱을 설치하려고하면 오류가 발생합니다.
$ ./adb -d install /Users/dimon/Projects/one-place/myprogram/platforms/android/build/outputs/apk/android-debug.apk -r -g
3704 KB/s (4595985 bytes in 1.211s)
pkg: /data/local/tmp/android-debug.apk
Failure [INSTALL_CANCELED_BY_USER]
장치에서 나는이 순간에 아무것도하지 않는다. 장치는 Xiaomi MI5, MIUI 7.2.13, Android 6.0입니다. 개발자 모드가 활성화되었습니다. 이 문제를 해결하는 방법?
“ionic run android”명령을 실행하려고 할 때 동일한 오류가 발생합니다.
UPD
다음은 설치 프로그램의 순간에 들어오는 ‘adb logcat’명령의 로그입니다.
06-06 10:04:20.051 788 903 I DisplayFeatureService: void android::update_watchlist(const prop_info*, void*): sys.boot_completed: 1
06-06 10:04:20.063 788 903 I DisplayFeatureService: void android::update_watchlist(const prop_info*, void*): sys.boot_completed: 1
06-06 10:04:20.078 13397 13397 E ANDR-PERF-MPCTL: Unable to create control service (stage=2, rc=-1)
06-06 10:04:20.082 788 903 I DisplayFeatureService: void android::update_watchlist(const prop_info*, void*): sys.boot_completed: 1
06-06 10:04:20.079 13396 13396 W iop : type=1400 audit(0.0:527): avc: denied { write } for name="socket" dev="tmpfs" ino=14686 scontext=u:r:dumpstate:s0 tcontext=u:object_r:socket_device:s0 tclass=dir permissive=0
06-06 10:04:20.088 788 903 I DisplayFeatureService: void android::update_watchlist(const prop_info*, void*): sys.boot_completed: 1
06-06 10:04:20.926 13400 13400 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
06-06 10:04:20.930 13400 13400 D AndroidRuntime: CheckJNI is OFF
06-06 10:04:20.966 13400 13400 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
06-06 10:04:20.995 13400 13400 I Radio-JNI: register_android_hardware_Radio DONE
06-06 10:04:21.004 13400 13400 E : WFDWhiteListing : library initialized successfully
06-06 10:04:21.020 13400 13400 D AndroidRuntime: Calling main entry com.android.commands.pm.Pm
06-06 10:04:21.027 13400 13400 I Timeline: Timeline: Activity_launch_request time:973226
06-06 10:04:21.028 1497 2996 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=file:///data/local/tmp/android-debug.apk typ=application/vnd.android.package-archive flg=0x18000000 cmp=com.miui.securitycenter/com.miui.permcenter.install.AdbInstallActivity (has extras)} from uid 2000 on display 0
06-06 10:04:21.033 1497 2996 E : WFDMMServiceClient ctor Context = 0x0, Cb = 0x0
06-06 10:04:21.033 1497 2996 E : getWFDMMServiceInstance get new Instance
06-06 10:04:21.033 1497 2996 E : Service not available yet
06-06 10:04:21.034 1497 2996 E : WFDMMServiceClient::~WFDMMServiceClient
06-06 10:04:21.037 1497 2996 E : WFDMMServiceClient ctor Context = 0x0, Cb = 0x0
06-06 10:04:21.037 1497 2996 E : getWFDMMServiceInstance get new Instance
06-06 10:04:21.037 1497 2996 E : Service not available yet
06-06 10:04:21.037 1497 2996 E : WFDMMServiceClient::~WFDMMServiceClient
06-06 10:04:21.050 2875 3077 D PowerKeeperEventLogManager: notifyForegroundCompomentChanged ComponentInfo{com.miui.securitycenter/com.miui.permcenter.install.AdbInstallActivity}
06-06 10:04:21.051 2875 3036 D PowerKeeperExecutor: notify state normal_state enter...
06-06 10:04:21.051 2875 3036 D PowerKeeperExecutor: foreground_change:
06-06 10:04:21.051 2875 3036 D PowerKeeperExecutor: set_cpu_powermode(middle)
06-06 10:04:21.051 2875 3036 I PowerKeeperExecutor: no local quick execution method for set_cpu_powermode
06-06 10:04:21.051 2875 3036 D PowerKeeperExecutor: set_lcd_mode(ui)
06-06 10:04:21.051 2875 3036 I PowerKeeperExecutor: no local quick execution method for set_lcd_mode
06-06 10:04:21.049 2887 2887 W EventReader: type=1400 audit(0.0:528): avc: denied { search } for name="756" dev="proc" ino=16099 scontext=u:r:system_app:s0 tcontext=u:r:zygote:s0 tclass=dir permissive=0
06-06 10:04:21.049 2887 2887 W EventReader: type=1400 audit(0.0:529): avc: denied { search } for name="756" dev="proc" ino=16099 scontext=u:r:system_app:s0 tcontext=u:r:zygote:s0 tclass=dir permissive=0
06-06 10:04:21.051 3247 4440 I octvm_power: power mode [normal] start 1465200261
06-06 10:04:21.051 3247 4440 I octvm_power: Action: set_cpu_powermode(middle) for [foreground_change]
06-06 10:04:21.051 3247 4440 I octvm_drv: common drv: platform_set_power_profile -> platform not support
06-06 10:04:21.051 2533 2887 I octvm : task pid 2113 have been add to group sys_standby.
06-06 10:04:21.051 3247 4440 I octvm_power: Action: set_lcd_mode(ui) for [foreground_change]
06-06 10:04:21.051 3247 4440 I octvm_drv: common drv: platform_set_lcd_mode -> platform not support
06-06 10:04:21.051 2533 2887 I octvm : task pid 2900 have been add to group sys_standby.
06-06 10:04:21.049 2887 2887 W EventReader: type=1400 audit(0.0:530): avc: denied { search } for name="756" dev="proc" ino=16099 scontext=u:r:system_app:s0 tcontext=u:r:zygote:s0 tclass=dir permissive=0
06-06 10:04:21.051 2533 2887 I octvm : task pid 4553 have been add to group sys_standby.
06-06 10:04:21.051 2533 2887 I octvm : [sys_standby]cgroup_add_tasks max single write time: 0ms
06-06 10:04:21.051 2533 2887 I octvm : [sys_standby]cgroup_add_tasks total time consume: 0ms
06-06 10:04:21.051 3247 4440 I octvm_power: onPowerModeChanged[normal] called
06-06 10:04:21.052 2875 3093 I FirstNotificationController: handleUnlockState: stoped
06-06 10:04:21.055 1497 2996 I Timeline: Timeline: App_transition_ready time:973254
06-06 10:04:21.055 1976 1976 V PhoneStatusBarPolicy: updateManagedProfile: mManagedProfileFocused: false mKeyguardVisible: true
06-06 10:04:21.055 1497 2996 I Timeline: Timeline: App_transition_stopped time:973255
06-06 10:04:21.059 1497 2996 E ActivityManager: Invalid thumbnail dimensions: 0x0
06-06 10:04:21.059 4553 4553 W .securitycenter: type=1400 audit(0.0:531): avc: denied { search } for name="tmp" dev="dm-0" ino=28 scontext=u:r:system_app:s0 tcontext=u:object_r:shell_data_file:s0 tclass=dir permissive=0
06-06 10:04:21.066 4553 4553 W asset : Asset path /data/local/tmp/android-debug.apk is neither a directory nor file (type=0).
06-06 10:04:21.066 4553 4553 D AdbInstallActivity: parsePackage is null , path :/data/local/tmp/android-debug.apk
06-06 10:04:21.059 4553 4553 W .securitycenter: type=1400 audit(0.0:532): avc: denied { search } for name="tmp" dev="dm-0" ino=28 scontext=u:r:system_app:s0 tcontext=u:object_r:shell_data_file:s0 tclass=dir permissive=0
06-06 10:04:21.072 1497 2230 E : WFDMMServiceClient ctor Context = 0x0, Cb = 0x0
06-06 10:04:21.072 1497 2230 E : getWFDMMServiceInstance get new Instance
06-06 10:04:21.072 1497 2230 E : Service not available yet
06-06 10:04:21.072 1497 2230 E : WFDMMServiceClient::~WFDMMServiceClient
06-06 10:04:21.073 1497 2230 E : WFDMMServiceClient ctor Context = 0x0, Cb = 0x0
06-06 10:04:21.073 1497 2230 E : getWFDMMServiceInstance get new Instance
06-06 10:04:21.073 1497 2230 E : Service not available yet
06-06 10:04:21.073 1497 2230 E : WFDMMServiceClient::~WFDMMServiceClient
06-06 10:04:21.075 1497 2230 E ActivityManager: Invalid thumbnail dimensions: 0x0
06-06 10:04:21.076 2875 3077 D PowerKeeperEventLogManager: notifyForegroundCompomentChanged ComponentInfo{com.android.settings/com.android.settings.Settings$WifiSettingsActivity}
06-06 10:04:21.069 2887 2887 W EventReader: type=1400 audit(0.0:533): avc: denied { search } for name="756" dev="proc" ino=16099 scontext=u:r:system_app:s0 tcontext=u:r:zygote:s0 tclass=dir permissive=0
06-06 10:04:21.076 1497 2230 I Timeline: Timeline: App_transition_ready time:973275
06-06 10:04:21.076 1497 2230 I Timeline: Timeline: App_transition_stopped time:973275
06-06 10:04:21.076 2533 2887 I octvm : task pid 2060 have been add to group sys_standby.
06-06 10:04:21.076 2533 2887 I octvm : [sys_standby]cgroup_add_tasks max single write time: 0ms
06-06 10:04:21.076 2533 2887 I octvm : [sys_standby]cgroup_add_tasks total time consume: 0ms
06-06 10:04:21.077 1976 1976 V PhoneStatusBarPolicy: updateManagedProfile: mManagedProfileFocused: false mKeyguardVisible: true
06-06 10:04:21.090 13400 13400 I art : System.exit called, status: 1
06-06 10:04:21.090 13400 13400 I AndroidRuntime: VM exiting with result code 1.
06-06 10:04:21.100 2060 2130 V MI_STAT : disabled local event upload
android-debug.apk가 언제 생성되는지 알지만 설치되지 않는 이유를 이해할 수 없습니다. 아마도 키 문자열은 다음과 같습니다.
06-06 10:04:21.066 4553 4553 W asset : Asset path /data/local/tmp/android-debug.apk is neither a directory nor file (type=0).
06-06 10:04:21.066 4553 4553 D AdbInstallActivity: parsePackage is null , path :/data/local/tmp/android-debug.apk
그러나 이것은 오류 문자열이 아니라 경고 및 디버그입니다. 또한 이상한 선 :
06-06 10:04:21.059 1497 2996 E ActivityManager: Invalid thumbnail dimensions: 0x0
하지만 그것이 문제인지 모르겠습니다.
또한 adb를 통해 자체 작성된 것뿐만 아니라 다른 앱을 설치하려고했습니다. 그러나 결과는 없습니다.
답변
동일한 장치에 대한 동일한 문제가 여기에 있습니다.
따라서 Xiaomi 문제이며 다음은이 문제에 대한 해결책입니다.
-
“보안”애플리케이션으로 이동하여 오른쪽 상단의 “옵션”을 탭하십시오.
-
“기능 설정”그룹까지 아래로 스크롤하여 “권한”을 찾습니다.
-
거기에서 USB를 통해 앱 설치를 관리하고 허용하지 않는 “USB를 통해 설치”옵션을 끕니다.
최신 Redmi 장치에서
설정> 추가 설정> 개발자 옵션> 개발자 옵션 : 확인 (가) USB 옵션을 통해 설치합니다 .
행운을 빕니다!
답변
답변
MIUI 8에서 개발자 설정으로 이동하여 “USB를 통해 설치”를 전환하여 활성화합니다.
답변
Redmi 및 Mi 장치의 경우 MIUI 최적화 끄기
설정> 추가 설정> 개발자 옵션> MIUI 최적화
답변
인스턴트 실행 기능에 문제가있는 것 같습니다. ” 파일-> 설정-> 빌드, 실행, 배포-> 인스턴트 실행 “으로 이동하여 비활성화하십시오.
위의 답변이 작동하지 않으면 작동하기를 바랍니다.
답변
Mi 또는 Xiaomi 장치의 경우
1) 설정
2) 추가 설정
3) 개발자 옵션
4) USB를 통해 설치 : Toggle On
나를 위해 잘 작동합니다.
노트 : 작동하지 않는 경우 다음 옵션도 시도 .
1) MI 계정에 로그인 (일부 장치에 적용되지 않음)
2) 또한 MIUI 최적화 켜기 비활성화 : 설정-> 추가 설정-> 개발자 옵션, 하단 근처에이 옵션이 표시됩니다.
3) 개발자 옵션을 활성화하고 개발자 옵션을 활성화하기위한 링크 : 여기에 설명
그래도 작동이 안되는?
-> Mi 계정에서 로그 아웃 한 다음 새 계정을 만들고 USB 디버깅을 활성화합니다.
감사