TWRP error: Unable to open /system_root/system/apex

lordcheeto03

Senior Member
Aug 18, 2012
1,713
590
143
( ͡° ͜ʖ ͡°)
In last working condition, my phone is the TMO branded device, converted to global 10.5.11 with Magisk and TWRP.

I decided to update to 10.5.12 via Local Upgrade, as I've done previously to update. The OOS update went fine but I encountered an issue when updating Magisk to 21.4. After attempting to install to inactive slot and reboot, my phone went into QualComm CrashDump mode. Attempting to boot into TWRP or the system resulted in being thrown back into CrashDump mode. I could still get to fastboot, so I booted TWRP from fastboot and was able to at least recover my device into a working state; albeit not how it should be working. I am currently on TMO ROM fresh from msm restore, 10.5.7.IN55CB, bootloader unlocked. Phone works, signal good, IMEI good, can receive texts, etc.

From that point on, no matter if I msm back to T-Mobile firmware, flash the Global fastboot ROM, factory reset, etc I'm getting an error I can't seem to find any hits on while searching.

"Unable to mount storage
E: Unable to open /system_root/system/apex
E: Unable to load apex images from system/apex"

I'm assuming I messed up my slot_b because prior to using the msm tool, if I tried to boot from slot_b it would send me to CrashDump mode while attempting to boot from slot_a directly after attempting slot_b would send me into stock recovery mode where I could do a factory reset and successfully boot into the system. After attempting a factory reset (and format data) via TWRP I then was being sent to CrashDump mode by trying to boot from either slot or trying to enter recovery mode. When first attempting to msm, holding vol+ and plugging device in would send phone to EDL mode where it would stay for a few seconds, then reboot into CrashDump Mode. I didn't think I was getting into EDL mode, but once it showed connected in the msm tool I quickly hit start and the restore process started.

While typing this, I tried to update magisk by installing to the inactive slot (which would be slot_b) and upon reboot I went straight to fastboot. I got the message included in the 2nd image attached.
 

Attachments

Nathan.7118391

Senior Member
Jul 30, 2012
712
221
73
Arlington
Hi there. MSM back to stick. Funny ways your time logging in to Google it anything. Murray let the phone after up. Take the OTA to current firmware 10.5.23 I think. Then bootloader unlock and flash global. Happy modding!
 

lordcheeto03

Senior Member
Aug 18, 2012
1,713
590
143
( ͡° ͜ʖ ͡°)
Hi there. MSM back to stick. Funny ways your time logging in to Google it anything. Murray let the phone after up. Take the OTA to current firmware 10.5.23 I think. Then bootloader unlock and flash global. Happy modding!
So taking the OTA on T-Mobile firmware is the part I'm missing? Because I've went back to stock with MSM, and I've took the OTA on global firmware (just not to 11.x) and problem persists
 

lordcheeto03

Senior Member
Aug 18, 2012
1,713
590
143
( ͡° ͜ʖ ͡°)
Yup, I always take the TMO OTA then bootloader unlock and global flash. If not then try another global file. Happy modding!
So I reverted back to TMO stock with msm tool, updated TMO firmware, unlocked BL, booted to fastbootd and ran the flashall.bat in 10.5.7 Global firmware... it all was going fine until it needed to reboot... it went to Qualcomm CrashDump mode... Slot B is buggered. I hold both vol buttons + power until it turns off, then do it again to enter bootloader mode. fastboot boot twrp.img and it takes me to twrp where I can toggle the boot slot back to a (I can't do fastboot set_active b from fastboot, it just throws up the fastboot help) and I can boot back into recovery.

The msm tool and global fastboot ROM I flashed is the same one I initially performed the conversion with when I first got the device. Even when on slot_a I am still getting the errors in the first picture I attached in OP; slot_b still gives me the errors posted in the 2nd picture.

edit:
I reverted with msm one more time, followed through the process to convert to global (minus taking the OTA first) and now it's flashing the global firmware. It successfully rebooted as it's supposed to do and it continued the install. On system.img, vendor.img, and product.img so far it has said "invalid sparse file format at header magic" then "resizing system_a" etc for all the partitions mentioned... but no, slot_b is still dead.

I see that the script flashes, say vendor.img but it says vendor_a... Can I manually do it through fastboot (or edit the flash all.bat) to flash to slot_b instead of a?
 
Last edited:

Nathan.7118391

Senior Member
Jul 30, 2012
712
221
73
Arlington
So I reverted back to TMO stock with msm tool, updated TMO firmware, unlocked BL, booted to fastbootd and ran the flashall.bat in 10.5.7 Global firmware... it all was going fine until it needed to reboot... it went to Qualcomm CrashDump mode... Slot B is buggered. I hold both vol buttons + power until it turns off, then do it again to enter bootloader mode. fastboot boot twrp.img and it takes me to twrp where I can toggle the boot slot back to a (I can't do fastboot set_active b from fastboot, it just throws up the fastboot help) and I can boot back into recovery.

The msm tool and global fastboot ROM I flashed is the same one I initially performed the conversion with when I first got the device. Even when on slot_a I am still getting the errors in the first picture I attached in OP; slot_b still gives me the errors posted in the 2nd picture.

edit:
I reverted with msm one more time, followed through the process to convert to global (minus taking the OTA first) and now it's flashing the global firmware. It successfully rebooted as it's supposed to do and it continued the install. On system.img, vendor.img, and product.img so far it has said "invalid sparse file format at header magic" then "resizing system_a" etc for all the partitions mentioned... but no, slot_b is still dead.

I see that the script flashes, say vendor.img but it says vendor_a... Can I manually do it through fastboot (or edit the flash all.bat) to flash to slot_b instead of a?
OP said sparse magic invalid is fine and won't hurt anything. If you are having trouble booting the phone then I suggest you wipe data. That's what's I had to do in order for it to work. Though the first few times I did it I didn't wipe any data and it worked just fine. I think OP said you can modify the script if you know what you're doing. Happy modding!
 

lordcheeto03

Senior Member
Aug 18, 2012
1,713
590
143
( ͡° ͜ʖ ͡°)
If you are having trouble booting the phone then I suggest you wipe data.
When you say wipe data, do you mean how, like, when you use msm tool data gets wiped? Or maybe you mean how data gets wiped when you unlock bootloader? Perhaps you mean like the flashall.bat wipes data as well...

I'm almost certain it's slot_b, I just need to know how to repair slot_b