Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Install on Device Failure [INSTALL_CANCELED_BY_USER]

I'm using Android Studio to connect to run app in my Xiaomi Redmi Note 3G device. My device is already found in the Choose Device Dialog, but I keep getting the [INSTALL_CANCELED_BY_USER] error :

Waiting for device. Target device: xiaomi-hm_note_1w-SSE6Y97PFYQCRK45 Uploading file  local path: C:\Users\Anthony\AndroidStudioProjects\UASProject\app\build\outputs\apk\app-debug.apk remote path: /data/local/tmp/com.si.UASPROJECT Installing com.si.UASPROJECT DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.si.UASPROJECT"    pkg: /data/local/tmp/com.si.UASPROJECT    Failure [INSTALL_CANCELED_BY_USER] 

I tried looking for solutions online, but there's no mention of Failure [INSTALL_CANCELED_BY_USER] error.

like image 364
Anthony.S Avatar asked Apr 04 '15 09:04

Anthony.S


1 Answers

Happens to my Xiaomi phone after updated it to MIUI 8. Took me hours to figure it out!

Check the followings if you're a victim too:

  1. Go to Settings -> Permissions -> Install via USB: Uncheck your App if it's listed.
  2. Go to Settings -> Additional Settings -> Privacy: Check the Unknown Sources option.
  3. Finally go to Settings -> Additional Settings -> Developer options: Check the Install via USB option.

Update (MIUI 8):

Signin in to MI account is required to enable Install via USB option.

Update 2

For some devices (e.g. Redmi) you might need to turn off MIUI Optimization and reboot your phone.

Settings > Additional Settings > Developer Options > MIUI Optimization

P.S. don't update MIUI unless necessary!

May the victims saved

like image 51
Jiyeh Avatar answered Sep 19 '22 15:09

Jiyeh