Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to extract/parse image properly - S10 #1

Open
sburke98 opened this issue Dec 2, 2020 · 2 comments
Open

Failing to extract/parse image properly - S10 #1

sburke98 opened this issue Dec 2, 2020 · 2 comments

Comments

@sburke98
Copy link

sburke98 commented Dec 2, 2020

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
Copy link
Author

sburke98 commented Dec 2, 2020

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

@grant-h
Copy link
Member

grant-h commented Dec 3, 2020

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 added a commit that referenced this issue Dec 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants