Our extraction method for the M4 file structure is currently incomplete, but our tools are sufficient for extracting apps. You will need scripts from [[https://github.com/Keitai-Archive/Keitai-Scripts|Keitai Scripts]] on GitHub.
**Step 1:** [[https://github.com/Keitai-Archive/Keitai-Scripts/blob/main/BeforeExtraction/assemble_m4.py|assemble_m4.py]]
The assemble_m4.py will divide the regions of the nor dump
python assemble_m4.py .bin
Example
python assemble_m4.py N506i-2_PF38F4462LLYDB0-f1.bin
**Step 2:** [[https://github.com/Keitai-Archive/Keitai-Scripts/blob/main/PostExtraction/convertForEmulator_m4.py|convertForEmulator_m4.py]]
The convertForEmulator_m4.py script will extract the DoJa files from the regions inside the firmware dump.
python convertForEmulator_m4.py m4_out_dir model_name
Example
python convertForEmulator_m4.py N506i-2_PF38F4462LLYDB0-f1.bin_output N506i