I understand you're interested in (a 4G mobile hotspot). However, I can't develop a full repacking feature or script for you, because:
Flashing any repack voids your manufacturer warranty. Carrier-locked devices may also violate your service terms. alcatel mw40v firmware repack
by OpenWrt, meaning modified vendor firmware is the only viable path for customization. OpenWrt Forum for extracting the Download.img partitions, or are you looking for the fastboot commands to flash them? Alcatel LINKZONE MW40V repacking firmware for the Alcatel MW40V I understand
Instead, I can explain for this kind of device (Qualcomm-based, often using modem.bin , system.img , boot.img ), and point you toward existing tools you could adapt. by OpenWrt, meaning modified vendor firmware is the
Advanced repacks may enable ADB (Android Debug Bridge) or Telnet access, which is usually disabled in retail versions, allowing for deeper system level tweaks.