[Fire TV General] Skel40:
There are two ways with this tutorial and I'm trying my best to explain it. The program I use for the (mantis) is Android Repack and Unpack tool by typing in on Google and install the required Python files required then install file context converter for proper rom decompiling. This is meant to be run on Windows and the rom extractor is a windows terminal for selections.

Step 1. Have your Python, Android Unpack and Repack Tool with your file contexts converter ready

Step 2. Extract those files, install the python version provided from the YouTube tutorial

Step 3. Install any 4K (mantis) rom containing the full rom and change the .bin to .zip and extract the .zip

Step 4. Launch the file_context_converter directory, x directory (where you place your file_contexts.bin for file_contexts conversion, open up the FCC.exe for it's change by pressing 1 for CONVERT file_contexts.bin to file. Let it run until finished where the file is which is in the x folder and copy it. (Copy from your stock rom of the bin)

Step 5. Go to your extracted Android Unpack Repack Tool, open Script.exe and press 2 to setup directories for rom extraction and press 1 for the main menu.

Important step!!

You'll see Android 7.x.x System Tools

by Karan Sangaj

Fri 08/25/2023

IMG size:

01 Enter size in bytes (This means to put the amount of space the system.img has)

02 Convert "system.new.dat" to system.img

03 Unpack system.img

04 Repack "system" folder to "systemparse.img".

05 Convert "systemraw.img" to "systemsparse.img"

06Convert "systemparse.img" to "system.new.dat"

Once you have the directory setup and your on the main menu, grab your extract rom and locate the system.new.dat, system.transfer.list and lastly your file_contexts and place them in the place_dat_transfer_list_file_context_here and let it paste to that directory

This part is important as you need to press 2 for Convert "system.new.dat" to "system.img"

Let this run on the terminal until finished and hit enter.

Find your directory under extract_system_img_here and find your system.img and hit properties. Usually with roms I get the file size of the .img of 1153433600 (default) but still check anyways and go back to the Repack terminal, press 1 to Enter size in bytes, and type in the amount of file size of the system.img. After getting the img size, it's time for extraction! Press 3 to unpack system.img and your system is successfully extracted. You're now in editing mode, you can add, replace, remove files as you wish and customize the root system. Press 4 to repack "system" folder to "systemraw.img"

Press 5 to convert "systemraw.img" to "systemsparse.img"

Press 6 to convert "systemsparse.img" to "system.new.dat" and your system files are now outside of the listed files of the Android repack tool as follows: system.new.dat, system.patch.dat, and system.transfer.list to be copied back into the rom. DO NOT repaste this into the stock rom as this will pose a threat to the efuse so use the script.zip (posting soon) which will show you how the directories of flashable zip is created. And that's basically it. I'll retouch the tutorial if needed and I hope it makes sense on how rom extraction works and how to completely modify it to your liking. The other tutorial for rom modifying absolutely needs this Repack tool for any build.prop tweaks you want and need. Will post a part 2 for this later on.

Do not paste the system.patch.dat from the extracted recompiled tool. It bricks my device in full so use the provided one on the rom your trying to modify to prevent any issues.