Today we will learn to flash stock rom in mi4i Android phone using fastboot on macOS.

Requirements

  1. MI4I Android phone
  2. Stock ROM
  3. macOS
  4. Fastboot tool

Make sure your phone is full charged or at least 75% charged before following this tutorial.

Also make sure that there is no interruption of electricity or connection between your mobile and your computer while flashing ROM.

Any interruption may lead to serious damage to your phone.

Note your mobile bootloader must be unlocked for flashing process.

Step 1: Downloading stock ROM from MI website

Head to MI website and download the Stock ROM for your MI4I phone. Link - MIUI Stock ROM

Step 2: Extracting the downloaded file

Now extract the downloaded ROM

extract
Double click on file to extract it.

Step 3: Copying extracted files to new folder

Make new folder in desktop and name it as mi.

extract

Now open extracted folder and copy all its content to new folder (mi) in desktop.

copy

Step 4: Downloading fastboot and installing it

Link – fastboot tools

2. After that extract the zip file.

fastboot

3. Open extracted folder

fastboot

4. Drag and drop install.sh file into terminal window

5. Now press enter and enter your sudo password

6. Now you will see the Installation success message.

fastboot

Step: 5 Booting MI4I in fastboot mode

Now power off your mobile.

Then Hold power button and volume down button simultaneously.

Now you will see this screen which means that your mobile is in fastboot mode.

fastboot Now connect your MI4I phone to your computer using data cable.

Step: 6 Flashing ROM

Now open terminal on your macOS.

1. Type cd ~/desktop/mi/

This command will change the current directory to the mi folder in desktop.

2. Now type ./flash_all.sh

You will see following messages

Tulsis-iMac:mi tulsiojha$ ./flash_all.sh

product: MSM8916
soc_id: 239
target reported max download size of 268435456 bytes
sending 'tz' (496 KB)...
OKAY [  0.018s]
writing 'tz'...
OKAY [  0.021s]
finished. total time: 0.039s
target reported max download size of 268435456 bytes
sending 'tzbak' (496 KB)...
OKAY [  0.018s]
writing 'tzbak'...
OKAY [  0.018s]
finished. total time: 0.036s
target reported max download size of 268435456 bytes
sending 'hyp' (72 KB)...
OKAY [  0.004s]
writing 'hyp'...
OKAY [  0.006s]
finished. total time: 0.011s
target reported max download size of 268435456 bytes
sending 'hypbak' (72 KB)...
OKAY [  0.006s]
writing 'hypbak'...
OKAY [  0.006s]
finished. total time: 0.012s
target reported max download size of 268435456 bytes
sending 'sbl1' (281 KB)...
OKAY [  0.011s]
writing 'sbl1'...
OKAY [  0.011s]
finished. total time: 0.021s
target reported max download size of 268435456 bytes
sending 'sbl1bak' (281 KB)...
OKAY [  0.012s]
writing 'sbl1bak'...
OKAY [  0.010s]
finished. total time: 0.022s
target reported max download size of 268435456 bytes
sending 'rpm' (155 KB)...
OKAY [  0.006s]
writing 'rpm'...
OKAY [  0.007s]
finished. total time: 0.013s
target reported max download size of 268435456 bytes
sending 'rpmbak' (155 KB)...
OKAY [  0.008s]
writing 'rpmbak'...
OKAY [  0.009s]
finished. total time: 0.017s
target reported max download size of 268435456 bytes
sending 'modem' (51377 KB)...
OKAY [  1.668s]
writing 'modem'...
OKAY [  1.517s]
finished. total time: 3.186s
target reported max download size of 268435456 bytes
sending 'aboot' (2117 KB)...
OKAY [  0.071s]
writing 'aboot'...
OKAY [  0.064s]
finished. total time: 0.135s
target reported max download size of 268435456 bytes
sending 'abootbak' (2117 KB)...
OKAY [  0.072s]
writing 'abootbak'...
OKAY [  0.062s]
finished. total time: 0.135s
erasing 'boot'...
OKAY [  0.033s]
finished. total time: 0.033s
erasing 'sec'...
OKAY [  0.043s]
finished. total time: 0.043s
erasing 'config'...
OKAY [  0.005s]
finished. total time: 0.005s
target reported max download size of 268435456 bytes
sending 'misc' (8 KB)...
OKAY [  0.004s]
writing 'misc'...
OKAY [  0.005s]
finished. total time: 0.008s
target reported max download size of 268435456 bytes
erasing 'system'...
OKAY [  1.459s]
sending sparse 'system' 1/7 (260922 KB)...
OKAY [ 11.574s]
writing 'system' 1/7...
OKAY [  8.092s]
sending sparse 'system' 2/7 (256403 KB)...
OKAY [ 11.227s]
writing 'system' 2/7...
OKAY [  8.589s]
sending sparse 'system' 3/7 (262108 KB)...
OKAY [ 11.497s]
writing 'system' 3/7...
OKAY [  9.566s]
sending sparse 'system' 4/7 (253166 KB)...
OKAY [ 12.025s]
writing 'system' 4/7...
OKAY [  8.375s]
sending sparse 'system' 5/7 (257630 KB)...
OKAY [ 10.767s]
writing 'system' 5/7...
OKAY [  8.005s]
sending sparse 'system' 6/7 (257163 KB)...
OKAY [ 11.327s]
writing 'system' 6/7...
OKAY [  9.150s]
sending sparse 'system' 7/7 (44268 KB)...
OKAY [  1.885s]
writing 'system' 7/7...
OKAY [  1.299s]
finished. total time: 124.836s
target reported max download size of 268435456 bytes
erasing 'cache'...
OKAY [  0.066s]
sending 'cache' (8336 KB)...
OKAY [  0.273s]
writing 'cache'...
OKAY [  0.268s]
finished. total time: 0.608s
target reported max download size of 268435456 bytes
erasing 'userdata'...
OKAY [  4.084s]
sending sparse 'userdata' 1/3 (259448 KB)...
OKAY [ 11.273s]
writing 'userdata' 1/3...
OKAY [  8.354s]
sending sparse 'userdata' 2/3 (249106 KB)...
OKAY [ 10.813s]
writing 'userdata' 2/3...
OKAY [  7.717s]
sending sparse 'userdata' 3/3 (67247 KB)...
OKAY [  2.887s]
writing 'userdata' 3/3...
OKAY [  2.469s]
finished. total time: 47.596s
target reported max download size of 268435456 bytes
sending 'recovery' (24658 KB)...
OKAY [  0.804s]
writing 'recovery'...
OKAY [  0.732s]
finished. total time: 1.536s
target reported max download size of 268435456 bytes
sending 'boot' (22180 KB)...
OKAY [  0.724s]
writing 'boot'...
OKAY [  0.666s]
finished. total time: 1.391s
rebooting...

finished. total time: 0.004s

Once the Installation is finished mobile will automatically rebooted.

extract

Enjoy.

Thanks for visiting….