How to unlock bootloader, root and install​ TWRP on Redmi 3S+ (should work with Mi 3s Prime too) On Redmi 3S+ , how do I :

I) Unlock bootloader

II) Install TWRP and root

There are confusing instructions available on internet. This is a self answered question detailing the procedure
Instructions to unlock bootloader of Redmi 3S phone are very confusing it took me many days to make it work, so I've documented the steps for anyone else trying. There's a lot of text but should be easily readable. Don't bother with part II, unless you have success with part I.



Part I - how I unlocked Bootloader on Redmi 3S+. 

Intro: These are not a guaranteed "how to" steps. Because there's no consistent method that is available people have to go by trial and error, and none of the guides I tried worked. Everything about unlocking MI is inconsistent, even their own tool. And there's no meaningful feedback which makes it even harder to figure out what's going on. Just when I was beginning to think that all those reports of it working are fake, it worked for me. Seems when it works, people don't provide exactly what they did. So here what I did was recorded all the conditions under which I've successfully unlocked the boot loader. If you follow this exactly it will increase your chances of unlocking. But all the variables are unknown, so Redmi may change one and it might not work. So it's like superstition. 

So, here are the conditions/states under which I've unlocked it:

Original version of MIUI: 8.1.6.0
Android version: 6.0.1

In Developer Options:


OEM unlocking: enabled
USB debugging: enabled


Settings / Mi Account / shows as signed in
Clicking on Mi Cloud there:


Every sync is off. 
Find device is off
and Back up device is off. 


Clicking on Devices shows:
- Redmi my phone number activated

Next, enable Developer Options by going to Settings / About phone (at the bottom) And tap a few times (10?) on  "MIUI Version" Till it will give you a message: "You're now a developer!"

Exit and go to Settings / Additional Settings / Developer Options -- and enable it. 

There will also be "USB Debugging" - enable it

OEM unlocking - enable it to allow the bootloander to be unlocked

Next, you need to register and request bootloader unlock permission.

Register on miui official forum. I used my e-mail (you should have a secondary e-mail, not a good practice to use your primary one on sites like these): http://en.miui.com/forum.php

Once you've registered, you can request unlock here: http://en.miui.com/unlock/  (it'll come up in Chinese, click English below) and just follow instructions. 

Next:

1) I had only ONE sim card in the phone's slot: #2 (slot #1 empty)
Same sim I used to sign in and request authorization with. I never got a confirmation message from Redmi. It's been a while since I've requested it, so I don't think it's because I've waited or "was patient" as some people say you have to be. I think it's rather the combination of things I've done. So just try right away or next day.

2) You need internet on your computer throughout the whole process. Without internet I only got first checkmark in the MI Unlock, which is "Verifying device", then on the "Unlocking" part I got a red x, and "error: unlocking redmi unknown error (-1)"

3) With my 3S phone tethering internet to the laptop, I logged into my MI account. Oh, by the way, sometimes it would give me "network error" during this login. I know I had internet, so it must be their server. I kept clicking without changing anything, and after a few times it signed in. Having said that, "network error" could mean anything and doesn't even have to be related to "network". (If you put a wrong information for example it might tell you that "account doesn't exist" for example, and after I unlocked it, now it just permanently gives me "network error" which makes me wonder if I lock it, will I be able to unlock again?) 

Now it wants you to put the phone into Fastboot. Unplug the USB cable shut down the phone. Then hold Volume Down + Power and it enters Fastboot. Plug in the phone back.

4) Now, don't do anything. As I said you need to have internet throughout the steps. So use alternate internet connection (don't touch this sim). Just ask a friend to turn on hotspot on their phone for a couple of mins.

5) Check in a browser to confirm have internet. Now click unlock and hopefully it'll work for you as it did for me. Good luck!

MI Unlock (miflash_unlock.exe) version I used: 2.2.406.5



Part II - Install TWRP and Root

Disclaimer: this part could brick your phone.

1) Download TWRP. The official TWRP site's versions for "Redmi 3" didn't work for me. The one shared by a guy on redmi forum seems fishy. So I found another one (and there is considerable size difference between the two).

https://androidfilehost.com/?fid=529152257862698997

MD5 of this file (check to confirm after you download using win-md5 or something like that): 36be7f4b14082b2e0cfd9d8f7c3b08d0

I forgot where I got this link. But it seemed more reliable than the one from Redmi forum. And this is the one I've used. I'll try to find the source later. You have to use TWRP designed for the model of the phone you're using. Using incompatible one could brick your phone (though supposedly not permanently). Anyway, if you find another TWRP source, make sure it specifically mentions that it's made for Redmi 3S.

Before you proceed, to connect the phone to PC, you'll need ADB and drivers. If you have Android Studio, you already have them, but for most people it's too big of an install, so instead download small package here and follow instructions to install: http://www.cyanogenmods.org/forums/topic/install-adb-fastboot-windows-drivers/

Once you got the drivers installed, go to the folder where adb.exe is and place the recovery.img there (it's the one from the TWRP zip, it could be named differently of course).

Then open up command window (cmd.exe) and go to the folder where adb.exe is.

A) Type this command to put the phone into Fastboot mode:

adb reboot bootloader


If your phone asks “Allow USB debugging” say yes.

B) Then transfer TWRP image file to the phone via the following command:

fastboot flash recovery recovery.img


C) And lastly, tell the phone to boot into it:

fastboot boot recovery.img


If you skip step C, the phone will probably delete the image when you reboot. Some tutorials skip it, and that doesn't seem to work

First time in the TWRP, it'll ask if you want to "Swipe to allow Modifications". You want to do this if you want to root.

Now once you've done that, you MUST “Disable dm-verity“. If you don't, the phone will enter into infinite bootloop and the universe will collapse (or so I heard). So I disabled it! Go to Advanced Settings and there it will be.

Now once you've done that you should be good to go. Reboot it into normal system mode and prepare yourself for Rooting!

Once the system boots, you should confirm that you've indeed installed TWRP.


  To enter TWRP recovery:  Shut down your phone. Then hold Vol Up, Vol
  Down and Power, at the same time and as soon as MI logo shows up,
  release just the power button, and when TWRP logo shows up release the
  other two buttons also, and wait a little and it'll start up with the
  menu. Although for me also works releasing all buttons once MI logo
  shows up.


Now to the actual rooting.

Having done the previous things, this part is actually pretty easy!

Go to the official SuperSU site: http://www.supersu.com/download

The SuperSU site is hard to understand, though what you need to do is really easy. Just need one file to download there: "Recovery Flashable.zip" (latest) and copy it to your phone. Or better yet, just download it from the phone's web browser. (They also have APK files on their site, you don't need them)

The browser will save the file to your Downloads folder most likely (check to make sure it's there once transfer is complete)

Now reboot into Recovery Mode (TWRP) 

Click Install

locate the zip file and Swipe to confirm flash.

Now the installation process will start and it will reboot the phone a few times while doing it, so be patient and don't fiddle with the phone, just put it on your desk and look at it.

Once it's all done, It'll ask you to reboot, and once you do that your phone should be rooted! An app was also installed during this process called SuperSU, it is a root manager that will manage which apps get the Root permission. To confirm you have root, you can enter adb shell and  cd /data/system  and try to create a folder there, only root can do that. (No need to download extra software to check if you have root.)

That's all. Next you'll probably want to remove some bloatware. I'm making a guide at the moment and will post a link here once done.