[GUIDE/TUTORIAL/HOWTO] Xiaomi Redmi Note 4 Snapdragon stock to Android 12.1 / LineageOS 19.1

Search This thread

danjde

Senior Member
Oct 16, 2013
64
8
verona
www.cosmognia.org
Hi Friends,
I've a phone where the unlock process was interrupted, the account xiaomi created but not completed the unlock code immission into the phone.

Do you know if is it possibile to restart from zero the unlocking bootloader process?

Many thanks!



David
 

syzw

Member
Aug 23, 2018
29
5
Hi Friends,
I've a phone where the unlock process was interrupted, the account xiaomi created but not completed the unlock code immission into the phone.

Do you know if is it possibile to restart from zero the unlocking bootloader process?

Many thanks!



David
After adding Mi account in Mi unlock status of developer options,I have unlocked with this.
 

vasdev

Member
Sep 23, 2021
8
3
Xiaomi Redmi Note 4
Cool tutorial @djibe89 .Will try it in few days. I am very new to custom roms, my redmi note 4 still has nougat 7.1, forgive me for my ignorance.

My question is after doing all the steps you mentioned above, I will end up with a android 11 rooted phone right ? so is there any way to make it unrooted ? will uninstalling magisk makes phone unrooted?.
Please forgive me if my questions seems too basic. thank you.

I want unrooted because I want to use this device as daily driver with banking apps and others .
 

djibe89

Senior Member
May 24, 2014
1,219
634
Samsung Galaxy Tab S2
Google Pixel 4a
Cool tutorial @djibe89 .Will try it in few days. I am very new to custom roms, my redmi note 4 still has nougat 7.1, forgive me for my ignorance.

My question is after doing all the steps you mentioned above, I will end up with a android 11 rooted phone right ? so is there any way to make it unrooted ? will uninstalling magisk makes phone unrooted?.
Please forgive me if my questions seems too basic. thank you.

I want unrooted because I want to use this device as daily driver with banking apps and others .
Hi, even though you don't install Magisk, phone will be seen as hacked by banking apps.
Magisk helps bypass detections.

I cannot garantee banking apps will work.
I'd have to buy a new one to test this. One day maybe.
 

vasdev

Member
Sep 23, 2021
8
3
Xiaomi Redmi Note 4
Hi, even though you don't install Magisk, phone will be seen as hacked by banking apps.
Magisk helps bypass detections.

I cannot garantee banking apps will work.
I'd have to buy a new one to test this. One day maybe.
Ok, thanks for replying. So, what custom rom or version should I install to make the bank apps think I am using a normal Android phone?
Is that even possible ?
 

Kudla

Senior Member
Mar 12, 2011
76
6
Samsung Galaxy A52 4G
I have installed the USB drivers on the laptop. Once I boot into fastboot screen on my 'redmi note 4' device, I connect the same to laptop.
But the 'Phone Connected' message does NOT pop up on MI Unlock tool. What am I missing here?

Please advise!
 

Garfoth

Member
Oct 25, 2017
23
3
OK so quick question: I just connected my Mi Account to my Redmi Note 4, do I need to wait for some kind of confirmation from Xiaomi? Because as it is now, it doesn't seem to matter whether the "OEM unlock" and "USB debugging toggles" are on or off, or if I've installed the drivers (I installed those posted in this guide), the phone just won't appear either in through fastboot (using the command "fastboot oem device-info") or through the Mi Unlock tool. Am I missing something?
 

djibe89

Senior Member
May 24, 2014
1,219
634
Samsung Galaxy Tab S2
Google Pixel 4a
OK so quick question: I just connected my Mi Account to my Redmi Note 4, do I need to wait for some kind of confirmation from Xiaomi? Because as it is now, it doesn't seem to matter whether the "OEM unlock" and "USB debugging toggles" are on or off, or if I've installed the drivers (I installed those posted in this guide), the phone just won't appear either in through fastboot (using the command "fastboot oem device-info") or through the Mi Unlock tool. Am I missing something?
Hi, like for @Kudla , it seems you have Windows USb faulty drivers.

Try to fix it from Windows Device Manager

Type: fastboot devices to check if device is recognized
 

Garfoth

Member
Oct 25, 2017
23
3
Hi, like for @Kudla , it seems you have Windows USb faulty drivers.

Try to fix it from Windows Device Manager

Type: fastboot devices to check if device is recognized
"fastboot devices" just doesn't do anything. "fastboot oem device-info" just hangs at <waiting for any device>... OEM unlock and USB debugging are both toggled on. The device manager recognises it as "Android" so I assume something happened when I was installing the drivers? If I try re-installing and it still doesn't work, where else can I find these drivers?
 

djibe89

Senior Member
May 24, 2014
1,219
634
Samsung Galaxy Tab S2
Google Pixel 4a
"fastboot devices" just doesn't do anything. "fastboot oem device-info" just hangs at <waiting for any device>... OEM unlock and USB debugging are both toggled on. The device manager recognises it as "Android" so I assume something happened when I was installing the drivers? If I try re-installing and it still doesn't work, where else can I find these drivers?
Fastboot devices blank tells that USB drivers are not correct.

From Windows Device Manager, select your "Android" device and you should try to force changing drivers to Xiaomi ones.

Or start fresh from another PC but fastboot drivers install may fail again.
 

Garfoth

Member
Oct 25, 2017
23
3
Fastboot devices blank tells that USB drivers are not correct.

From Windows Device Manager, select your "Android" device and you should try to force changing drivers to Xiaomi ones.

Or start fresh from another PC but fastboot drivers install may fail again.
So far I've gotten the exact same reaction from Windows 7 (fully updated), Windows 8.1 (fully updated) and Windows 10 Pro 21H1, all 64-bit. When I try to install the drivers from device manager (and point it to the folder of your pack) it says "no drivers found". I'm going to just delete and try finding a way to disable Windows trying to install drivers on its own but I highly doubt this is going to do much...

EDIT: OK that's weirder. Today my Windows 8.1 system says, in the update history says the following: "TP-LINK - Other hardware - Android Bootloader Interface".

EDIT 2.0: I have no goddamn idea what exactly i did right but NOW the win8.1 laptop recognised the phone and i could unlock it...
 
Last edited:
  • Like
Reactions: djibe89

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    [GUIDE/TUTORIAL/HOWTO] Xiaomi Redmi Note 4 Snapdragon stock to Android 12.1
    [GUIDE/TUTORIAL/HOWTO] Xiaomi Redmi Note 4/4X Snapdragon SOC (codename mido) stock to Android 12 / LineageOS 19.1

    Complete guide to install Android 12 on your Xiaomi Redmi Note 4 (Snapdragon or 4X).
    This tutorial only applies to this model, to check the correct version:
    in Android, go to Settings > About phone, make sure Device model is Redmi Note 4.
    It must be Snapdragon: below Device model, CPU must be Octa-core Max 2.0Ghz
    ### If CPU is not Octa-core Max 2.0Ghz, you have the Mediatek version (codename Nikel), see here:
    https://xdaforums.com/f/xiaomi-redmi-note-4-mediatek-roms-kernels-reco.5784/
    ### If phone is not Redmi Note 4, quit this tutorial


    CHANGELOG

    v4. Minor improvements, Android 13 incoming (+ Google Camera) !
    v3. Android 12.1 thanks to awesome Zeelog (and @anandsvm), migrate to MindTheGApps, upgrade TWRP
    v2. BitGApps, updated TWRP + Magisk
    v1. Initial release


    1) WHAT YOU NEED

    - djibe Redmi Note 4 pack: https://bit.ly/djibe-redminote4-pack
    (contains all you need: USB drivers + Mi Unlock tool + fastboot & adb + TWRP Recovery 3.6.2_9-0 + Magisk root v23)

    + ROM LineageOS Unofficial 19.1: https://xdaforums.com/t/ota-feb-16-...ineageos-18-1-mido-vanilla-by-zeelog.4186179/
    Download latest build: https://github.com/zeelog/OTA/releases

    + MindTheGApps 12.1 ARM64: http://downloads.codefi.re/jdcteam/javelinanddart/gapps
    or BitGApps ARM61 12.1 v1.4+: https://github.com/BiTGApps/BiTGApps-Release/releases


    2) INSTALL DRIVERS

    First uninstall all Oneplus, Oculus ... Android drivers.

    Go to the folder you unzipped earlier.
    navigate to usb_driver_r13-windows > usb_driver.
    Right click on android_winusb.inf and select Install. Confirm with OK.
    Restart Windows.

    ### If you experience problems with phone connection later, use https://github.com/lostindark/DriverStoreExplorer (thanks @Lysolus for sharing)


    3) BACKUP YOUR DATA

    Make sure Google/provider account is synchronized.
    Backup photos, documents, contacts before going any further (ex: use the backupyourmobile app).
    Connect phone to PC, search for all .jpg, .mp3, .mp4 files on your phone and retrieve data.


    4) UNLOCK BOOTLOADER

    ### Before going further, you need the latest official firmware.

    Go to Settings > About phone.
    MIUI version must be 11.0.2.0 (NCFMIXM).
    Unlock Developer settings:
    Tap 7 times on MIUI version item.

    If not: connect to Wifi, tap on System update > Check for updates.
    ### System won't update ? Download latest firmware from here: https://xiaomifirmwareupdater.com/firmware/mido/

    MIUI Account
    Insert your SIM card.
    Enter Sim PIN and turn off wifi, turn on mobile data and sync.
    Go to Settings > Mi Account
    Enter your phone number adapted to prefix and create an account (if not yet done).
    Make sure phone Mi Account is active, in Settings, besides Mi account is written an identifier.

    Go to Settings > Additional settings > Developer options and scroll to Mi Unlock Status item.
    Permission required, Agree
    ### Make sure Wifi is off and mobile data on, then tap on Add account and device, then Got it.
    ### As written, don't sign out of Mi account, perform factory reset or erase system data for now.
    ### Keep calm and carry on.

    Now open the \Mi Unlock subfolder from my pack.
    Launch miflash_unlock.exe ad administrator: right click on .exe > Run as administrator
    Agree to terms.
    Login to your Mi account (with phone number prefixed or email)
    Confirm login with SMS verification.

    ### Alternative: Open this webpage from your PC: https://en.miui.com/unlock/
    ### Click on Unlock now, then Download Mi Unlock archive. Unzip and refer to previous steps.

    Back to phone, turn it off.
    Then hold Volume down + Power buttons until phone vibrates and displays Fastboot screen.
    Connect phone to USB.

    Back to PC, Mi Unlock now says "Phone connected".
    Unlock button is available, click on it and confirm with Unlock anyway.
    Wait until Unlocked successfully is displayed.
    Click on Reboot phone.
    Unlocked is written at the bottom of screen during boot.

    ### Need to quit Fastboot mode ? Hold Power until phone vibrates and restarts.


    5) FLASH TWRP RECOVERY

    Back to Android, go to Settings > Additional settings > Developer options,
    switch OEM unlocking ON and USB debugging ON.

    Connect phone to PC.

    Open a Windows command prompt on the /flash subfolder folder you unziped earlier:
    select folder with left click, right click while holding SHIFT on keyboard > Open command windows here

    In command, enter
    Code:
    adb devices
    Commands starts adb and returns: bfacf0c80104 unauthorized
    On the phone, Allow USB debugging and send command again.
    Command now returns: bfacf0c80104 device
    Now enter
    Code:
    adb reboot bootloader
    Phone restarts in bootloader/fastboot mode.

    Enter
    Code:
    fastboot devices
    Command returns: bfacf0c80104 fastboot
    ### If not, you may try to reinstall USB drivers or try another PC.
    Now enter
    Code:
    fastboot flash recovery twrp-3.6.2_9-0-mido.img
    Command returns: Finished. Total time: 1.540s

    Now enter
    Code:
    fastboot boot twrp-3.6.2_9-0-mido.img
    and wait while TWRP recovery boots.

    TWRP asks: Decrypt data, tap on Cancel.
    then Swipe to Allow Modifications.

    Leave phone connected to PC.

    We must remove encryption to access partitions.
    From TWRP Home screen, go to Wipe > Format Data. This will remove all data on phone.
    Type yes and confirm with bottom right icon.


    6) BACKUP SYSTEM

    Now go to Home screen > Backup.
    Select System, Vendor, Boot, Bootloader, Firmware and EFS partitions.
    Swipe to Backup and wait during Backup.

    Back to Home > Mount.
    Using Windows Explorer, access Redmi Note 4 and copy the TWRP folder from Internal Storage folder to somewhere safe.

    Then copy LineageOS 19.1 and gapps.zip (+ magisk if you want root) to the same phone's Internal Storage folder.
    ### Copy both zip files straightforward. Don't unzip archives.


    7) FLASH ANDROID 12.1

    Once again Swipe to Allow Modifications.

    Go to Install > lineage*.zip,
    then Add more zips: mind*.zip.

    ### Optional: to flash Magisk root, go to Reboot > Recovery. Then Install > Magisk*.zip

    Go to Reboot > System


    8) ROOT ACCESS AND DEVELOPER MENU (OPTIONAL)

    With Magisk, you are root once phone is started. No extra manipulation needed.
    Superuser permissions can be managed from Magisk Manager app (it was flashed during Magisk flash. Or get it https://github.com/topjohnwu/Magisk/releases).

    You can now remove install files from Internal storage.

    For developer menu:
    open the Settings menu, select "About Phone".
    Tap on the "Build number" entry seven times. You should be notified, that the developer settings are now active.
    Now go to Settings menu > System > Developer settings.


    That's it.

    Enjoy,
    djibe

    Thanks: Zeelog, @anandsvm, Aryan Kedare, @xtrymind @flex1911, LineageOS team, TWRP team, MindTheGApps team
    1
    Thanks for this... Will try it in 2-3 days
    Hi,
    Any feedback is very welcome.

    Normally you have all you need to hack it.

    Enjoy :D
    1
    Will payment apps work after installing magisk? like Gpay, PhonePe
    Also will it take 7 days to unlock bootloader?

    Hi, no idead for payment.
    But MagiskHide normally does the trick.

    Unlock bootloader is fast with all the tools in my pack.
    1
    Error1 displayed but after reflashing with mindgapps majisk is working now
    Cool, enjoy. The phone is still good
    1
    Hi @tito_puente, you can start from step 7 to enjoy a clean Note 4.