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

read more about the <flavor>'s in the OP!

twrp-3.2.2-PREVIEW-129_g4_<flavor>

Status: stable

Release date: 2018-07-06

Download: sfX leech server (same download for all G4's)

Kernel: preview builds compile the kernel on build automatically (official not) - so the kernel differ between official and preview

Difference to

PREVIEW-127

:

N: md5sum check fixed (upstream fix requested)

O: md5sum check fixed (upstream fix requested)

sorry no MM backport for this (and not planned to do so)

Big thanks:

goes to [MENTION=8699949]ThePiGuy[/MENTION] who actually found that bug and tested my fix!

Blame:

TWRP code - its not my fault ;)

Background:

you may saw in several places (e.g on my leech server) a zip file or img file and then the same filename but with the extension "md5sum" or "md5".

Example: lineage-15.1-20180704-UNOFFICIAL-h815.zip and lineage-15.1-20180704-UNOFFICIAL-h815.zip.md5sum

When you flash a file in TWRP and have the exact same filename but with the extension "md5sum" or "md5" in the same directory TWRP will verify the integrity of the zip/img file.

Why is that important? Often enough a download seems to be fine or you pushed a file to the device without an error but .. it nevertheless somehow getting corrupted (there are several reasons why that can happen which I do not discuss here in detail).

So doing that integrity / md5sum check ensures the zip/img you are about to flash is valid and not corrupted/changed in any way.

An idea what happens when flashing a corrupt ROM zip? soft brick or unexpected ROM behavior at least.

Since a long time files with the extension "md5sum" got completely ignored by TWRP (I'm pretty sure this commit on Jun 17, 2017 brokes it).

TWRP 3.1.1 is the last known version were the md5 check was still working.

This does not affect the file extension "md5" - only "md5sum" extensions were ignored.

.. and to make things worse: all ROMs you can find use the md5sum extension in their build scripts! so it affects the most important ones (imho).

You will see no error in TWRP about that (thats why it was not get detected so long) and its hard to do so as md5sum extension .. was just not expected to be there.

My fix is send upstream and has been tested successfully so I hope it will be merged to the official code soon... - until then all N and O PREVIEW builds will auto-patch the above so having my fix included (from #129 on).

.
[G4 Android Development] tmvkrpxl0:
Rom is Stock

Version is MM

and Not encrypted

Did i made mistake? i don't know why device name is LG-UsU

dmesg: https://paste.omnirom.org/view/3c9034fa

recovery: https://paste.omnirom.org/view/f578aa1d

and Thanks to post UsU post i can root my device now!
[G4 Android Development] steadfasterX:
Read and follow FAQ #25a) in the UsU thread.
[G4 Android Development] kevan_f275:
Soft Brick of LG G4

Soft Bricked my LG G4, got as far as flashing the ROM onto the device through TWRP but it wont install. Kept getting error 7 even after re-flashing the rawres and laf files. tried brute forcing throught error 7 by changing updater script but am now getting error 6 messages. I have tried multiple ROMs not that it made a difference. I cant post a link so I'll PM anyone the recovery if they think they are able to help.

regards.
[G4 Android Development] ThePiGuy:
Update TWRP?

What was the error output by twrp with the error 7 (that's a generic error)
[G4 Android Development] kevan_f275:
I'm fairly certain I'm using the most recent version of TWRP the code said that the rom was for LG G4 h815. I think my phone thinks its not a G4 anymore because it only shows up as LG_UsU when connected to my laptop...
[G4 Android Development] steadfasterX:
Uhm I answered you already!?

https://xdaforums.com/g4/general/unlock-unlock-lg-g4-device-usu-t3760451/post77377095

I told you what to do with the url to be able to post it.

I told you that without the recovery log you can't get any help.

I also told you that just a recovery log without the error is useless.

I also asked what you mean by soft brick as I can't see you have one from what you wrote.
[G4 Android Development] steadfasterX:
Latest Official release

twrp-3.2.3-0

Release date: 2018-08-06

Download: https://twrp.me

Device Tree changelog: (no changes)

TWRP sources changelog: twrp-3.2.2-0 <--> twrp-3.2.3-0 (previous official vs. current official)

Summary

changelog:

Yea they merged my md5sum fix :)

https://twrp.me/site/update/2018/08/06/twrp-3.2.3-0-released.html

Latest PREVIEW release

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

when to use

)!

twrp-3.2-3-PREVIEW-132_g4_<flavor>

Status: stable

Release date:2018-08-20

TWRP sources changelog: github-source

Download: sfX leech server (same download for all G4's)

Kernel: preview builds compile the kernel on build automatically (official not) - so the kernel differ between official and preview

Device Tree changelogs:

MM flavor

N flavor

reduced size like in O (means you need at least a MM bootloader stack to run N previews from now on)

O flavor
[G4 Android Development] SeewolfPK:
I use twrp-3.2-3-PREVIEW-132_g4_<flavor> now.

I make a Backup with this version and now a restore, after trying another rom.

Backup 100% is shown on screen, but now nothing happens since some minutes.

I will wait 2 more minutes and then i will restart my phone. Therefore i must take out the battery.

I boot again into recovery and from there to system but got the message: no os installed.

Could not install os before wipe dalvik/system and cache.

Update: Install https://eu.dl.twrp.me/g4/

This Version works for me
[G4 Android Development] steadfasterX:
Well without a recovery log.. if the UI does not react pull it with adb when the restore stucks:

adb pull /tmp/recovery.log
[G4 Android Development] SeewolfPK:
Update: Install https://eu.dl.twrp.me/g4/

This Version works for me

So I can not make log.
[G4 Android Development] steadfasterX:
Anyone interested in testing a brand new TWRP feature?

I am currently modifying TWRP in a way that you can backup even your internal storage like pictures and photos and videos and such.

The state is still alpha and needs a lot of testing and some things are not implemented yet. Just to warn you ;)

I would be glad to have one or two other testers as well to see if my main concept works as expected.

the long term plan is that this patch for TWRP will be sent upstream to include it in all official TWRP versions for all devices!!

I have discussed this with the main TWRP devs and the chances are good that this will be accepted ( it's the HOW which may will take a while )

Here is an overview of the concept if interested:

https://github.com/steadfasterX/boo...ork/wiki/Internal-Storage-(data-media)-Backup

If interested send me a PM with the subject:

"TWRP data media"
[G4 Android Development] tmihai20:
I have read about this. Will this be configurable? Maybe some of us do not always want to backup everything, including internal memory.
[G4 Android Development] steadfasterX:
take a look at the linked wiki page pls.

.
[G4 Android Development] tmihai20:
[MENTION=5545101]steadfasterX[/MENTION]: that looks perfect, at least from a user point of view.
[G4 Android Development] aoleary:
I:Error writing destination fd (Operation not permitted)

Hi [MENTION=5545101]steadfasterX[/MENTION]

I get an error when trying to backup with TWRP.

I have 14.5 GB free on my external SD Card, and backup requires 13.2GB, so disk space should not be an issue...

Backing up System Image...
I:Reading '/dev/block/mmcblk0p47', writing '/external_sd/TWRP/BACKUPS/LGH815309be46a/Atomic-OS 2018-09-18/system_image.emmc.win'
I:Error writing destination fd (Operation not permitted)
Backup Failed. Cleaning Backup Folder.

Full log here: https://del.dog/lacunorebi.pl

I tried with both 3.2.1 and 3.2.3 with same result..

Kind regards,

aoleary
[G4 Android Development] steadfasterX:
Do not check system IMAGE. That's nothing you want and just there as a fallback. I guess I'll remove it in one of the next versions. The main reason why that exists was due to TWRP in FIsH (TWRP on unlocked devices). Now as we all can unlock it's not needed anymore and should be removed.

Technical background:

Your sdcard is not formatted with a modern file system like ext3/4 or ntfs so you can't write files bigger then 4GB and a system IMAGE(!) exceeds that limit
[G4 Android Development] regsnerven:
Just a quick info: The date and time was wrong when I first flashed Lineage OS 15.1 (coming from "official" Nougat). But after a complete factory reset and a wipe of system, dalvik etc. and a boot into Android, followed by a reboot into recovery, the time is correct.

Maybe it is just the transition before the first flash?

The laggy interfaces appears here, too. I had this on another phone before. But I find it to only be a real problem on screen unlock, because it makes it hard to really control the slider.

Aside from that: great work :)))

Thank you!
[G4 Android Development] steadfasterX:
It's known and mentioned a lot of times already that you need to boot once into android to have a correct time in TWRP. While TWRP itself is doing magic things there is no automatic time sync which can happen here as there is no network connection. It just reads the time offset of the real time clock. That offset is set in android when you set the correct time. Once set TWRP will read that offset and knows the time too.

Laggy interface is nothing I can see here. It just happens to some ppl (maybe a result of flashing different TWRP versions) and you should reset TWRP to defaults in the settings which helped some.

.
[G4 Android Development] grantdb:
Laggy interface is non existent for me however if you mean that the unlock slider being a pain I kind of like that because it has prevented me from doing wrong wipes and deleting partitions accidentally etc
[G4 Android Development] steadfasterX:
Latest PREVIEW release

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

when to use

)!

twrp-3.2-3-PREVIEW-136_g4_<flavor>

Status: TESTING

Release date: 2018-10-12

TWRP sources changelog: github-changelog

Download: sfX leech server (same download for all G4's)

Kernel: github-changelog (preview builds compile the kernel on build automatically (official not) - so the kernel differ between official and preview)

Device Tree changelogs:

O flavor

N flavor

MM flavor

Summary changelog:

HIGH experimental: all #136 builds include my Internal Storage backup patch (state and details: here).

Thats the main reason why the "Status" is "TESTING" for this build.

kernel update

removal of

image

backup option for the system partition (more details in the commit)

The brand new and

high experimental

feature to backup your internal storage is a WIP (work in progress) but I would love to hear your feedback of the current implementation.

If you encounter any issue just share the recovery.log.

.
[G4 Android Development] obvious:
[MENTION=5545101]steadfasterX[/MENTION] Does the option to backup internal storage magically disappear if no SD card is inserted? If so, great. Just flashed and option not there. Haven't got SD card handy at the moment.
[G4 Android Development] steadfasterX:
Yes external sdcard is required. Also ensure that the internal storage backup is enabled in the TWRP settings
[G4 Android Development] adam_s_459_:
I tried the latest preview on my H812, and here are the results: it backed up everything fine, but restoring the datamedia failed. The log is attached to this post. :good:
[G4 Android Development] steadfasterX:
Great thx for the log.

Could you please share the output of:

Thanks
[G4 Android Development] adam_s_459_:
here is the output of the command.

h815:/ $ ls -la /external_s/

I-search:

PS/LGUSU853aa8b5/2018-10-13--13-33-43_lineage_h815-userdebug_810_OPM6171019030K1/ <

ls: /external_s/TWRP/BACKUPS/LGUSU853aa8b5/2018-10-13--13-33-43_lineage_h815-userdebug_810_OPM6171019030K1/: No such file or directory
[G4 Android Development] steadfasterX:
No while in TWRP pls and ensure you copy the whole line and not cut it anywhere

thx

.
[G4 Android Development] adam_s_459_:
ofc, sorry here is the output of the command attached
[G4 Android Development] kessaras:
[MENTION=5545101]steadfasterX[/MENTION], yup he is right.

attached two logs. (I am encrypted and decrypted fine)

1 log after backup

<i reboot to recovery>

<i try restore backup>

failed with error 233 and grabbed 2nd log.

if anything else is needed let me know. a dmesg , something.
[G4 Android Development] steadfasterX:
ok great thanks :)

I guess I know why that happens as I never had enough data in datamedia that a file split happened (when you have more then 1,xGB TWRP will split the backup into several parts).

Will fix it asap.

.
[G4 Android Development] steadfasterX:
Latest PREVIEW release

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

when to use

)!

twrp-3.2-3-PREVIEW-144_g4_<flavor>

Status: TESTING

Release date: 2018-10-16

TWRP sources changelog: sfx github-changelog

Download: sfX leech server (same download for all G4's)

Kernel: github-changelog (preview builds compile the kernel on build automatically (official not) - so the kernel differ between official and preview)

Device Tree changelogs:

O flavor

N flavor

MM flavor

Summary changelog:

HIGH experimental: beginning from #136 build all versions will include my Internal Storage backup patch (state and details: here).

Thats the main reason why the "Status" is "TESTING" for this build.

This update contains a fix for restoring Internal Storage

Keep in mind that the whole feature is still high experimental !!

The brand new and

high experimental

feature to backup your internal storage is a WIP (work in progress) but I would love to hear your feedback of the current implementation.

If you encounter any issue just share the recovery.log.

This also means: atm of writing the only safe way of using this new internal storage backup feature is by backing up to an external sdcard. Adb backup works fine too but the restore NOT (yet). Watch the above linked wiki page for any progress regarding the implementation

.
[G4 Android Development] adam_s_459_:
I tried the datamedia restore and it works perfectly. Great job!
[G4 Android Development] steadfasterX:
Many thanks for testing! 3 users tested (me, kessaras and you) and for all of them it works which makes me happy :)

Still a lot of work to do but it's worth it imho. When this gets included in the main TWRP code I'll get out for party xD
[G4 Android Development] TrueFaith:
It will works on V20o ?
[G4 Android Development] sdembiske:
Refer to the thread you started: post # 2
[G4 Android Development] Spaceboy60:
I'm running 3.1.1 due to the fact that it's the only one compatible with efidroid. However I'm having an issue with restoring. For some reason it's painfully slow. I'm using a relatively new Samsung MicroSD card and restoring a backup takes like over an hour, maybe 2. Is this normal.? I've done some speed tests on the card and everything appears fine, decent speeds.
[G4 Android Development] steadfasterX:
I've optimized a lot in later versions including the kernel so..

You can check with top and the w command maybe it's not using all cores duno.

Edit:

Well and if you do NOT meant TWRP booted from the recovery partition but about TWRP started within efidroid yes that's normal. Efidroid loop mount partitions as files on the internal storage and that's always slower then direct access.
[G4 Android Development] adam_s_459_:
That's a side affect of efidroid. You'll find that if you uninstall efidroid it will be fast again.
[G4 Android Development] Komekokos:
What's meaning Ilapo-4cpu and Ilapo-2cpu in twrp repository? Must I upgrade the twrp to these versions?
[G4 Android Development] steadfasterX:
Is your device affected by the ilapo?

Then yes.

If not no.

If you don't know what the ilapo is: search for it & read but as you don't know what it is you don't need those versions.

In short: these TWRP versions throttle down the cpu amount of your device to avoid overheating on devices affected by the ilapo
[G4 Android Development] Komekokos:
Ok thanks then I don't need those versions :svetius:
[G4 Android Development] DjMaxTn:
Hello there, I have an unlocked H810 (UsU), but I cant factory reset the device, after the reboot I find my self in TWRP menu, the factory reset can not be made for unlocked devices? even the key combo does not work (two times YESA but boots to twrp always, not the stock LG factory reset process)

Thanks for your help
[G4 Android Development] steadfasterX:
you can either factory reset by Android (settings menu)

or by TWRP. In TWRP to complete delete all data including pics, downloads etc choose FORMAT data in the TWRP wipe menu

or by the stock factory reset screen:

the stock factory reset screen has changed. Consider to read the UsU thread OP again (especially topic "Factory reset hardware key combo")

.
[G4 Android Development] DjMaxTn:
Thanks, now i am getting this error Need help with "Unfortunately, LGSetupWizard has stopped."
[G4 Android Development] steadfasterX:
well this thread is about TWRP. is your issue about TWRP? no... so pls open a new thread in the help forum.

I have no idea what you have done (I offered 3 solutions and you haven't said which one you have chosen) but if you haven't FORMAT data in TWRP this can cause your issue. remember that format data will delete all you internal storage obviously.

.-
[G4 Android Development] DjMaxTn:
Sorry for not giving enought information about my issue, yes he key combo did work and did erase all internal storage and cache and dalvik. Now i think i sould somehow make a flashable zip with the apk needed.
[G4 Android Development] polfrank:
I think that I found a small bug with TWRP.

TWRP version: 3.2.3-PREVIEW-144_g4_N

Rom installed: Stock Nougat 7.0

The bug: When trying to backup your system, a check is being done, in order to confirm that there is enough available space.

If you want to backup in the internal storage a check is being done on it. --> OK

If you want to backup in the external storage, the check is being done on the internal one. --> Problem!

For example I have 10GB external and 3GB internal free space. When I pick backup to external, a message comes up saying: Sorry, you have only 3GB available free space. (or something like this)

I've found a way to workaround this, but I'm still mentioning it generally, for the project.
[G4 Android Development] steadfasterX:
Yea that could be an issue with my data media backup implementation .. Thx for reporting!

EDIT:

https://github.com/steadfasterX/bootable_recovery_twrp_fork/issues/6
[G4 Android Development] hteles:
Hey.

something strange started happened! Don't know if it's my USU'ed H815 dying or if something changed.

After updating to April LAOS 15.1 Unofficial TWRP can't decrypt Data, but the ROM boots after entering the same password. If you ask me i would bet on the phone EMMC dying. If anyone is running LAOS 15.1 from April and have encryption can comment on the issue i'll be glad.

Regards.
[G4 Android Development] steadfasterX:
Try to decrypt in TWRP and share the recovery log (see my sign)
[G4 Android Development] steadfasterX:
Thanks . This is not my latest unofficial . You are using the latest official .

Try my unofficial and share the recovery log and dmesg again
[G4 Android Development] obvious:
TWRP is changing

With the advent of TWRP 3.3.0 you no longer need to keep It updated with installer zips + a bunch of other changes...

https://www.xda-developers.com/twrp-3-3-0-release/

Updated G4 release at https://eu.dl.twrp.me/g4/
[G4 Android Development] steadfasterX:
Latest PREVIEW release

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

when to use

)!

twrp-3.3-0-PREVIEW-163_g4_<flavor>

Status: TESTING

Release date: 2019-04-20

TWRP sources changelog: sfx github-changelog

Download: sfX leech server (same download for all G4's)

Kernel: github-changelog (preview builds compile the kernel on build automatically (official not - yet) - so the kernel differ between official and preview)

Device Tree changelogs:

P flavor - NEW! I started with building LOS 16.0 so pie builds are needed :) I already helped [MENTION=4956374]aoleary[/MENTION] to get AEX pie working so LOS should go fine too ;)

O flavor

N flavor

MM flavor

Summary changelog:

HIGH experimental: beginning from #136 build all versions will include my Internal Storage backup patch (state and details: here).

Thats the main reason why the "Status" is "TESTING" for this build.

This update includes the latest TWRP plus my datamedia patch on top. There is one known issue with the current patch state: restoring datamedia crashes atm! I'm working on a fix but the previous implementation was based on the android-8.1 branch and the migration to 9.0 broke things a bit .

Keep in mind that the whole feature is still HIGH EXPERIMENTAL !!

The new and

high experimental

feature to backup your internal storage is a WIP (work in progress) but I would love to hear your feedback of the current implementation.

If you encounter any issue just share the recovery.log.

This also means: atm of writing the only safe way of using this new internal storage backup feature is by backing up to an external sdcard. Adb backup works fine too but the restore NOT (yet). Watch the above linked wiki page for any progress regarding the implementation

.
[G4 Android Development] sdembiske:
Did a full backup with the new version including internal storage: Rebooted to Recovery, then wiped Cache, Dalvik cache, System & format Data > yes and restored the backup. At formatting in the restore phase it rebooted to Recovery and when I tried to restore again, I could only select Internal Storage (no backups to restore in there) - indicated couldn't create sd card external?

Any way, reinstalling previous version and will try to restore another prior backup now (Addendum: successfully done). Logs attached.

recovery.log link: https://paste.omnirom.org/view/548d7346

dmesg.log link: https://paste.omnirom.org/view/71e3e85f

S.
[G4 Android Development] steadfasterX:
Thanks for your report and testing!

It seems ( not quite sure though as I am not at my pc so reading logs is painful as usual) that you try to restore a data/media backup ? Is that true?

If so then see my note about it from the previous post:
[G4 Android Development] sdembiske:
Yes, I was aware of your previous post and the caveat but wanted to test it and provide logs in the event it might help ...
[G4 Android Development] rundumdieuhr:
twrp-3.3.0-0-g4.img

Hi, Thanks steadfasterX for all your work, highly appreciated.

I am very happy now, also a bit confused. Via the TWRP app, I have been able to download and flash the new & stable recovery version twrp-3.3.0-0-g4.img. I am highly satisfied, because it remembers language and clock settings in TWRP. Assuming this is your work, great job and thanks a lot!

Nonetheless, I understand this is not the Oreo-specific version which would support decryption, right? So should I wait for a specific version or is this it (all-in-one)? (Possibly, the official TWRP app already adjusted to Oreo and there is nothing to wait for, I cannot tell.)
[G4 Android Development] sdembiske:
TWRP 3.3.0-PREVIEW-182_g4_O Backup Fails: Backup file 'data/media/0/TWRP/BACKUPS ... not found!

recovery.log Link: https://paste.omnirom.org/view/448f4583

dmesg.txt link: https://paste.omnirom.org/view/f4525afc

Media backup in settings was not ticked etc. Is it trying to find the file in internal storage?

This has happened on a number of versions with the media backup option included.

Addendum

: Same error when backing up to internal storage
[G4 Android Development] steadfasterX:
does not look like a datamedia issue. it is more likely an issue with the android-9.0 code here.

pls share the output of:

adb shell "ls -la /data/media/0/TWRP/BACKUPS/LGUSUfe62f596/2019-05-11--18-58-22_lineage_h812_usu-userdebug_810_OPM718120500"
[G4 Android Development] rundumdieuhr:
What did I miss [MENTION=5545101]steadfasterX[/MENTION]? Thx