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?
Currently, TWRP doesn't support multiple user profiles or what OnePlus calls Parallel Apps.
This XDA post has a work-around.
For me the error was related to I/O or file corruption issue. To find what has happened, you should browse to BACKUP_Location (usually ext SD)>TWRP>BACKUPS>backupfolder and find the recovery.log file. open the file and at bottom lines read what folder caused backup failed. Delete the corrupted folders using TWRP File Manager, delete the old backup folder and try backup again. Consider that this may occur for different folders. so you need to read the recovery file every time.
I think I found the solution!
- Go to Wipe in TWRP, swipe to factory reset
- 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
- Rename recovery image as recovery.img, boot phone into fastboot, plug into computer, run these commands on the computer: fastboot devices fastboot flash recovery recovery.img fastboot boot recovery.img
- Open recovery on phone
- Select Forgot Password, will wipe all leftover files in SD Card.
- Boot back into recovery, select reload, select Install over ADB or Install Over USB or something similar and plug phone into computer.
- Run 'adb sideload oxygen-os-filename' without quotes on computer.
- Let it install OxygenOS, it may appear to be frozen at some points; it probobaly isn't, so don't shut it off or unplus USB.
- Download Bluspark TWRP: forum.xda-developers.com/devdb/project/dl/?id=26601&task=get
- Reboot into fastboot, plug into 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
- Success (hopefully)
yes, Twrp has some compatible problem with oneplus 5. I have same error using Twrp 3.1.1-1 with lineageOS 7.1 nightly build, but finally I work out with this:
1, reboot into recovery, Twrp 2, goto terminal in Advanced 3, cd /system 4, rm addon.d 5, exit
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.
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