yashsingh1/xdaforums huggingface dataset:
[G2 Android Development] 4r44444:
Anybody can please tell me how I can flash the new Version when I can't access recovery? Also thx for UPdate.

Flashing reovery.img doesn't work, now I cant access recovery and cant access System because "systemUI" is forceclosing :/ Help
[G2 Android Development] Computoncio:
You can flash recovery using dd

Example:

dd if=/pathto/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery

Phone: LG G2 D805

Kernel: Dorimanx kernel v6.7 LP D802

1st ROM : SRK-D80230f_20150926_droidth

2nd ROM : Waiting for custom recovery ;)

MODS: Viper4Android, Xposed
[G2 Android Development] 4r44444:
dd command not found in cmd
[G2 Android Development] marek_poland:
You can do it via terminal app
[G2 Android Development] 4r44444:
I cant open System so I cant open any apps so I cant open any terminal because every 1 second "system UI closed" appears.
[G2 Android Development] 60nine:
[MENTION=5031300]blastagator[/MENTION] - if we don't use f2fs, we don't need to update - correct?
[G2 Android Development] dorimanx:
There are new stuff added and selinux fixed, so yes, its good to update.

Sent from my LG-D802
[G2 Android Development] Computoncio:
You just use adb.

In cmd type

adb shell

Then the dd command.

If you don't have the adb in our pc search in xda for adb.

In stweak on tweaks tab select "DEV ROOTED ADB"

Phone: LG G2 D805

Kernel: Dorimanx kernel v6.7 LP D802

1st ROM : SRK-D80230f_20150926_droidth

2nd ROM : Waiting for custom recovery ;)

MODS: Viper4Android, Xposed
[G2 Android Development] Ibanez33:
Does anyone's home and back button not work while in recovery?
[G2 Android Development] dorimanx:
Oh... i want to report critical BUG.

i have installed 2.8.7.2 recovery.

and tried to switch my kernel to selinux to try some stuff.

when i rebooted to recovery, it's run some script for few sec and i seen that it's wiping my DATA! NOOOOOO!!!!!

(it's didnt wiped the storage!)

and reboot.

rom booted and it's empty. i lost ALL! :( man not cool. damm... all lost...

6GB lost... i feel like my home blown by bomb.

and now each time i try to reboot to recovery it's wiping my data!

there something that detect selinux and wipe data! kill it.

Reverted back to 2.8.7.1 and wiping stop.

Restoring data from 31/06/15 but i have titanium backup from this mount. so not big deal.
[G2 Android Development] sheikhramnuj:
Same thing happen to me. How you revert back to previous version? Now i can't access my recovery :(:(
[G2 Android Development] dorimanx:
i hope you have data as ext4 if not. wait for FIX.

then download flshify app.

extract recovery.img from twrp zip.

use the app to install recovery. point to recovery.img location.

this how i done it.

my data is ext4 so i had no problems with 2.8.7.1 for mounts.
[G2 Android Development] Bundizle:
happened to me today..i just thought i was mad. I was like..did i wipe my data without me knowing?? Guess am getting old..
[G2 Android Development] v.konvict:
Okay are u guys on stock based roms or cm. Cz now i am scared to reboot to recovery. I am on resurrection rmx and i just flashed the 2.8.7.2
[G2 Android Development] Bundizle:
caf roms..safest bet just titanium backup ur data u never know. But my observation is when you reboot through the rom i.e choosing to reboot to recovery is all fine but when u try to manually boot to rom is when it happens.
[G2 Android Development] v.konvict:
Thanks for the heads up

But even with that method I still got a wipe. Had to start afresh. Now installed 2.8.7.1
[G2 Android Development] blastagator:
If it makes you feel any better, this literally happened to me today :( :( Stupid PC driver wasn't working either so I had a damn brick for a few hours til I got my hands on a different PC.

I couldn't boot ROM due to bad kernel build, then bomb blow up on me too.

Rolling back to old version. Will work on it tomorrow. For now it is so late and work tomorrow :(

DO NOT USE 2.8.7.2 !!! IT is a ticking bomB!!!!

IT seems that if you are in ROM and click reboot to recovery, it works fine.

If you use the button combo - WIPE.

(or at least this was my experience.)

Much worse for me since I was using button combo to rescue broken boot.img. Had to go full stock kdz and restart from scratch!
[G2 Android Development] slayer3032:
Well the same happened to me earlier this morning when I was trying to swap bootstacks and roms :(

I forgot how disgusting and sickening that 4.2.2 was lol
[G2 Android Development] dorimanx:
I feel you my friend, after all i managed to restore all that lost, well few things lost, but nothing critical (sms, call log)

I know you will find that ugly code and delete it, or mark it as useless + warning for never merge it from sources.

we learn that we must have backup, and be 1000% sure, that our recovery, the last resort, the light in tunnel! Will not fail us :)

i will always use your recovery build, no matter what!

take the time, we have working great recovery 2.8.7.1 if data is ext4.

Sent from my LG-D802
[G2 Android Development] Computoncio:
It happened to me too when i used flashify to flash the recovery, but i selected to wipe cache and dalvik.

When the phone rebooted data was wiped but i though it was my fault, that i had select to wipe data :(

I have learned to backup when messing with recovery or testing kernels with mods by me. Now i always backup, so i didn't loose much like you or dorimanx.

[MENTION=5031300]blastagator[/MENTION] it happens when we do stuff that nobody else does. Don't let this bug bother you.

We will wait till you fix the recovery, we can flash dorimanx kernel with dd till then.

Phone: LG G2 D805

Kernel: Dorimanx kernel v6.7 LP D802

1st ROM : SRK-D80230f_20150926_droidth

2nd ROM : Waiting for custom recovery ;)

MODS: Viper4Android, Xposed
[G2 Android Development] blastagator:
Thing is, I don't have a clue what could even cause that. The only real change was turning stupid SELinux back on to permissive. It seems that wasn't hurting anything being off (it was off for many releases), so I'll try turning it back off and building tonight.

Guess I should listen to the old adage - "If it ain't broke, don't fix it!"
[G2 Android Development] Computoncio:
Maybe the "wipe data" in recovery is now working as it should.

That's my guess!!!

Just shooting to the sky and roping to hit a bird [emoji12]

I have cache and data partitions as e2fs, all the others default.

If you want me to test pm me with the link.

Making a nandroid after sending this msg, jyst in case [emoji14]

Phone: LG G2 D805

Kernel: Dorimanx kernel v6.7 LP D802

1st ROM : SRK-D80230f_20150926_droidth

2nd ROM : Waiting for custom recovery ;)

MODS: Viper4Android, Xposed
[G2 Android Development] runekock:
What about the 'update vendor branch' patch: https://github.com/blastagator/cm_d...mmit/1209d0e0836aa8bb2c6c6f67c0b51e60e38ad00d ?

(I really don't know what I'm talking about here. The patch title just sounded like it might change something)
[G2 Android Development] smartpr1v4t3:
I can only report that i have the problem with the somboons rom and the data is automatically wiped when i access the recovery. (data and cache f2fs)

After that problem i restored with kdz and tried it again because i thought did something wrong, but the same problem apaers.

Third try:

Now i use cloudy 3.3 (data and cache f2fs) with the 2.8.7.2 recovery and everything is working fine with latest dorimanx. I have Selinux set to permissive.

Maybe this information helps you for finding the error.
[G2 Android Development] casual_kikoo:
It's known that 2.8.7.2 has this bug that wipe all data. Untill [MENTION=5031300]blastagator[/MENTION] (or someone else) find and fix the issue, he recommends using the 2.8.7.1 version. And that what every one should make, cause even if the recovery added the possibility, inter alia, to backing up the bootloader, there is no need for us, "lambda" users, to install the latest version. So please mate(s), DON'T INSTALL v2.8.7.2.
[G2 Android Development] smartpr1v4t3:
Yep i know this already. I read the last posts ;)

Because blastagator wrote he has no clue what the error cause i wanna give him some information that maybe help. ;)
[G2 Android Development] blastagator:
For TESTERS:

IF ALL YOUR DATA GETS DELETED, DONT SAY I DIDNT WARN YOU!!!!

[Removed]

d800 & d802 ONLY

Be sure you backup your stuff and know how to restore! Please try reboot to recovery from within ROM as well as the button combo from power off.

Version will say 2.0.7.3

edit: Removed - Still bugged.
[G2 Android Development] Computoncio:
View attachment 3528925

Refreshing..... [emoji14]

Phone: LG G2 D805

Kernel: Dorimanx kernel v6.7 LP D802

1st ROM : SRK-D80230f_20150926_droidth

2nd ROM : Waiting for custom recovery ;)

MODS: Viper4Android, Xposed
[G2 Android Development] blastagator:
I have actually narrowed it down to this. Problem being I am stupid and delete old tree after builds were working. Will make new vendor setup and try again. The one I was actually using before I replaced because I realized I did a bunch of half-baked commits, so it was amazing that one worked at all.

Clarification: I dropped the new kernel (selinux permissive and all) into the image from 2.8.7.1 and no data wipe non-sense. Nothing else changed except the stupid vendor blobs. (And a couple minor things that if they cause this problem I'll be shocked.)

edit: Dropped old kernel into new build, still the same issue. Confirmed the kernel is definitely not the issue.

edit2: Pulling out hair. Will work on again another night :eek:
[G2 Android Development] khanjui:
My data gone too. But it's not much important for me. Keep up man! I believe you fill fix it.
[G2 Android Development] blastagator:
*deleted*

Old code recovered.
[G2 Android Development] Romagnolo1973:
Unfortunately I update TWRP witn 2.8.7.2 before Dorimanx and Blastagator warning.

How can I return tu a previous version without loose all my data? (I have a backup on my pc that can save me but inside my G2 I have 15 GB of MP3 and copy from pc to rom I lneed hours)

Using Autorec V2 that instal an old TWRP can help or in the moment it goes on TWRP puff all data are loose?

Thanks
[G2 Android Development] samuele94:
Install https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=it and write: su (press ok) reboot recovery ( press ok) like this

su

reboot recovery

and when you are in recovery flash 2.8.7.1
[G2 Android Development] casual_kikoo:
This method works well, but implies that user may have access to the ROM: the "Wipe Data Bug" occurs, apparently, when the user try to access recovery with the hardware method (let's imagine when experiencing bootloop), so we can't access a terminal emulator.
[MENTION=4413981]Romagnolo1973[/MENTION], you have to reflash the 2.8.7.1 version, either by AutoRec v.2, through recovery if you go into with the method describe by [MENTION=6103587]samuele94[/MENTION] or by dd (if you want to understand what you're doing):

-Download the 2.8.7.1 version and push it into your phone (imagine in /sdcard/Download);

-with a file explorer such as ES File Explorer, go where you push the recovery and extract the .zip file: it will give you a folder (twrp-2.8.7.1-device_model*-bump-blastagator-signed) with a "recovery.img" into it;

-open terminal emulator;

-or in CMD/Linux/Mac OS terminal

adb shell

-then

su

-let's imagine again that the folder is in /sdcard/Download: in your terminal (or in " adb shell "), type

dd if=/sdcard/Download/twrp-2.8.7.1-[B]device_model*[/B]-bump-blastagator-signed/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery

/!\ THIS COMMAND WORKS ON MY LG G2 D802, BUT I DON'T KNOW PARTITIONS SCHEME FROM OTHERS MODELS: DO IT AT YOU OWN RISK. /!\

-reboot in recovery and you'll see that you have the version 2.8.7.1

*: Be sure to replace " device_model " with your model, for me it was " d802 ".
[G2 Android Development] saspo59:
Even if u update to 2.8.7.2 and didnt activate sellinux in dori app nothing shuld happen to your files just go to recovery and flash 2.8.7.1. back this what dori said i didit exactly and all ok
[G2 Android Development] Romagnolo1973:
Thanks at both! I simply use Samuele94 method and it is perfecly working, no need to made others steps.

I put twrp 2.8.7.1 zip into SD, used terminal emulator and reboot into recovery, flash zip and reboot, everithing is working and TWRP now is 2.8.7.1.
[G2 Android Development] blastagator:
The bug seems VERY specific to only occuring when using the HARDWARE KEY COMBO to enter recovery. You should be able to boot recovery by using the Reboot->Recovery menu option in ROM.

NOTE: I am not 100% certain the bug is specific, but I have not had any instance to the contrary.

Best way to fix recovery if you have working ROM, imo, is to use flashify and flash the recovery image from 2.8.7.1
[G2 Android Development] _that:
So apparently something places a wipe_data option in the TWRP command line, into the bootloader control block, or in /cache/recovery/command. Do you have a TWRP log of that wipe? If you want to reproduce it without wiping, find the line "Factory_Reset = true;" in twrp.cpp and change it to false.

Disclaimer: If it still wipes your data after that change, it's not my fault. :angel:
[G2 Android Development] blastagator:
Thanks, I'll work on this tonight!

Update to all: I found the old blobs that worked in 2.8.7.1. Compiled and still no go. Tonight I will roll everything back to the 2.8.7.1 build and go forward from there until I find error. Starting to think maybe something changed upstream on omni-4.4 branch.... we will see.

edit: Bricked my phone again, ugh! At least kdz is easy, just annoying.
[G2 Android Development] blastagator:
I ended up being tied up with some fun personal matters this evening. However, I did get to spend some time on this - I successfully reverted everything and made a build of, essentially, 2.8.7.1 again. Confirmed the bug is gone. When I get next chance, I will slowly add the commits back in to see where things go crazy :)
[G2 Android Development] dorimanx:
Can i suggest to take 2.8.7.1 push updated kernel with all that needed for f2fs driver.

And release to reduce the problem for people with data as f2fs.

Then when you have time, we can help testing more advanced build with all new stuff.

Thanks for your hard work :)

Sent from my LG-D802
[G2 Android Development] kondzio66:
I can't enter to twrp 2.8.7.1 (freeze at twrp logo) I tried flash recovery image using dd if but still not working ;( ( I never installed 2.8.7.2).
[G2 Android Development] bender_007:
Try 2.8.7.0 , reset to defaults. Then flash 2.8.7.1

Poslano sa mog LG-D855 koristeći Tapatalk
[G2 Android Development] blastagator:
I don't know what changed in the driver, but it causes other issues. By that I mean - I restored my /data using TWRP with the new f2fs driver, then my rom wouldn't boot. It is like the same problem users of your ROM had where recovery wouldn't boot after your kernel setup f2fs in /data, but the opposite.

Not really sure how to handle it at this point. Clearly some bug somewhere, possibly in new f2fs driver (or maybe it was in old one).

Only real solution is to have all f2fs twrp users upgrade the driver in their ROM kernel. I haven't decided how to proceed. I'll probably just put the new version out with a big warning about f2fs and system hang.
[G2 Android Development] zmankiller:
Well I flashed 2.8.7.2 right before your warning, messed up my phone got on this forum saw that and I almost cried, lol that'd be the fourth time in a year I lost all my stuff. Luckilyi found the srk tool booted to recovery and now I'm downgrading the 2.8.7.1 anyhow thanks for the warning to bad I missed it, I think I'm gonna wait before getting a new recovery next time anyhow thanks for tour work
[G2 Android Development] dorimanx:
Solution is simple.

After upgrade to new recovery, need to backup your data again.

Then try to restore it, and boot.

If all ok. Then just add this instruction.

That old f2fs data, cant be restored.

Need to make new backup.

Sent from my LG-D802
[G2 Android Development] blastagator:
Can someone advise if they got the data wipe bug with /data formatted as ext4? (@dorimanx do you still use ext4?)

Thanks all.

edit: bug found. Apparently if you have too many partitions, TWRP flips out. Adding the bootloader and misc partitions is the problem.

[MENTION=4878287]_that[/MENTION] - too many partitions (or certain partitions?) causes hardware key combo to enter recovery to erase /data.
[G2 Android Development] dorimanx:
Yes ext4 here. But cache is f2fs.

And well done finding the bug :)

think what could happen if its was wiping the bootloader :eek:

Total blackness across the globe.

Holy sh@t :)

Sent from my LG-D802
[G2 Android Development] blastagator:
It is extra weird because if you reboot to recovery using ROM, it works 100% fine. Using hardware keys is only thing that causes problem. Very strange.
[G2 Android Development] _that:
There is no hardcoded limit on the number of partitions. Where did you add the bootloader partition, and why?
[G2 Android Development] 60nine:
excuse me if i'm wrong but doesn't a hardware key combo for entering twrp lead to factory reset white screen which is (in normal scenario) overrided by answering "scary questions" to enter twrp?

and when you reboot to recovery from rom - that screen doesn't pop up...

the answer should be somewhere inbetween... something that triggers factory reset like you're on stock recovery... (afaik, if you don't have a custom recovery, answering "yes" to those questions will surely wipe all your data)

just a thought...
[G2 Android Development] Computoncio:
Did you tried this [MENTION=5031300]blastagator[/MENTION]?

Phone: LG G2 D805

Kernel: Dorimanx kernel v6.8 LP D802

1st ROM : SRK-D80230f_20150926_droidth

2nd ROM : Waiting for custom recovery ;)

MODS: Viper4Android, Xposed
[G2 Android Development] blastagator:
Don't mind me. I am a total dummy - it was actually the /misc partition, which already had a note that it could cause crashes - I have no idea why it causes this issue, but apparently someone found out in the past and I was too dumb to read the rest of the fstab </facepalm>

edit: Have some other things to do, will probably have the build out Sunday or so. We shall see.
[G2 Android Development] blastagator:
November 9, 2015 (2.8.7.3)

November 9, 2015 (2.8.7.3)

-Sorry about bad 2.8.7.2 build :(

-Still built off of omni-4.4 source code. (Android-M isn't ready for a full release yet.)

-Vendor: Complete overhaul of vendor blobs, now using cm-12.1-caf branch from lg-devs

-TWRP: Make separate flags for ability to backup or restore partitions

-Device: Add ability to backup/restore Bootloader partitions

++User cannot use TWRP to restore Bootloader, too dangerous!

-Device: Removed system_image

++We don't need this for our phone and it was confusing people who didn't READ the change log

-TWRP/Device: Remove any warnings about system mount RO, this isn't important for our phone

-Device: Set max brightness to actual max (255)

-Device/TWRP: Create default brightness, set it to 175 (~68%)

-Kernel: Latest f2fs driver

++This should fix issue where ROM running kernel with newest f2fs doesn't boot

++Note: This breaks compatibility with ROM using old f2fs driver. Read note below.

-Kernel: Other commits that were needed to make latest f2fs driver work

-Kernel: Config changes that might allow encrypted f2fs to work now!

-Kernel: Enable SELinux

++Before I accidentally completely disabled, now it should boot Enabled, but in Permissive mode.

-TWRP: More tweaking to recreation of media folder / setting internal storage path

-Device: Remove integrated supersu

IMPORTANT - f2fs /data note: If you restore OLD backups, you will probably cause ROM or recovery (or both) to hang! This is obviously bad because your only option at that point is doing a back to stock kdz. To avoid problems, make NEW backups AFTER upgrading to the new version of TWRP. Backups made with 2.8.7.3 can be restored with 2.8.7.3 without causing issue.

All should work fine. Should be a safe build again. I did make some changes to the actual TWRP code & submitted patches to their gerrit, but I am fairly confident we're back in business.

Also of note - I can't believe it has been a year since I started this project!
[G2 Android Development] Computoncio:
Just flashed 2.8.7.3 rom booted ok, no issues.

Thanks for giving me access to recovery again :good:

Now issues/glitches i found.

When i backuped in recovery (choose all) it backuped o lot more partitions than i choose.

I tested the repair in wipe option, it repaired data and cache but it tried to repair system using e2fs repair and not ext4 repair.

I have data and cache in e2fs, system is ext4.

Logs attached if you want to take a look.

Data partition erase bug not found :good:
[G2 Android Development] blastagator:
"Bootloader" is a pile of partitions, even though just listed as one item, so this is the intended action.

e2fs is for ext4, f2fs.fsck is for f2fs. Log reflects proper function - e2fs on the ext4 patition, and fsck.f2fs on the f2fs partition.
[G2 Android Development] KpKi:
If I formatted cache partition only to f2fs, will I lose data ?
[G2 Android Development] Computoncio:
As i was saying..., excelent work Blastagator, thanks very much for all the work you have done.

No you won't, you can flash v2.8.7.3 it's working as it should.
[G2 Android Development] 0xetrov1:
Interesting, after flashing the latest version I can't boot into Recovery, but the ROM, which I am using now (CM12.1) boots completely fine! :D

Error: Fastboot

EDIT: I've flashed again, using Flashify, and everything works perfect, using /cache as F2FS
[G2 Android Development] barturblits:
Could you specify the version of your f2fs driver? Any idea on how to check the version of the current driver in my ROM?
[G2 Android Development] dorimanx:
New f2fs driver in recovery, support older code.

so its not really matter.

Just do backup of all f2fs partitions with new recovery.

All the rest, is irrelevant.

Sent from my LG-D802
[G2 Android Development] 7HUND3R:
So I can simply format /cache to f2fs without losing any data and gaining some performance because f2fs is faster than ext4? Am I right?
[G2 Android Development] desirexel:
Working great.
[G2 Android Development] smartpr1v4t3:
I only wanna report everything is Working fine after upgrade From 2.8.7.2 to 2.8.7.3

Thanks blastagator!
[G2 Android Development] dorimanx:
Yes but you will not gain anything by converting cache. Its not effect anything. Cache used when installing apps, and maybe for other brif operations. No noticed performance boost.

Sent from my LG-D802
[G2 Android Development] lollipo:
I've installed the latest version and I am using stock rom with dorimanx.

Unfortunately I cannot enter recovery. It stucks at the loading screen and after a while the phone boots the os.

Can anyone help me?

Thanks in advance
[G2 Android Development] blastagator:
Are you sure it was 2.8.7.3? Use flashify to flash 2.8.7.3. If it still hangs, try flashing 2.8.7.1.
[G2 Android Development] SREEPRAJAY:
Thought I could remind you for the correct button combination...different boot loaders different combinations....a reminder because simple things are the ones we miss usually...
[G2 Android Development] v.konvict:
Just download reboot recovery from playstore if u dont wanna play around with different button combinations. Thats wat i am using
[G2 Android Development] samuele94:
For d802 it's Power vol- release at logo and press power vol- (confirm with power) or power vol- release at logo and press vol+ vol - (confirm with power and navigate with vol+ vol - )
[G2 Android Development] SREEPRAJAY:
Yes sir. I know that :) , I was only reminding him that there are different key combinations
[G2 Android Development] lollipo:
Thanks for your reply. I figured it out. I deleted the twrp folder in the sd card directory and then it booted. Strangely my twrp version was 2.8.6.1. even though I had 2.8.7.3. before (for sure).

I already had that problem once. Do you know why? I had updated twrp by flashing the zip and after rebooting, I had the new version. But how did twrp downgrade itself?

2.8.6.1 was the version I had when I flashed twrp using autorec.