topjohnwu / Magisk

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

Phone cant mount partitions after installing magisk (it can manually) #8518

Open LiterallyUser opened 3 days ago

LiterallyUser commented 3 days ago

Hello! i am experiencing problem with installing magisk. Currently i am using CrDroid 10.1 gsi and every time i install it (replace boot.img) my phone hangs at 'Tecno' logo and doesnt boot. however, if i will run this:

mount /dev/block/mapper/userdata /data -t f2fs -f mount /dev/block/by-name/prodnv /mnt/vendor -t ext4 -f mount /dev/block/by-name/socko_a /mnt/vendor/socko sleep 2 insmod /mnt/vendor/socko/mali_kbase.ko insmod /mnt/vendor/socko/adaptive-ts.ko

The phone will boot up to os but wont have other modules like camera, figerprint and etc. Some logs on bootup: логи1.txt

Also if i will try to flash install.zip using twrp it will error out with "unsupported image" (probably fstab related)

(i tried multiple magisk versions INCLUDING the latest and dev one) Device: Android version: 14 Magisk version name: cant find Magisk version code: 28001

LiterallyUser commented 3 days ago

mounts.txt ^^^ cat /proc/mounts on a working phone

LiterallyUser commented 3 days ago

some more logcat magisk 28001 debug.txt mounts.txt proc mount on non booting.txt dmesg right when phone is available for adb.txt stuff

theintel commented 1 day ago

Does your phone have vbmeta partition? (Check stock ROM) If there is vbmeta.img, then you have to add the signature of the modified boot.img to the vbmeta and flash both.

LiterallyUser commented 21 hours ago

then you have to add the signature of the modified boot.img

i think its not the case here since magisk works perfectly in stock os

theintel commented 19 hours ago

I see. And Crdroid doesn’t have vbmeta either then?

LiterallyUser commented 19 hours ago

looks like yeah since it is just a gsi. By the way i am manually signing boot image using vbmeta thing

LiterallyUser commented 19 hours ago

(rsa4096_vbmeta.pem)

LiterallyUser commented 19 hours ago

(this is the only way to make phone accept boot image and boot, this works perfectly fine on stock os)

LiterallyUser commented 19 hours ago

also i should mention that it will be in this half-booted state after rooting it if i am using ANY gsi

theintel commented 19 hours ago

For me, the stock rom had vbmeta. I had to manually sign the modified boot.img, then add that signature to vbmeta_modified.img. After flashing them both, it still didn’t boot. The stock rom was somewhat aggressive. The only way was:

Only then it booted without issues. If everything else fails, maybe try this (tiresome) method.

LiterallyUser commented 19 hours ago

i will try to soon!

LiterallyUser commented 19 hours ago

my stock image also has vbmeta but it is packed in .pac file and idk how to take it out

theintel commented 19 hours ago

Pac file? Sounds familiar. Does your phone have spreadtrum (SPD) chipset?

LiterallyUser commented 19 hours ago

mhm

LiterallyUser commented 19 hours ago

Unisoc T606

theintel commented 19 hours ago

Then you have to use SPD Research Tool to unpack that pac file.

LiterallyUser commented 19 hours ago

Noted.

LiterallyUser commented 19 hours ago

Gotta to do this now

LiterallyUser commented 19 hours ago

BUT how to add signature to vbmeta?

theintel commented 19 hours ago

Long process. But I think I can guide you through.

Pac file tutorial: https://www.hovatek.com/forum/thread-1231.html

LiterallyUser commented 19 hours ago

i already know how to flash it since i did this multiple time :D

theintel commented 19 hours ago

vdmeta_modified.img making tutorial: https://www.hovatek.com/forum/thread-32664.html

But first make sure that your rom has vbmeta.img (could be vbmeta_a.img). Check in SPD Upgrade Tool flashing page.

LiterallyUser commented 19 hours ago

i am using this tool to sign boot tho-

theintel commented 19 hours ago

Great. Go the extra mile and follow the tutorial thoroughly. You can ask here if you get stuck.

LiterallyUser commented 18 hours ago

for some reason when i am trying to load image in research tool it says "error 3508"

theintel commented 18 hours ago

BTW, many versions of SPD Upgrade Tool / Research Tool couldn’t flash my device successfully. I had to try them one by one until I found a working version.

So make sure that you can successfully flash the stock/custom rom before tweaking partitions. Things can go wrong very often.

LiterallyUser commented 18 hours ago

for some reason only upgrade tool works for my rom

theintel commented 18 hours ago

Keep trying these until you find a working one: https://spdflashtool.com/category/research-tool

For me, Research Tool version R23.19.3301 worked.

LiterallyUser commented 18 hours ago

THIS ONE WORKED!

LiterallyUser commented 18 hours ago

it seems like there are 5 vbmetas....

theintel commented 18 hours ago

vbmeta-sign.img (partition name vbmeta_a) matters the most. Ignore others for now. Is there any vbmeta_b?

theintel commented 18 hours ago

THIS ONE WORKED!

Can you imagine that they provide broken software releases! And we have to figure out which one works.

LiterallyUser commented 18 hours ago

nope, only a

LiterallyUser commented 18 hours ago

the a\b thingy is kinda broken on this device

theintel commented 18 hours ago

nope, only a

OK cool. Keep going. You need to extract signatures one by one and save them. Long process. Needs hex editing. Take your time. Don't rush anything. One bit of wrongly copied hex data can ruin hours of work.

the a\b thingy is kinda broken on this device

That's Unisoc way of doing things maybe.

LiterallyUser commented 18 hours ago

it looks like whole thing hanged and now everything expect browser for some reason is irresponsive

LiterallyUser commented 18 hours ago

oh, i see why now, i have 0kb of storage left. Well, i will clean stuff out and will continue this thing, however its kind of late time for me rn

theintel commented 18 hours ago

oh, i see why now, i have 0kb of storage left. Well, i will clean stuff out and will continue this thing, however its kind of late time for me rn

I'm tired too. TTYL.

mgnoon009 commented 6 hours ago