ADB Backup: fix md5 check on restore.
Add debug capability.
Fix backup of images after tarred partitions with too much padding
Add more md5 logging.
Skip digest check if selected.
Change ADB Backup version to 3 for new fixes to image padding.
Change-Id: I0f76c0733c523717e4797d1a14c3ae47d046fc8c
diff --git a/adbbu/twrpback.hpp b/adbbu/twrpback.hpp
index c52da3e..edc1626 100644
--- a/adbbu/twrpback.hpp
+++ b/adbbu/twrpback.hpp
@@ -42,6 +42,7 @@
int adb_control_bu_fd; // fd for twrp to bu communication
int adb_read_fd; // adb read data stream
int adb_write_fd; // adb write data stream
+ int debug_adb_fd; // fd to write debug tars
bool firstPart; // first partition in the stream
FILE *adbd_fp; // file pointer for adb stream
char cmd[512]; // store result of commands
@@ -54,6 +55,7 @@
void close_backup_fds(); // close backup resources
void close_restore_fds(); // close restore resources
bool checkMD5Trailer(char adbReadStream[], uint64_t md5fnsize, twrpMD5* digest); // Check MD5 Trailer
+ void printErrMsg(std::string msg, int errNum); // print error msg to adb log
};
#endif // _TWRPBACK_HPP