4

I have installed FreedomOS on my OnePlus 5. I'm not sure if this is related to FreedomOS, but when I try to make a backup in TWRP with data, system, and boot, it has an error with createTarFork() shortly after it gets to backing up data. It also says 'read only filesystem' when I try to open Terminal from Advanced and run 'cd /data/media/0/TWRP/BACKUPS/bad7d639 && rm -rf backup-name'. What can I do to fix this and why is this happening?

0

6 Answers 6

3

For me, the error was related to the I/O or file corruption issue.

To find what has happened, browse to the backup location (usually /external_sd/TWRP/BACKUPS/backupfolder) and find the recovery.log file. Open the file, and at the bottom lines, read what folder caused backup failed.

Delete the corrupted folders using TWRP File Manager, delete the old backup folder, and try to do a backup again. Consider that this may occur for different folders, so you need to read the log file every time.

1
  • This solved the problem for me too -- it was due to linux panicking when getting to the corrupted data. I found the most useful thing to do was to use another app, Migrate, and watching it like a hawk to see exactly what on the data partition caused the panic. The actual stack trace in the kernel log was utterly unhelpful. Deleting the offending file solved the problem.
    – Landak
    May 4, 2020 at 20:37
2

Currently, TWRP doesn't support multiple user profiles or what OnePlus calls Parallel Apps.

This XDA post has a work-around.

1

On my OnePlus6, the issue was having multiple users configured.

To remove the additional user (and stay only with the default one), I used Total Commander to see the files under /data/user. It had a folder named "10", which is the id of the additional user.

Then opened a terminal (using termux) and run:

su
pm remove-user 10
1

Had installed Shelter App, this a second User environment or Work Profile. The Second user is encrypted with extra User Password, which my version of TWRP could not decrypt.

It is discussed in here GitHubForTwrp A script is mentioned also which would remove folders. I did uninstall Shelter App and deleted following folders "10" is ID for additional user.

/data/system_ce/10 
/data/system_de/10 
/data/misc/user/10
/data/misc_ce/10 
/data/misc_de/10 
/data/user/10 
/data/user_de/10
/data/user_ce/10 
/data/vendor_de/10 
/data/vendor_ce/10

After removing these folders TWRP BU worked.

0

I think I found the solution!

  1. In TWRP, go to "Wipe" and swipe to factory reset
  2. Download:
    • OnePlus Recovery: oxygenos.oneplus.net.s3.amazonaws.com/OP5_recovery.img
    • OxygenOS: oxygenos.oneplus.net.s3.amazonaws.com/OnePlus5Oxygen_23_OTA_015_all_1708252353_e6d7756780064352.zip
  3. Rename the recovery image as recovery.img, boot phone into fastboot, plug into the computer, run these commands on the computer:

    fastboot devices
    fastboot flash recovery recovery.img
    fastboot boot recovery.img
    
  4. Open recovery on the phone

  5. Select "Forgot Password", this will wipe all leftover files in SD Card.
  6. Boot back into recovery, select reload, select "Install over ADB" or "Install Over USB" or something similar and plug the phone into the computer.
  7. Run adb sideload oxygen-os-filename on the computer.
  8. Let it install OxygenOS, it may appear to be frozen at some points; it probably isn't, so don't shut it off or unplug USB.
  9. Download Bluspark TWRP
  10. Reboot into fastboot, plug into the computer and run these commands on the computer:

    fastboot devices
    fastboot flash recovery bluspark-twrp-filename-location.img
    fastboot boot bluspark-twrp-filename-location.img
    
  11. Success (hopefully)

3
  • This worked a few days ago, but now it shows up with the same error. Can anyone help me?
    – anonymous
    Sep 30, 2017 at 15:36
  • 5
    I think anything that starts with 'factory reset' can't be an answer to backup problem. With all respect. Sep 3, 2019 at 1:59
  • so which one is the backup step? you just deleted and overrode a bunch of stuff
    – Dan
    Oct 17, 2021 at 4:17
0

TWRP has some compatible problems with OnePlus 5. I have the same error using TWRP 3.1.1-1 with LineageOS 7.1 nightly build, but I finally work out with this:

  1. Reboot into recovery, TWRP
  2. Go to the terminal in "Advanced"
  3. Type cd /system to change the path to the system folder
  4. Type rm addon.d to remove the addon file
  5. Type exit to quit from the terminal

Now back to TWRP home, try backup/restore again, it should works.

Further adjustment: do check the use rm -f to format disk settings of TWRP, to make sure TWRP won't mess up the filesystem.

3
  • What's addon.d?
    – anonymous
    Feb 12, 2018 at 11:47
  • don't know what exactly addon.d for, I got this info from some forum, tried and works.
    – anyone
    Feb 22, 2018 at 21:58
  • no such file or directory addon.d Dec 6, 2021 at 10:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .