[QUESTION] How to repack product.img - Android Q&A, Help & Troubleshooting

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

IJoseph23 said:
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
Click to expand...
Click to collapse
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
Note: Questions go in Q&A Forum
If you are posting a Question Thread post it in the Q&A forum. Technical discussion of Android development and hacking. No noobs, please. Device-specific releases should go under the appropriate device forum...
forum.xda-developers.com
and the others. I've moved your thread to Android Q&A.
Thanks for your cooperation!
Regards
Oswald Boelcke
Senior Moderator

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)

Related

[Q] How to unpack and repack atrix .img files

I have been trying to unpack the atrix system.img file from the stock gingerbread 4.5.91 build, but I can't seem to get it to work. I keep getting an error about a segmentation fault. I have tried it on linux (ubuntu), OSX and windows. Linux and OSX give me a segmentation fault using unyaffs. Windows just gives me a stack file. If anyone knows how to unpack and repack the atrix .img files in either three of the operating systems I would appreciate the help.
Read the forum rules, questions do not belong in this section of the forum - thats what the Q&A section is for. Mr. Clown, please move or delete this thread..

how create recovery.img

how create recovery.img
A recovery image for HTC is similar to a boot.img.
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
Thread moved to Q&A.

[Q&A] Boot/Recovery repack utils for WINDOWS

Q&A for Boot/Recovery repack utils for WINDOWS
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for Boot/Recovery repack utils for WINDOWS. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
Recovery Unpack issue
@michfood , i've tried with all versions of your tool the first an v2 version give a sintaxys error, the v3 give "done" but al of my folders are empty, i need to edit the build.prop because my recovery is upside down ( it works but i dislike the upside down issue)
thanks in advance
PD.: i use a W7 utimate pc for unpack, ive tried from the desktop, cmd in administrator mode, from the C:/ directory but my folders are only empty after unpack, another files like rmdisk.tar and other is present but nothing in the rmdisk internal folders
all fine, but it's not unpack & pack my MTK system.img file :/
Hi @michfood,
I did unpack boot.img successfully but for editing ramdisk, but in the extracted folder there is an empty ramdisk zip and a ramdisk file...so how do i do the ramdisk editing??
custom Recovery for Tab 4
ok so I have been doing some lots of research of late into rom building, recoveries etc . I noticed there is only a TWRP recovery for Galaxy Tab 4. I want to know is the any of the guides on porting recoveries may help me build a CWM recovery for galaxy tab 4 coz most of them look like limited to MTK devices. If its possible kindly suggest a perfect start.
No problem with the OS to use am ok with any ie. Windows or linux or cygwin.
thanks

[Question] Stuck in fastboot after flashing stock super.img

Device: Realme GT Explorer Master Edition (rmx3366). Android - 11 stock (RUI2.0_A.15). Bootloader - unlock. Root - Magisk_canary_92546e8a (patched boot.img).
1. Backup super.img by Partitions Backup & Restore or Universal Mount SystemRW.
2. Flash stock super.img without any changes
fastboot flash super super.img
3. Device does not boot into the system. Stays in fastboot mode.
Can anyone advise which way to dig?
The goal is to make the system partition writable. The problem is that it is not possible to write a super.img back, even without making any changes.
diogen78 said:
Device: Realme GT Explorer Master Edition (rmx3366). Android - 11 (RUI2.0_A.15). Bootloader - unlock. Root - Magisk_canary_92546e8a (patched boot.img).
1. Backup super.img by Partitions Backup & Restore or Universal Mount SystemRW.
2. Flash stock super.img without any changes
fastboot flash super super.img
3. Device does not boot into the system. Stays in fastboot mode.
Can anyone advise which way to dig?
The goal is to make the system partition writable. The problem is that it is not possible to write a super.img back, even without making any changes.
Click to expand...
Click to collapse
@diogen78
Prior to your next posting please read the guidances that are stuck on top of every forum like
[ATTN] : Read before posting - Any questions posted here will be MOVED or CLOSED
Please read the below before posting. Any questions not development related will be moved or closed. Forum Searching | Posting | The Basics: (Make sure you've read them before starting a new thread) Forum Rules Forum Search Google Forum...
forum.xda-developers.com
I've moved the thread to Q&A.
Regards
Oswald Boelcke
Senior Moderator

Unable to edit /etc/mkshrc

I just tried to add variables on Android /etc/mkshrc file but I get an error:
Read-only file system
Click to expand...
Click to collapse
Further, I have tried to use adb remount, but it says inaccessible or not found.
I tried to use the following:
mount -o remount,rw /
Click to expand...
Click to collapse
But it says '/dev/block/dm-10' not user mountable in fstab.
Phone is Pixel 6
xracerx123 said:
I just tried to add variables on Android /etc/mkshrc file but I get an error:
Further, I have tried to use adb remount, but it says inaccessible or not found.
I tried to use the following:
But it says '/dev/block/dm-10' not user mountable in fstab.
Phone is Pixel 6
Click to expand...
Click to collapse
Hello and good morning, @xracerx123
Prior to your next posting please read the guidances that are stuck on top of every forum like
Note: Questions go in Q&A Forum
If you are posting a Question Thread post it in the Q&A forum. Technical discussion of Android development and hacking. No noobs, please. Device-specific releases should go under the appropriate device forum...
forum.xda-developers.com
and the others. I've moved your thread to Android Q&A.
Thanks for your cooperation!
Regards
Oswald Boelcke
Senior Moderator
what was your search result for Pixel 6 mount rw Read-only file system?
https://twitter.com/i/web/status/1170404631865778177
https://blog.esper.io/android-dessert-bites-25-erofs-in-android-13-47987123

Categories

Resources