摘要 |
A method and apparatus update an image stored in a memory of a device. A next block writing index n for updating a first target memory block of the memory is determined. Backup data is written to a backup block of the memory when n is an even number. The first target memory block is updated with the new data. The backup data is calculated based on a binary operation between new data corresponding to n and old data stored in a second target memory block corresponding to n+1, and the binary operation has reversibility. If n is the last block writing index, then the binary operation is not used and the backup data is the same as the new data. |