[guide] steps to flash gsi on redmi note 7

Search This thread

letsmakecakes

Senior Member
  • Apr 11, 2017
    845
    4,203
    Dhaka
    [GUIDE] STEPS TO FLASH GSI ON REDMI NOTE 7 [lavender]​

    Many of us tried Flashing GSI on our Redmi Note 7 but failed due to various reasons even though it is absolutely bugless for Redmi Note 7 .
    Here are the steps which i will mention below that will let us use the full potential of GSI.

    Requirements :
    • Bootloader Unlocked
    • TWRP Installed
    • Ofcourse a working device

    Installation Method :
    • First of all we need the flash the latest chinese beta rom.It gets updated everyweek. Since I have the cn rn7 i prefer to update the vendor partition everyweek for fixes and latest updates.But you can try on your stable rom too (I can't gurantee if things will work out on stable rom or not) .So, first of all be on china beta rom.
    • Go to fastboot mode and connect your pc to your device .You need to have installed xiaomi drivers to make this work properly. Once you are in fastboot ,open a terminal/cmd and type : fastboot -w ( this will erase your existing system partition and data and internal storage too , so make sure to have a backup if you have something essential on ur device)
    • Now considering that we have already downloaded a gsi i.e a phh GSI ..now for this case we are gonna assume its aosp as an example.. while in the fastboot mode type : fastboot flash system system.img ( here system.img(it can be of different name too) is the gsi img which you download from phh thread).
    • Remember : once the flash is completerd reboot to TWRP and not to system.
    • Once you are in twrp , flash magisk ( flash magisk latest canary as it has support for system as root devices) then press on wipe button of twrp,,,then advanced wipe..then tick mark on system and you will see repair or change file system option.Click on it..Click on repair and resize file system.
    • Now go to mount settings and mount system partition. Now you can flash gapps if you want .
    • After flashing gapps finally reboot to system
    • Voila! After in about 5 mins you will be booted to GSI rom

    Post Installation Method :
    • You will have almost everything working after booting into gsi except you will run into brightness bug which you can fix by the following way
    • Connect your device with pc and enable mass storage
    • open a cmd/terminal on ur pc
    • type the following codes : adb shell
      su ( in this case you will have to give permission from your device ; grant it)
      setprop persist.sys.qcom-brightness 4095
    • Congragulations Now you have installed a gsi perfectly on your device :)

    In this way you can flash almost all the gsi available on phh thread :) Hope this clarifies all of our problems.
    Hit Thanks if I helped you somehow with this
     

    chiplovez9x

    Senior Member
    May 31, 2012
    109
    12
    repair or change file system option.Click on it..Click on repair and resize file system. I don''t get this one. There are a few options inside
     

    Forever Alone

    Senior Member
    Jun 22, 2012
    812
    1,070
    I don't know much but gsi means u can flash almost all roms (which have images). And most of ROMs do have gsi images.. So u can install any rom on your phone. I don't know the steps to do so.. ?
     

    PROdelision

    Senior Member
    Dec 11, 2015
    615
    117
    21
    Dombivli
    No, its not required.
    here's everything i did:
    on miui beta.....already encrypted.
    did fastboot -w
    flashed latest RR gsi via fastboot
    booted to twrp, flashed magisk(v19), repair and resize
    reboot
    asks for decryption password

    where exactly am i going wrong?
    able to boot if im using decrypt zip but lockscreen doesnt work.
     

    ahadrox

    Senior Member
  • Jun 23, 2016
    256
    72
    Earth
    [GUIDE] STEPS TO FLASH GSI ON REDMI NOTE 7 [lavender]​

    Many of us tried Flashing GSI on our Redmi Note 7 but failed due to various reasons even though it is absolutely bugless for Redmi Note 7 .
    Here are the steps which i will mention below that will let us use the full potential of GSI.

    Requirements :
    • Bootloader Unlocked
    • TWRP Installed
    • Ofcourse a working device

    Installation Method :
    • First of all we need the flash the latest chinese beta rom.It gets updated everyweek. Since I have the cn rn7 i prefer to update the vendor partition everyweek for fixes and latest updates.But you can try on your stable rom too (I can't gurantee if things will work out on stable rom or not) .So, first of all be on china beta rom.
    • Go to fastboot mode and connect your pc to your device .You need to have installed xiaomi drivers to make this work properly. Once you are in fastboot ,open a terminal/cmd and type : fastboot -w ( this will erase your existing system partition and data and internal storage too , so make sure to have a backup if you have something essential on ur device)
    • Now considering that we have already downloaded a gsi i.e a phh GSI ..now for this case we are gonna assume its aosp as an example.. while in the fastboot mode type : fastboot flash system system.img ( here system.img(it can be of different name too) is the gsi img which you download from phh thread).
    • Remember : once the flash is completerd reboot to TWRP and not to system.
    • Once you are in twrp , flash magisk ( flash magisk latest canary as it has support for system as root devices) then press on wipe button of twrp,,,then advanced wipe..then tick mark on system and you will see repair or change file system option.Click on it..Click on repair and resize file system.
    • Now go to mount settings and mount system partition. Now you can flash gapps if you want .
    • After flashing gapps finally reboot to system
    • Voila! After in about 5 mins you will be booted to GSI rom

    Post Installation Method :
    • You will have almost everything working after booting into gsi except you will run into brightness bug which you can fix by the following way
    • Connect your device with pc and enable mass storage
    • open a cmd/terminal on ur pc
    • type the following codes : adb shell
      su ( in this case you will have to give permission from your device ; grant it)
      setprop persist.sys.qcom-brightness 4095
    • Congragulations Now you have installed a gsi perfectly on your device :)

    In this way you can flash almost all the gsi available on phh thread :) Hope this clarifies all of our problems.
    Hit Thanks if I helped you somehow with this

    Which GSI should be needed to take? A-only or A/B ?
     

    pryggi

    Senior Member
    Aug 27, 2015
    367
    202
    Xiaomi Poco F1
    here's everything i did:
    on miui beta.....already encrypted.
    did fastboot -w
    flashed latest RR gsi via fastboot
    booted to twrp, flashed magisk(v19), repair and resize
    reboot
    asks for decryption password

    where exactly am i going wrong?
    able to boot if im using decrypt zip but lockscreen doesnt work.

    I have no experience with GSI images, but I know in general that PIE breaks the encryption, if you roll back the security patch level. I don't know it this happened in your case, but I have lost couple of times my encrypted storage when I have tried to restore a backup of rom with older android patch level. After that, the bootup encryption pin is no longer accepted, neither by android nor by twrp, so the only option is to format data to remove encryption and start from scratch.

    Were your miui beta and rr gsi of the same android security patch level?
     
    Last edited:

    satadi

    Member
    Apr 8, 2019
    27
    11
    [GUIDE] STEPS TO FLASH GSI ON REDMI NOTE 7 [lavender]

    Many of us tried Flashing GSI on our Redmi Note 7 but failed due to various reasons even though it is absolutely bugless for Redmi Note 7 .
    Here are the steps which i will mention below that will let us use the full potential of GSI.

    Requirements :
    Bootloader Unlocked
    TWRP Installed
    Ofcourse a working device


    Installation Method :
    First of all we need the flash the latest chinese beta rom.It gets updated everyweek. Since I have the cn rn7 i prefer to update the vendor partition everyweek for fixes and latest updates.But you can try on your stable rom too (I can't gurantee if things will work out on stable rom or not) .So, first of all be on china beta rom.
    Go to fastboot mode and connect your pc to your device .You need to have installed xiaomi drivers to make this work properly. Once you are in fastboot ,open a terminal/cmd and type : fastboot -w ( this will erase your existing system partition and data and internal storage too , so make sure to have a backup if you have something essential on ur device)
    Now considering that we have already downloaded a gsi i.e a phh GSI ..now for this case we are gonna assume its aosp as an example.. while in the fastboot mode type : fastboot flash system system.img ( here system.img(it can be of different name too) is the gsi img which you download from phh thread).
    Remember : once the flash is completerd reboot to TWRP and not to system.
    Once you are in twrp , flash magisk ( flash magisk latest canary as it has support for system as root devices) then press on wipe button of twrp,,,then advanced wipe..then tick mark on system and you will see repair or change file system option.Click on it..Click on repair and resize file system.
    Now go to mount settings and mount system partition. Now you can flash gapps if you want .
    After flashing gapps finally reboot to system
    Voila! After in about 5 mins you will be booted to GSI rom


    Post Installation Method :
    You will have almost everything working after booting into gsi except you will run into brightness bug which you can fix by the following way
    Connect your device with pc and enable mass storage
    open a cmd/terminal on ur pc
    type the following codes : adb shell
    su ( in this case you will have to give permission from your device ; grant it)
    setprop persist.sys.qcom-brightness 4095
    Congragulations Now you have installed a gsi perfectly on your device :)



    In this way you can flash almost all the gsi available on phh thread :) Hope this clarifies all of our problems.
    Hit Thanks if I helped you somehow with this

    Hi!

    Did you not disable dm-verity and force-encryption?

    Another question, the dev MIUI roms contain both the system and vendor partitions, right? How do you install only the vendor partitions from them? Or do you just flash MIUI and then reflash the custom ROM system? In that case, won't that affect dm-verity and encryption on the data partition?
     
    Last edited:

    LionHeart90

    Senior Member
    Nov 14, 2018
    354
    153
    Flashing correctly a GSI like in this guide; with vendor ecc ecc, will gcam work? Actually i'm on stock MIUI 10 and obv all working fine with a perfect version. My doubt is it. :confused:
     

    Forever Alone

    Senior Member
    Jun 22, 2012
    812
    1,070
    Did you not erase your /data partition through TWRP?
    ---------- Post added at 03:06 AM ---------- Previous post was at 02:46 AM ----------


    Did you not erase your /data partition through TWRP?

    I did wipe userdata but not internal storage. heard its because i have unencrpyed data partition?
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 27
      [GUIDE] STEPS TO FLASH GSI ON REDMI NOTE 7 [lavender]​

      Many of us tried Flashing GSI on our Redmi Note 7 but failed due to various reasons even though it is absolutely bugless for Redmi Note 7 .
      Here are the steps which i will mention below that will let us use the full potential of GSI.

      Requirements :
      • Bootloader Unlocked
      • TWRP Installed
      • Ofcourse a working device

      Installation Method :
      • First of all we need the flash the latest chinese beta rom.It gets updated everyweek. Since I have the cn rn7 i prefer to update the vendor partition everyweek for fixes and latest updates.But you can try on your stable rom too (I can't gurantee if things will work out on stable rom or not) .So, first of all be on china beta rom.
      • Go to fastboot mode and connect your pc to your device .You need to have installed xiaomi drivers to make this work properly. Once you are in fastboot ,open a terminal/cmd and type : fastboot -w ( this will erase your existing system partition and data and internal storage too , so make sure to have a backup if you have something essential on ur device)
      • Now considering that we have already downloaded a gsi i.e a phh GSI ..now for this case we are gonna assume its aosp as an example.. while in the fastboot mode type : fastboot flash system system.img ( here system.img(it can be of different name too) is the gsi img which you download from phh thread).
      • Remember : once the flash is completerd reboot to TWRP and not to system.
      • Once you are in twrp , flash magisk ( flash magisk latest canary as it has support for system as root devices) then press on wipe button of twrp,,,then advanced wipe..then tick mark on system and you will see repair or change file system option.Click on it..Click on repair and resize file system.
      • Now go to mount settings and mount system partition. Now you can flash gapps if you want .
      • After flashing gapps finally reboot to system
      • Voila! After in about 5 mins you will be booted to GSI rom

      Post Installation Method :
      • You will have almost everything working after booting into gsi except you will run into brightness bug which you can fix by the following way
      • Connect your device with pc and enable mass storage
      • open a cmd/terminal on ur pc
      • type the following codes : adb shell
        su ( in this case you will have to give permission from your device ; grant it)
        setprop persist.sys.qcom-brightness 4095
      • Congragulations Now you have installed a gsi perfectly on your device :)

      In this way you can flash almost all the gsi available on phh thread :) Hope this clarifies all of our problems.
      Hit Thanks if I helped you somehow with this
      8
      Which one? And did u flash it before or after flashing the gsi system.img?
      It was a pain till i found the right way.

      Resume:
      • Go back to Xiaomi.eu developer 9.4.18
      • TWRP > backup > vendor image (save it in a usb otg)
      • Fastboot mode and connect to computer
      • terminal/cmd (on computer)
      • fastboot -w
      • fastboot flash system system.img
      • TWRP > mount > system
      • TWRP > install> GApps
      • TWRP > install > magisk (canary)
      • TWRP > wipe > advanced wipe > system, select repair or change file system > repair
      • TWRP > wipe > advanced wipe > system, select repair or change file system > resize
      • TWRP > restore > vendor image
      • Reboot
      5
      My bootloader-unlock timer finally expired today. So, I unlocked the bootloader of my Redmi Note 7 (32GB+3GB) and installed phusson's phh-treble AOSP build (with gapps and phh-superuser preinstalled) with the help of the original post and the replies from some of the members here. So, I'm listing below the steps I took to get everything functional.

      Pre-Installation Build: MIUI 10 India Stable 10.2.11 (the vendor.img is from this build, which is the latest stable build in India as of 27.04.2019)

      Steps
      1. Unlocked the bootloader with XiaomiToolV2 (link below) on a Macbook Pro (it's a straight-forward process and I didn't have to install fastboot or adb before hand)
      2. Downloaded and installed fastboot and adb (made sure the XiaomiToolV2 DMG is unmounted)
      3. Enabled USB debugging and ensured my device was read properly by adb and fastboot
      4. Reboot to fastboot
      Code:
      adb reboot bootloader
      5. Reset your partitions
      Code:
      fastboot -w
      6. Installed TWRP
      Code:
      fastboot flash recovery recovery.img
      7. Reboot to recovery (hold the volume-up button as soon as the screen goes blank)
      Code:
      fastboot reboot
      8. In TWRP, used adb push to load the system.img to /sdcard/TWRP
      Code:
      adb push system.img /sdcard/TWRP/system.img
      9. Installed the system.img image from TWRP
      10. Installed Magisk v19.0 (link below) from TWRP
      11. Reboot to system
      12. The system will take some time in the initial bootup to encrypt the data. It will then reboot and go through the first boot process.
      13. Enable USB debugging and fix the brightness post-bootup (I still see the issue when booting up after decrypting data)
      Code:
      adb shell
      su
      setprop persist.sys.qcom-brightness 4095
      14. phh-treble doesn't pass the SafetyNet (ctsProfile: fail) by default. So, I followed a fix on phusson's GitHub (link below) to get the build to pass SafetyNet.

      Edit:
      The configuration to use for setting up SafetyNet fix on Magisk Config is as below
      Code:
      Edit device fingerprint > Pick a certified fingerprint >  Xiaomi > Redmi Note 7 > yes > back > back > back
      
      Script settings > Boot stage > Late service > post-fs data > yes > back > back > back

      Other Notes
      - Fingerprint is working fine
      - Brightness issues are not being seen at runtime (they are seen during bootup, though)
      - SafetyNet is passing (so Google Play status is "Certified")

      Links
      - Magisk and TWRP links I got from the All-in-One thread located in this sub-forum: https://forum.xda-developers.com/redmi-note-7/how-to/one-redmi-note-7-unlock-bootloader-t3890751
      - Fix for the SafetyNet: https://github.com/phhusson/treble_experimentations/issues/116
      - Patatra's post was especially helpful too: https://forum.xda-developers.com/showpost.php?p=79386506&postcount=76
      - Ofcourse, OPs post was helpful too.
      4
      Can you please share more screenshots?
      Like in memory section (RAM) usage and the stock launcher and settings main page?
      Thanks in advance bro.

      It took me like 10 minutes to upload these screenshots :laugh:
      But it's my pleasure to help.
      I do notice that the touch latency is not on par with miui or maybe it's because of animation. Scrolling in the settings menu is a tad slower but it is not annoying because apps run as it should be. Although some apps are not in full screen and it has no option like in miui to force the app to fill out the rest of the screen but hey, AOSP is AOSP and even with these minor issues I still enjoy the simplicity of AOSP based roms.
      3
      Screenshot_Pixel_Launcher_20190416-141411.jpg

      Screenshot_Settings_20190416-141455.png
      what gsi rom you flashed? Can you attach some screenshot ? Thank you!

      Gửi từ redmi note 7 của tôi bằng cách sử dụng tapatalk