Monday, October 16, 2017

How To Flash & Unbrick Xiaomi Phone [Tutorial]



Greetings MIUI Lovers and Xiaomi Users,

Note: It has been reported that beyond MIUI V8.1, Developers has removed Download Mode (EDL), please try it at your own risk.

Steps for Flashing/Unbrick Redmi 4/Prime/4A: (This can be used to flash from China Rom to Global Rom, or Tampered Rom to Original Rom)

Please be noted I will not take any responsibility for anything happened to your device. Use Windows 64-Bit, users having issue on 32-Bit Windows. You may face this error " Not enough storage to process this command"

Important: - Before flashing it is advised to take the backup of data and make sure that your phone battery is charged enough.


You need to Start your Phone in Download Mode.(Not Fastboot Mode)


Do The Following.
1. Go to the Recovery Mode by Volume Up and Power button.
2. Click Download from Screen
3. Plug USB Cable to PC
4. PC will install the device driver, let it do its job




On your PC do these next steps:

1. Open Device Manager and Phone will be detected as QHUSB_BULK under the Com Ports section.

Right Click and choose Update Drivers.

Note : - Driver Signature Enforcement: It's recommended to disable. Reboot your PC in Advanced Mode and Choose Disable Driver Signature.

2. Choose Browse My Computer for Driver Software

3. Choose the Path of Xiaomi Folder. Most of users will find it like this.
Note:- If Folder does not exist , Install MI Flash (Link below) first.
Win 64 bit C: \ Program Files (x86) \ Xiaomi \ MiPhone \ Qualcomm \ Driver
Win 32 bit C: \ Program Files \ Xiaomi \ MiPhone \ Qualcomm \ Driver

4. Choose Install this Driver Software anyway.

5. Wait till driver installation successful.

6. The driver will be installed Sucessfully and you can see added in Ports as Qualcomm HS-USB.



Now we are ready to Flash!

Flashing ROM Part.Windows 64-Bit recommended as users are facing issues on 32-Bit and brick thier devices.
The ROM links below are of Fastboot Rom. Recovery ROM will not work.If you have already downloaded Fastboot ROM no need to Download again.
(File Extension with .Zip file is Recovery ROM, .tgz or .tar file is Fastboot ROM)

you can choose your Fastboot rom here:

Fastboot Rom Download Link

If link does not work, Put Letter "o" not Zero before the Link address.

Flash Tool:  Download Here
Important: - Before flashing it is advised to take the backup of data and make sure that your phone battery is charged enough.

Steps to Flash ROM: -
1. Download ROM from the above link (Which one you want to Flash) and extract it to Desktop(Use Winrar Software to extract).
(Please check if the file suffix is '.tgz'. Please rename it to '.tgz' if the suffix is '.gz or .tar')
Note: - Some users get error while extracting on Desktop Because there is space in the username of PC or the folder as shown.

The users should put the ROM In C Drive in a folder without spaces. E,g C:/ROM/MIUI


2. Download flashing tool from the above link and install it.
3. Once installation is complete, Run MiFlash application
4. Click on browse
5. Select ROM folder from Desktop(From the location where ROM is saved)

Note: -The path of the ROM folder Should be like "C:\\MIUI" Not "C:\MIUI\images"
The MIUI Rom folder should Contain the following files



6. Press Refresh button to see you device in flashing tool.
After pressing refresh button you will see connected device (COM 5) in my PC




Choose Flash_all option.
8. Click on Flash and it will start process



9. Once flashing process completes



Remove the cable and keep Power Button pressed until it Vibrates.
The Device will start, wait till completion , it can take up to 10 Minutes.



Note:
from _Xan_

Please mention in your tutorial if you are logged in Mi Account until upgrade is need to log out because in Mi Flash will handle exception: 
[0.18  COM10]:[COM10]:start flash.
[2.22  COM10]:cannot receive hello packet,MiFlash is trying to reset status!
[4.74  COM10]:cannot receive hello packet,MiFlash is trying to reset status!
[7.26  COM10]:try to reset status.
[8.41  COM10]:write time out try agian 96
[9.92  COM10]:write time out try agian 97
[11.43  COM10]:write time out try agian 98
[12.94  COM10]:write time out try agian 99
[14.44  COM10]:write time out try agian 100
[15.24  COM10]:error:The write timed out.
[15.25  COM10]:error:The write timed out.



Thanks for the input

Source : Xiaomi Forum

Disable Driver Signature Enforcement in Windows 7/8/10 64-Bit



Disable Driver Signature Verification through Troubleshoot

Step 1. Enter Troubleshoot.
There are many ways to get into Troubleshoot. In Windows 10/8.1/8, you can click “Restart” from the power options menu or the Start menu and hold down the “Shift” key at the same time. Once the computer has rebooted, you will be able to choose the Troubleshoot option. Or you can try Windows key + R to bring up the Run box, try shutdown/r/o and hit Enter, click “Close” to sign off and then you can choose the Troubleshoot option when the computer has rebooted.

Step 2. Select “Advanced options” and “Startup Settings”.

Step 3. You need to restart you computer one last time to modify boot time configuration settings.


Step 4. You will be given a list of startup settings, including “Disable driver signature enforcement”. To choose the setting, you need to press F7 key.


In Windows 7, XP and Vista, you can continuously pressduring boot-up to get to Advanced Boot options (on some other systems, you need to first pressto go into Boot Menu and then pressto reach Advanced Boot options). When the menu pops up, use the Down arrow key to scroll to “Disable driver signature enforcement” and press “Enter”. Continue the boot process.
Your PC will reboot and you are able to install any drivers including the unsigned drivers without error messages.

Top 2. Disable Driver Signature Enforcement Permanently and Completely

You can try commands to disable driver signature enforcement permanently and completely.
Step 1. Open a Command Prompt with admin privileges. In Windows 10/8.1/8, press the Windows key + X and select “Command Prompt (admin)”. In Windows 7/XP/Vista, you can type “command prompt” in the Start search box, right-click on “Command Prompt” in the result and select “run as administrator”.

Step 2. Type the following command and press the Enter key:
bcdedit /set testsigning on
You should receive the “The operation completed successfully” message.


In my test, you can also type the commands as below:
Please pressafter each line.
bcdedit.exe -set loadoptions DDISABLE_INTEGRITY_CHECKS
bcdedit.exe -set TESTSIGNING ON
Step 3. Close the Command Prompt window and restart your computer. Now you can install any unsigned drivers without problems.

Part 4. How to Enable Driver Signature Enforcement if Needed

You can enable driver signature enforcement whenever you need. Try the 2 methods. Both requires to type commands in Command Prompt window. To enter Command Prompt, refer to Top 2 above.
Method 1. If you disable driver signature verification through Troubleshoot, type the following commands:
bcdedit.exe -set loadoptions DDISABLE_INTEGRITY_CHECKS
Restart your computer.
Method 2. If you turn off driver signature verification with the 2th method, try the command below:
bcdedit /set testsigning off
Reboot your computer.

Sunday, October 15, 2017

How To Unlock Bootloader [Xiaomi]




[Tools, Tips & Tutorials] How To Unlock Bootloader


What is Bootloader ?
In the simplest terms, a bootloader is a piece of software that runs every time your phone starts up. It tells the phone what programs to load in order to make your phone run.



How is Recovery mode Related to Bootloader ?

Bootloader loads the recovery mode. When a phone is in recovery, it can execute large pieces of code that totally rewrite the Android operating system.



What is the important of Bootloader ?

Bootloaders basically package the instructions to boot operating system kernel and most of them also have their own debugging or modification environment. As the bootloader kicks off before any piece of software on your device.
The bootloader is important because it loads both of these pieces of software. Without a working bootloader, your phone is a useless brick.



Why unlocked bootloaders are important ?

Some bootloaders, however, contain an extra layer of security that checks to make sure that it only loads an operating system that passes its approval process.A locked bootloader means you can’t install your own OS. For most people, that’s fine. However, if you want to put the latest version of CyanogenMod or any other ROMs.on your phone, a locked bootloader means you can’t.


: Video Tutorial :










Here is a Method for  How to  Unlock Bootloader of Redmi 4A :-





Steps for Unlocking Bootloader

1 )  Apply for Bootloader Unlocking permission.

     You need to apply your request hereGive a proper reason for Unlocking.







2)  Upon Approval, Download Mi Unlock Tool.


3)  Download and install FlyVPN app on your device from the Google Playstore.




4)  Launch the FlyVPN app, Choose a VPN server as China and pick the result with shortest ping time in (ms), which is green in color. As shown below:-










Note : As we all know, the issue of Unlocking Error is mainly due to the congestion of the server and time-out issues. Hence, using this alternative will ensure quick hand shake connection.

5 ) Enable Developer options:- Go to About phone > tap MIUI version at least 7 times to activate the Developer options.



6 ) Enable USB Debugging:- Go to Additional settings > Developer options > USB debugging > Enable it , Enable OEM unlocking too.








7 ) Go to Additional settings > Developer options > Mi Unlock status > Add account and device. Upon a successful binding of your  Account and Device, it will notify, "Added successfully. Mi account is associated with the device now." as shown below:-








8 ) Launch the Mi Unlock Tool, double-click "MiFlashUnlock.exe", then enter your Email/Phone no./Mi Account ID.


9 ) Switch off your Redmi 4A, then press Power + Volume Down button and hold simultaneously for like 5-6 sec until it vibrate and release when the Mi logo appear and plug in your USB Data Cable conected to your PC / Laptop. As shown below:-







Tap on Unlock.











10 ) Now your device is unlocked  ☺ 



Unlocking Bootloader will reduce your Security level , So we do not advise and encourage you to Unlock. So Please proceed at your own risk, and you are hold responsible for your own device.

Updated on 15.10.2017 : If you can't find any China server on flyVPN , then choose any other country server.



If you get an error 86012 while binding your account , then wait for 1 week . After 1 week , neglect that error and proceed to unlock with Mi unlock tool.