[SOLVED] Bootloop-ish on Fastboot Mode but TWRP works - OnePlus 7 Pro Questions & Answers

Hello, I'm new here, so if I'm doing something wrong have mercy .
My 1+7Pro GM1913 is unlocked, rooted with Magisk (I think 22.1), TWRP 3.5.0_9-0-guacamole and OOS (last flashed version was 10.0.11.GM21BA considering I still have on the phone the OnePlus7ProOxygen_21.E.32_OTA_032_all_2101280020_c39273ef1f205b6.zip).
Last time I've flashed something I think was about a month ago, with the last update. No problem so far, until today. This morning my phone had problems with wifi, so I rebooted it.
From that moment on, it boots only to Fastboot Mode. I can get to TWRP and I can access my phone directories from the pc only from TWRP, every other mode makes my phone unreachable from usb, and installing or updating drivers doesn't work.
I would love to avoid any data loss or anything related to having to reinstall every 2FA I have.
I tried deleting everything from /data/adb/modules but nothing changed.
I looked around on XDA but I usually get people stuck on Fastboot only and accessible via usb, which is not my case.
So I was thinking about flashing the latest available OTA, then TWRP, then Magisk from TWRP but I'm not sure if it will works or just worsen my problem.
Has anyone had this problem before? Any idea about how to solve this?
Thanks for anyone willing to help me.
Have a nice day!
EDIT:
Solved flashing the full OTA.zip, twrp.zip, reboot and Magisk.zip after renaming the apk.

I think this will help you:
Twrp --> flash your boot.img (with "payload dumper" it can be extracted from the full OTA update file)
Then flash twrp.zip, reboot in to twrp, flash magisk.zip, wipe dalvik cache
Reboot and provit ;-)

Being a monday and everything, I'll write down what I've done so far, this way if anyone find this post with the same luck as mine maybe it will be less painful for him\her.
I followed this guide on XDA in merit of the "payload dumper" suggested by Ghost323 and followed the instruction on the Github page, which are:
google protobuf for
Code:
python pip install protobuf
Make you sure you have Python 3.6 installed.
Download payload_dumper.py and update_metadata_pb2.py
Extract your OTA zip and place payload.bin in the same folder as these files.
Open PowerShell, Command Prompt, or Terminal depending on your OS.
Enter the following command:
Code:
python -m pip install protobuf
and being my zip a full OTA​
When that’s finished, enter this command:
Code:
python payload_dumper.py payload.bin
This will start to extract the images within the payload.bin file to the output folder you are in.
Click to expand...
Click to collapse
All good until the
Code:
python payload_dumper.py payload.bin
gave me a "no module named bdsiff4" error.
So I used
Code:
pip install bsdiff4
and turns out I'm missing Microsoft Visual C++ 14.0, which is absurd because I'm staring at it in my programs and I used it last week.
Anyway, one vs_BuildTools.exe, 12Gb downloaded and a reboot later, this time
Code:
pip install bsdiff4
works and the
Code:
python payload_dumper.py payload.bin
command finally starts.
Once that's done in the output folder I found the boot.img and made a copy into my phone root folder /.
At this point, I was looking for a flashable zip of Magisk, but I found out in a tweet dated 11:55 AM · Jan 22, 2021 that "the Magisk Manager APK *itself* is a custom recovery flashable zip", so back to Github to download the Magisk-v22.1.apk and copy that on the same root folder on my phone, following the instruction under the Magisk v22.0 updated installation guide. Under "Custom Recovery" it is written to rename the .apk into .zip.
On TWRP, Install, Install Image, and selected boot.img.
At that point I can choose between Boot, System Image, Vendor Image and Install Recovery Ramdisk.
But on the installation guide of Magisk is written "Never, ever try to restore either boot or recovery partitions back to stock! You can easily brick your device by doing so, and the only way out is to do a full Odin restore with data wipe."
So now I'm stuck. Please help.
Later I'll flash twrp-installer-3.5.2_9-0-guacamole.zip, reboot to TWRP and flash the Magisk-v22.1.zip.

You can install your full OTA update file in TWRP. Then install TWRP.zip. Restart into TWRP, install Magisk.zip (rename Magisk 22.1.apk to Magisk 22.1.zip). Wipe dalvik cache and reboot into the system.
That should work the same way. The main thing is that your Boot.img is fine again.
Both ways of mine should lead to the same success.
I wish you success.

Yes, flashing the full OTA, twrp, reboot and Magisk gave me back my phone.
However now my SafetyNet is having problems.
Thanks for the help!

Related

Update Pixel 2

So I'm a bit confused. I have my phone rooted at the last security update was Dec 7th 2017. At the time, I was just happy to have my phone rooted so didn't bother with updating, but feel like I should. Do I have to do anything specially to run updates like that or can I just do them? Thanks.
upperbladez said:
So I'm a bit confused. I have my phone rooted at the last security update was Dec 7th 2017. At the time, I was just happy to have my phone rooted so didn't bother with updating, but feel like I should. Do I have to do anything specially to run updates like that or can I just do them? Thanks.
Click to expand...
Click to collapse
Flash full factory image without the "-w" (wipe) flag in the batch file.
Re Root after android has updated.
For OTA to work you need to have original boot.img .
Other option can be ressurecting boot.img and let the OTA update work. But, at least for me, flashing the full image without wipe flag is easier and less hassle than other methods.
Search around if you need a detailed guide. There are few. Click on the post below!
Telperion said:
This guide is primarily intended for rooted users, since stock users can just take the OTA. This guide will result in a device running the latest software update without wiping any of your user data. It also has instructions for how to get a custom recovery and root after the update.
Installing update
Make sure you have the latest Google SDK Platform Tools. Extract the archive to a location of your choosing (creates platform-tools folder)
Get the latest walleye Factory Image from Google's Developer Page and save to a location of your choosing
Extract the archive, and open the extracted folder. You should see a list of files: bootloader-walleye-[version string]
flash-all.bat
flash-all.sh
flash-base.sh
image-walleye-[version string].zip
radio-walleye-[version string]
Open the flash-all script (flash-all.bat for Windows, flash-all.sh for Linux/OSX) in your favorite text editor.
Find the line that reads "fastboot -w update image-walleye-[version].zip and remove "-w" (the wipe user data switch). Save and close the flash-all script.
Move (cut and paste, etc) all of these files to the platform-tools folder.
Enable USB Debugging from the Developer Options menu on your device (press "Build Number" 7 times if not already visible)
With your device plugged into the computer, open a command prompt in the platform-tools folder
Windows: Open the folder, hold down Shift and right click inside the folder, "Open Command window here"
Linux: If you're on Linux you already know how to do this
OSX: Open a folder in a terminal
Reboot to bootloader:
Execute update script in terminal:
Windows:
Linux/OSX:
The device will reboot a few times while updating
Restoring root and/or a custom recovery:
Download latest:
TWRP image
Magisk zip
TWRP zip
(Optional) Custom kernel zip
Place all files in the platform-tools folder
Reboot to bootloader
Boot TWRP image.
Note: As of the February security update, TWRP 3.2.1-0 cannot decrypt the /data/ partition. When prompted for your PIN, cancel. You can keep /system/ read-only.
Push zip files to /tmp
Optional: TWRP persistent installation + custom kernel:
Install Magisk:
Optional: TWRP persistent installation + custom kernel:
Reboot to system
Click to expand...
Click to collapse
https://forum.xda-developers.com/pixel-2/how-to/guide-how-to-install-google-software-t3760033
jtf420 said:
Flash full factory image without the "-w" (wipe) flag in the batch file.
Re Root after android has updated.
For OTA to work you need to have original boot.img .
Other option can be ressurecting boot.img and let the OTA update work. But, at least for me, flashing the full image without wipe flag is easier and less hassle than other methods.
Search around if you need a detailed guide. There are few. Click on the post below!
Click to expand...
Click to collapse
I guess were I am confused is that I am at 8.1.0, but I am currently rooted. I have a verizon pixel, so if I update, could it possibly hurt my phone or am I good to go because I was able to unlock the phone?

Magisk creates bootloop

downloaded factory image from googles website
copied latest platform tools to the same directory as the extracted contents of the zip from google.
run the batch file, can boot into android just fine.
reboot to bootloader, use fastboot boot twrp-3.2.3-0-walleye.img
install the twrp zip
android boots fine and i can use my phone normally.
install magisk apk, reboot to recovery, install magisk 16.7 zip, android wont boot
everything was fine until i made a backup last night within twrp. ive repeated the above process idk how many times. any help would be appreciated
EDIT: https://forum.xda-developers.com/pixel-2/how-to/guide-unlock-flash-root-pixel-2-walleye-t3702417 is the guide i was using.
EDIT 2: now when i install TWRP and try to reboot to system, it just reboots back to TWRP...
EDIT 3: looking at the contents of my twrp zip, theres a file called magiskboot so what im going to do is reinstall the factory image using the bash script included in the download directly from google, then just flash twrp-pixel2-installer-walleye-3.2.3-0.zip, then install the magisk manager and see what happens. if that doesnt work ill redo the factory image, boot from twrp-3.2.3-0-walleye.img, install magisk, and see what happens without installing twrp.

Advanced OTA keeping Magisk and TWRP (needs a computer)

History...
I originally wrote this guide to upgrade from 10.0.4.0 to 10.0.7.0.
I have also used this same guide to install every OTA from 10.0.7.0 to 11.0.11.0.
This guide assumes you have both Magisk and TWRP, that Magisk cannot "uninstall" (because of TWRP installation) and that you want to keep both Magisk and TWRP after installation. Parts of this guide may still be useful if you aren't in this exact situation.
If you only have Magisk, you should be able to follow these much simpler instructions: https://forum.xda-developers.com/mi-a2-lite/how-to/guide-install-magisk-proper-support-ota-t3836952
Things to have on hand:
- vanilla_boot.img (for the version you currently have)
- patched_boot.img (your current boot image with Magisk)
- TWRP img and zip (see version info below)
I think that TWRP also causes the vendor partition to be modified. It may also touch system but I have a modified bootanimation.zip which modifies system, so I can't be sure. In any case, I also have a backup of system.img and vendor.img.
Because Magisk is installed after TWRP, Magisk's "backup" of the "stock boot image" is not vanilla. This means that in order to take the OTA, I have to flash the vanilla boot image.
0 - Update your patched_boot.img
If you don't have a patched_boot.img for your current Magisk (eg. my patched_boot.img was old, since I had installed several Magisk updates), you should build a new patched_boot.img so that when you boot it, the system will continue to work.
Push the vanilla image to the phone.
Code:
adb push vanilla_boot.img /sdcard
Then get Magisk to install using the "Select and Patch a File" method, select the file you uploaded. Then pull down the patched image.
Code:
adb pull /sdcard/Download/magisk_patched.img patched_boot.img
1 - Prepare to OTA
For some reason, my carrier does not like the OTA process so I always turn on Airplane mode + Wifi.
Get to fastboot and check the current slot.
Code:
adb reboot bootloader
fastboot getvar current-slot
My current slot was b
Flash the system and vendor partitions (if necessary).
Code:
fastboot flash system_b vanilla_system.img
fastboot flash vendor_b vanilla_vendor.img
Flash vanilla and boot the patched image (so that Magisk is active and the OTA can be applied).
Code:
fastboot flash boot_b vanilla_boot.img
fastboot boot patched_boot.img
2 - Do the OTA
Install OTA (DO NOT REBOOT)
If the OTA fails
If the OTA fails, you can find out which partitions it doesn't like from the logcat. If you have a fastboot image, you can reflash the affected partitions. As previously mentioned, I've had to flash all of boot, vendor and system for each OTA.
Code:
adb logcat | grep update_engine
...
07-01 06:52:38.470 E/update_engine(935): [0701/065238.470683:ERROR:delta_performer.cc(990)] The hash of the source data on disk for this operation doesn't match the expected value. This could mean that the delta update payload was targeted for another version, or that the source partition was modified after it was installed, for example, by mounting a filesystem.
07-01 06:52:38.470 E/update_engine(935): [0701/065238.470931:ERROR:delta_performer.cc(995)] Expected: sha256|hex = A4AD686D7BF628486668446221D0089BF5915DBC1158C83D30A06222FE7D2ACB
07-01 06:52:38.471 E/update_engine(935): [0701/065238.471002:ERROR:delta_performer.cc(998)] Calculated: sha256|hex = 4CADBE88EC1C019913A0B416EB9031840D4BA6B2287A3FC814A2B8B7F9871F7D
07-01 06:52:38.473 E/update_engine(935): [0701/065238.471072:ERROR:delta_performer.cc(1009)] Operation source (offset:size) in blocks: 0:5221,5461:405,5869:1,5873:343,6221:589
07-01 06:52:38.473 E/update_engine(935): [0701/065238.473233:ERROR:delta_performer.cc(1191)] ValidateSourceHash(source_hash, operation, source_fd_, error) failed.
07-01 06:52:38.473 E/update_engine(935): [0701/065238.473340:ERROR:delta_performer.cc(298)] Failed to perform BROTLI_BSDIFF operation 187, which is the operation 0 in partition "boot"
07-01 06:52:38.473 E/update_engine(935): [0701/065238.473411:ERROR:download_action.cc(337)] Error ErrorCode::kDownloadStateInitializationError (20) in DeltaPerformer's Write method when processing the received payload -- Terminating processing
07-01 06:52:38.739 E/SystemUpdate(15410): [Execution,NonStreamingAbApplyAction] Installation failed with error code: 20.
3 - Backup the vanilla boot image
Note that you need to pull from the other slot (in my case, a).
Code:
adb shell
su
dd if=/dev/block/by-name/boot_a of=/sdcard/vanilla_boot.img bs=1024k
Backup system.img and vendor.img too (if required).
Code:
dd if=/dev/block/by-name/system_a of=/sdcard/vanilla_system.img bs=1024k
dd if=/dev/block/by-name/vendor_a of=/sdcard/vanilla_vendor.img bs=1024k
4 - Magisk patch the other slot
Use Magisk to "Install to Inactive Slot (After OTA)" (DO NOT REBOOT)
5 - Backup the patched boot image
Note that you need to pull from the other slot (in my case, a).
Code:
dd if=/dev/block/by-name/boot_a of=/sdcard/patched_boot.img bs=1024k
exit
exit
# back on your computer
adb pull /sdcard/vanilla_boot.img
adb pull /sdcard/patched_boot.img
Pull down system and vendor images too (if required).
Code:
adb pull /sdcard/vanilla_system.img
adb pull /sdcard/vanilla_vendor.img
Now you can let Magisk reboot. This is the moment of truth...
At this point you should have an upgraded, Magisk-enabled system and backups of the vanilla and patched boot images. Congratulations on completing the OTA!
If the system fails to boot
There's a few things to try before giving up if the system fails to boot...
1) Boot without Magisk (fastboot boot vanilla_boot.img). Probably indicates that a Magisk module you have is no longer compatible.
2) Boot TWRP (fastboot boot twrp.img) and poke at things. As an example, I used the /sdcard/mm program (part of Magisk Manager for recovery) to disable EdXposed when the OTA to Android 10 failed to boot.
6 - Restore TWRP
It is possible to boot TWRP from fastboot so you don't strictly need to install TWRP. I like to have it available anyway.
Old version info...
I had been using the official TWRP 3.2.3, which worked great up until 10.0.9.0. With 10.0.9.0, I couldn't get to TWRP, I just got the system destroyed screen. I could fastboot boot it, but it couldn't mount /data (a problem it has always had).
I figured out that TWRP 3.3.1-dees_troy (from the official TWRP site) works with 10.0.9.0 and up. What's more, it works (can decrypt /data) if you fastboot boot it, not just after install. So you could in theory simply not install TWRP and fastboot boot if in the event that you actually need it.
I know that people have their own favourite versions, with the offain version being popular (didn't work for me). There's OrangeFox too (also didn't work for me).
In summary, I recommend Official TWRP 3.3.1-dees_troy but if you have a favourite alternative, feel free to use it instead.
TWRP thread: https://forum.xda-developers.com/mi-a2-lite/development/official-twrp-daisy-t3855396
Download link: https://dl.twrp.me/daisy/
Restoring TWRP is the same as installing it the first time. This is the process that I use.
Flash vanilla boot, then install TWRP to it.
Code:
adb reboot bootloader
fastboot boot twrp-3.3.1-dees_troy-daisy.img
Install TWRP
Code:
adb push twrp-installer-3.3.1-dees_troy-daisy.zip /sdcard
Use TWRP to install twrp-installer-3.3.1-dees_troy-daisy.zip
I install my modified bootanimation.zip at this time.
Mount System from TWRP (it is normally already mounted for me).
From a shell:
Code:
adb shell
cd /sdcard
cp bootanimation.zip /system/system/media/bootanimation.zip
Umount System
You must re-install Magisk after installing TWRP.
Code:
adb reboot bootloader
fastboot boot patched_boot.img
Use Magisk to "Direct Install (Recommended)"
Reboot
For some reason, my carrier does not like the OTA process so at this point I normally power off the phone rather than just rebooting. When the phone boots, I can turn off airplane mode and check that a mobile data connection can be made.
7 - Confirm that everything works
Make sure the system comes up and Magisk Manager says that Magisk is installed.
Make sure you can get to TWRP. Boot while holding VOL+ or
Code:
adb reboot recovery
Make sure TWRP can see your files.
Congratulations! You have installed an OTA while keeping Magisk and TWRP!
8 - Backup boot.img with TWRP + Magisk (optional)
If you want a copy of the boot.img with both Magisk and TWRP. This pulls from the now-current slot (in my case, a). I'm not totally sure of the value of this, since I can't get fastboot to boot this image. It may come in handy if you upgrade TWRP and that breaks (since you can flash this back rather than having to install the old TWRP again).
Code:
adb shell
su
cd /sdcard
dd if=/dev/block/by-name/boot_a of=twrp_boot.img bs=1024k
exit
exit
# back on the computer
adb pull /sdcard/twrp_boot.img
Thanks. Could you upload or indicate where we can get the necessary files?
Will i loose all user data and internal storage wiped if i do this?
Thanks for sharing, looks complicated, also i think you should use a fixed twrp, since the official dont have acces to sdcard.
rossarnie said:
Thanks. Could you upload or indicate where we can get the necessary files?
Click to expand...
Click to collapse
If you have Magisk, you should already have the vanilla and patched boot.img files.
Of you don't already have Magisk, just follow the install procedure here. https://forum.xda-developers.com/mi-a2-lite/how-to/guide-install-magisk-proper-support-ota-t3836952
If you're running 10.0.4.0 without magisk and need to extract your vanilla boot.img. Use fastboot to boot into twrp and then you can do the DD command to extract boot. Use adb pull to save it to PC.
I used official TWRP from here.
https://forum.xda-developers.com/mi-a2-lite/development/official-twrp-daisy-t3855396
Apparently there's a different twrp that can access the external SD card. I don't have an external SD card so I don't need it.
dr.bahaeddin said:
Will i loose all user data and internal storage wiped if i do this?
Click to expand...
Click to collapse
I didn't lose any data.
I've never had a problem with Magisk. TWRP does tend to bootloop after install, which is why I install magisk again.
You should be able to flash the patched or vanilla boot if twrp is boot looping to fix it too. Just won't have twrp anymore.
a1291762 said:
I didn't lose any data.
Click to expand...
Click to collapse
Mind you. I have a backup of my apps and data that's off of my phone so even if I do need to factory reset I can get it back. That's a longer and more complicated guide.
Txatxiquesi said:
looks complicated.
Click to expand...
Click to collapse
Before I had twrp the standard Magisk ota process was enough. But that loses twrp and with twrp in my magsik backup, the uninstall didn't work. So extra steps are needed. Plus some extra steps to make backups of important files for the next OTA
a1291762 said:
If you have Magisk, you should already have the vanilla and patched boot.img files.
Click to expand...
Click to collapse
Hmm... This may not be the case. I'm careful to make backups but it's easy to skip this.
If you don't have a patched boot image you can backup your current boot partition from a root shell. You need to find out if you are booting a or b slot. Then
dd if=/dev/block/by-name/boot_a of=/sdcard/patched_boot.img bs=1024k
Magisk puts old stock backups into /data. I had 4 files in there which makes it hard to know what each file is.
That's why I made sure to backup my vanilla boot image immediately.
If you're stuck without a vanilla 10.0.4.0 boot you can't do the OTA. I can upload mine somewhere when I get home tonight if it's not already online.
a1291762 said:
...If you're stuck without a vanilla 10.0.4.0 boot you can't do the OTA. I can upload mine somewhere when I get home tonight if it's not already online.
Click to expand...
Click to collapse
This would be very helpful, please
FunkmasterC said:
This would be very helpful, please
Click to expand...
Click to collapse
Here is the backup I made of the 10.0.4.0 vanilla boot.img. You'll need to decompress this before flashing.
URL REMOVED
What's new on 10.0.7.0 bro? Should me wait for 10.1 update if im on 10.0.4.0 rooted?
10.0.7.0 has the March security patches. I haven't noticed any actual changes.
Thank you, your Linux commands are sick, I never know I can get the vanilla and patched boot.img like that.
Cheer~
is there an update for file version 10.0.8.0??
I only just got the notification this morning. I'll do the upgrade tonight but I expect the same process will work.
I just used the same process to go from 10.0.7.0 to 10.0.8.0. This time I was installing to slot b instead of slot a, but otherwise, things were the same.
A side note... I hadn't got around to installing TWRP 3.3.0 so I did that but it couldn't mount /data. TWRP 3.2.3 can mount /data, so I installed that again.
a1291762 said:
I just used the same process to go from 10.0.7.0 to 10.0.8.0. This time I was installing to slot b instead of slot a, but otherwise, things were the same.
A side note... I hadn't got around to installing TWRP 3.3.0 so I did that but it couldn't mount /data. TWRP 3.2.3 can mount /data, so I installed that again.
Click to expand...
Click to collapse
I have successfully updated to 10.0.8.0 with Magisk 18.1, now on Magisk 19.1, everything is running fine. I'd like to also install TWRP but refrain from doing so because of the problems (bootloops, crashes, etc) the official TWRP 3.2.3 shows with decryption in Pie and mounting external or even internal sdcard. I wonder if the latter is fixed in the inofficial fixed version. I think the benefit of TWRP is not worth the effort of repeating a1291762 wonderful tricky procedure on the monthly OTA update basis.
However the procedure is very smart, a back-to-the-roots approach of former days... great, I like it.
But I don't understand how a patched_boot.img can be created from an empty file (boot_a)?
[dd if=/dev/block/by-name/boot_a of=patched_boot.img bs=1024k] Locating the boot_a in </dev/block/by-name/> reveals a boot_a file with 0 bytes. Moreover, to unzip the zipped stock boot Image in </data/stock_boot*.img> or </sbin/.magisk/mirror/data/> I am looking for a command that just returns the boot file rather than expanding it to the full partition. Weird, can anybody help?
Thanks again to a1291762
grufty47
It appears that it is not possible to add some boot.img as attachment
grufty47 said:
I'd like to also install TWRP but refrain from doing so because of the problems (bootloops, crashes, etc) the official TWRP 3.2.3 shows with decryption in Pie and mounting external or even internal sdcard.
Click to expand...
Click to collapse
I use official TWRP 3.2.3. Only really to fix bootloop problems.
I don't have a SD and no problems mounting data.
Lots of people following the TWRP install guide seem to get bootloop. I solve that by patching boot with Magisk. Some people recommend installing an old about image.
If you have a backup of boot you can at least restore that if you have problems.
grufty47 said:
But I don't understand how a patched_boot.img can be created from an empty file (boot_a)?
Click to expand...
Click to collapse
Welcome to Unix, where nearly everything is a file.
Hard disk? /dev/sda
Partition? /dev/sda1
File? /mnt/sda1/file.txt
In this case, boot_a is a way to access a partition on the phone's flash. Actually a link (shortcut) to /dev/mmcblk0p52. Partition number 53 on flash chip 1. The size can't be seen because it's a device and not a file.
grufty47 said:
I am looking for a command that just returns the boot file rather than expanding it to the full partition.
Click to expand...
Click to collapse
dd is a command to read a device. The partition is 64M big so that's the size of the file. gzip can compress well because the actual image is only 24M big and the rest is empty.
Magisk knows how to do it. A tool called magiskboot but I don't know where it lives or how to run it.
I found this header from magiskboot. It shows how the boot.img is structured.
https://github.com/topjohnwu/Magisk/blob/master/native/jni/magiskboot/bootimg.h
I just did the 10.0.9.0 OTA. I added a section of updating your patched_boot.img (since the Magisk updates I did made my old one useless) and I changed the backup instructions due to changes in Magisk 19. If you know where the stock boot lives before reboot, please let me know.

[GUIDE] P20 Pro Android 8.x How to Root

For those who would like to root, but not install any version of TWRP, here is a guide I put together. Hopefully it's easy enough and specific enough to understand:
1. Be sure to download the firmware you are CURRENTLY on to avoid any possible issues. Find it under SETTINGS, SYSTEM, ABOUT PHONE, BUILD NUMBER. The region is in parenthesis and the firmware version is the last three digits.
2. Extract the RAMDISK.img file using this Huawei Updater Extractor: https://forum.xda-developers.com/showthread.php?t=2433454
3. Obtain a previously patched RAMDISK file to get an initial Magisk install on your phone first. There is one on XDA floating around named CLT-29-MAGISK.img.
4. Boot into ***FASTBOOT and then get to a CMD window with your ADB tools and use the command "fastboot flash ramdisk CLT-29-MAGSIK.img"
5. Reboot the phone and download Magisk Manager 5.5.5. There may be other versions that work, but this version worked every time for me.
6. After installing Magisk Manager 5.5.5, install the next two upgraded versions while INSIDE Magisk Manager until you get to 7.1.x.x. To avoid any issues with Magisk Manager, don't exit out of the application until you install 7.1.x.x.
7. Click INSTALL on the first option next to the word MAGISK in Magisk Manager to patch your freshly extracted RAMDISK.img file from Step 2. Magisk Manager does not allow for direct installation of the Magisk zip file any longer so you need to patch a stock RAMDISK file to be flashed in Step 9.
8. Copy that RAMDISK.img file to your PC and place the file in your ADB tools folder. It would be good to save a copy of this file for later if you need to re-root. By doing so, you can avoid steps 1-3.
9. Boot into FASTBOOT and then get to a CMD window with your ADB tools and use the command "fastboot flash ramdisk patched_boot.img"
10. Reboot and you'll have root!
***FASTBOOT
To boot into FASTBOOT, turn off phone, hold down the VOLUME DOWN button for a few seconds, and while still holding it plug your charging cable into the phone. The screen should turn on with a white background indicating you are in FASTBOOT mode.
Hi good guid, I flashed version 9.0.0.252 and had a lot fc. back to 215, everything works, any idea what the latest European working version clt-lgrp2-ovs 9.0.0??

Magisk & Lineage = No wifi

Goodmorning everyone. I have a problem with magisk and lineageos 18.1
I have a xiaomi mi mix 2 unlocked
Premise: I've never had any problems with magisk and lineage until now.
I installed magisk scrupulously following the official instructions and using both the boot.img patch system and the direct installation via recovery (adb sideload & lineage recovery)
In both cases magisk appears as not installed when looking from magisk manager and the wifi stops working (the phone connects to the various networks I have tried but reveals them as without internet.)
clearing cache does nothing
resetting network connections does nothing
Updating to the latest version of the radio firmware does nothing
restore boot.img OR reinstall lineage corrects the problem
In all cases I don't get root ...
Honestly, everything is beyond my understanding .. can you help me?
Ork_77 said:
Goodmorning everyone. I have a problem with magisk and lineageos 18.1
I have a xiaomi mi mix 2 unlocked
Premise: I've never had any problems with magisk and lineage until now.
I installed magisk scrupulously following the official instructions and using both the boot.img patch system and the direct installation via recovery (adb sideload & lineage recovery)
In both cases magisk appears as not installed when looking from magisk manager and the wifi stops working (the phone connects to the various networks I have tried but reveals them as without internet.)
clearing cache does nothing
resetting network connections does nothing
Updating to the latest version of the radio firmware does nothing
restore boot.img OR reinstall lineage corrects the problem
In all cases I don't get root ...
Honestly, everything is beyond my understanding .. can you help me?
Click to expand...
Click to collapse
It seems to me like you aren't properly flashing the patched boot.img. What method are you using to flash the patched boot.img?
Droidriven said:
It seems to me like you aren't properly flashing the patched boot.img. What method are you using to flash the patched boot.img?
Click to expand...
Click to collapse
I used both the method I'm aware of
1) I install magisk manager, extract the boot.img from lineage zip, upload it to the phone, patch it with magisk manager (operation ends fine), pass the modified version back to the pc reboot the phone in recovery and install the new boot with adb (installation ends correctly).
2) I rename the magisk app as .zip and then I install it through recovery
The result is the same.
In the past (with lineage 17) i always used the second method and I lived happy and with root for years.
Ork_77 said:
I used both the method I'm aware of
1) I install magisk manager, extract the boot.img from lineage zip, upload it to the phone, patch it with magisk manager (operation ends fine), pass the modified version back to the pc reboot the phone in recovery and install the new boot with adb (installation ends correctly).
2) I rename the magisk app as .zip and then I install it through recovery
The result is the same.
In the past (with lineage 17) i always used the second method and I lived happy and with root for years.
Click to expand...
Click to collapse
Since you have TWRP, you don't need the patched boot.img.
The Magisk Manager app has the root binaries built in now, all you should need to do is a Magisk Manager flashable zip.
Read this:
The Magisk Manager APK can now be flashed from within TWRP
Magisk is now distributed as part of the Manager APK, meaning you no longer need to flash a separate ZIP file from a custom recovery.
www.xda-developers.com
...
Droidriven said:
Since you have TWRP, you don't need the patched boot.img.
The Magisk Manager app has the root binaries built in now, all you should need to do is a Magisk Manager flashable zip.
Read this:
The Magisk Manager APK can now be flashed from within TWRP
Magisk is now distributed as part of the Manager APK, meaning you no longer need to flash a separate ZIP file from a custom recovery.
www.xda-developers.com
Click to expand...
Click to collapse
Yes...this is exatcly what I did.
Method 2.
Ork_77 said:
Yes...this is exatcly what I did.
Method 2.
Click to expand...
Click to collapse
You said that you converted the apk into a flashable zip. I think you should be able to find a MagiskManager.zip that is prepackaged for you to download and flash.
Also, if you use the patched boot.img method, you should rename the patched boot.img to "boot.img", then place the boot.img in your fastboot folder on PC. Then right click inside the fastboot folder and choose the option to open a cmd terminal, then boot your device into fastboot mode, connect your device to PC, type the following command:
fastboot devices(press enter)
If it returns a serial number, you are connected. Next, type the following command:
fastboot flash boot boot.img(press enter)
This should flash the patched boot.img correctly. Then reboot the device to system and try installing the Magisk Manager apk file from your internal storage instead of flashing it as a zip in recovery. If that doesn't work, try flashing the apk as a zip in recovery, wipe cache and dalvik cache after flashing the zip(DO NOT FACTORY RESET OR FORMAT ANYTHING), then reboot to system and see if it works correctly.
Droidriven said:
You said that you converted the apk into a flashable zip. I think you should be able to find a MagiskManager.zip that is prepackaged for you to download and flash.
Also, if you use the patched boot.img method, you should rename the patched boot.img to "boot.img", then place the boot.img in your fastboot folder on PC. Then right click inside the fastboot folder and choose the option to open a cmd terminal, then boot your device into fastboot mode, connect your device to PC, type the following command:
fastboot devices(press enter)
If it returns a serial number, you are connected. Next, type the following command:
fastboot flash boot boot.img(press enter)
This should flash the patched boot.img correctly. Then reboot the device to system and try installing the Magisk Manager apk file from your internal storage instead of flashing it as a zip in recovery. If that doesn't work, try flashing the apk as a zip in recovery, wipe cache and dalvik cache after flashing the zip(DO NOT FACTORY RESET OR FORMAT ANYTHING), then reboot to system and see if it works correctly.
Click to expand...
Click to collapse
Hi Droidriven, thank you for your answers. Perhaps, synthesizing my steps too much, I gave the impression of not being particularly capable in computer science (you even tell me to press "enter" after commands ...). Well, let's say it's not my case.
All steps are performed correctly.
all steps end without errors.
No matter what I do, in the end Magisk appears as n / a, I don't have root, and the data connection doesn't work. Small addition about the latter aspect: when rebooting the wifi connection works for a variable time between 10 and 20 seconds, after which the network appears as without internet (or intranet) but the phone remains connected.
At the reboot, history repeats itself
Restoring the original boot everything returns to normal.

Categories

Resources