Latest Magisk messed up my boot. Can I recover without losing everything?

Search This thread

¿GotJazz?

Senior Member
Oct 9, 2006
794
169
Samsung Galaxy Tab S4
OnePlus 6T
Hi - I tried updating Magisk this morning, and it semi-bricked my OP7P. When I rebooted my phone, I got stuck in FastBoot Mode.

I'm running the latest Android 10 OOS.

My first step at that point was to do a fastboot boot twrp-3.4.0-0-guacamole.img to get into Recovery Mode. That worked, and I tried switching to my SLOT B to boot from.

That seemed to work at first ... but not really.

While my OP7P appeared to be booting from Slot B, it was stuck in a boot loop, with the OOS boot screen "circling electron dot" rotating very, very slowly. After about 5 minutes, I gave up on that.

So, I did another fastboot boot twrp-3.4.0-0-guacamole.img to get into Recovery Mode again, and did a backup of all the partitions (Boot, System Image, Vendor Image, Data, Modem, and EFS) and saved that off.

Now that I backed up all my previous partitions, is there a way for me to get my OP7P back to where it was before I corrupted my boot with Magisk? Can I just recover the Boot Partition from a previous TWRP backup? Or, reinstall some stock image of OOS, reinstall TWRP 3.4.0.0, and then recover some of the partitions I just backed up?

I'm going to hold off until I hear a response back ... I'm afraid if I take any other steps at this point, I could cause irreparable damage - if I haven't already.

¿GJ?
 
Last edited:

biglo

Senior Member
Jul 18, 2009
1,024
169
OnePlus 7 Pro
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 (21.4 or 22), wipe dalvik cache
Reboot and provit ;-)

Ps: for magisk22, rename magisk22.apk to magisk22.zip

Not all super heroes wear capes! Thank you so much!
 
  • Like
Reactions: ghost323

naveen_reloaded

Senior Member
May 15, 2010
662
40
Chennai
www.urssiva.com
I flashed boot.img to "boot" and flashed twrp.zip

Was on Havoc OS.

Tried to rebooting , it booted into another slot i think , didnt mount the parition. So had to reboot again .. but this time it went to bootloop again with animation.

Now i cant able to go into twrp or fastboot.

Have ti soft bricked ? Atleast took a backup when i was inside TWRP.

can someone help me ? When i boot (not turned off) , it is showing as " Unknown USB Device (Device Descriptor Request Failed)"
 

ghost323

Senior Member
Mar 30, 2016
53
13
Install your magisk.zip then try a restart. If you have a bootloop, go back to twrp, change the slot (a / b), install magisk.zip and restart again.
 

ghost323

Senior Member
Mar 30, 2016
53
13
Plan B: install your current firmware via twrp (as if you were doing an update).
Then flash twrp.zip
Then restart again directly in twrp
Then flash magisk.zip
Then delete dalvik cache
Then restart into the system

Good luck
 

ghost323

Senior Member
Mar 30, 2016
53
13
Sorry i'm @ work...
WTF?!
Have you already tried a USB stick? Maybe this will be shown to you if you have the right cable.
 

naveen_reloaded

Senior Member
May 15, 2010
662
40
Chennai
www.urssiva.com
Thanks for the replies.. Even from work..
I dont even know which partition i am in. I tried to reboot into recovery and its working. From there i went to change from slot a to b and its showing
unable to mount /data/media/TWRP/ .twrps

Problem is i cant able to mount "data".
 

naveen_reloaded

Senior Member
May 15, 2010
662
40
Chennai
www.urssiva.com
I think its the partition which is not loading,i think just dirty flashing the ROM should work , but for that i need to mount the data/media/sdcard or internal storage right ? Or will not help ?

I once again flashed TWRP through "TAIO"tool and it flashed on both slot A and slot B.

Looking into log here :


Code:
I:Switching packages (splash)
=> Linking mtab
I:Setting active slot B
=> Processing /etc/twrp.fstab for SAR-detection
I:Reading /etc/twrp.fstab
I:Done processing fstab files
I:SAR-DETECT: SAR System detected
=> Processing /etc/twrp.fstab
I:Reading /etc/twrp.fstab
I:Processing '/boot'
I:Processing '/system'
I:Created '/system' folder.
I:Processing '/system_image'
I:Processing '/vendor'
I:Processing '/vendor_image'
I:Processing '/metadata'
I:Processing '/data'
I:FBE contents 'ice', filenames 'aes-256-cts'
I:Flag identified for processing, but later unmatched: 36
I:Processing '/firmware'
I:Created '/firmware' folder.
I:Processing '/misc'
I:Processing '/modem'
I:Processing '/bluetooth'
I:Processing '/dsp'
I:Processing '/efs1'
I:Processing '/efs2'
I:Processing '/efsc'
I:Processing '/efsg'
I:Processing '/op2'
I:Created '/op2' folder.
I:Processing '/usbstorage'
I:Created '/usbstorage' folder.
I:Done processing fstab files
I:Setting up '/data' as data/media emulated storage.
I:Can't probe device /dev/block/sda19
I:Unable to mount '/data'
I:Actual block device: '/dev/block/sda19', current file system: 'ext4'
I:Can't probe device /dev/block/sda19
I:Unable to mount '/data'
I:Actual block device: '/dev/block/sda19', current file system: 'ext4'
I:Backup folder set to '/data/media/TWRP/BACKUPS/b2562ef9'
I:Settings storage is '/data/media'
libc: Unable to set property "ro.crypto.state" to "encrypted": error code: 0xb
libc: Unable to set property "ro.crypto.type" to "file": error code: 0xb
e4crypt_mount_metadata_encrypted: /data 0
key_dir/key: /metadata/vold/metadata_encryption/key
Key exists, using: /metadata/vold/metadata_encryption/key
Using Keymaster HAL: 4 from QTI for encryption.  Security level: TRUSTED_ENVIRONMENT, HAL: [email protected]::IKeymasterDevice/default
begin failed, code -62
Upgrading key in memory only: /metadata/vold/metadata_encryption/key
upgrade_key failed, code -38
I:Unable to decrypt metadata encryption
libc: Unable to set property "ro.crypto.state" to "encrypted": error code: 0xb
libc: Unable to set property "ro.crypto.type" to "block": error code: 0xb
E:Unexpected value for crypto key location
E:Error getting crypt footer and key
Updating partition details...
I:App found at '/system_root/system/priv-app/twrpapp'
I:Can't probe device /dev/block/sda19
I:Unable to mount '/data'
I:Actual block device: '/dev/block/sda19', current file system: 'ext4'
I:Unable to mount '/usbstorage'
I:Actual block device: '', current file system: 'vfat'
...done
I:Can't probe device /dev/block/sda19
I:Unable to mount '/data'
I:Actual block device: '/dev/block/sda19', current file system: 'ext4'
Unable to mount storage
I:Unmounting main partitions...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    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 (21.4 or 22), wipe dalvik cache
    Reboot and provit ;-)

    Ps: for magisk22, rename magisk22.apk to magisk22.zip
    2
    Thanks, @ghost323 ! You're a lifesaver!

    That is exactly the answer I was looking for, and my OP7P is operational again without any issues.

    I'm bookmarking this page, and also putting some notes into my Android stuff for future reference ... Though, I hope I don't have to reference it again. :D

    ¿GJ?
    1
    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 (21.4 or 22), wipe dalvik cache
    Reboot and provit ;-)

    Ps: for magisk22, rename magisk22.apk to magisk22.zip

    Not all super heroes wear capes! Thank you so much!
    1
    As long as twrp does not require a pin when starting, this partition is encrypted. But why is there no prompt to enter a pin ?! This is really stupid! When I'm at home, I'll deal with it a little. Maybe I'll find something useful about it.
    1
    I've searched a little, but haven't found anything useful yet. Are you using the latest twrp?
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone