Question Complete phone backup including internal storage data

Search This thread

NOSS8

Recognized Contributor
So format the data again in TWRP and install the ROM you sent me via MiFlash. Then I tried Backup in TWRP. Again the message cannot be found storage. And the backup does not include any internal storage data. I have the latest TWRP on there. I do not know what to do
As I told you, I use a Xiaomi EU rom and not a stock one.
Maybe it comes from that where the Twrp is less successful on the Cupid than the Zeus (it would surprise me but remains possible, and not having access to the changelogs, I cannot confirm anything).
I use Micloud for backups and Mi assistant (all in Chinese) because the translated version does not work with devices with A/B partitions.
Google should work too.
Then we don't spend our time making backups.
 

Benoni1

Senior Member
Mar 2, 2015
240
24
Czech
As I told you, I use a Xiaomi EU rom and not a stock one.
Maybe it comes from that where the Twrp is less successful on the Cupid than the Zeus (it would surprise me but remains possible, and not having access to the changelogs, I cannot confirm anything).
I use Micloud for backups and Mi assistant (all in Chinese) because the translated version does not work with devices with A/B partitions.
Google should work too.
Then we don't spend our time making backups.
For now, thank you for your time. Yesterday I expanded MiCloud to 50GB and backed up. But after installing another ROM, nothing recovered from MiCloud. Reports 0 backups
 

NOSS8

Recognized Contributor
For now, thank you for your time. Yesterday I expanded MiCloud to 50GB and backed up. But after installing another ROM, nothing recovered from MiCloud. Reports 0 backups
No need to buy storage, choose pc backup.
This will create a folder on your phone that you transfer to your PC, to restore do the opposite.
On the cloud if the system is different the backup does not appear.
 

alecxs

Forum Moderator
Staff member
Feb 17, 2016
4,255
7
2,982
gitlab.com
please find how to get recovery.log in post #4. the file is pulled into current directory (probably platform-tools directory). the command is intended to type in cmd.exe while phone connected in TWRP recovery mode.
so if any errors occur, provide recovery.log right after the error
Code:
adb pull /tmp/recovery.log
 

alecxs

Forum Moderator
Staff member
Feb 17, 2016
4,255
7
2,982
gitlab.com
sure. I am waiting on the river whatever comes down... 🍺
2560px-Dresden-canalettoblick-gp.jpg
 
  • Like
  • Haha
Reactions: Renate and NOSS8

alecxs

Forum Moderator
Staff member
Feb 17, 2016
4,255
7
2,982
gitlab.com
it fails on Gmail not sure why. you can try to delete the file and try again. also it is recommended to run fsck to see if that fixes something.

Code:
  296 I:Successfully decrypted metadata encrypted data partition with new block device: '/dev/block/dm-9'
  725 User 0 Decrypted Successfully!
  728 I:All found users are decrypted.
  735 /data | /dev/block/dm-9 | Size: 105924MB Used: 25281MB Free: 66076MB Backup Size: 25281MB
  736    Flags: Can_Be_Mounted Can_Be_Wiped Can_Be_Backed_Up Wipe_During_Factory_Reset Wipe_Available_in_GUI IsPresent Can_Be_Encrypted Is_Encrypted Is_Decrypted Has_Data_Media Can_Encrypt_Backup Use_Userdata_Encryption Is_Storage Is_Settings_Storage 
  737    Symlink_Path: /data/media/0
  738    Symlink_Mount_Point: /sdcard
  739    Primary_Block_Device: /dev/block/sda38
  740    Decrypted_Block_Device: /dev/block/dm-9
  741    Display_Name: Data
  742    Storage_Name: Internal Storage
  743    Backup_Path: /data
  744    Backup_Name: data
  745    Backup_Display_Name: Data (excl. Storage)
  746    Storage_Path: /data/media/0
  747    Current_File_System: f2fs
  748    Fstab_File_System: f2fs
  749    Backup_Method: files
  750    Mount_Flags: 1030, Mount_Options: discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,inlinecrypt,gc_merge
  751    MTP_Storage_ID: 65537
  752    Metadata Key Directory: /metadata/vold/metadata_encryption
  ...
 1181 I:operation_start: 'Nandroid'
 1185 I:Backup Name is: '2023-02-12--10-04-16'
 1186 I:Backup_Folder is: '/usb_otg/TWRP/BACKUPS/serialno/2023-02-12--10-04-16'
 1187 I:Calculating backup details...
 1188 I:Backup_List: /data;/misc;/cache;/bluetooth_image;/boot;/cust;/dsp_image;/dtbo;/modem_img;/recovery;/vendor_boot;/super;
 1211 I:Creating backup...
 1212 I:Creating tar file '/usb_otg/TWRP/BACKUPS/serialno/2023-02-12--10-04-16/data.f2fs.win000'
  ...
25422 I:addFile '/data/data/com.google.android.gm/files/downloads/b6ddb802f24eadea4a34d8b967fcc1b9/attachments/d_0_0_65479aa8_ebfb05de_e762710f_a1a5e107_8481486a/20190204_130635.jpg' including root: 1
25423 libtar:   ==> set selinux context: u:object_r:app_data_file:s0:c176,c256,c512,c768
25424 I:Killing pid: 704
25425 I:InfoManager saving '/usb_otg/TWRP/BACKUPS/serialno/2023-02-12--10-04-16/data.info'
25426 createTarFork() process ended with ERROR: 255
25427 Backup Failed. Cleaning Backup Folder.
25428 I:Backup_Run stopped and returning false, backup cancelled.

this is the file it fails. you can delete it if you don't mind. but probably it will fail on another file then...
Code:
rm  '/data/data/com.google.android.gm/files/downloads/b6ddb802f24eadea4a34d8b967fcc1b9/attachments/d_0_0_65479aa8_ebfb05de_e762710f_a1a5e107_8481486a/20190204_130635.jpg'

so just try fsck
Code:
umount /sdcard
umount /sdcard
umount /data
fsck /dev/block/dm-9

also I have noticed there is no /storage in fstab, so this is not the patched TWRP for backup of internal storage. here is modified version (untested) with additional entry.

might be broken, as my AIK gives some warnings regarding cpio..
Code:
Android Image Kitchen - UnpackImg Script
by osm0sis @ xda-developers

Supplied image: TWRP_3.7.0_12-Mi12_v7.2_A13-cupid-skkk.img

Setting up work folders . . .

Image type: AOSP

Signature with "AVBv2" type detected.

Splitting image to "split_img/" . . .

ANDROID! magic found at: 0
BOARD_KERNEL_CMDLINE twrpfastboot=1
BOARD_PAGE_SIZE 4096
BOARD_OS_VERSION 13.0.0
BOARD_OS_PATCH_LEVEL 2099-12
BOARD_HEADER_VERSION 4
BOARD_HEADER_SIZE 1584

Unpacking ramdisk to "ramdisk/" . . .

Compression used: lz4-l
/android_win_tools/cpio: system/etc/terminfo/2/2621a not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/e/eterm not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/e/eterm-color not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/h/hp2621a not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/h/hp70092a not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/l/lft-pc850 not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/n/ncr260vt300wpp not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/n/ncrvt100wpp not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p12 not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p12-m not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p12-m-w not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p12-w not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p14 not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p14-m not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p14-m-w not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p14-w not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p4 not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p5 not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p7 not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p8 not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p8-w not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p9 not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p9-8 not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p9-8-w not created: newer or same age version exists
/android_win_tools/cpio: system/etc/terminfo/p/p9-w not created: newer or same age version exists
280033 blocks

Done!
Code:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

# mount point          fstype  device                                        device2              flags

/metadata              ext4    /dev/block/bootdevice/by-name/metadata                             flags=display="Metadata";backup=1;wrappedkey
/data                  f2fs    /dev/block/bootdevice/by-name/userdata                             flags=fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized+wrappedkey_v0,keydirectory=/metadata/vold/metadata_encryption,metadata_encryption=aes-256-xts:wrappedkey_v0
/storage               f2fs    /sdcard                                                            flags=fsflags="bind";display="Internal Storage";backup=1;usermrf;ignoreblkid
/cache                 ext4    /dev/block/bootdevice/by-name/rescue                               flags=backup=1;wipeingui;wipeduringfactoryreset

/cust                  ext4    /dev/block/bootdevice/by-name/cust                                 flags=display="Cust";backup=1;flashimg=1

# Boot
/boot                  emmc    /dev/block/bootdevice/by-name/boot                                 flags=backup=1;slotselect;flashimg=1
/recovery              emmc    /dev/block/bootdevice/by-name/recovery                             flags=backup=1;slotselect;flashimg=1
/dtbo                  emmc    /dev/block/bootdevice/by-name/dtbo                                 flags=backup=1;slotselect;display="Dtbo";flashimg=1
/vendor_boot           emmc    /dev/block/bootdevice/by-name/vendor_boot                          flags=display="vendor_boot";slotselect;backup=1;flashimg=1
#/exaid                 emmc    /dev/block/bootdevice/by-name/exaid                                flags=display="exaid";backup=1;flashimg=1
/vbmeta                emmc    /dev/block/bootdevice/by-name/vbmeta                               flags=display="vbmeta";slotselect;backup=1;flashimg=1
/vbmeta_system         emmc    /dev/block/bootdevice/by-name/vbmeta_system                        flags=display="vbmeta_system";slotselect;backup=1;flashimg=1
/logo                  emmc    /dev/block/bootdevice/by-name/logo                                 flags=display="logo";backup=1;flashimg=1
/misc                  emmc    /dev/block/bootdevice/by-name/misc                                 flags=display="misc";backup=1;flashimg=1

# Persistent Firmware & Properties
/persist               ext4    /dev/block/bootdevice/by-name/persist                              flags=display="Persist"
/persist_image         emmc    /dev/block/bootdevice/by-name/persist                              flags=display="Persist";flashimg=1

# Firmware partitions
/bluetooth             vfat    /dev/block/bootdevice/by-name/bluetooth                            flags=display="bluetooth";slotselect;fsflags="ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait"
/bluetooth_image       emmc    /dev/block/bootdevice/by-name/bluetooth                            flags=display="bluetooth";slotselect;backup=1;flashimg=1
/dsp                   vfat    /dev/block/bootdevice/by-name/dsp                                  flags=display="dsp";slotselect
/dsp_image             emmc    /dev/block/bootdevice/by-name/dsp                                  flags=display="dsp";slotselect;backup=1;flashimg=1
/modem                 vfat    /dev/block/bootdevice/by-name/modem                                flags=display="Modem";slotselect;fsflags="ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait"
/modem_img             emmc    /dev/block/bootdevice/by-name/modem                                flags=backup=1;display="Modem";slotselect;flashimg=1

# Removable storage
/usb_otg               auto    /dev/block/sdg1                            /dev/block/sdg          flags=fsflags=utf8;display="USB-OTG";storage;wipeingui;removable

(attachment removed)
 
Last edited:

Top Liked Posts