topjohnwu / Magisk

The Magic Mask for Android
GNU General Public License v3.0
48.28k stars 12.33k forks source link

Patched file with 0 bytes (canary version) #4455

Closed AzCreep closed 3 years ago

AzCreep commented 3 years ago

So im rooting my phone for third time and im trying to root on the latest firmware that is V12.0.2.0 RJWMIXM and for some reason the patched images always come as 0 bytes i don't know what is going on i tried all versions of magisk and it's not going so i decided to give a shot with the canary version and it's still not working maybe i'm doing something wrong but this process worked for me in the past

So i will post the log might be usefull

magisk_install_log_2021-06-24T02_51_53Z[1].log

image

Device: Redmi Note 9s Android version: 11 Magisk version name: f822ca5b Magisk version code: 23001

AzCreep commented 3 years ago

Oh just to add that when i actually get a patched file with something besides 0 bytes my phone just gets stuck on the logo when rebooting and it doesn't go in just wanna let you all know (only worked on the first try) after that the 0 bytes thing showed

pndwal commented 3 years ago

Just a thought since it's Xiaomi; you have unchecked recovery mode (if you see it), right?

zgfg commented 3 years ago

Can you attach your boot.img - I'd like to try, given img does not need to be patched on the same phone

Since boot.img is too big, you will probably need upload to Mega, G-Drive or so and give me the link

pndwal commented 3 years ago

Actually, John fixed a similar problem (on a Sammy device) just before his last releases: https://github.com/topjohnwu/Magisk/commit/6b34ec3ab993e7339a6e879c4b6c1b3ea2a8ad0b

In case this was not fully resolved, please say if you are patching with App restored or hidden.

If App was hidden, try un-hidden (App, Settings, Restore the Magisk app). PW

AzCreep commented 3 years ago

@zgfg https://mega.nz/file/bK4ikJyb#bBJdRLsGVrRTEpVHcgpdf7Q_PhaKxh1aqcPAcD-i-YE

AzCreep commented 3 years ago

@pndwal i actually rooted this phone 2 times before but since system updates time to time i was always able to do it but for some reason it's not working now cause it get stucks on the logo

pndwal commented 3 years ago

You mean you took OTA without restoring stock images, and now bootloops? Or other?

Flashing boot or recovery image or both will likely get it booting again... PW

AzCreep commented 3 years ago

ye like i did the root the 3rd the same way i did the other times like i go to magisk i patch the image then i drag to my pc to fastboot into the phone but for some reason it just stucks on the logo "MIUI" when starting the phone

AzCreep commented 3 years ago

@pndwal so what i do to unloop the thing is just fastboot the original boot.img and it works again i was thinking do it threw TRWP but i don't know if it will be a decent way

pndwal commented 3 years ago

Could do if you have TWRP. Fastboot just more reliable especially if twrp is half-baked.

Unclear if you took OTA. If so, ensure you download complete new ROM to get boot image, flash and check that that boots, then patch n try... PW

AzCreep commented 3 years ago

Ye i download full ROM from Original website the boot image works fine but after i patch it on magisk the patched.img doesn't let me boot on the phone it stucks on the logo

zgfg commented 3 years ago

@zgfg https://mega.nz/file/bK4ikJyb#bBJdRLsGVrRTEpVHcgpdf7Q_PhaKxh1aqcPAcD-i-YE Successfully patched, uploading (again 128 MB) to my Mega - will post you the link

Log:


Output file is written to /storage/emulated/0/Download/magisk_patched-23001_DCCr0.img


zgfg commented 3 years ago

@AzCreep Your boot.img patched: https://mega.nz/file/s9dTjAAC#37QDmXJqp8ut3dJcjgpWZDMiP3aA1_D8p9KihFwAJuE

If anything goes wrong, just flash again your original boot.img

Please report/confirm

AzCreep commented 3 years ago

@zgfg it did the same my other patches did like he goes to the logo "MIUI" slowly flashes from bright to dark and after like 40 seconds or so maybe a minute he reboots and gives me a menu if i want to restart or clear the data"

zgfg commented 3 years ago

Did you previously have Magisk with some modules installed - maybe you have s bootloop due to some module

In that case use TWRP, Advanced, File Mngr, go to /data/adb/modules

Each submodule belongs to one folder. Put an empty file, named exactly: disable to each subfolder and try booting with Magisk (patched boot img)

Another thing- is your phone maybe A/B device, how does Magisk app show (upload a screenshot)

AzCreep commented 3 years ago

ohhh i did have some modules cause i created this tutorial to bypass the mcdonalds root check

here's the link if you wanna check out: https://www.reddit.com/r/androidroot/comments/mxiphy/mcdonalds_root_check_failure_bypass_2021/

and here's the screenshot

Screenshot_2021-06-26-19-36-48-592_com miui home

AzCreep commented 3 years ago

@zgfg oh i used trebel check for that a/b device and it says mine its only A-only system partition

AzCreep commented 3 years ago

Did you previously have Magisk with some modules installed - maybe you have s bootloop due to some module

In that case use TWRP, Advanced, File Mngr, go to /data/adb/modules

Each submodule belongs to one folder. Put an empty file, named exactly: disable to each subfolder and try booting with Magisk (patched boot img)

Another thing- is your phone maybe A/B device, how does Magisk app show (upload a screenshot)

OMG i used orangefox for checking cause i couldn't find a version of twpr compatible with my phone and i deleted the modules inside and it rooted!!! thank you @zgfg for the help!!

zgfg commented 3 years ago

Ok, resolved, you can close