[QUESTION] How to repack product.img

Search This thread

IJoseph23

New member
Jan 12, 2023
3
1
Hi everyone, I hope you're doing great

So, I'm currently trying to debloat some XOS ROMs which is Infinix's official firmware.

I have a problem repacking product.img since it doesn't have file_contexts which is required by the tools that repack .img files
 

Oswald Boelcke

Senior Moderator / Moderator Committee
Staff member
Hi everyone, I hope you're doing great

So, I'm currently trying to debloat some XOS ROMs which is Infinix's official firmware.

I have a problem repacking product.img since it doesn't have file_contexts which is required by the tools that repack .img files
Hello and good afternoon, @IJoseph23

Welcome to XDA! I hope you'll always get the support you require.

However, prior to your next posting please read the guidances that are stuck on top of every forum like
and the others. I've moved your thread to Android Q&A.

Thanks for your cooperation!
Regards
Oswald Boelcke
Senior Moderator
 
  • Like
Reactions: Clark Joseph Kent

alecxs

Forum Moderator
Staff member
Feb 17, 2016
3,680
5
1,543
gitlab.com
these kind of img files are partition images of linux file systems, sometimes sparsed with simg2img to reduce file size.

usually, partition images can mounted in linux only, same as partitions. windows is not capable of mounting linux file systems natively.

"extracting" linux images on windows is just some nasty hack and not intended for "repacking", because windows file system (NTFS) cannot handle linux file names and its metadata (like permissions, uid/gid, secontext)

the proper way is to mount (EXT4) partition image on linux, delete files, and unmount it.

additionally it might need img2simg/simg2img (not for dynamic partitions on super partition)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hi everyone, I hope you're doing great

    So, I'm currently trying to debloat some XOS ROMs which is Infinix's official firmware.

    I have a problem repacking product.img since it doesn't have file_contexts which is required by the tools that repack .img files
    Hello and good afternoon, @IJoseph23

    Welcome to XDA! I hope you'll always get the support you require.

    However, prior to your next posting please read the guidances that are stuck on top of every forum like
    and the others. I've moved your thread to Android Q&A.

    Thanks for your cooperation!
    Regards
    Oswald Boelcke
    Senior Moderator