How to parse the Manifest.mbdb file in an iOS 4.0 iTunes Backup

后端 未结 8 1081
小蘑菇
小蘑菇 2020-12-02 03:45

In iOS 4.0 Apple has redesigned the backup process.

iTunes used to store a list of filenames associated with backup files in the Manifest.plist file, but in iOS 4.

相关标签:
8条回答
  • 2020-12-02 04:40

    I finished my work on this stuff - that is, iOS 4 + iTunes 9.2 update of my backup decoder library for Python - http://www.iki.fi/fingon/iphonebackupdb.py

    It does what I need, little documentation, but feel free to copy ideas from there ;-)

    (Seems to work fine with my backups at least.)

    0 讨论(0)
  • 2020-12-02 04:44

    I liked galloglas's code, and I changed the main function so that it shows a sorted list of total size by application:

    verbose = True
    if __name__ == '__main__':
        mbdb = process_mbdb_file("Manifest.mbdb")
        mbdx = process_mbdx_file("Manifest.mbdx")
        sizes = {}
        for offset, fileinfo in mbdb.items():
            if offset in mbdx:
                fileinfo['fileID'] = mbdx[offset]
            else:
                fileinfo['fileID'] = "<nofileID>"
                print >> sys.stderr, "No fileID found for %s" % fileinfo_str(fileinfo)
            print fileinfo_str(fileinfo, verbose)
            if (fileinfo['mode'] & 0xE000) == 0x8000:
            sizes[fileinfo['domain']]= sizes.get(fileinfo['domain'],0) + fileinfo['filelen']
        for domain in sorted(sizes, key=sizes.get):
            print "%-60s %11d (%dMB)" % (domain, sizes[domain], int(sizes[domain]/1024/1024))
    

    That way you can figure out what application is eating all that space.

    0 讨论(0)
提交回复
热议问题