[DEV] Flashing and Rooting Phone, Development project

Zaid Sheikh

Member
Feb 2, 2017
19
16
0
All the thanks goes to @Peak.Krittin [Dev].
MIUI Forum link to this thread :-

http://en.miui.com/thread-3584490-1-1.html

Greeting , MIUIers
This thread is divided into 2 part
- Flashing TWRP & ROOT (& INSTALL XIAOMI.EU)
- My active development project for Redmi S2/Y2 (YSL)

Today , I will be showing you how to flash TWRP and root the Xiaomi Redmi S2/Y2 (YSL)
I took time to make this and sure that it is noob friendly.

You can not blame anyone if you bricked your phone, It's all your own fault. Please done it with caution.
People who do not know what they are doing right now please leave this thread alone.

!!! Unlocking & Rooting phone will lost your warranty !!!
(Re-locking & flashing full rom by fastboot should give your warranty back)

Requirements :
- Unlocked Bootloader
- Workable Brain
- Common Sense
- TWRP
https://drive.google.com/file/d/1kW_j-iQDDPHnt8cWkcogtKR7iM--8Yhh/view


- Magisk
https://github.com/topjohnwu/Magisk/releases/download/v16.4/Magisk-v16.4.zip


- ADB & FASTBOOT
- ADB & FASTBOOT DRIVER
- Xiaomi.eu Rom (Optional)
https://xiaomi.eu/community/forums/miui-rom-releases.103/


Note:- You can flash it on any miui rom.It is safe to flash.
and for boot into recovery wiping of data not needed.
but if you flash ( I said flashing) on xiaomi.eu MIUI roms then to decrypt internel data you have to click on wipe data and then it will ask you something you have to simply write "yes" and then your internel data will be decrypted and you can see all the files of internel data in twrp.( Decryption of internel storage is only supported by xiaomi.eu roms )
But if you flash it on any other MIUI rom then it will not decrypt your internel storage (So no need to wipe data). To flash any .zip or .img file you have to put that file in your sdcard so that you will flash it through twrp.

And note that if you only boot into twrp then you dont have to wipe data but you have to put your flashable files in the sdcard.TWRP will not be there once you reboot.It only will be seen when you again boot into twrp through cmd.and you will get ota update as well if you only boot into twrp because when once you reboot your phone you will get your stock recovery not twrp.

I am again saying booting and flashing are two different things.

!!! UNLOCKED BOOTLOADER REQUIRED !!!

Let get start,

Copy the twrp file into your ADB&Fastboot folder.

First of all , Prepare your phone in fastboot by
- Power + Volume Down
- adb reboot fastboot

Then type "fastboot devices"

It should return something.. (Your phone)
If it didn't ( Please go read #1 Solution in the end of the thread

After that, type
"fastboot boot twrp-3.2.1-0-ysl.img"
If you want to temporarily boot twrp
or type
"fastboot flash recovery twrp-3.2.1-0-ysl.img"
If you want to flash recovery.
Then, You should see your phone entering TWRP
You will be prompted
"Please enter password to decrypt your phone"
(Please read solution #2 at the end of the thread to permanently disable encryption)
Don't enter password....
Click cancel then go to wipe
Then "Slide to wipe" ( If there are errors please go read #3 Solution in the end of the thread )

Then advanced wipe and wipe Internal Storage

After that, click "Install" then click "select storage"
and select External Storage / SD Card and click
"Magisk.zip" and "Install This ZIP" wait until the installation finish then click "Reboot Device"

Congratulations, You have rooted your phone

Solution Part :
#1 : My device is not founded in fastboot...
Answer : Did you even unlock your bootloader...
#2 : Permanently disable encryption
Answer : Please make sure that you done rooting your phone then flash xiaomi.eu rom before flash please wipe all of your partition except EXTERNAL STORAGE (SD CARD) then flash Magisk.zip again

What is xiaomi.eu rom?
It is a modded miui rom based on CHINA and have OTA update supported... Also, It disable encryption

#3 : Can't format
Answer : Please reboot your phone into fastboot and start the process again...

--------++++++ Development Part ++++++--------Redmi S2/Y2

WhatsApp Group : https://goo.gl/9g8S9Y

ARM64 Kernel
- Kernel build completed

Collecting VENDORS FILE to make the kernel work...

Custom ROM
- Let talk about it later ( I'm secretly doing it)
--------------------------------------------------------------

And... Thank you for deleting my old thread with the Irrelevant reason

and for information about Development of redmi S2/Y2 join our whatsapp group.
Link is mention above .

and if you like this then please like this thread.

THANK YOU
 
Last edited:

Zaid Sheikh

Member
Feb 2, 2017
19
16
0
nice guide
I just unlocked bootloader and try to instal twrp and i found something wrong


this one is right
"fastboot flash recovery twrp-3.2.1-0-ysl.img"

is wiping internal storage needed? for what?
also whatsapp group link is broken
brother first of all sorry for broken whatsapp group link
now coming to your issue
brother if you only want to reboot into twrp recovery then use this command :-
fastboot boot twrpname.img

and if you want to flash it :-

fastboot flash recovery twrpname.img

if you have xiaomi.eu MIUI rom then it is needed to wipe internel data or you can simply click on wipe data na then type yes .It will decrypt your internel storage only works in xiaomi.eu rom

and if you wipe data on other roms like golbal beta or stable then it will not decrypt your internel data .
 

Zaid Sheikh

Member
Feb 2, 2017
19
16
0
ok finally I'm understand
at first booting to twrp it take time, ask password and log show "unable to decrypt blabla...." it was beacuse I'm on global right? and I can only flash .zip only from sdcard
so now I'm on eu rom then format data, and no more "unable to decrypt blabla...." is that mean I can flash .zip from Internal storage?
yes u r right but you have to wipe data first
 

peaktogoo

Senior Member
Mar 13, 2018
359
1,036
113
Tokyo
As the proper owner of this guide, He just copied without PM or permission

Edit : He gave proper credits now.
 
Last edited: