faizwildanritonga/spreadtrum_flash ? reverse-engineered prompt
Reverse engineered prompt
Build me a command line tool for dumping and managing Spreadtrum phone firmware.
It should connect to a device through either the official SPRD U2S Diag driver or a LibUSB driver, then let me work in a simple interactive prompt or run one line commands from the terminal. I want it to be able to load and execute the needed FDL stages, read partitions and flash memory to files, write partitions back, erase partitions, print the partition table, and handle common boot and verification tasks like switching slots, disabling verity or AVB, and checking chip info. It should also support waiting for a device to appear, reconnect attempts, verbose logging, and basic save path handling.
Make it feel like a practical flashing utility, with clear help text, safe prompts when needed, and working examples in the README. If you need current details for the driver side or platform setup, look up the latest docs online.
Are you gonna build this?
make sure you review the code using coderabbit