An utility to extract stock string translations from MotoMAGX and EZX phones.
The first step is to unpack the strings from the entire firmware:
-
Disassemble the SBF firmware file to the SMG code groups using SBF Tool or SBF-Recalc programs.
-
Unpack or mount required SMG files to get a full rootfs image of the firmware.
-
Use the [Code Groups] article to understand which SMG will need to be unpacked or mounted.
- MotoEZX: CG34 (data_resource), CG35 (userfs_db), CG36 (userfs_general), CG37 (secure_setup), CG41 (language), CG42 (setup), CG43/CG44 (rootfs)
- MotoMAGX: CG36 (rootfs), CG37 (userfs), CG43 (setup), CG44 (secure_setup), CG46 (language), CG52 (data_resource)
-
Use various Linux utils: uncramfs, unsquashfs, and the "jffs2_mount_mtdram.sh" script for unpacking or mounting file systems.
-
Use the following command to collect using strings from the firmware:
find fw_rootfs/ -type f -exec strings {} \; | grep -e "^TXT" | sort | uniq | sed -e "s/,.*$//" > Strings.txt
-
Put the "MotoLangDump" and "Strings.txt" files to phone, e.g. to your memory card (
/mmc/mmca1/). -
Load the environment variables to run the program.
. /etc/initservices/services/ezxenv.sh # MotoMAGX . /home/native/.profile # MotoEZX
Note: It is not necessary on most custom firmware mods.
-
Use the following command to unpack strings from "Strings.txt":
./MotoLangDump Strings.txt
-
Take the "Strings_Table.txt" file from the current directory.
Note: The language of the translated strings in the table will depend on the installed language in the firmware and the selected language in the phone settings. Strings on the MotoEZX phones are stored differently, so there are few of them.