TWRP openrecoveryscript on A/B partitions - Google Pixel 2 XL Questions & Answers

I am trying to automate my nandroid backups but apparently a/b devices mount /data/cache as /cache so I don't know how to make twrp read my openrecoveryscript file from /data/cache. Any help would be greatly appreciated.

darkfire404 said:
I am trying to automate my nandroid backups but apparently a/b devices mount /data/cache as /cache so I don't know how to make twrp read my openrecoveryscript file from /data/cache. Any help would be greatly appreciated.
Click to expand...
Click to collapse
Have you solved this problem? if yes how did you solve your problem?

mauronofrio said:
Have you solved this problem? if yes how did you solve your problem?
Click to expand...
Click to collapse
I haven't yet. I don't know if it's possible without modifying TWRP to read from /data/cache on startup since the cache partition doesn't exist on a/b devices

I doubt it will help or not...
But I noticed when sideloading an OTA, that whatever the .zip file would be called would "extract" to the folder "sideload" (in the /sdcard, but there's a good chance that it's its own folder in the root directory...) as sideload.zip (i believe...I can easily be wrong....but I remember it was a simple and obvious one-word name....). I remember having issues with TWRP processing the initial .zip file, so I would extract the initial OTA .zip file, then manually input what was extracted into that folder under that specific name and TWRP was able to automatically start processing the OTA....
I'm not sure, but maybe you might find this process beneficial and/or interesting/inspiring...

darkfire404 said:
I am trying to automate my nandroid backups but apparently a/b devices mount /data/cache as /cache so I don't know how to make twrp read my openrecoveryscript file from /data/cache. Any help would be greatly appreciated.
Click to expand...
Click to collapse
Have you tried to put the script in /data/cache/recovery/openrecoveryscript ? if the folder doesn't exist try to create it

mauronofrio said:
Have you tried to put the script in /data/cache/recovery/openrecoveryscript ? if the folder doesn't exist try to create it
Click to expand...
Click to collapse
I did that. It didn't work

I'm encountering the same behavior. OpenRecoveryScripts are not being executed.
Running TWRP-3.2.3-0, Pixel 2 on Android 9.0.

UncertainSpin said:
I'm encountering the same behavior. OpenRecoveryScripts are not being executed.
Running TWRP-3.2.3-0, Pixel 2 on Android 9.0.
Click to expand...
Click to collapse
I'm having the same problem too. I have been using Tasker to write to /cache/recovery/openrecoveryscript because that's all I could find online.
I intend to have this in the Run Shell command in Tasker.
chmod 0777 /cache/recovery
echo "backup SDCRBM weeklybackup" > /cache/recovery/openrecoveryscript
echo "reboot" >> /cache/recovery/openrecoveryscript
chmod 664 /cache/recovery/openrecoveryscript
I have verified that it is writing the file, and TWRP seems to be erasing it which from what I gather it is supposed to do. But it is not executing the command when TWRP starts.
LineageOS 16.0 unofficial/ TWRP 3.2.3 on Samsung Galaxy S7.

We need to bring TWRP developers awareness for this issue, it's already reported on GitHub (https://github.com/omnirom/android_bootable_recovery/issues/221) but not acknowledge by TWRP team... If you have a GitHub account, vote for that issue, if you know someone from TWRP, bring them attention to that.
IMO, having this script working is very important for truly automated backups of our devices, let's get this issue fixed...

rfgamaral said:
We need to bring TWRP developers awareness for this issue, it's already reported on GitHub (https://github.com/omnirom/android_bootable_recovery/issues/221) but not acknowledge by TWRP team... If you have a GitHub account, vote for that issue, if you know someone from TWRP, bring them attention to that.
IMO, having this script working is very important for truly automated backups of our devices, let's get this issue fixed...
Click to expand...
Click to collapse
Yup indeed needs to be fixed..

Related

[Root Question] How to I Install Xposed on Rooted Amazon Fire TV 2? (Guide Please)

How to I Install Xposed on Rooted Amazon Fire TV 2? (Guide Please)
Do I download XposedInstaller_3.0_alpha4.apk? and xposed-v78-sdk21-arm64.zip?
Please Help
Could I Use Flashfire?
You can't install xposed since there is no custom recovery
Tried with Flashfire where no custom recovery is needed ? what version of xposed should i try?
No Luck with Flashfire and xposed v78-sdk22-arm 64. Going to have to wait for a fix
yeah I've had no luck, just have to wait I guess
ians325 said:
No Luck with Flashfire and xposed v78-sdk22-arm 64. Going to have to wait for a fix
Click to expand...
Click to collapse
Did you encounter boot loop or soft-brick when you attempted this?
z_thompsonpa said:
Did you encounter boot loop or soft-brick when you attempted this?
Click to expand...
Click to collapse
No
ians325 said:
No
Click to expand...
Click to collapse
Thanks! You prompted me to give this a shot after confirming that it wouldn't do any serious damage. I found some things out in the process that explain why this isn't working as of yet.
The Xposed zip you mentioned requires the following Linux GNU tools (or equivalent):
cut
find
head
sed
I suspect this is why it is failing, because I was able to backup my system partition and restore my backed-up system partition through FlashFire. (more on this later)
Sooo.. I thought why not go all the way and try to install BusyBox first? ..since this would fix the missing commands
Much to my surprise the Busybox install actually worked and I had the whole suite of linux commands at my disposal!!!
Things went south pretty quick, though, when I realized that SELinux was blocking my ability to run the following command:
I couldn't run this command:
Code:
mount -o remount rw /system
So, this would prevent a further attempt at installing Xposed through Flashfire, because it would have to mount the system partition as rw in order to modify the files and add the Xposed framework.
I ended up restoring my system partition after this fiasco using Flashfire. It re-enabled my ability to remount /system as rw and SELinux has seemed to calm down in the logs.
In conclusion:
Xposed requires Busybox
[*]SELinux enforces more policies when Busybox is installed
[*]Setting SELinux to Permissive has no effect
EDIT: **Details in my next post**
z_thompsonpa said:
Thanks! You prompted me to give this a shot after confirming that it wouldn't do any serious damage. I found some things out in the process that explain why this isn't working as of yet.
The Xposed zip you mentioned requires the following Linux GNU tools (or equivalent):
cut
find
head
sed
I suspect this is why it is failing, because I was able to backup my system partition and restore my backed-up system partition through FlashFire. (more on this later)
Sooo.. I thought why not go all the way and try to install BusyBox first? ..since this would fix the missing commands
Much to my surprise the Busybox install actually worked and I had the whole suite of linux commands at my disposal!!!
Things went south pretty quick, though, when I realized that SELinux was blocking my ability to run the following command:
Code:
mount -o remount rw /system
So, this would prevent a further attempt at installing Xposed through Flashfire, because it would have to mount the system partition as rw in order to modify the files and add the Xposed framework.
I ended up restoring my system partition after this fiasco using Flashfire. It re-enabled my ability to remount /system as rw and SELinux has seemed to calm down in the logs.
In conclusion:
Xposed requires Busybox
SELinux enforces more policies when Busybox is installed
Setting SELinux to Permissive has no effect
Click to expand...
Click to collapse
Nice work, have you seen this tidbit on BusyBox Github for SELinux?
https://github.com/ukanth/afwall/wiki/BusyBox#difference-between-selinux-and-non-selinux-busybox
There's also some decent results on Google that may offer some clues... https://www.google.com/search?q=SELinux+mount+system+as+rw+android&ie=utf-8&oe=utf-8
fldash said:
Nice work, have you seen this tidbit on BusyBox Github for SELinux?
https://github.com/ukanth/afwall/wiki/BusyBox#difference-between-selinux-and-non-selinux-busybox
There's also some decent results on Google that may offer some clues... https://www.google.com/search?q=SELinux+mount+system+as+rw+android&ie=utf-8&oe=utf-8
Click to expand...
Click to collapse
Thanks for helping out. I jumped the gun on blaming SELinux. I'll go back and edit my previous post.
BusyBox, as far as I can tell works great!
(It will probably require more testing, but for the time being I am not having any issues.)
I figured out what was causing the problem with the inability to mount /system as rw. It was actually caused by attempting to flash Xposed, I believe. I tried it all again tonight and stopped this time after installing BusyBox and before flashing Xposed using Flashfire. I was still able to mount /system properly with functional GNU utils. I hadn't tested this before at this this stage.
I couldn't remount because of "orphaned inodes" after attempting to flash Xposed. Pretty sure this means its corrupting the partition, but yet its still mountable as read-only.
I restored my /system again to get everything back to normal and just installed BusyBox this time. So far so good...
I want to go back and try to flash Xposed again, and this time look in the logs folder. I think the addition of the BusyBox binaries are causing the installer script to error somewhere else during execution causing the partition corruption. Who knows.. there may be a workaround.
keep up the good work
z_thompsonpa said:
Thanks for helping out. I jumped the gun on blaming SELinux. I'll go back and edit my previous post.
BusyBox, as far as I can tell works great!
(It will probably require more testing, but for the time being I am not having any issues.)
I figured out what was causing the problem with the inability to mount /system as rw. It was actually caused by attempting to flash Xposed, I believe. I tried it all again tonight and stopped this time after installing BusyBox and before flashing Xposed using Flashfire. I was still able to mount /system properly with functional GNU utils. I hadn't tested this before at this this stage.
I couldn't remount because of "orphaned inodes" after attempting to flash Xposed. Pretty sure this means its corrupting the partition, but yet its still mountable as read-only.
I restored my /system again to get everything back to normal and just installed BusyBox this time. So far so good...
I want to go back and try to flash Xposed again, and this time look in the logs folder. I think the addition of the BusyBox binaries are causing the installer script to error somewhere else during execution causing the partition corruption. Who knows.. there may be a workaround.
Click to expand...
Click to collapse
How are you restoring your system partition? Using that diff patcher (for root) with a USB A-A cable?
fldash said:
How are you restoring your system partition? Using that diff patcher (for root) with a USB A-A cable?
Click to expand...
Click to collapse
I haven't had to break out the USB A-A cable yet... thankfully (except for root of course).
I used Flashfire to backup my /system partition as RAW backup before I started all of this experimentation. I have just been restoring back to this known good state using Flashfire after each time I corrupt the system partition.
I intended on trying this method, and if it didn't work to fall back to the method mentioned in the root thread. I checked the logs last night and Flashfire seems to be succeeding at this task, at least.
Right now, I am picking through the Xposed installer script source and using the Flashfire logs to debug why it is failing. It appears to be a permissions issue, but a lot of the stdout/stderr is suppressed so its hard to tell exactly where. When I get home today, I am going to try to modify the installer script to produce more output so I can debug the issue further. If I cant figure it out, I'll post my findings either way.
I've fixed a few bugs in the flash script already, but it always errors on overwriting:
Code:
/system/lib/libart.so
It's throwing some error about read-only filesystem. (I'll post exact error later)
I've thrown in some checks to see if the /system mount is unmounting or something odd like that, but that's not it.
I've got a few guesses as to why, but I am not going to mention them until I have more solid evidence.
Any advice would help as well... I just wanted to post the update I promised.
z_thompsonpa said:
Thanks for helping out. I jumped the gun on blaming SELinux. I'll go back and edit my previous post.
BusyBox, as far as I can tell works great!
(It will probably require more testing, but for the time being I am not having any issues.)
I figured out what was causing the problem with the inability to mount /system as rw. It was actually caused by attempting to flash Xposed, I believe. I tried it all again tonight and stopped this time after installing BusyBox and before flashing Xposed using Flashfire. I was still able to mount /system properly with functional GNU utils. I hadn't tested this before at this this stage.
I couldn't remount because of "orphaned inodes" after attempting to flash Xposed. Pretty sure this means its corrupting the partition, but yet its still mountable as read-only.
I restored my /system again to get everything back to normal and just installed BusyBox this time. So far so good...
I want to go back and try to flash Xposed again, and this time look in the logs folder. I think the addition of the BusyBox binaries are causing the installer script to error somewhere else during execution causing the partition corruption. Who knows.. there may be a workaround.
Click to expand...
Click to collapse
z_thompsonpa said:
I've fixed a few bugs in the flash script already, but it always errors on overwriting:
Code:
/system/lib/libart.so
It's throwing some error about read-only filesystem. (I'll post exact error later)
I've thrown in some checks to see if the /system mount is unmounting or something odd like that, but that's not it.
I've got a few guesses as to why, but I am not going to mention them until I have more solid evidence.
Any advice would help as well... I just wanted to post the update I promised.
Click to expand...
Click to collapse
I think we should go another method. Use the tools in the root thread to just create an image with Xposed/root and just do a DIFF.
fldash said:
I think we should go another method. Use the tools in the root thread to just create an image with Xposed/root and just do a DIFF.
Click to expand...
Click to collapse
I think so... I am pretty sure its a dead end. I also tested using adb to write the files and it failed on /system/lib/libart.so, as well. It's, I believe, because the object is loaded in memory?? don't quote me on that... but loading through preloader, I think, would avoid this limitation as ART is not running.
So can anyone in here tell me if its possible to have xposed on fire tv 2 5.0.5 thats rooted and now has twrp recovery on ? I have tried to flash the xposed zip in recovery but when i reboot its stuck at amazon logo. Went back into recovery and flashed rbox's pre rooted 5.0.5 and booted normally. Id like to have (im sure many others would also) xposed and playstore, ive searched the forums but because rbox method is new there is no information on this subject now.
sconnyuk said:
So can anyone in here tell me if its possible to have xposed on fire tv 2 5.0.5 thats rooted and now has twrp recovery on ? I have tried to flash the xposed zip in recovery but when i reboot its stuck at amazon logo. Went back into recovery and flashed rbox's pre rooted 5.0.5 and booted normally. Id like to have (im sure many others would also) xposed and playstore, ive searched the forums but because rbox method is new there is no information on this subject now.
Click to expand...
Click to collapse
Use this method, I've slightly modified the text from another post & added it into a text file for you, this works a 100% but as usual I take no responsibility if you do any thing wrong & brick the Fire Tv2.
Enjoy & press that thanks button If this helped you
Thanks for this. I will try it shortly and report back if it works for me. I have stumbled upon another thread that the guys seem to be working on playstore issues, http://forum.xda-developers.com/fire-tv/help/q-guide-to-getting-google-play-rbox-t3310974
Made a guide here if anyone wants to install
http://forum.xda-developers.com/fire-tv/general/installing-xposed-fire-tv-2-guide-t3314142

A request to official/unofficial TWRP developers

Hi All!
As plenty of people know by now that the latest modified twrp that we have does not work with encrypted storage when flashing official nougat oos. And there must be many people like me who due to reasons dont have time to copy n move everything back or don't want to decrypt their storage. So me and all of op3 community would appreciate if anyone can take some time out of their schedule and build an updated twrp version so that we can flash official nougat without screwing with storage or encryption. Because nougat is the future now and we'll start receiving nougat update from now onwards. And its a shame tha such an active dev device like op3 does not even have an updated twrp version. Thanks!
+1
A reason for this issue is probably OnePlus not releasing any Kernel Source code yet.
https://github.com/OnePlusOSS/android_kernel_oneplus_msm8996/issues/27
eng.stk was releasing a couple twrp mods but doing so is a pita with users on your back who constantly want 247 support.
AcmE85 said:
A reason for this issue is probably OnePlus not releasing any Kernel Source code yet.
https://github.com/OnePlusOSS/android_kernel_oneplus_msm8996/issues/27
eng.stk was releasing a couple twrp mods but doing so is a pita with users on your back who constantly want 247 support.
Click to expand...
Click to collapse
Totally agree to that. I was also assuming that an updated kernel sources are required to build a compatible twrp recovery for nougat. Waiting eagerly for the same. And considering the feedback of people on official OOS, i don't feel it's really a must have update as of now.
I also agree to the point about users. People need to stop taking developers for granted, and give them their space to release updates, and they should understand the dev is doing this in his/her free time not as a full time job. I hope we'll see an updated TWRP soon. Until then, MM is serving me well. No hurry
He is only asking, stop crying dude
To many ladies with balls here
fanbogo said:
He is only asking, stop crying dude
To many ladies with balls here
Click to expand...
Click to collapse
Sorry for the confusion what is it intended for me?
TWRP password, please help.
As first i wasn't able to flash any twrp files at all as after flashing it shows some black screen so not even from the official TWRP site the files were helpful, then after ages of serching I found some thread in XDA where a guy posted the link to this twrp https://forum.xda-developers.com/on...nity-build-t3461648/post68691560#post68691560, then I was able to successfully install it and boot into TWRP recovery.
So here I am now stuck with the ****** password to decrypt data and I simply want to root my OP 3 but due to this situation I am unable to so any solutions on this will be much helpful and any way to remove the dumb password for the TWRP.
Thanks.
Dude even if twrp shows encrypted you can still flash supersu. Just mount the /system partition in Mount options and flash supersu via otg.
Dude that is a mess n upon that I don't have otg, and really isn't there any way for this to encryption to get decrypt ?
samyj22 said:
Dude that is a mess n upon that I don't have otg, and really isn't there any way for this to encryption to get decrypt ?
Click to expand...
Click to collapse
You can flash SuperSU without TWRP being able to decrypt your DATA partition:
- Boot into TWRP
- cancel the password prompt
- push the supersu.zip to your phone via adb push supersu.zip / (notice the blank between zip and /!).
- go to INSTALL, navigate to the root directory and flash it
- reboot
Worked without issues on my device.
samyj22 said:
Dude that is a mess n upon that I don't have otg, and really isn't there any way for this to encryption to get decrypt ?
Click to expand...
Click to collapse
Connect your phone to your pc, boot TWRP via fastboot from the PC and flash SuperSu via adb under advanced in TWRP.
Gesendet von meinem ONEPLUS A3003 mit Tapatalk
AcmE85 said:
You can flash SuperSU without TWRP being able to decrypt your DATA partition:
- Boot into TWRP
- cancel the password prompt
- push the supersu.zip to your phone via adb push supersu.zip / (notice the blank between zip and /!).
- go to INSTALL, navigate to the root directory and flash it
- reboot
Worked without issues on my device.
Click to expand...
Click to collapse
Didn't knew that at all part from ya we can push files via side load, but just to confirm my internal storage shows as 0mb as it is encrypted n even if I push the files to internal storage so just wanted to make sure will it show up in two file manager?
Next thing so if I have any ROM files to flash can they be pushed as well with the command adb push file.zip /right?
N yah I have to enter sideload mode for this right.
samyj22 said:
Didn't knew that at all part from ya we can push files via side load, but just to confirm my internal storage shows as 0mb as it is encrypted n even if I push the files to internal storage so just wanted to make sure will it show up in two file manager?
Next thing so if I have any ROM files to flash can they be pushed as well with the command adb push file.zip /right?
N yah I have to enter sideload mode for this right.
Click to expand...
Click to collapse
I just booted into twrp, canceled the password prompt and pushed the file while being in the main menu.
The file will be stored in your devices root folder, not "internal storage" or "sdcard".
So when you go to "install", you have to go all the way up your folder structure. This is were you will find the supersu.zip.
AcmE85 said:
You can flash SuperSU without TWRP being able to decrypt your DATA partition:
- Boot into TWRP
- cancel the password prompt
- push the supersu.zip to your phone via adb push supersu.zip / (notice the blank between zip and /!).
- go to INSTALL, navigate to the root directory and flash it
- reboot
Worked without issues on my device.
Click to expand...
Click to collapse
Can we perform an adb sideload rather than adb push to directly flash SuperSU zip? Or does sideload only works for rom zips?
AcmE85 said:
I just booted into twrp, canceled the password prompt and pushed the file while being in the main menu.
The file will be stored in your devices root folder, not "internal storage" or "sdcard".
So when you go to "install", you have to go all the way up your folder structure. This is were you will find the supersu.zip.
Click to expand...
Click to collapse
Just a little confusion, as the internal storage is the same as root directory or the one level back to the SD card is the root directory?
abhibnl said:
Can we perform an adb sideload rather than adb push to directly flash SuperSU zip? Or does sideload only works for rom zips?
Click to expand...
Click to collapse
Yes you can directly sideload.
Bro just need confirmation on the commands for the push and sideload as well correctly, that will be really helpful...... ?
samyj22 said:
Bro just need confirmation on the commands for the push and sideload as well correctly, that will be really helpful......
Click to expand...
Click to collapse
Mount system in recovery,
adb sideload sample.zip
adb push <source-path> <target-path>
If file is in the adb folder already, then
adb push sample.zip /system or whatever path you want to send it to.
Edit: While pushing, make sure you mount system as RW first. But i guess when you mount system in TWRP, it's automatically in RW mode. But please do check with someone who has done it or an expert. I have limited knowledge, so sharing as far as i know
abhibnl said:
Mount system in recovery,
Click to expand...
Click to collapse
Hello thank you, but in twrp i can't mount /system
in mount i can select system but i have
Decrypt data
Select Storage
Disable/enable MTP.
acetone802000 said:
Hello thank you, but in twrp i can't mount /system
in mount i can select system but i have
Decrypt data
Select Storage
Disable/enable MTP.
Click to expand...
Click to collapse
Do you have all those 3 options in the mount menu? I don't think that should be there. I'm sorry, your statement is a bit unclear actually.

[RECOVERY][UNNOFICIAL][6045] TWRP 3.1.0-0/3.0.2-0-r5 for Alcatel Idol 3 (6045)

Team Win Recovery Project 3.X+, or twrp3for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface,but you can use hardware buttons too.The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
Features since 3.1.0-0
vold decrypt on a few select HTC devices, TWRP will now attempt to use the system partition's vold and vdc binaries and libraries to decrypt the data partition (nkk71 and CaptainThrowback)
adb backup to stream a backup directly to or from your PC, see documentation here (bigbiff)
tweak MTP startup routines (mdmower)
support new Android 7.x xattrs for backup and restore to fix loss of data after a restore (Dees_Troy)
support POSIX file capabilities backup and restore to fix VoLTE on HTC devices and possibly other issues (Dees_Troy)
better indicate to users that internal storage is not backed up (Dees_Troy)
improve automatic determination of TW_THEME (mdmower)
minimal getcap and setcap support (_that)
try mounting both ext4 and f2fs during decrypt (jcadduono and Dees_Troy)
shut off backlight with power key (mdmower)
timeout during FDE decrypt (Dees_Troy and nkk71)
support for FBE decrypt and backing up and restoring FBE policies (Dees_Troy)
boot slot support (Dees_Troy)
TWRP app install prompt during reboot (Dees_Troy)
support for AB OTA zips (Dees_Troy)
support new Android 7.x log command (Dees_Troy)
update recovery sources to AOSP 7.1 (Dees_Troy)
numerous bugfixes and improvements by too many people to mention
This is thanks to the Xiaomi mi4i devs and @persona78 for porting it to 6045 (and @satana.nik.1996 for starting to port TWRP from other phones, in 4PDA)
Supported Devices
Any 6045 Variant
Installation Guide
There are multiple methods, i will post the 3 i know here
If you have stock recovery and you are on Lollipop
Install fastboot tools (Android) from google's Sdk on your PC
Reboot in Fastboot mode, pressing volume - and USB cable into the pc or enter into fastboot using in adb (with usb debug enabled) adb reboot-bootloader
Enter the command : fastboot -i 0x1bbb flash recovery twrp-3.1.0-0-m1_Idol3.img (I suggest to rename the file, for to example twrp.img, so you just write fastboot-i 0x1bbb flash recovery twrp.img)
write : fastboot reboot, and when the phone is starting, only press volume+ and you will enter to TWRP
If you have TWRP installed (Any android version)
Boot into TWRP using Vol+ and Power
Go to Install
Press Install Image and search twrp-3.1.0-0-m1_Idol3.img
Then Press Recovery, swipe and it is installed
If you have MM stock, without TWRP and ROOT
Install/Search Rashr from Play Store
Grant SD and Root Permissions
Press Recovery, then search twrp-3.1.0-0-m1_Idol3.img
Press install and you are done
Bug/s TWRP 3.1.0-0
You can't reboot into Recovery from Recovery (you can just press vol+ to avoid this)
It shows internal Storage 2 times, but does not affect in anything (just make sure when you wipe, just wipe 1 and not both at the same time)
You tell me
Bug/s TWRP 3.0.2-0-r5
You can't reboot into Recovery from Recovery (you can just press vol+ to avoid this)
Sort of Laggy (like TWRP 3.0.1-0)
You tell me
Download
TWRP 3.1.0-0 https://mega.nz/#!p4g2RYQS!uq4nFsef55JiKUoepU6kASGfI8sz6Tf970nEyNHHdE8
TWRP 3.0.2-0-r5 https://mega.nz/#!FxxxWYRS!PebYGrzogP8OohJ9IrjpAar8Ya2c4BK8NdmX4jFyJPw
Full ROM backup via ADB https://forum.xda-developers.com/idol-3/general/backup-adb-recovery-twrp-3-0-2-r5-twrp-t3574214
[TOOL] [WINDOWS] TWRP Backup & Restore Tool For PC (not tested on idol3) https://forum.xda-developers.com/android/software-hacking/tool-twrp-backup-restore-tool-pc-t3572241 (from xda, @dexbyte)
Creator
juliusssssmiui
Edited for Idol 3
@persona78
Source Code: https://twrp.me/devices/xiaomimi4i.html
Version Information
Status: Beta
Current Stable Version: 3.0.2-0-r5
Stable Release Date: 2016
Created 2017-03-10
Last Updated 2017-03-17
@panchovix I have twrp 2.74 version, can I flash twrp 3.1 using your step two or another way?
Sent from my 6045I using Tapatalk
belkoo said:
@panchovix I have twrp 2.74 version, can I flash twrp 3.1 using your step two or another way?
Sent from my 6045I using Tapatalk
Click to expand...
Click to collapse
You can, but i can't remember if TWRP 2.74 has that option (to install .Imgs)
panchovix said:
You can, but i can't remember if TWRP 2.74 has that option (to install .Imgs)
Click to expand...
Click to collapse
My bad, I had the 2.8.7.0 version and it can install images. Installed on 6045K without problems, I didn't tried to flash system or wipe data, I don't know will it be problems with that. Anyway, thanks a lot for EVERY single man for making such a great things for this phone including you @panchovix ☺.
Sent from my 6045I using Tapatalk
Just added the changelog, and it is a lot lol, this is good news if N get released (anyways i'm trying to use the adb backup to pc and i can't make it work)
also work on the 6045O?
panchovix said:
In my case shows Blade S6 when connected in TWRP mode to the PC (does not affect in anything)
Click to expand...
Click to collapse
Where exactly do you see this? I see "6045" in the Device Manager, and "recovery" when doing "adb devices".
i'm trying to use the adb backup to pc and i can't make it work
Click to expand...
Click to collapse
Same here... Nothing happens on the device, and the backup file that gets created on the PC has this one line:
Code:
/sbin/sh: /system/bin/bu: not found
When I checked /system/bin in unpacked ramdisk, I found it to be completely empty, but I did find /sbin/bu. So... Not knowing enough to figure out what exactly was wrong here, I just copied the contents of /sbin into /system/bin, repacked the img, and flashed it. Guess what? ADB backup works now. So, someone smarter than me should figure out how to "properly" fix it, because I am pretty damn sure what I did was not the right thing to do, even though it seemed to solve the problem... I didn't do much testing, other than completing the adb backup. Too late, going to bed now...
kt-Froggy said:
Where exactly do you see this? I see "6045" in the Device Manager, and "recovery" when doing "adb devices".
Same here... Nothing happens on the device, and the backup file that gets created on the PC has this one line:
Code:
/sbin/sh: /system/bin/bu: not found
When I checked /system/bin in unpacked ramdisk, I found it to be completely empty, but I did find /sbin/bu. So... Not knowing enough to figure out what exactly was wrong here, I just copied the contents of /sbin into /system/bin, repacked the img, and flashed it. Guess what? ADB backup works now. So, someone smarter than me should figure out how to "properly" fix it, because I am pretty damn sure what I did was not the right thing to do, even though it seemed to solve the problem... I didn't do much testing, other than completing the adb backup. Too late, going to bed now...
Click to expand...
Click to collapse
When you can ,please send me the IMG via pm (or here) and I can test some things
And thanks for finding one way to fix it!
Enviado desde mi 6045B mediante Tapatalk
jbach44 said:
also work on the 6045O?
Click to expand...
Click to collapse
I'm not sure since I don't have that model
If you want , you can test and say me here if it worked for you [emoji14]
Enviado desde mi 6045B mediante Tapatalk
kt-Froggy said:
Where exactly do you see this? I see "6045" in the Device Manager, and "recovery" when doing "adb devices".
Same here... Nothing happens on the device, and the backup file that gets created on the PC has this one line:
Code:
/sbin/sh: /system/bin/bu: not found
When I checked /system/bin in unpacked ramdisk, I found it to be completely empty, but I did find /sbin/bu. So... Not knowing enough to figure out what exactly was wrong here, I just copied the contents of /sbin into /system/bin, repacked the img, and flashed it. Guess what? ADB backup works now. So, someone smarter than me should figure out how to "properly" fix it, because I am pretty damn sure what I did was not the right thing to do, even though it seemed to solve the problem... I didn't do much testing, other than completing the adb backup. Too late, going to bed now...
Click to expand...
Click to collapse
Hi!
How do backup to pc, for me to understand.
So for what i can read insted of bin folder must be a symlink to sbin, right?
.
.
panchovix said:
Just added the changelog, and it is a lot lol, this is good news if N get released (anyways i'm trying to use the adb backup to pc and i can't make it work)
Click to expand...
Click to collapse
Hi!
How to backup?
.
persona78 said:
Hi!
How to backup?
.
Click to expand...
Click to collapse
He still didn't send me the IMG so idk how to
Enviado desde mi 6045B mediante Tapatalk
panchovix said:
He still didn't send me the IMG so idk how to
Enviado desde mi 6045B mediante Tapatalk
Click to expand...
Click to collapse
@panchovix
I already found it!
This is how to backup system for example:
Code:
adb backup -f system.img --twrp system
And in adb folder you will get system.img
How it works:
adb backup -f <filename> --twrp <options> ( --compress: compress data )
options:
system: backup system
cache: backup cache
data: backup data
boot: backup boot
etc for each partition.
Read this if you want to learn more about it:
https://github.com/omnirom/android_bootable_recovery/commit/ce8f83c48d200106ff61ad530c863b15c16949d9
And twrp-lux-3.0.2-r5 can do backup to in the same way! Just need to copy the bu file into /system/bin folder and compile it again... -_-
I think twrp-lux-3.0.2-r5 is better than TWRP 3.1 ...
The MTP works better on pc.
This is twrp-lux-3.0.2-r5_Idol3.img -> https://mega.nz/#!wsAgBSiY!DifwUCYvIoOmMXp14u0ZuBaekhCVmnEDdurU2_6UFfw
This is twrp-3.1.0-0-m1_Idol3.img fixed -> https://mega.nz/#!55hFCABY!GovSGXaQ1muuU0c-wDYN-40iapzey5Jp0AFhIp2B3qg
If you need help just tell me, maybe i can help!
.
persona78 said:
@panchovix
I already found it!
This is how to backup system for example:
Code:
adb backup -f system.img --twrp system
And in adb folder you will get system.img
How it works:
adb backup -f <filename> --twrp <options> ( --compress: compress data )
options:
system: backup system
cache: backup cache
data: backup data
boot: backup boot
etc for each partition.
Read this if you want to learn more about it:
https://github.com/omnirom/android_bootable_recovery/commit/ce8f83c48d200106ff61ad530c863b15c16949d9
And twrp-lux-3.0.2-r5 can do backup to in the same way! Just need to copy the bu file into /system/bin folder and compile it again... -_-
I think twrp-lux-3.0.2-r5 is better than TWRP 3.1 ...
The MTP works better on pc.
This is twrp-lux-3.0.2-r5_Idol3.img -> https://mega.nz/#!wsAgBSiY!DifwUCYvIoOmMXp14u0ZuBaekhCVmnEDdurU2_6UFfw
This is twrp-3.1.0-0-m1_Idol3.img fixed -> https://mega.nz/#!55hFCABY!GovSGXaQ1muuU0c-wDYN-40iapzey5Jp0AFhIp2B3qg
If you need help just tell me, maybe i can help!
.
Click to expand...
Click to collapse
thanks man! i'm an the unevirsity now but will add the 3.0.2.0 version too, for those who want to use it
just wondering, why you don't post the 6039 version here on Android dev too?
panchovix said:
thanks man! i'm an the unevirsity now but will add the 3.0.2.0 version too, for those who want to use it
just wondering, why you don't post the 6039 version here on Android dev too?
Click to expand...
Click to collapse
Maybe when i get home i will do it
.
Sorry guys, busy at work... :\
persona78 said:
Hi!
How do backup to pc, for me to understand.
So for what i can read insted of bin folder must be a symlink to sbin, right?
Click to expand...
Click to collapse
Looks like you already figured out the backup process... Just to note, it also creates the regular backup folder on the device, but also copies it over through ADB to the PC. Yeah, I think it should be either a symlink, or maybe some playing around with the PATH variable, not sure... I did the most simple thing, just to test it out: if a binary is expected in some folder, just put it there. But it's rather stupid, IMO...
panchovix said:
He still didn't send me the IMG so idk how to
Click to expand...
Click to collapse
Sorry, here it is, just for reference.
kt-Froggy said:
Sorry guys, busy at work... :\
Looks like you already figured out the backup process... Just to note, it also creates the regular backup folder on the device, but also copies it over through ADB to the PC. Yeah, I think it should be either a symlink, or maybe some playing around with the PATH variable, not sure... I did the most simple thing, just to test it out: if a binary is expected in some folder, just put it there. But it's rather stupid, IMO...
Sorry, here it is, just for reference.
Click to expand...
Click to collapse
Yeah np, seems he did it, anyways (since I'm not on my home still), did you try to restore the phone with the PC backup? If I'm not wrong it should be adb restore twrp-- ( I can be very wrong lol I don't remember)
That is the most important thing, since you can just move the file to the PC and save space on the phone always
Enviado desde mi 6045B mediante Tapatalk
panchovix said:
did you try to restore the phone with the PC backup? If I'm not wrong it should be adb restore twrp-- ( I can be very wrong lol I don't remember)
That is the most important thing, since you can just move the file to the PC and save space on the phone always
Click to expand...
Click to collapse
Nope, haven't tried it yet... I will try, but not sure when, as I am really crazy busy now between work and home (I am in the final stages of building my own house, lol).
But to me, honestly, this is just an added convenience over just copying over the standard TWRP backups to the PC. Even without adb backup, we can always copy over the TWRP backup folder(s) to the PC, and delete them from the device. Then simply copy them back to do a restore, when needed... Takes some extra time, sure, but still can easily be done.
kt-Froggy said:
Nope, haven't tried it yet... I will try, but not sure when, as I am really crazy busy now between work and home (I am in the final stages of building my own house, lol).
But to me, honestly, this is just an added convenience over just copying over the standard TWRP backups to the PC. Even without adb backup, we can always copy over the TWRP backup folder(s) to the PC, and delete them from the device. Then simply copy them back to do a restore, when needed... Takes some extra time, sure, but still can easily be done.
Click to expand...
Click to collapse
Yeah but for informatics people , less time =always better [emoji14] I will try once I get to home, since I was on University
Gratz with the own house!
Enviado desde mi 6045B mediante Tapatalk
Added new imgs with fixed adb pull, many thanks to @persona78 and @kt-Froggy for helping, finding and fixing the problem
posted a tool that does the adb backup automatized, from persona78

Question [FIXED] Anyone else unable to backup with TWRP?

I can't backup /data with TWRP from both Nebrassy & Vasishath.
"createTarFork() process ended with ERROR: 255"
"Backup failed. Cleaning Backup Folder."
I do not have multiple users set up (TWRP is known to have problems with that).
Recovery Log (only latter part due to file-size):
found fscrypt policy '/data/user_de/0/nextapp.fx/code_cache' - '0DE0' - 'e5e82a9 - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
pastebin.com
In the log I found this notable part:
Code:
failed to lookup fscrypt tar policy for '/data/extm' - '600abdeb88d2da0f8f374d53b133c57b'
I:Error adding file '/data/extm' to '/data/media/0/TWRP/BACKUPS/2d50fb62/2021-07-18--16-59-39/data.f2fs.win008'
Error creating backup.
I:ERROR tarList for thread ID 0
Error creating backup.
tomxyz said:
I can't backup /data with TWRP from both Nebrassy & Vasishath.
"createTarFork() process ended with ERROR: 255"
"Backup failed. Cleaning Backup Folder."
I do not have multiple users set up (TWRP is known to have problems with that).
I included the Recovery log.
In the log I found this notable part:
Code:
failed to lookup fscrypt tar policy for '/data/extm' - '600abdeb88d2da0f8f374d53b133c57b'
I:Error adding file '/data/extm' to '/data/media/0/TWRP/BACKUPS/2d50fb62/2021-07-18--16-59-39/data.f2fs.win008'
Error creating backup.
I:ERROR tarList for thread ID 0
Error creating backup.
Click to expand...
Click to collapse
Try to Remove your screen lock and try again.
Or try this
In TWRP, go in "Advanced" menu => "Terminal" => Type: rm /data/extm -Rf
In previous versions of the TWRP backup worked but then restore failed so I think this is a known issue
Hmm, Ive solved the same problem before for another person.so yes.
Could you try the steps above?
Robert314 said:
In previous versions of the TWRP backup worked but then restore failed so I think this is a known issue
Click to expand...
Click to collapse
Kenora_I said:
Or try this
In TWRP, go in "Advanced" menu => "Terminal" => Type: rm /data/extm -Rf
Click to expand...
Click to collapse
Thank you! Deleting extm worked!
That problematic folder is supposedly created by Xiaomi MIUI and is related to their "Second Space"-feature (Multiple Users feature). It was empty for me.
On an unrelated note, do you perhaps know what partitions should be backed up, when trying out other Custom ROMs? I see Super twice, kinda confusing.
I'm guessing Data + Boot + Super (one of them atleast?)
Maybe just data i guess
System and boot if you want to restore the old system
Kenora_I said:
Or try this
In TWRP, go in "Advanced" menu => "Terminal" => Type: rm /data/extm -Rf
Click to expand...
Click to collapse
I can confirm that after doing so, the TWRP backup worked again in my case, too.
Xiaomi Mi 9T Pro with MIUI 12.5.5 (xiaomi.eu).
Kenora_I said:
Hmm, Ive solved the same problem before for another person.so yes.
Could you try the steps above?
Click to expand...
Click to collapse
It absolutely works thanks. Redmi Note 10 pro .MIUI lastest
create tar fork error 255
dreamytom said:
Thank you! Deleting extm worked!
That problematic folder is supposedly created by Xiaomi MIUI and is related to their "Second Space"-feature (Multiple Users feature). It was empty for me.
On an unrelated note, do you perhaps know what partitions should be backed up, when trying out other Custom ROMs? I see Super twice, kinda confusing.
I'm guessing Data + Boot + Super (one of them atleast?)
Click to expand...
Click to collapse
I'd backup system, boot and that's it
Just in case you can't revert back to the last working ROM
Kenora_I said:
Or try this
In TWRP, go in "Advanced" menu => "Terminal" => Type: rm /data/extm -Rf
Click to expand...
Click to collapse
I did this the problem was solved but I have to do this all the time. Is there a permanent solution to this?
Kenora_I said:
Or try this
In TWRP, go in "Advanced" menu => "Terminal" => Type: rm /data/extm -Rf
Click to expand...
Click to collapse
I notice this, but I am afraid to delete that. for what supposed to?
MattHdH said:
I notice this, but I am afraid to delete that. for what supposed to?
Click to expand...
Click to collapse
Just some problem with MIUI and it's second space feature, delete it and the backup should work.
svtg24124522 said:
I did this the problem was solved but I have to do this all the time. Is there a permanent solution to this?
Click to expand...
Click to collapse
No, unfortunately that's because of how MIUI works
First I used Los and Nebrassy twrp. I experimented with gpu undervoltage. I was not able to restore data partition...
When I started to use arrow someone suggested to use : 3.6.1_11-RedmiK40_v3.4_A12-alioth-skkk_49fc7a15.img . This time I was able to use nandroid backup to restore arrow after wrong results of gpu modifications.
Kenora_I said:
No, unfortunately that's because of how MIUI works
Click to expand...
Click to collapse
it sems to be workin for everyone but for me it doesnt what to do

Getting GSI ROM's for g4

Hello, this sounds a little bit impossible but i made some progress with my friend. We made a vendor partition, edited the TWRP but we stuck at the part of making a vendor. Can the g4 community do it? I think you can, especially @steadfasterX. UsU, FWUL and SALT were masterpieces.
Also, it looks so hard. Because there is no phone with S808 and A9.
If you need to know how did i made the vendor partiton, i can help.
I use H815TR UsU'd. If that helps.
You should describe much more detailed what you did and what problems you have after that.
steadfasterX said:
You should describe much more detailed what you did and what problems you have after that.
Click to expand...
Click to collapse
First i put the parted file on the phone and run it via terminal in TWRP.
cp /sdcard/parted /sbin/ && chmod 755 /sbin/parted was the command i used.
Second, i unmounted every partition and wrote the command: parted /dev/block/mmcblk0
After, I wrote p to see what number was my userdata (it was 50) and i wrote rm 50.
After i deleted the userdata, i wrote
mkpart userdata ext4 6359MB 30GB
mkpart vendor ext4 30GB 31.3GB
to make a vendor partiton.
Finally, i did a format data and @MeizuM6T edited the TWRP.
I did everything with @MeizuM6T .
Now i need vendor files.
The easiest way is to simply copy /system/vendor from an existing ROM tbh.
steadfasterX said:
The easiest way is to simply copy /system/vendor from an existing ROM tbh.
Click to expand...
Click to collapse
Most roms contain system-as root, obviously this is where @Emo19 and me get stuck.
Would connecting the vendor via FSTAB be enough to boot?
MeizuM6T said:
Most roms contain system-as root, obviously this is where @Emo19 and me get stuck.
Would connecting the vendor via FSTAB be enough to boot?
Click to expand...
Click to collapse
Well then i don't get the problem.
We mimic a vendor partition since (iirc) pie and to follow android standards we already moved everything needed to /system/vendor including config updates where needed pointing to /vendor. I would say 98% of this move is done already for the rest see e.g: https://github.com/LGgFour/android_device_lge_g4-common/search?q=System/vendor
Ofc currently /vendor is just a symlink to /system/vendor but for the system it feels like it has a separate vendor partition already.
So my guess was you just copy everything from /system/vendor and put that in your /vendor partition and if we made everything right and you fix the rest of the few /system/vendor paths it should just boot. Ofc you would need to update fstab to point to the dedicated vendor partition then. Does that help?
steadfasterX said:
Well then i don't get the problem.
Click to expand...
Click to collapse
The vendor has successfully connected but the treble support is still not visible.
Vendor is connected to the system and is working now, how should we arrange for treble?
MeizuM6T said:
The vendor has successfully connected but the treble support is still not visible.
Vendor is connected to the system and is working now, how should we arrange for treble?
Click to expand...
Click to collapse
no idea really. I have never ported anything to treble. just the other way around
steadfasterX said:
no idea really. I have never ported anything to treble. just the other way around
Click to expand...
Click to collapse
Thanks, I think we need to write "ro.treble.enabled = true" via build.prop. then we will try to install some GSI Roms.
MeizuM6T said:
Thanks, I think we need to write "ro.treble.enabled = true" via build.prop. then we will try to install some GSI Roms.
Click to expand...
Click to collapse
well I dont think its THAT easy. I was serious about the other way around so take a look at what I did for another device:
https://code.binbash.rocks:8443/MVA-VoLTE/android_device_samsung_j5y17lte/commits/branch/eos-q/search?q=treble&all=true
https://code.binbash.rocks:8443/MVA-VoLTE/android_device_samsung_exynos7870-common/commit/ab2567dc82fbdb2a21aa3ea28572dd18e5b7fb79
https://code.binbash.rocks:8443/MVA-VoLTE/android_kernel_samsung_exynos7870/commit/b8e2cf570dfd383fb3a4497d6b53d51c9226ca7b
Ofc you would do the opposite then what the commits showing and ofc I dunno if thats enough and haven't checked what needs to be adapted etc but it should give you an idea
steadfasterX said:
well I dont think its THAT easy. I was serious about the other way around so take a look at what I did for another device:
Click to expand...
Click to collapse
I doubt it will open either, it shouldn't be that simple. I will look at what you have thrown

Categories

Resources