yashsingh1/xdaforums huggingface dataset:
[G4 Android Development] steadfasterX:
New PREVIEW releases

read more about PREVIEWS and the <flavor>'s in the OP (what they are and

when to use

)!

BREAKING NEWS

I decided to create a Telegram group for all stuff around Android : here

and another one if you want to keep up2date whenever I build something (TWRP, SHRP, LOS, /e/, ...): here

twrp-3.4.0-PREVIEW-230_g4 for N, O, P and datamedia

Release date: 2020-08-20

Status:

without

data/media patch*: considered to be STABLE (exception:

P

which is in

BETA

but only bc decryption does not work here)

including

data/media patch*: UNSTABLE (known issues for backup & restore) (note: datamedia builds have been paused until further notice)

Summary changelog (read the linked changelogs above for ALL changes):

fix encryption in rare cases (data corruption, downgrading). Details: here

choosing factory reset will now erase the encryption metadata

automatically

and it is possible to do that

manually

as well (wipe menu).

When your device is encrypted and you erase that partition manually you will not be able to boot anymore

add option to backup the encryption metadata (recommended to choose when you have encrypted your device! re-do a backup whenever you change your password/pin in Android then as well)

TWRP sources changelogs:

without data/media patch

including data/media patch (note: datamedia builds have been paused until further notice)

Flavor specific changelogs:

Device tree: P flavor

Kernel: P flavor

Device tree:O flavor

Kernel: O flavor

Device tree:N flavor

Kernel: N flavor

MM flavor has reached its

END OF LIFE

Download:

without

data/media backup/restore: sfX leech server (compatible with all G4 models and containing all flavors)

including

data/media backup/restore: sfX leech server (note: datamedia builds have been paused until further notice)

*Notes:

Since build #191 I split regular TWRP builds:

without

my data/media patch and those

including

my experimental data/media patch - as it turns out it is not as production ready as thought.

The data/media version can be found from now on here only: http://leech.binbash.rocks:8008/TWRP/datamedia/ and it is always based on Android Pie (almost identical to the P flavor - just with the datamedia patch on top). It will also lack behind as the TWRP sources need to be manually included from upstream and I do that rarely only.

The new and

high experimental

feature to backup data/media (so your internal storage) is a WIP (work in progress) but I would love to hear your feedback of the current implementation and the current known issues.

If you encounter any issue check the known issues first and if it is not listed share the recovery.log or even better open a new issue there.

.-
[G4 Android Development] steadfasterX:
ANNOUNCEMENT

for convenient reasons I provided several flavors in the past: MM, N, O and P.

Official

TWRP is still on O and I will keep it like that until I find the time to fix decryption in P.

Anways.

The thing is time goes by and offering these flavors becomes harder to maintain in the future.

I am not just doing the ROM's, TWRP and SHRP for the LG G4 but also for other devices like gtexslte, j5y17lte, fajita and soon hotdog.

so long story short, the flavors are EOL (End of Life) -> soon:

- Preview MM: EOL for longer time already

- Preview N: EOL with next build (>230)

- Preview O: EOL with next build (>230)

-

Official

O: ongoing - until P can decrypt (if ever)

- Preview P: ongoing - no EOL (yet)

Downloads of the EOL flavors will stay avail ofc.

The upcoming build (will drop soon) contains a fix for OTA support - which itself can cause a recovery bootloop - read all the details here.
[G4 Android Development] steadfasterX:
Correct. see https://forum.cyanogenmod.org/topic/122600-unable-to-unlock-encrypted-device/#comment-596099

.
[G4 Android Development] KingPin6:
hi, one more vote for the h811, I would love to be able to upgrade my CM install. thank you.
[G4 Android Development] steadfasterX:
Announcement

TWRP v3.0.2-1 contains all my changes up to my build #162.

That means my changes have been merged and I'm the official maintainer for this device now.

That also means that v3.0.2-1 and my build #162 have the same functionality.

I will continue providing beta versions if they come before sending them upstream.

And again: I'm the maintainer not a TWRP developer :rolleyes:

Ok got it ;) I will try it but no promises when...
[G4 Android Development] steadfasterX:
Thanks but you didn't followed the FAQ completely:

Besides the above tell me:

ROM name or say "STOCK"

ROM version ("LL" or "MM" - if you can tell me the build number as well)

Encrypted device or not
[G4 Android Development] skdubg:
latest build of OmniROM 6.0.1

no decryption
[G4 Android Development] steadfasterX:
Ok I checked the log and here is the solution (hopefully):

Boot into twrp

Menu Mount: select Data to get it mounted

On your PC:

adb shell rm /data/system/time/ats_2

adb shell rm /data/time/ats_2

One of the above adb cmds may fail but that doesn't matters.

Now reboot into recovery again and the time should :fingers-crossed: be fine.

After you switched from STOCK to OMNI you may have not wiped your data partition correct?

The above commands deletes artifacts left over from your STOCK installation.

Let me know if that solves your problem and if not send a link to your new recovery.log pls.

.
[G4 Android Development] TecknoFreak:
Damn I envy you guys, any love for h811?
[G4 Android Development] bxmoney181:
Others asked already. Time to be patient.
[G4 Android Development] popy2006:
Does the official twrp 3.0.2.1 supports f2fs?

Gesendet von meinem LG-H815 mit Tapatalk
[G4 Android Development] steadfasterX:
Popy I wrote:

TWRP v3.0.2-1 contains all my changes up to my build #162.

That also means that v3.0.2-1 and my build #162 have the same functionality.

So... :confused:

.
[G4 Android Development] popy2006:
Thx.

I was thinking that just your code was merged and just to be sure I have asked ?

Gesendet von meinem LG-H815 mit Tapatalk
[G4 Android Development] steadfasterX:
Oh no problem just ask ;)

So yes it is my code, my configs, my kernel and my build config.

The only difference is the way it is actually build. Twrp uses Jenkins to build. me not.

.
[G4 Android Development] popy2006:
Thx, for clearing things up.

OT: which rom you are using? Cm13 based or stock?

Gesendet von meinem LG-H815 mit Tapatalk
[G4 Android Development] steadfasterX:
CM 13 based: RR http://tinyurl.com/RRh815

.
[G4 Android Development] popy2006:
thx, i am also on this rom.

today i have tried Imperium 5.0, but had bad wifi issues (just 40% signal 2m away from ap and 5 ghz was not picked up).

Back to RR and all is good ;)

pOpY

<OT-END>
[G4 Android Development] marn3us:
Hi [MENTION=5545101]steadfasterX[/MENTION], first of all thanks for the amazing job on revamping our G4's recovery! :)

If you don't mind, I would love to ask you if it's possible to slightly tune the kernel you have implemented in TWRP (Llama). Let me explain better: Llama's default I/O scheduler is bfq with small read-ahead size, but based on accurate tests here on XDA (and personal test) the best one is ZEN (close second is SIO).

If you could thus tweak your TWRP to have ZEN I/O scheduler and 2048Kb read-ahead size for ExternalSD card we would have a faster I/O performance, which is very noticeable when doing large backups and ROM installations ;)

Thanks in advance!
[G4 Android Development] steadfasterX:
Good catch. Will look into it.

Thanks for pointing!

.
[G4 Android Development] marn3us:
No problem, thanks again for your great work! Keep it up! :)
[G4 Android Development] steadfasterX:
i have opened an issue at GitHub for this: https://github.com/steadfasterX/android_device_lge_h815/issues/2
[G4 Android Development] PeeHoo:
Hi!

Sorry to bother but I've tried multiple times and I still can't boot to the recovery:

fastboot boot lgg-twrp-h815.img

downloading 'boot.img'...

OKAY [ 0.904s]

booting...

OKAY [ 0.400s]

finished. total time: 1.306s

after this phone reboots normally...
[G4 Android Development] steadfasterX:
Which twrp version ? Try an older one maybe..

Which OS?

Which fastboot version?

Btw:

The console output seems to incomplete. Please rename your twrp image without dashes like simply "twrp.img"

It seems that the file gets not downloaded to your device because I miss the bytes count when downloading but maybe that is because you use an older fastboot version.

.
[G4 Android Development] skdubg:
thanks.

time/date is now correct :good:
[G4 Android Development] steadfasterX:
So... I had some spare time to check the difference between h811 and h815.

The result is .. They are identically? :confused:

http://www.phonearena.com/phones/LG-G4_id9104 (scroll down for the "diff").

The only thing i found was that h811 means it is network locked to tmobile.

Please correct me if I'm wrong ..

.
[G4 Android Development] bxlegend:
I've assumed that to be the case (aside from differing bootloader's and kernels). Sadly I will no longer have the H811 in a couple of days. Two of mines suffered the boot loop and T-Mobile no longer have any stock of the leather variant (besides having a leather back, the hardware looks much better) and they've sent me a galaxy S6 as a replacement. Thanks for taking the time to look into this.
[G4 Android Development] RogerF81:
There is a bug in the new official version: Once the screen turns off while you are in TWRP, you cannot turn the screen on any more no matter what I'm doing.
[G4 Android Development] steadfasterX:
Do you have an USB cable connected?

What happens if you have it removed/connected?

Did you tried double tap?

Where is your recovery log? --> Pls check the FAQ #4 "What Logfiles have to be provided and how?"

Thanks

.
[G4 Android Development] RogerF81:
Yeah, but unplugging and reconnecting didn't change anything, charging neither.

Also double didn't work.

Recovery.log is now attached.
[G4 Android Development] steadfasterX:
strange. All that works for me (and others)..

So could you pls follow the FAQ #4 -->

B)

step by step and provide the logs?!

Afterwards install http://xdaforums.com/devdb/project/dl/?id=20364

and do the same steps again and report if that other build is working for you..

Thanks

.
[G4 Android Development] RogerF81:
The other build was working.

Here are the logs (I was not able to extract logcat, there was always an error:

logcat -d -b all > /tmp/logcat.txt
logcat -d -b all > /tmp/logcat.txt
logcat read failure

recovery.log

dmesg.txt
[G4 Android Development] zeduck:
I can't encrypt my device.

On a fresh CyanogenMod 13 installation, I went to Security settings and I chose Encrypt device.

So the phone reboot, displayed a green Android and then try to reboot on CyanogenMod.

It took more thant 2 hours and didn't come to an end, so I force the shutdown.

At that point, I couldn't boot my phone anymore.

So I went to recovery mode and ask to wipe all data.

Then my phone boot again but do not show anything else than the background.

Is it ROM related or recovery related?

ROM is fresh CyanogenMod 13 and recovery is TWRP 3.0.2-1 for H815.
[G4 Android Development] gentr:
Enter in download mode and flash kdz with lgup
[G4 Android Development] zeduck:
I've managed to reflash clean CyanogenMod 13.

It seams that problem occurs when you have root installed.

So I removed root and my device is now correctly encrypted: there is a prompt for my pin on startup.

All boot fine and I have to enter my SIM pin.

Then, I want to unlock my device but CyanogenMod tells me that my pin (previously used to decrypt the device) is not correct.

Did someone experienced this?
[G4 Android Development] steadfasterX:
wipe again and link the recovery log. As mentioned in the OP and in my FAQ I cannot give support without it.

I cannot say for pure CM but the most custom roms will not allow encrypting the device. For sure it will never work if you root with supersu. The reason is that supersu will modify the boot image which prevents encrypting. In that case you need to flash without root then encrypt then root.

This was the order I used for RR..

.
[G4 Android Development] zeduck:
I'm not sure if that is what you want.

I reboot to recovery and export dmesg.

https://paste.omnirom.org/view/303e55c9
[G4 Android Development] steadfasterX:
This is well known:

https://forum.cyanogenmod.org/topic/122600-unable-to-unlock-encrypted-device/#comment-596099

There is another option : deleting a specific library but that my have site effects nobody knows.

.
[G4 Android Development] steadfasterX:
No...

I meant my FAQ #4 "What Logfiles have to be provided and how?"

But as you have a working solution now and your problems regarding booting up is not twrp related you don't need to provide any logs. I need the logs when you still have problems with twrp only.

.
[G4 Android Development] marn3us:
Hi [MENTION=5545101]steadfasterX[/MENTION], any news on the small kernel tweak I suggested last week? :)
[G4 Android Development] steadfasterX:
Hi

No..

RL consuming all my time atm.. The changes you requested making sense and will be added but I have no timeline for you.

.
[G4 Android Development] marn3us:
Don't worry, I'm not in a hurry! Enjoy RL!

I have been doing some additional research on my own and I came to the conclusion that FIOPS scheduler is even faster than ZEN for doing backups and large file transfers ;)
[G4 Android Development] MadcapCries:
hello all

I'm not using a mod, as I tell you before, do you still need an hand, could provide some log or other useful things
[G4 Android Development] steadfasterX:
Afair you were on stock and wanna help decrypting it right?

The problem is that I tried to trace the problem but the stock encryption is made totally different then CM.

I tried to start tracing the regular boot process. That means I build a boot image based on stock which traces the decryption but unfortunately without any new insights.

Currently I'm out of ideas. The libraries needed are all there.. maybe it isn't he way twrp starts decryption but who knows. I will not give up yet but a little bit stuck..

.
[G4 Android Development] PhrostB:
Would it be possible to update H811 to the latest version as well?
[G4 Android Development] steadfasterX:
Try the h815 version and please report if that works. The reason is when it comes to twrp(!) the specs are identical for both h815 and h811. so the h815 version should work for you as well.. Please let me know your results!!

.
[G4 Android Development] PhrostB:
Seems to work fine. Thanks for the tip :)
[G4 Android Development] steadfasterX:
Great thats what I thought but there were no testers yet ;)

Do you use an encrypted ROM? If so: Which one?

Could you do me a favor?

Create a backup with the latest h811(!!) twrp first. That means you need to install the twrp version again for the h811.

This is just for sure that you have everything in place should something goes wrong. Do a full backup including EFS!

Then install the h815 twrp and create a full backup again with that version. Do not leave twrp yet.

Now try a full restore of the backup made with the h815 twrp. Before you restart the system there is a last thing I need - the recovery.log. Check FAQ #4 A) for a how-to including a how-to upload that:

http://xdaforums.com/g4/development/recovery-twrp-3-touch-recovery-t3442424/post68249027

If you want to help even more you could also follow FAQ #4 B) as well.

Then as the last step you should restart the system which should just work.

Would be great if you can do all that. This ensures that this twrp is working as it should!

.
[G4 Android Development] PhrostB:
ok I have the first log. I'm not encrypted. running CM13 one of the latest nightlies (like 2 days ago maybe)

http://www.filedropper.com/recovery_8

second recovery log: http://www.filedropper.com/recovery_9

dmesg: http://www.filedropper.com/dmesg_1
[G4 Android Development] steadfasterX:
Great thanks!

The logs are looking great and they tell me that backup & restore working fine for the h811 model as well.

Thanks for proving this!

.
[G4 Android Development] PhrostB:
no problem. Are you going to upload an official h811 version so we can update our roms easily?
[G4 Android Development] steadfasterX:
yes! this is in the works atm.

I'm currently waiting for the main devs to handle that merge correctly.

I will provide an update here when done.

.
[G4 Android Development] PhrostB:
ok thanks :D
[G4 Android Development] popy2006:
[MENTION=5545101]steadfasterX[/MENTION]:

I' get the following error (in german) when i'll try to restore a backup made with data & cache formated as f2fs on ext4 (data & cache):

Prozess ExtractTarFork() endete mit Fehler: 255

I have done the following:

My device was running RR 5.7.4 (Android 6.0) with data & cache formated in f2fs

made an twrp backup

changed file system of data & cache back to ext4

wiped everything (system, internal storage incl. data, cache, dalvik...)

installed cm14

wiped everything (ill know file system is currently ext4)

restored backup of RR

now ill get this error

ill know i restoring an f2fs backup to ext4 filesystem/partitions.

My question is how does twrp stores the filesystem information any why?

Backups are compress with tar (correct my if i am wrong), so why does twrp need this information?

Just to format the partion before restoring?

When tar gets extracted it doesnt depend ony any filesystem, it just extracts the files -> like zip, right?

The only sign of an file system i have found is the file name of the backup "data.f2fs.win000".

So in my case twrp trys to format an ext4 partition with fs2fs format cmd?

Could ill just rename the files to ex. "data.ext4.win000" ?

thx

pOpY

Update:

This worked for me! Just renamed the files with ext4 in filename and restore was working!
[G4 Android Development] steadfasterX:
Yes all totally true.

the error regarding restoring to another file system is a known behaviour and as you already saw the file system info is in the file name only.
[G4 Android Development] popy2006:
Thx for confirming!

Would be nice if this gets fixed someday ?

The following behavior would be better :

Try to format the Filesystem of the destination partition from file name.

If that fails, don't abort, just give some log message.

Try to format it in its current Filesystem.

Just my ideas about this behavior.

Thx pOpY

Gesendet von meinem LG-H815 mit Tapatalk
[G4 Android Development] steadfasterX:
I saw a talk with the devs about that some weeks ago so they are aware about this and may fix that some day.

That's the way it goes with open source: Providing a possible solution can be made by everyone!

See the main devs as project leaders only. they give the main direction and they are limited in time and resources. Especially when one keep in mind that this all is a hobby for all of us.

You may have not the skills yet but everyone is able to learn!!! ;)

The other way (which is slower and without any guarantee that this will be included some when) is open an issue at github. maybe you have luck and there is someone else who could do that for you but the idea of open source is to learn and give back to the community what you're able to give.

So you know what to do now :cool:

.
[G4 Android Development] popy2006:
Hey, thx for the info.

I am a c / c++ / c# developer in my company, so the problem are not the skills :p :cool:

Its real life (family) and free time.

But i have BIG respect of guys like you and any other dev which is involved in such great open source projects like recoverys, roms and so on :good: :good: :good:

pOpY
[G4 Android Development] steadfasterX:
amazing :cool: you're predestined for providing a patch ;) ....more then the most!

For sure I understand that free time is luxus but don't give up on trying to find some ;)

It's the same for me btw. I have weeks (actually the case) where I cannot do anything else then writing some comments / answers here and sometimes I can spend a whole day on coding something.

Thanks anyway for your feedback of course :)

.
[G4 Android Development] :
Which library would that be?
[G4 Android Development] FadeFx:
I came across the same error while restoring a backup recently, however, I did not change any partition filesystem. Any idea what else could be the reason?

Also it is a bit complicated to manage multiple backups while time is not working correctly, will this ever be fixed, or is it just unfixable due to Qualcomm time system?

Gesendet von meinem LG-H815 mit Tapatalk
[G4 Android Development] popy2006:
Sorry, I dont have an other fix for the restore issue. Maybe a manual wipe of the partion helps?

I don't have the time issue!

It's fixed, for cm roms and I think for stock also.

pOpY

Gesendet von meinem LG-H815 mit Tapatalk
[G4 Android Development] steadfasterX:
Time is working correctly for both stock and CM! Which twrp build?

You have to use 3.0.2-1 or my test build in download section.

If you switched from stock to CM/AOSP without doing a factory reset then you have to delete the stock time files before time will work. For this I need the log.

Regarding the error it is the same as usual. Read the ****ing FAQ #5 on this thread.

Please follow at least FAQ #4 A. No support without!

http://xdaforums.com/g4/development/recovery-twrp-3-touch-recovery-t3442424/post68249027

So to sum up: I need the logs when the error happens.

.
[G4 Android Development] steadfasterX:
I hate to quote myself but it seems it is necessary even when posted just before your post...

So please read and follow:

It may has to do with the selection you made.

Which twrp version? Always use the latest available.

.
[G4 Android Development] steadfasterX:
Hi marn3us

Could you test this one here please: http://xdaforums.com/devdb/project/dl/?id=21671 (removed)

thanks

EDIT:

Sorry, just found a bug after tested it on my second device. Please use this one instead: ;)

http://xdaforums.com/devdb/project/dl/?id=21673

.
[G4 Android Development] gentr:
can not back to previous version 3.0.2-1
[G4 Android Development] steadfasterX:
interesting. please

upload recovery.log!

--> FAQ 4-A) http://xdaforums.com/showpost.php?p=68249027&postcount=3

For manually installing the previous one:

adb shell "dd if=/external_sd/twrp-3.0.2-1-h815.img of=/dev/block/bootdevice/by-name/recovery"

.
[G4 Android Development] gentr:
upload hire https://paste.omnirom.org/view/5e0f47e5
[G4 Android Development] steadfasterX:
there seems to be no error in the log?! You have to re-produce the error and then get the recovery.log. Otherwise I cannot see anything there ;)

.
[G4 Android Development] gentr:
Upload again