yashsingh1/xdaforums huggingface dataset:
[G4 Android Development] svetloslav:
Yes indeed, restoring nandroid backups made with this recovery fails. I did it on CM13. To get around I had to install a fresh nightly CM13 and restored all settings with Titanium Backup Pro form the very same failed nandroid backup. So there is a relatively easy solution, but of course not being able to trust 100% an nandroid backup is a major, major deal breaker for me, so I am back to the official TWRP. By the way is there an explanation as to why the size of this recovery .img is almost half compared to the official TWRP?
[G4 Android Development] Aldideos:
The recovery broke my Imei, I hae a backupbut if I recover by it it doesn't restre... please help...

Edit:

Also tried to recover with the original recovery... no luck...

Edit 2:

Fixed with another backup made with the original recovery
[G4 Android Development] steadfasterX:
sorry for that! I cannot confirm that though..

Can someone provide a recovery log from a failed restore??

Saying it fails doesn't help solving the problem so it would be great to get at least that..

Due to the user reports I removed build 91 from download section

.
[G4 Android Development] steadfasterX:
Thanks for reporting please provide recovery log file

Sorry for any inconvenience I can not confirm that though. Regarding your question about the size of the image please read OP
[G4 Android Development] morgoth6:
Propably related: http://xdaforums.com/nexus-6p/help/announcement-twrp-3-0-2-1-fatal-bug-t3453119
[G4 Android Development] steadfasterX:
many thx for pointing to this!

There is a commit from Dees_Troy which seems to be related Fix restore of subpartitions

I cannot say for sure but it sounds like this is the reason for the problems.

Currently waiting for feedback of the devs to confirm...

Update

ok fully confirmed:

Due to a bug in the twrp sources regarding the subpartition handling some partitions which gets grouped like EFS (modemst1 + modemst2) were not able to be restored by twrp. It seems this bug was introduced somewhen between the android-5.0 repo (official twrp) and the android-6.0 repo (my twrp).

The only partitions in our device which are based on subpartitions and used in backup are EFS related. /data, /system, /recovery or /boot should all not be affected by this bug. So restoring your device should work with build#091 or newer (as reported by 2 users) as long as you do NOT try try to restore EFS. This is untested by me but as long as this is the only bug it should work without problems.

Just to clarify things: I'm not a twrp developer. I use their code to build a twrp version for our device. TWRP is build by humans. Humans are known to make faults. So I really appreciate the work of the TWRP developers but keep in mind that every software u r using contains bugs. You may not know them (yet) but they are there.

My fault was to not test EFS restoring before releasing. The main reason for this is that I have to do all tests on my daily driver which I really resist on.

To be able to get full support without any restrictions I bought a

second

device yesterday for testing and developing

only

! Yes you had read right! just for testing.. and no i have not too much money but i hate to develop on my daily driver + the current situation makes me mad. I hope to get the 2nd one in the next days..

After that I will build with the mentioned fix of Dees_Troy and will testing the backup and restore with both STOCK and CM based ROM on it - including EFS of course.

This will take some time so don't expect any updates until my tests reached the final stairs.

If you are brave enough: I always need testers. Send me a PM if you want to help. Create a backup with the official twrp first and then you are save to test the updated ones..

And btw:

keep in mind that official TWRP versions can not always be fully tested by the TWRP devs!

They do not own each device they support so the same happened here could had happened in the next

official

twrp version.

The only reason why it happens now is that I used newer sources then the official released.

.
[G4 Android Development] DevUt:
Let me explain

Restoring a nandroid backup is always bad in nature (even if you wipe)

The best always is install a rom and only restore selective things

By that way you can trust the nandroid backup

And let me tell you that this is soon going to be official and the dev [MENTION=5545101]steadfasterX[/MENTION] is soon to be the maintainer of the device

And the size, this recovery uses a compressed kernel(lzma afaik) while the official dosent, and this allows this recovery to be more modified and feature rich and flawless

Belive [MENTION=5545101]steadfasterX[/MENTION] has given way too much in this recovery :)
[G4 Android Development] svetloslav:
I am very thankful for this upgraded version, just pointed out my experience. As you can see the more people report an issue, any issue in general, the greater the chances of a solution. I realize my complaint here was not very useful since it contained no log. Nevertheless by not reporting at all we would definitively risk bringing more people into trouble than otherwise. Now let me try to add some useful information to the current problem. By my recollection the reported cause of failure to restore was program's inability to find the "firmware" directory.
[G4 Android Development] Aldideos:
Thank you for your excellent work... The efs issue was a big heart stroke but fortunately I fix it... In my opinion the best option is to delete the possibility to restore efs by recovery, if the backup with this recovery is affidable and create a zip file to restore it. Or to delete also the backup and post a guide to backup it with adb. Efs restoring is a rare thing, in my opinion it is not necessary to implement it on the recovery. It is a problem not a feature... In fact I have not noticed that I was restoring also Efs, even if I wouldn't do that.

After all I want to mantain your recovery as my daily driver and I want to try the Time fix for Cm roms if possible. If it could help I have cm13 latest nightly with Llama...

Sorry for my bad English.

Edit:

In recovery I can backup the firmware partition but when I tried to restore it twrp sends me an error... What is this partition? In the original recovery it is not present...
[G4 Android Development] steadfasterX:
Just to clarify

Reporting any errors is highly appreciated.

I wrote a hopefully meaningful FAQ (see post 3 of this thread) how you can report and what logs are needed for a qualified (!) report. This way ensures I get all needed details to find the root cause of a problem but needs some effort from you.

That's the usual way to do it but there are exceptions as they are always exceptions:

A critical bug like like restoring breaks your system is such an exception. Here it is important to get such feedback ASAP even without providing logs.

Those major critical bugs are very very rare so time is important.

So it's all good and for the next time just ensure you also get the logs ;)

Thx for your understanding

steadfasterX

.
[G4 Android Development] akiute:
Hi,

I don´t found download section for test encrypt phone with CM13.
[G4 Android Development] steadfasterX:
Pls read:

http://xdaforums.com/showpost.php?p=68491660&postcount=51

If you are still willing to test and you had

understood

the impact! Then - I really mean

then

only: Send my a PM and I can provide you the latest build.

.
[G4 Android Development] popy2006:
I'll read through the last posts regarding the efs restore issue. I am not planning to restore efs, but is there a fixed version already?

Just wann to be sure, if I'll accidentally tick efs ?

Thx pOpY

Gesendet von meinem LG-H815 mit Tapatalk
[G4 Android Development] steadfasterX:
Hi pOpY

yes there is.

Totally

untested.

Based on the latest TWRP sources.

Diff: https://github.com/omnirom/android_...25c5b5c3293d6b6e78a623d40987fe8...android-7.0

I hope to get my test device in the next hours (if I can trust the package tracking).

Before even beta testing the new version i wanna do a first run on my device. So if all becomes good I could release a new version today.

Will send you a PM when ready for testing. ;)

.
[G4 Android Development] steadfasterX:
My dev device has been arrived :victory:

Currently trying to restore already ;) including EFS of course :fingers-crossed:

Just a note: I have updated the FAQ (added #10).

If you wanna backup EFS without the TWRP GUI and especially for those may wanna test the next builds the

backups

steps mentioned there are highly recommended.

UPDATE

Backing up --> OK

Restoring with EFS --> OK

Restoring without /firmware --> OK

Restoring with /firmware --> FAILS

I had tested with a completed wiped device before restoring and have everything in place afterwards. No problems regarding EFS or something else.

The /firmware thing is something I got from one of the other TWRP devs when I merged my tree with him.

/firmware contains necessary proprietary files but I'm not sure if we really want to backup it in TWRP though.. some official TWRP images do that some not.

For new backups I have remove the option to backup /firmware for the moment but when restoring a backup containing a /firmware tar and you forget to untick /firmware it will leaves you with an incomplete partition.

I currently investigating that issue but the reason of that failure is because of 1 file is tar'ed as a hardlink but it is none. Somehow that results in 20 hardlinks in the tar file and when trying to restore this file together with the wrong hardlinks restoring fails.

This seems to be again not an issue of mine but with the TWRP sources.. somehow backin up /firmware corrupts that tar..

I trying to find out why atm.

UPDATE 2

I re-added firmware so it can be backuped again.

I fixed an issue within the fstab and now it is working both backing up /firmware and restoring as well.

Restoring older firmware backups cant be fixed easily within twrp and those will fail. So the workaround for this is creating a new firmware backup with the latest build and not restoring the one from the previous builds :silly: . (You can pull the older firmware backup and extract the corrupted file on the PC if you really need to. The rest can be extracted with "tar xzf" when in twrp using adb shell)

I still need some more test runs before pushing the new build out but i believe we are on the right way

UPDATE 3

Build #144 is ready for the brave testers :highfive: :victory:

Finally I was able to fix both:

- the firmware backup (restoring failed because of wrong way on taking the backup) bug

- and the efs restore bug

I tested a full backup including all except cache (who wants to backup cache btw?? ):

- First on my new test device. No problem.

- Then I tested the same on my productive device and again inclusive EFS and firmware. No problem. Everything is working as it should. I currently writing from my restored device btw :laugh:

I like to provide quality so I want to have this new build tested by at least 2 other people out there. If you feel brave enough send me a PM. I send you a guide which ensures that you will loose no data of course. It would be good to have at least one with stock or stock based ROM..

.
[G4 Android Development] steadfasterX:
Let's say when you see the bl is locked then it is too late and you may have soft bricked.

The question is how high are the chances that it locks when flashing and that depends on how you flash.

If you use a kdz with LG up the unlock state will be preserved. When you flash partitions manually or by a provided TWRP zip ensure that you do not flash misc and persistent partitions and you should be safe.

On the other hand is restoring the bl unlock state verified by our friend [MENTION=5461026]kessaras[/MENTION] who knows what he does so we can consider it is safe to restore.

I would like to see at least one more proof to be 100% sure but that's because I'm paranoid...

So you could consider to just restore it as well.

Now you know the risks and chances but the way to go is up to you. I would just restore it but without a pc like you.. Hard to say..

.
[G4 Android Development] stefan.kurz:
OT:

I'm so stupid cause i have a g2 for Backup but it's [MENTION=313982]home[/MENTION]...

I really wanna try these rom(s). I have holiday, no work, much time, wife and kids gone shopping and today lousy weather outside.

What can happen...i have no doubt that the flash like introduced by kessara or Astrako works. If i don't like the rom(s) i can deal with it till next week. Maybe i learn to love them...[emoji6].

One thing annoying me is that i don't know if i can registrate whatsapp. I read that it's may not work cause i'm abroad... 1st world Problems
[G4 Android Development] rocky184:
Hi, can someone please advise me where I'm going wrong.

I've unlocked my BL and download the twrp file, renamed to TWRP.img which I've placed in the adb folder.

I can boot my phone into fastboot but whenever I type "fastboot boot TWRP.img" I just get the error......

"cannot load 'TWRP.img': No such file or directory"

I've tried renaming and also downloading again but it's always the same :(
[G4 Android Development] ntnlzr:
you've to go into adb folder or tipe full path in fastboot command
[G4 Android Development] rocky184:
Thanks but I've tried that. Opened cmd window from adb folder which is where the TWRP file is, but still no luck.
[G4 Android Development] stefan.kurz:
Open the Explorer Folder on your pc or laptop in which your TWRP.img is placed. Open the terminal or cmd with press Shift+right Mouse Button.
[G4 Android Development] kessaras:
fastboot boot <twrp.img> is blocked in 29a bootloader.

do directly

fastboot flash recovery <twrp.img>

fastboot boot ............ is only useful to test if twrp actually boots. its for those who dont trust the dev :p (joking)
[G4 Android Development] rocky184:
Thank you kessaras but that doesnt work either although now only says "error: cannot load g4-twrp.img"
[G4 Android Development] steadfasterX:
It likely seems you have a name issue.

First you referred to TWRP.img now it is g4-twrp.img

You can type the first letter and then use the tab key to ensure you have the correct file name of the TWRP image.
[G4 Android Development] rocky184:
Thank you steadfaster - that worked perfectly!
[G4 Android Development] doritosblack:
Does encryption work on the latest Lineage OS build with the latest twrp beta? I have tried the latest official twrp with latest Lineage OS, but failed. Thank you in advance.
[G4 Android Development] Eskander:
It appears that the problem fixed in this old emergency beta release regarding the recovery bootloop when we try to factory reset our devices from system settings on stock roms isn't fixed in the last releases.
[G4 Android Development] steadfasterX:
No. That's why I haven't changed the title yet. Latest TWRP official or beta support N but not 100% which means all functions work but not decryption.

Google has made a big change in N regarding encryption (from Full Disk Encryption (FDE) to File Based Encryption (FBE) ). That's the main reason why I personally still stuck with MM.

But stay tuned.. I work since a while on something new which is a ROM mainly for security lovers based on N and later hopefully O.. This requires a lot of work though.. But as a side effect I will add full decryption support to TWRP for N based custom ROMs..

sfX
[G4 Android Development] sirsomething:
So what are really the downsides from installing N roms with the current stable twrp?
[G4 Android Development] steadfasterX:
As said everything works but not decryption.
[G4 Android Development] nortish:
Type on your PC:

fastboot boot twrp.img

That doesnt work for me. It get "FAILED (remote: unknown command).

Is it possible to flash it with "fastboot flash recovery twrp.img" or am I f-ing things up that way?
[G4 Android Development] DarrenNewsgroup:
2 possible problems come to mind...

1 - did you do the "adb reboot bootloader" command first? See the 1st post, section "installation". This command is mentioned a few lines before the "fastboot boot twrp.img" that you mentioned in your post.

2 - is the file on your PC called twrp.img or twrp-v3-something.img? It is simpler to rename the PC file so it is called twrp.img and then use "fastboot boot twrp.img".

It is a bit daunting the first time you flash twrp via the PC but after that you can flash an upgrade from within twrp itself.

Hope that helps

Darren
[G4 Android Development] ufocus:
If you're on nougat stock this command doesn't work anymore. Flash twrp.img and then reboot to recovery through key combo or other methods stated in OP.
[G4 Android Development] nortish:
Which command doesnt work? "fastboot boot twrp img?

I followed the OP but didn't see any special guidelines for Nougat
[G4 Android Development] ufocus:
"fastboot boot recovery twrp.img" works for MM and below.

I clearly stated to read OP or the thread even to solve it on your own. You're not the first one to encounter this. Obviously you didn't...

Use "fastboot flash recovery twrp.img" if your on nougat stock
[G4 Android Development] kessaras:
i pressed the thanks button here out of respect to your patience to repeat the same thing for over than one month ! :o
[G4 Android Development] steadfasterX:
If the recommended install method fails (fastboot boot twrp.img and so on) the recommended ways to install TWRP are:

1) when you already have root you can use the dd Install Method ( https://twrp.me/lg/lgg4.html ). After you've used that method exec: adb reboot recovery . If you skip this TWRP will be overwritten on next boot!

2) If you have *no* root the quickest way is :

fastboot flash recovery twrp.img

after this you have to take out the battery and use the key combo to go into the factory reset screen. Walk through it to bring up TWRP. If something goes wrong this will really factory reset so deleting your user data so ensure that the flash command went well!

If you skip this step or if you fail to open the factory reset screen the first time after flashing you have to reflash TWRP in fastboot and try again.
[G4 Android Development] kessaras:
safer:

fastboot reboot

hardware combo key
[G4 Android Development] ufocus:
If you time it well, it works. "Timing is key"
[G4 Android Development] steadfasterX:
This isn't safer. Tbh it's even harder your way because you need a much more better timing then when pulling out the battery and using the key combo .. ;)

But I don't judge.. I'm fine with whatever works :)
[G4 Android Development] steadfasterX:
Fresh news

due to a recurring issue when users using stock / stock based ROMs I decided to change my beta builds.

I can't support any constellation in official builds due to a change within the Android sources. So a decision has been made.

From now on:

1. ... all BETA (not official) builds can be found here:

http://droid.binbash.it:8008/TWRP

2. ... all builds will be splitted into stock, MM and N build types

3. ... all build types will have the same version number because when I start a build I do it for all (so all types will be up2date)

4. ... official will be always the latest and greatest and meant for custom ROMs (so the next official one will be for custom-N)

in short:

Hint: you can use

*ANY*

TWRP version for

installing

ROMs!

So flash with you current TWRP version and depending on the ROM you install choose one of the following TWRP versions:

custom-mm: when you want to use custom/aosp based MM based ROMs

custom-n: when you want to use custom/aosp based N based ROMs

stock: when you want to use stock / stock based ROM installed (no: customized STOCK is not custom ROM in these terms)

(OP has been updated with this hint ofc)

So why 3 different ones?

1. we need to handle STOCK different then custom ROMs to avoid the TWRP bootloop. This requires a change in the build configuration so goes deep.

In short: when I fix the TWRP bootloop for STOCK this would void OTA updates and others on custom ROMs

2. we need a MM one to support decryption for MM based custom ROMs and to stay compatible to the ROMs binaries/libraries

3. we need a N as we need the N proprietary blobs and the decryption support has changed massively here (means another deep configuration change)

I'm not responsible for any confusion :silly:

So when you are on STOCK / STOCK based I highly recommend to install the latest BETA for stock from the above URL.

todays snapshot of downloads:

133 twrp-3.1.1-BETA-21_g4_custom-n.img

93 twrp-3.1.1-BETA-21_g4_stock.img

27 twrp-3.1.1-BETA-21_g4_custom-mm.img

So I guess we can consider them as safe to use ;)

HINT: As I hard-hard bricked my device a third time now (due to unofficial unlock attempts) the current twrp versions on the new link ARE COMPLETELY UNTESTED (except for custom-N)![/SIZE]

They use the same sources then before but as the whole build process behind has been changed maybe something screwed up ... i dont think so but who knows.

If you want to test feel free and report back any issues (together with the recovery log)

sfX
[G4 Android Development] kinuris:
So, the "stock" build is like the emergency build, to avoid the TWRP bootloop, right?
[G4 Android Development] tqwzUX6fn39GZMEzSnDF:
Is there any reason to update twrp in case of lineage 14?
[G4 Android Development] steadfasterX:
dpends on your current twrp version
[G4 Android Development] ufocus:
[MENTION=5545101]steadfasterX[/MENTION] Is it necessary to change TWRP version(edition) to backup and restore appropriate ROM?
[G4 Android Development] kessaras:
Edit:

Backup and restore are the same . They make use of dd
command. In general,

twrp are unified. but ! ->> there are some special occasions where we need the specific twrp just to be 100% safe,

1) stock roms can do full restore but with a different command than aosp/los roms do it.

2) encryption

more details from [MENTION=5545101]steadfasterX[/MENTION]
[G4 Android Development] steadfasterX:
In case of the switch between stock and custom ROMs yes.

when you switch between custom ROM marshmallow and nougat it's not necessary but recommended.

it's only required (!) between custom MM and N when you make use of encryption once I get it working for nougat
[G4 Android Development] thewild:
Any reason to not use "adb reboot recovery" ?

I find the key combo to be difficult to perform. On stock Nougat with the bootloader warning, I never managed to get into recovery.
[G4 Android Development] steadfasterX:
you can use that command without any problem as long as Android is able to boot. it's up to you how you wanna enter TWRP ;)
[G4 Android Development] magiQx:
Hi,

i recently updated to nougat v29a (g4 h815) and now i cant instal twrp anymore. ("enable oem unlock" is grayed out) i tried some tutorials on how to install it but it does not work. This tutorial i used to unlock and install twrp when i was on stock MM.

i always receive this error and cant find a solution.

C:\adb>fastboot boot twrp.img

downloading 'boot.img'...

OKAY [ 1.189s]

booting...

FAILED (remote: unknown command)

finished. total time: 1.205s

any help is apreciated. Thanks!
[G4 Android Development] kessaras:
do you think that you are alone on this planet ?

there is a small box everywhere in xda app and web interface thats called "search box". Use it please. its annoying to say the same things to every single individual.

if people don't use the search box then what can we do ? repeat same thing everyday ? -_-

Remember that you are not alone. Someone else must have had the same problem.
[G4 Android Development] thewild:
Since I just had this problem, I'll save 5 minutes of your time (no more, the answer is in the TWRP thread, where it belongs) :

fastboot flash recovery twrp.img

adb reboot recovery

Enjoy.
[G4 Android Development] magiQx:
first, thanks.

second, being over 7bil i assume im not alone. i had over 10 tabs open with different "solutions" or guides. none i tried worked. For others it did, for me it didnt. I'll keep trying.

---------- Post added at 03:24 PM ---------- Previous post was at 03:22 PM ----------

Thanks for your time. Tried that, for others it worked, for me it didnt. after flashing and booting into recovery, on the screen is only the androud bot with a red exclamation mark on its opened chest and beneath taht it writes "no command"