Install app via usb: The device is temporarily restricted
Asked Answered
S

35

83

When I toggle on the install via USB in developer mode:

  • it will pop the toast message said that the device is temporarily restricted
  • then toggle off the settings.

Is there any solution for this?
I searched through all the way like turning off MIUI optimization but still does not work. I cannot debug my application by Android Studio in this way......

Sheena answered 3/9, 2017 at 4:21 Comment(6)
You have developer account? MIUI devices binded to it's accounts.Kinard
Do u mean Mi account? Or I have to sign a developer account beside than Mi account. Last month I can use normally, but this month suddenly like thisSheena
I not very familiar with MIUI, but other peoples with MIUI tells me, what they must get special permission as "developer account". Sorry, I don't know more details.Kinard
Nvm, thank for your suggestions. I think this is MIUI bug but I not sure, because people complain last year and still no any official reply.Sheena
I got this problem in my Xiaomi Mi5 from India. All the mentioned solutions didn't work in my case. Then I tried to figure out the Core reason behind it and solve it. In MIUI, in order to change "Install via USB" option, you must be connected to the internet and signed in your Mi account. Due to some reason, requests from out of the China servers are getting rejected, so I connected to one open China VPN and tried again to enable 'Install via USB' and I got success. For detailed solution and VPN details, see this useful Youtube video: youtu.be/MeKUJlD-Ke4Prosecution
Possibly related on Android.SE: Enable "Install via USB" without creating MI AccountParegmenon
P
34

For me on a rooted MIUI v.8.5.1 I just need to:

  • turn off wifi
  • turn on mobile connection In development options

after doing that both Install via USB and USB debugging started to work.

Priapitis answered 29/11, 2017 at 6:14 Comment(4)
that method doesnt work anymore. You have to use china VPNNationwide
How to make it work in MIUI 9? does not work with it.Overtake
if somebody still get problem to enable "Install via USB", then try Security App -> Permissions -> Gear Icon at top right corner -> Turn On "Install via USB"Downhearted
Works for me, ThanksFritzsche
O
96

"Install via USB" wont work if your Xiaomi phone is running MIUI 8 or above. Looks like when you try to Enable this option, your phone trys to connect to some chinese server and fails.

I got a work around and it worked for me. Idea is to connect to Chinese-Shanghai server through VPN. Try the following:

  1. Install PlexVPN from Playstore and login into it. You will get a 24 hr free VPN service.
  2. Select China-Shanghai server and connect.
  3. From developer option in your Xiaomi phone, Enable "Install via USB".
  4. You can then disconnect the VPN and logout from PlexVPN.

Enjoy!!

Outfitter answered 10/12, 2017 at 2:25 Comment(11)
This is the only solution that worked for me. Many many thanksForfeit
Yep, it works! I'm from Spain and have Orange and it's the only solution so far. Thank you.Metallic
This must be the accepted answer. It works great.Thanks a lot.Luxate
Such a weird thing. Dont know how but it works. Thank youBitartrate
This is the only solution that works for newer MIUI versions, I tried everything else. Thanks!Boot
can't wait until there is a lineage os version for the note 5aSchism
Worked. In my case cannot connect with China-Shangai server (but the "Free Connection" worked for me) @Sheena You should select this as the correct answer.Leticia
I use Transocks chinese app, much simpler and it's free~University
If you dont get it for free, try this answer below: https://mcmap.net/q/240782/-install-app-via-usb-the-device-is-temporarily-restrictedZigzag
VPN works flawlessly! Had to use my SIM card nevertheless... Now "they" got my phone numberSheepshearing
this app no longer have shanghai. I use "China VPN" with beijing server as alternative and it works. Also notes that I use mobile data (redmi 7) forum.xda-developers.com/t/…Shrink
U
52

All you have to do is Turn your Wi-Fi off, turn on mobile data, and then enable the setting for "Install via USB". It'll go through.

Source: http://en.miui.com/thread-544718-1-1.html

Undone answered 5/9, 2017 at 15:54 Comment(8)
yeah, but when I am trying to do this - device is asking for interner connection. how do I deal with it ?Idleman
Hi, Andrew. Sorry, I left my answer incomplete. I've edited it now. You also need to turn on mobile data.Undone
This actually works. My device is Xiaomi Redmi Note 4. Note that I switched off the MIUI optimization too (from dharmx's answer), though.Grandchild
Apart from this, in developer options go for last item name is 'Turn on MIUI optimization', turn off this option it will ask for reboot , then reboot device by clicking Turn off & reboot buttonHousefather
Try my solution.Outfitter
Doesn't work, it says "Connect to the network and try again" :(Felicitasfelicitate
You need to be connected to the Internet via mobile data.Undone
thanks, finally found this answer. worked for me without turning off MIUI optimization in xiaomi redmi note 4.Korey
P
34

For me on a rooted MIUI v.8.5.1 I just need to:

  • turn off wifi
  • turn on mobile connection In development options

after doing that both Install via USB and USB debugging started to work.

Priapitis answered 29/11, 2017 at 6:14 Comment(4)
that method doesnt work anymore. You have to use china VPNNationwide
How to make it work in MIUI 9? does not work with it.Overtake
if somebody still get problem to enable "Install via USB", then try Security App -> Permissions -> Gear Icon at top right corner -> Turn On "Install via USB"Downhearted
Works for me, ThanksFritzsche
A
24

Try this

  1. Settings -> Additional Settings -> Developer options -> Turn off Miui Optimizations -> Restart
  2. Security -> Permissions -> Gear Icon at top right corner -> Turn On "Install via USB"
  3. Settings -> Additional Settings -> Developer options -> Turn On/Off "USB Debugging" -> Turn On "Install vis USB"
Antepast answered 14/10, 2017 at 11:12 Comment(8)
Restarting after turning off miui Optimizations worked for me!Incarnate
This should be the accepted answer, at least for MIUI v8.5.5.0, The crappiest operating system ever, don't ever buy a phone that ships this malwareOriginative
Remember to turn OFF then turn ON for USB Debugging option, after you restart before turning on Install via USB.Nikko
I also think this should be accepted answer. For me only two steps was enough to be able to install app from Android Studio (I don't need to enable option in developer options - it is turned off and I am able to install :))Brigand
i wasnt able to turn ON install via usb, but probably turning off miui optimization helped (also restarted), i am able to run app from android studio now - while install via usb is off and still asks for sim card.. also none of the vpn fixes worked for me.Rigamarole
this Miui optimisation options is missing nowUta
Turn off Miui Optimizations worked for me with a restartTillion
2nd point is currently (MIUI 12.5.9): Apps > Permissions > Install via USB > Gear icon top right > Install via USB (switch)Gottschalk
C
20

Turning off Wi-Fi and enabling Mobile Data (thank you Xiaomi for wasting my money to enabling mobile data which the last one I didn't have) on Xiaomi 4A did not work for me. Every time I tried to enable Install App Via USB it displayed me "the device is temporarily restricted". So, I found this solution:

Turn on VPN onto your device with these parameters and try again toggle Install from USB:

  • Server Address: China server from https://www.vpngate.net/en/
  • IPSec Key: vpn
  • Username: vpn
  • Password: vpn

I hope this info will be helpful to someone

Czechoslovakia answered 18/12, 2017 at 14:30 Comment(4)
this one was the only one that worked for me (Xiaomi Remdi 4x, MiUI 9.1Karajan
Use this site to get vpn username and password, connecting to a china server worked for us vpngate.net/enZigzag
I used a server located in Hong Kong. China server did not work for me.Specialty
yeah, we can use vpn to enable it again :) good luck!Nullification
D
13

(1) Turn Off your Wi-Fi
(2) Turn On your Mobile Data
(3) Turn On "Install via USB" from Developer Option of your device.
That's all

Dahlgren answered 2/11, 2017 at 4:37 Comment(0)
B
9

i had same problem with MI Redmi 4a i solved it by ->

first become a developer by clicking on

setting->About phone->MIUI version (7-8 times)

then, setting->additional setting->developer options->USB debugging

Turn on your usb debugging, then in developer options go for last item name is 'Turn on MIUI optimization', turn off this option it will ask for reboot , then reboot device by clicking Turn off & reboot button

after reboot go to Setting->Permissions click on top right menu button Turn on install via USB option

thats it !

Bis answered 28/9, 2017 at 12:12 Comment(4)
I actually try this, but it still doesn't work for my device. Btw, now it is okay even though i dunno what happen, the option suddenly working perfectly without any updates or setting change.... I wonder what MIUI working...Sheena
you can also use it over wifi if you have.Bis
Works like a Charm !! ThanksGreenness
NOTE if "Permissions" not listed then search it in Settings. Thanks.Markusmarl
A
9

The Best what I found devices without mobile data in device is to SIGN_OUT from MI_Account in the device and Login Again -> Try to enable USB_Debugging(Security Setting)-> enable INSTALL_VIA_USB

Almuce answered 6/12, 2017 at 10:26 Comment(2)
Thank you very much.This trick work for me,to wresting more time after.Impressure
this is the only solution that works for me. redmi 5A, miui 9.1.8Blintz
J
6

These steps worked for me after struggling 1 hour, Not needed to connect to Chinese server.
(1) Turn Off your Wi-Fi
(2) Turn Off your Mobile Data
(3) Turn On "Install via USB" from Developer Option of your device.
4) It will show the Error "No network found"
5) Now Turn On your Mobile Data
6) Again Turn on "Install via USB"
7) it will work, now Happy!

Jughead answered 16/1, 2018 at 11:18 Comment(1)
when i turn off mobile data and click "Install vis USB" it pops up to sign into MI UI Account.Agonize
L
5

In MIUI 8.5 it gives the error like you mention while enabling "install via USB", to resolve the error you need to make WIFI off and make mobile data on and then enable the option “Install via USB”. it will work for you.

A detailed blog: http://sforsuresh.in/xiaomi-mi-note-4-install-via-usb-device-temporarily-restricted/

Lilithe answered 18/10, 2017 at 8:20 Comment(0)
M
5

You will need to sign up/sign in for a Mi account before you continue.

1) Extract sim card from your non-Redmi phone. (It should be nano sim. Contact your telecom provider to get one if you have a micro or normal sim).

2) Insert sim card into Redmi phone.

3) Go to Settings -> Additional Settings -> Developer options.

4) Under Debugging, click on 'Install via USB' option.

The phone will enable this.

Remove the sim card.

That's it!! You should now be able to install your apps via USB from Android studio.

Please remember not to disable this option, otherwise, you may need to re-insert your sim card.

PLEASE NOTE: The above steps are guaranteed to work in Xiaomi Redmi 5 phone. Please improve this answer if the steps are different for other models of Xiaomi.

Massive answered 15/3, 2019 at 9:46 Comment(0)
M
4

Disable WiFi and switch install via USB on while you are connected through data and under your xiaomi account. It works!

Moonseed answered 3/10, 2017 at 6:57 Comment(2)
Not working connect to the network and try again displayCanteen
@GaneshGiri Tun on Mobile data and tun off WiFi and try againAllograph
A
4

In my case,

I turned on Airplane mode and

turn it off then

turn off Wifi and

turn on mobile data.

Now I can turn on install via USB.

May it helps some one like me.

Allograph answered 8/3, 2018 at 18:22 Comment(0)
G
3

Please verify your email and phone number in Mi account first then try this:

  1. Settings -> Additional Settings -> Developer options -> Turn off Miui Optimizations -> Restart
  2. Security -> Permissions -> Gear Icon at top right corner -> Turn On "Install via USB"
  3. Settings -> Additional Settings -> Developer options -> Turn On/Off "USB Debugging" -> Turn On "Install vis USB"
Gerous answered 9/12, 2017 at 18:57 Comment(1)
After turning off MiUi optimizations I was able to enable it.Nenitanenney
U
3

Redmi Note 4 (Nougat 7.0, MIUI 9)

For me, options like Turning WiFi off & on, trying on Data Network, or Turning off MIUI Optimization din't work. Also, the Install via USB never got enabled.

Following steps helped me to install apps via USB

  • Additional Settings > Developer Options
  • Here, click on USB Debugging (Security Settings). This will take you through some warning screens. Allow (click on Next/Accept) for all. At the end, it will be enabled.
  • Now turn on the Install via USB and it gets enabled.
  • Try to Run the app by connecting your device. If it still doesn't run (as in my case), find Select USB Configuration and select Charging This worked for me.
Unknowable answered 29/12, 2017 at 13:19 Comment(1)
didnt work for meUta
D
2

Solution with NO VPNing that worked for me:

  1. go to Settings->Accounts->MiAccount->AccountSecurity->Devices
  2. I had a Redmi 9 device listed there (I don't own a Redmi device)
  3. I removed that Device, so now no devices were listed
  4. go back to developer settings, enable install via USB, everything works.

I assume not everyone will have a Redmi device listed there, maybe some will have a different device, maybe some will even have the correct device(this is not something I can test by myself), but it makes sense to me that correcting any wrong devices from that list (or maybe deleting all devices like I did) might fix the problem.

Dicta answered 12/12, 2017 at 22:46 Comment(0)
P
2

I got this problem in my Xiaomi Mi5 from India. All the mentioned solutions didn't work in my case. Then I tried to figure out the Core reason behind it and solve it. In MIUI, in order to change "Install via USB" option, you must be connected to the internet and signed in your Mi account. Due to some reason, requests from out of the China servers are getting rejected, so I connected to one open China VPN and tried again to enable 'Install via USB' and I got success. For detailed solution and VPN details, see this useful Youtube video: https://youtu.be/MeKUJlD-Ke4

Prosecution answered 17/12, 2017 at 6:51 Comment(1)
Your most welcome Som. Glad it worked. Thanks for confirming.Prosecution
N
1

I will write what worked for me, these other solutions did not work out.

switch "Install via USB" to ON,

When the dialog box "Allowing" appear, quick tap your screen out of the dialog box.

Repeat it until u see that "Install via USB" is ON.

After u see "Install Via USB" is ON, you need to re-checking by pressing back button and go to developer option again.

This worked for me. Thanks.

Nubble answered 12/12, 2017 at 9:41 Comment(0)
S
1

I had this issue on my Redmi Note 4 with MIUI 9. For me the procedure is very simple.

1. Go to Settings -> Permissions -> Gear icon at top right corner.

2. Give the required permission for Install via USB.

3. Goto Developer Options and try using Install via USB. It will work now.

This process is for one time. I hope you have resolved this issue too.

Selene answered 8/3, 2018 at 14:9 Comment(0)
K
1

Faced same problem with Xiaomi Mi5 MUI9.

Turning on/off connections or MUI optimization did not work for me. What worked is:

Settings -> Additional Settings -> Privacy -> enable Unknown sources

Korney answered 4/4, 2018 at 10:41 Comment(0)
D
1

In my case when i updated MIUI version to the new available version, resolved the issue. So check if there is any update available for your device, go to

Settings => About phone => System update => here it will shows you the new available MIUI version for your device. So update it then try again.

Note: Turn your Mobile data before enabling install via USB.

Detached answered 20/8, 2018 at 11:51 Comment(1)
After updating the OS, i have regstered my mobile number +91 ... which created account and then enabled the USB debuggingLaborer
G
1

In my case, I connect to Chinese VPN, then I turn on install via USB and its work.

Gammy answered 5/11, 2021 at 7:29 Comment(0)
M
0

I had the exact same problem, tried all the suggested workarounds, but none of them worked for me. Strangely enough, what actually has worked for me was turning on MIUI optimization (it was turned off when the problem occurred)! After turning it on, I was able to toggle on install via USB.

Mahound answered 1/12, 2017 at 18:1 Comment(0)
D
0

This worked for me:

Go to settings-> Mi Account->Account security Then verify phone and email, If not added then add and verify that

Dowdy answered 2/12, 2017 at 18:9 Comment(1)
Its same after getting verifiedLuxate
F
0

I tried everything to no result, then read somewhere that you should use VPN and connect under China to unlock your phone's bootloader. Applied the same solution here and it worked!

Forkey answered 5/12, 2017 at 21:14 Comment(0)
E
0

If turning your Wi-Fi off is not working for you, then you might have not yet registered your MIUI account as a developer account.

To do so go to MIUI Dev center and register your already created account. After the review process this should not be bugging you anymore.

But remember as other have noted to:

  • Turn off Wi-Fi connection
  • Turn on mobile connection
Eubanks answered 9/12, 2017 at 16:58 Comment(0)
M
0

In my case,I was using my phone that is Redmi 4 and the usb debugging was not working.It was always giving the message "the device is temporarily restricted" .I have tried all this steps but the result was same.Then I found the foolish thing that I have put the device in charging mode only.When I switch to MTP(Transfer files) and then it started working correctly.I know its a foolish thing but it may help to someone.

Marilou answered 19/12, 2017 at 11:46 Comment(0)
B
0

if you have root you can force it with adb shell adb shell su setprop persist.security.adbinput 1

Bet answered 22/12, 2017 at 23:15 Comment(0)
B
0

Above solutions doesn't work for me. In my case it works by changing Additional settings -> Region to Russia/Some other country.

Bonar answered 2/3, 2018 at 14:6 Comment(0)
S
0

For me, on Redmi 3s prime with MIUI 9.2, enabling MIUI optimisation on developer menu worked. It caused phone to restart.

Shamus answered 10/3, 2018 at 10:6 Comment(0)
B
0

I'm on MIUI Global 9.6 | Stable [9.6.1.0 (NCFMIFD)].

Problem for me was that wifi was not connected. As mentioned in some answers, apparently device tries to connect to server.

It works for without mobile data.

Book answered 17/8, 2018 at 6:34 Comment(0)
A
0

I have tried every method mentioned here but unfortunately none were worked for MI 5A . Finally i have succeeded by connected to open china VPN

settings->VPN->add new VPN-> Name:Give some name , Type:L2TP/IPSec PSK , Server address: vpn601519347.opengw.net , IPSec preshared key :vpn , User name :vpn , Password :vpn .

Press OK, Enable VPN once the connection is successful go to developer option and enable install via USB option.

You can also try different server address like china088.opengw.net , vpn959922015.opengw.net

Arlenearles answered 12/11, 2018 at 10:5 Comment(0)
L
0

For anyone want to use free option you can install 1.1.1.1: Faster & Safer Internet before turn on Install via USB

https://play.google.com/store/apps/details?id=com.cloudflare.onedotonedotonedotone

Lovellalovelock answered 10/8, 2022 at 8:56 Comment(0)
R
0

If you are not able to disable MIUI optimization as suggested by other users All you got to do is head over to Developer options and tap on “Reset to default values” a few times. And the miui optimization will appear

Rey answered 21/11, 2022 at 9:33 Comment(0)
A
-5

Wifi has to be off for security reasons because you can use adb over wifi

Agreeable answered 9/10, 2017 at 11:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.