Implemented SC6531C readback and target system

This commit is contained in:
Luxferre
2021-12-21 16:15:47 +02:00
parent 23817f3b09
commit 2215104d81
3 changed files with 91 additions and 20 deletions
+24 -4
View File
@@ -1,4 +1,4 @@
# UniFlash: an opensource Unisoc/Spreadtrum phone flash reader/writer
# UniFlash: an opensource Unisoc/Spreadtrum feature phone flash reader/writer
## About
@@ -24,23 +24,43 @@ Run `python uniflash.py -h` to see all parameters. But there are several typical
**Note**: you need to hold a bootkey pressed when connecting the device for it to be detected correctly. This key can vary across devices. Typically it's Call, Soft Left, Soft Right, Center, 9 or #, but it can be anything else.
Some chipset versions (esp. the ones before SC6531E) require the following procedure to connect in order to initiate successful data transfer:
1. Pull out the battery and the cable.
2. Insert the cable.
3. Hold the bootkey and then insert the battery.
UniFlash ships with several typical targets that you can specify with `-t` (`--target`) parameter and not have to configure anything else:
- `sc6531efm_generic` (default) - for SC6531E/F/M with no signed FDLs;
- `sc6530_generic` - for SC6530 and SC6531B/C/DA with no signed FDLs;
- `sc7703a_generic` - for SC7703A with no signed FDLs.
If you want to, the targets are fully overridable with individual parameters, see program help for all details.
### SC6531E
This is the default target for UniFlash, FDLs for it are shipped in the repo and you don't need to configure anything else unless your model requires signed FDLs.
This is the default target for UniFlash, FDLs for it are shipped in the repo and you don't need to configure anything (even `-t` parameter) else unless your model requires signed FDLs.
For SC6531E, firmware is usually 4MB long, so you just need to run `python uniflash.py dump your-output-file.bin` to dump the firmware image and `python uniflash.py flash your-input-file.bin` to flash it.
### SC6531F/M
For SC6531F or SC6531M, **specifying the wrong dump length and attempts to write flash from the same dump can make the device unbootable!**
For SC6531F or SC6531M, the target is still `sc6531efm_generic` unless your model uses signed FDLs. However, **specifying the wrong dump length and attempts to write flash from the same dump can make the device unbootable!**
Here, firmware can be larger, so you need to pass in the length. As with any integer parameter here, you can pass it in hexadecimal format as well.
E.g. for CAT B26 (bootkey is `#`) the dumping command is: `python uniflash.py -l 0x800000 dump b26.bin`
### SC6531C
SC6531C is a single-FDL variant. Here, if your model doesn't require signed FDLs, you need to specify `sc6530_generic` target and typically 8MB length, for instance, for Alcatel OT-2051D the boot key is Call key and the command to dump is: `python uniflash.py -t sc6530_generic -l 0x800000 dump ot2051d.bin`
**Note**: for SC6531C, only readback is supported as of now.
### SC6531D and lower
For now, SC6531DA and other single-FDL variants of SC6531 chipset are not supported.
For now, SC6531DA and other variants of SC6531 chipset older than SC6531CA are not supported.
## Credits