Installation did not succeed.
The application could not be installed: INSTALL_FAILED_USER_RESTRICTED
Installation via USB is disabled.
需要打开Settings->developer options里的允许USB安装
代码见
/frameworks/base/services/core/java/com/android/server/pm/InstallPackageHelper.java
public int installExistingPackageAsUser(
......
if (mPm.isUserRestricted(userId, UserManager.DISALLOW_INSTALL_APPS)) {
return PackageManager.INSTALL_FAILED_USER_RESTRICTED;
}