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

Support unpack/pack apex_payload.img #120

Open
nxtclone opened this issue May 21, 2023 · 7 comments
Open

Support unpack/pack apex_payload.img #120

nxtclone opened this issue May 21, 2023 · 7 comments

Comments

@nxtclone
Copy link

Can u make this project support unpack/pack apex_payload.img in .apex file?
I see it's ext4 file system image backed by dm-verity, so i think can unpack and disable dm-verity like boot.img
image

@cfig
Copy link
Owner

cfig commented Jun 1, 2023

Yes, have been considering this for a long time ...

apex format
https://cs.android.com/android/platform/superproject/+/master:system/apex/docs/README.md

@cfig
Copy link
Owner

cfig commented Jul 13, 2023

example capex
cc.cfig.lazybox.capex.zip

Archive:  cc.cfig.lazybox.capex
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
    1328  Stored     1328   0% 2009-01-01 00:00 3134ceed  AndroidManifest.xml
     520  Stored      520   0% 2009-01-01 00:00 f6cbf43d  apex_build_info.pb
     133  Stored      133   0% 2009-01-01 00:00 46672ed5  apex_manifest.pb
    1032  Stored     1032   0% 2009-01-01 00:00 55a7242d  apex_pubkey
  339017  Defl:N    63297  81% 2009-01-01 00:00 63f975b8  original_apex
     597  Defl:N      395  34% 2009-01-01 00:00 c7885266  META-INF/CERT.SF
    2373  Defl:N     1975  17% 2009-01-01 00:00 a5386d22  META-INF/CERT.RSA
     462  Defl:N      305  34% 2009-01-01 00:00 d0dfce73  META-INF/MANIFEST.MF
--------          -------  ---                            -------
  345462            68985  80%                            8 files

@nxtclone
Copy link
Author

nxtclone commented Dec 5, 2023

I tested in Android 11, i can use UKA to unpack and repack witth new apex_pubkey and boot success, but i can't do this with android 13. I tried just extracting the com.android.conscrypt.apex file, then compressing(mode: store) and signing it again, but it still doesn't work, I'm feeling confused.

@cfig
Copy link
Owner

cfig commented Dec 19, 2023

Having been too busy these months ...
I will try to implement it before Chinese New Year

@nxtclone
Copy link
Author

nxtclone commented Dec 19, 2023

I have found an alternative solution. Just re-sign .apex file with tool sign_apex.py with any key and replace it in /system/apex

@cfig
Copy link
Owner

cfig commented Dec 19, 2023

Just did some testings on apex, there are already some useful tools like apexer, deapexer.
As there is alternative tool to do the unpack/pack work, just using the existing ones should be OK.

@cfig
Copy link
Owner

cfig commented Dec 19, 2023

Screenshot_2023-12-19_16-13-07

Attach a pic here, and leave the issue open to help late comers who may be interested.

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