Got this freaky error
Installation failed with message Failed to finalize session : INSTALL_FAILED_USER_RESTRICTED: Install canceled by user.
It is possible that this issue is resolved by uninstalling an existing version of the `apk` if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
When trying to run the apk
in my redmi 4 MIUI 8.5.4.0
OEM unlocking enabled
Solution Tried
- MIUI optimization turned off
- USB debugging turned on
- Verify apps over USB turned on
NOTE: while turning on install via USB a pop up saying The device is temporarily restricted
Best Answer
Steps for MIUI 9 and Above:
Settings -> Additional Settings -> Developer options ->
Turn off "MIUI optimization" and Restart
Turn On "USB Debugging"
Turn On "Install via USB"
Set USB Configuration to Charging
Turn On "install via USB
MTP(Media Transfer Protocol) is the default mode.
Works even in MTP in some cases