[Xiaomi Redmi 3s Questions & Answers] IamDictator:
Hey Guys,

I have a redmi 3s prime and i tried to install lineage os on it, during the process i accidentaly flashed twrp over both the recovery and the boot. Now i cannot get into the recovery (and fastboot) unless i flash it over boot before rebooting my phone. After that i AM able to flash an new rom but it seems to always have wifi issues.

atm i am trying to flash the xiaomi developers global rom to see if it makes any difference. My main goal is to flash TWRP and a curstom rom (linage or resurrectionremix).

Can anyone help me?

Thanks alot!

Update #1

The flashing of the global developer rom worked and the wifi seems to work aswell, i will try to boot into fastboot and recovery.

Update #2

Its seems i am able to boot into fastboot and recovery again

Update #3

Following a tutorial for flashing TWRP and a custom rom but cant se2 anyone help me here?:

>>> Check then next step to root :

- launch minimal adb tool (previously installed)
- type : adb devices (to list phone connected) it will appear "unauthorized"
- on the phone : accept the computer
- re type : adb devices
it has changed in "authorized"
- type : adb reboot bootloader
it will go in fastboot mode (the same that power + vol down)
- type : fastboot devices
your phone will appear as in adb mode (unless the bad signed driver is choosen in win10 ; i won't repeat it again)
- type (optional) : fastboot oem device-info (to verify if bootloader is locked or unlocked)
now, we go to root
- type : fastboot boot twrp.img (if it is your renamed twrp copied in the minimal adb folder)
link for TWRP guide at the end if needed

!!! it will boot temporary in this recovery but it will keep your original recovery !!!
> allow to modify system (don't keep the "read only" if you want to root or flash recovery later)
go to settings to set date, hours, language, set custom options...

My optional advices :
- save your EFS & persist partitions or all whole partitions (except cache) to make a backup
- export this backup in computer or SD card in case of future problem
(EFS, persist are usefull to save and restore your IMEI in particular)
- you can flash directly TWRP with fastboot command : fastboot flash recovery twrp.img

>>> Root :

Now flash DM-verity patch, then superSU.zip to root and accept to wipe dalvik/cache after, finally reboot !
Device is rooted ! and you have kept the original recovery.
the reboot is quite long like rom update (because of cache rebuild)
sometimes, parts of theme are lost after rooting : just restore your theme
some devices don't need DM-verity patch as explained upper
superSU app shows "systemless root" from android 6+, it is normal, read below

>>> Change the Recovery by TWRP (optional) :

Now you are rooted, you have 2 methods :

- Install one TWRP app with googleplay and flash recovery through app on rooted device.
New official app in development (flash/backup .img & .tar)
- OR reboot in fastboot mode (with TWRP app method or power+vol- method or adb reboot recovery method)
in fastboot mode, and type commands :
fastboot devices
fastboot flash recovery twrp.img
(be sure your twrp.img is unlocked and correctly copied/renamed in minimal adb folder)
Now, long press power to turn OFF phone
power + vol+ (release power at vibration) to enter in TWRP or by TWRP app or Updater app or under Windows with minimal adb reboot recovery command

Note for devices with DM-verity : flashing TWRP needs to have patched system with DM-verity patch before because you will modify system most of time - generally, you don't need to patch again because you have ever done it in previous steps - in case of bootloop : go to fastboot mode, boot in TWRP with command and patch it.
Chainfire has recently modified superSU for android 6+ devices with DM-verity to install root without modify the system : it's called "systemless root". When you flash superSU.zip, it detects automatically android version, cleans old files and installs with appropriate method. Maybe no need to patch boot in this case with DM patch.