备份后 , 会在MIUI/backup/AllBackup 路径下产生具体日期的备份文件 .
打开其中一个如下:
会有一个未格式化的xml文件
使用编辑器打开格式化一下 , 方便查看
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<MIUI-backup>
<jsonMsg></jsonMsg>
<bakVersion>2</bakVersion>
<brState>3</brState>
<autoBackup>false</autoBackup>
<device>raphael</device>
<miuiVersion>20.12.9</miuiVersion>
<date>1612170926846</date>
<size>2820469313</size>
<storageLeft>275372630016</storageLeft>
<supportReconnect>true</supportReconnect>
<autoRetransferCnt>0</autoRetransferCnt>
<transRealCompletedSize>0</transRealCompletedSize>
<packages>
<package>
<packageName>com.tencent.mm</packageName>
<feature>-1</feature>
<bakFile>微信(com.tencent.mm).bak</bakFile>
<bakType>2</bakType>
<pkgSize>4475721693</pkgSize>
<sdSize>0</sdSize>
<state>1</state>
<completedSize>2820468224</completedSize>
<error>0</error>
<progType>0</progType>
<bakFileSize>0</bakFileSize>
<transingCompletedSize>0</transingCompletedSize>
<transingTotalSize>0</transingTotalSize>
<transingSdCompletedSize>0</transingSdCompletedSize>
<sectionSize>0</sectionSize>
<sendingIndex>0</sendingIndex>
</package>
</packages>
<filesModifyTime/>
</MIUI-backup>
格式化后 , 如何反格式化呢 , 删除之间的空格.
like 就像这样, 会变成一行 .
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><MIUI-backup><jsonMsg></jsonMsg><bakVersion>2</bakVersion><brState>3</brState><autoBackup>false</autoBackup><device>raphael</device><miuiVersion>20.12.9</miuiVersion><date>1612170926846</date><size>2820469313</size><storageLeft>275372630016</storageLeft><supportReconnect>true</supportReconnect><autoRetransferCnt>0</autoRetransferCnt><transRealCompletedSize>0</transRealCompletedSize><packages><package><packageName>com.tencent.mm</packageName><feature>-1</feature><bakFile>微信(com.tencent.mm).bak</bakFile><bakType>2</bakType><pkgSize>4475721693</pkgSize><sdSize>0</sdSize><state>1</state><completedSize>2820468224</completedSize><error>0</error><progType>0</progType><bakFileSize>0</bakFileSize><transingCompletedSize>0</transingCompletedSize><transingTotalSize>0</transingTotalSize><transingSdCompletedSize>0</transingSdCompletedSize><sectionSize>0</sectionSize><sendingIndex>0</sendingIndex></package></packages><filesModifyTime /></MIUI-backup>
注: 格式化代码修改后需压缩回之前的格式(否则无法正常使用) , xml 与 html 格式类似 , 可以使用html 压缩工具去压缩 xml文件 .