BigMAC icon indicating copy to clipboard operation
BigMAC copied to clipboard

Failing to extract/parse image properly - S10

Open sburke98 opened this issue 5 years ago • 2 comments

It seems that the extraction process isn't completely working on newer Samsung ROMs. Trying to extract an S10 firmware - G973U1UES4ETI1_G973U1OYM4ETI1_ACG seems to complete, but then process.py has a number of failures like failing to find vendor_file_contexts, and sepolicy (precompiled_sepolicy in this case), although both files are present in the ROM when I extract it.

I went through and manually copied in the missing files, however it eventually fails as it cannot determine the parent of system_server.

as both precompiled_policy, and vendor_file_contexts are in vendor.img, the issue might lie somewhere in the parsing of the vendor partition.

I've attached the extract files which end up in policy/samsung/ after the extract stage, and here's a gdrive link to the actual firmware: https://drive.google.com/file/d/1PgNpZEfBAjuT7wPeB_T8AknJ9tJDLHfT/view?usp=sharing

G973U1UES4ETI1_G973U1OYM4ETI1_ACG_extract.zip

sburke98 avatar Dec 02 '20 21:12 sburke98

Tracked this down a little farther. android-extract.sh was not parsing out the vendor image. At some point samsung switched vendor from being a sparse image to a full ext4 image, so adding vendor.img.ext4 to the ext4 list at least partially fixes this and it correctly pulls files from /vendor.

It still fails instantiating the SEPolicy, but gets farther along, failing with "Issue spawning system_server"

EDIT: new extract G973U1UES4ETI1_G973U1OYM4ETI1_ACG_new_extract.zip

sburke98 avatar Dec 02 '20 22:12 sburke98

This looks like the root cause error message:

INFO: Last ditch file mapping recovery for system_server found '/system/apex/com.android.runtime.release/bin/art_preinstall_hook_system_server'

grant-h avatar Dec 03 '20 01:12 grant-h