yashsingh1/xdaforums huggingface dataset:
[G4 Android Development] kessaras:
when you have a crash , check dmesg also.

dmesg is our crash logcat since logcat can only run when we are booted only.

it will have some information about your crash for sure
[G4 Android Development] steadfasterX:
the problem occurs when Android is booted so logcat seems to be the best choice but you are right that the dmesg is always a good option as well
[G4 Android Development] DevUt:
dmesg is mainly used for low level C code (service crashes, init ) .

Logcat is log where java applications log , and java applications run only after zygote.

Zygote is started by init.

In recovery only C is running so kmsg is the best and if its twrp then recovery.log helps understand ( keyword understand)
[G4 Android Development] raptorddd:
how do i get it.? i found a page that says using adb commands i run. but where do logs go.?
[G4 Android Development] steadfasterX:
Read my FAQ #4 B
[G4 Android Development] raptorddd:
found an easier way... using kernel aditour.. so apparently its not your twrp.. as i am using normal h811. but am still facing soft reboot. so ill go ahead and KDZ my phone use kessaras debloater and ill use your twrp..

but seems that am having a problem. so i still going to get log cat and dmesg.. so maybe you could help me find the cause.. since its not a twrp ill pm you with logs.

---------- Post added at 10:45 AM ---------- Previous post was at 10:44 AM ----------

found an easier way... using kernel aditour.. so apparently its not your twrp.. as i am using normal h811. but am still facing soft reboot. so ill go ahead and KDZ my phone use kessaras debloater and ill use your twrp..

but seems that am having a problem. so i still going to get log cat and dmesg.. so maybe you could help me find the cause.. since its not a twrp ill pm you with logs. let me know if you willing to help me.. :fingers-crossed:
[G4 Android Development] steadfasterX:
I was sure it is not twrp to blame ;)

You can send the logs but for this just open a new thread in the help section and pm me the link ;)
[G4 Android Development] kessaras:
http://www.linfo.org/dmesg.html this is the man page of dmseg
[G4 Android Development] raptorddd:
got it thanks .. am out of thanks button... guys
[G4 Android Development] steadfasterX:
Long way this time to go official but today i pushed the changes needed to the test page of twrp.

This is required to unify the builds on the official site and later i will hopefully push the code chances made in the latest beta.

UPDATE-1

ok requested the merge of my tree to the official sources.

#
[G4 Android Development] obvious:
Any changes between beta 5 and upcoming official?
[G4 Android Development] steadfasterX:
Not for the upcoming one.

But I will switch the the twrp branch to N for the then next build to hopefully fix any issues with N backup/restore and having all other fixes integrated from that tree, too.
[G4 Android Development] tqwzUX6fn39GZMEzSnDF:
With latest beta I still got wrong date for backups. Is this something which hasn't been solved?
[G4 Android Development] steadfasterX:
Do you saw and follow FAQ #6?

https://xdaforums.com/showpost.php?p=68249027&postcount=3
[G4 Android Development] tqwzUX6fn39GZMEzSnDF:
I didn't.

Thanks, will try later and inform about result.
[G4 Android Development] tqwzUX6fn39GZMEzSnDF:
Followed the instruction: date is correct now. Thanks.

Is it required to do it again after each TWRP update?
[G4 Android Development] steadfasterX:
No it is ROM dependend. You have to do it once again when you install a stock based ROM and afterwards a CM based one. If you just use CM based ROMs or just use/switch between stock based ROMs the steps are not necessary.
[G4 Android Development] raptorddd:
i just want to report this. this is second time it happened to me.

i flash KDZ using LGUP tmobile h811 20r.. all good . then i went ahead and installed your twrp beta5.

did the required wipes to install stock based rom imperium.. it flashes and everything okey.. but once i get to the start up screen the one that ask to enter connect to wifi, then name your phone ect till you get to LG home screen.. as soon as it shows startup set up. i get unfortunalltelly VPN has stopped... and same for camera.. sensors dont work. no sound. did this twice same thing..

decided to use the one in the twrp page .. no errors.??

i already posted this a few months ago.. when i flashed genisys it didnt happened.?? maybe something LG changed.? like imperium kernel latest 6.2 wont work on genisys 20p. theres no sound. i must be on 20r rom. ??

yeah no log. but it was late at night. and i need it working phone. and i had to enable log.
[G4 Android Development] mjheid.muc:
Hello, is there a chance that "fastboot boot twrp.img" doesn't work anymore?
[G4 Android Development] raptorddd:
twrp ins independat to adb. i think you either have a phone -pc comunication or command you are given and file name is different must match both file and command.
[G4 Android Development] kessaras:
fastboot is always the same , it hasn't changed. The command is stilll working of course.
[G4 Android Development] steadfasterX:
I think I know the reason for this.

I strongly believe that the firmware files changes between those both ROM versions and we do not backup/restore those in twrp atm. So the fix would be easy: including firmware in the backup.

I will do this in a next beta but atm I'm on vacation up to the end of next week..

The workaround would be:

Boot in twrp

Manually edit fstab and enable /firmware as backup option

Mount and backup everything including firmware

Restore everything including firmware

All should be fine

But I remember that there were problems with including firmware in twrp which prevented me from enabling it for backups. I will check that again...

#
[G4 Android Development] raptorddd:
thanks no problem. well i fixed by using twrp from official page.

but i hope to use your when new released fix. :good:

have a great time enjoy vacations.
[G4 Android Development] AsHalt:
is the unlocked bootloader a requirement (yes, I did read but conflicting arguments from this YT video by XDA Developers )

I have a H815 SEA , rooted thru the low effort root and apparently according to LG there's no bootloader for my phone...

[YOUTUBE]https://www.youtube.com/watch?v=epcXXkMPRWk&t=1s[/YOUTUBE]
[G4 Android Development] steadfasterX:
Root yes. TWRP no. What conflicting arguments?

Well tbh when the boot loader cannot be unlocked no chance for booting a modified image. AFAIK this means both boot and recovery. So well at the end we could use flashify and install TWRP in the recovery partition but ... --> you would get the secure boot error . what no one has tried yet (AFAIK) --> Flashing TWRP within the download mode but not like the normal method but with send_command. The usual way is to use fastboot command which is not possible because of your locked BL. This may work but I can't test it. This will not workaround the secure Boot error because this can be "fixed" in the bootloader only. So the chances are very high that this will just not work. I mean it

would

work as long as the BL will not verify recovery and just boot only....

.
[G4 Android Development] draymond1987:
MFW I seen the word "beta".... https://giphy.com/gifs/cosmo-kramer-tbRCzy6svShag

I know Raptor has an H811 too, but I likes flashing new things! I ventured to the HTC M9 for about a week, and have returned here LOL. I just really missed the phone, physically and mentally. You know how many times I tried searching for the buttons on the back of the phone?! O_o
[G4 Android Development] kessaras:
taking drugs ? :D if you want i can trade my h815 with your m9 so that you have 2 of them :D
[G4 Android Development] steadfasterX:
Oh besides that: I made this for another lg device a while ago but the way which should work is to just inject TWRP live on boot! This may not work on nougat but for LL and MM. The only bad is that whenever the ROM gets updated the flashing procedure for TWRP needs to be done as well.

This could be done much more easily but I need time to implement that. That would mean we could have TWRP on any g4 :fingers-crossed: plus I can define the key combo of any choice to go into recovery. :cool:

.
[G4 Android Development] draymond1987:
I'd need a new GIF to display my affection for drugs! Kidding, obviously though. As Max Lee (Youtuber) says "we get HIGH on Android, everyday."

If I had a use for another LG G4, I would consider a trade :P I'm going to keep the M9 around as a backup device. Not to go off topic, and I do apologize to OP: I really like Sense, but I forgot how BLOATED it seems. I know our system can take up a bit too, and yes, just the size of how much the OS takes away from the user. Also, I really appreciate how our development has AOSP functioning fully, as Sense does have some bugs. Camera hasn't been working in awhile, from what I have read, and that's a deal breaker. ESPECIALLY because I only see 2-3 AOSP based ROMs being worked on. I'm not hating on the device or development or anything like that at all !

I like to have a combination of Stock and AOSP, just because Android is amazing in that aspect. BUT if I ever plan to sell it, I can consider you, first.
[G4 Android Development] steadfasterX:
Stop this.
[G4 Android Development] steadfasterX:
This may be not necessary anymore?! At least for h818..

https://xdaforums.com/g4/development/unofficial-bootloader-unlock-lg-g4-t3563898

Update:

The unlock described doesn't work. aboot is signed and verified.

G4 can

not

be unlocked with a patched aboot!
[G4 Android Development] steadfasterX:
Today I tried to fix the /firmware issues but unfortunately it was not a success yet.

The files get backuped fine but when restoring selinux errors are thrown.. I have to spent more time on this.

EDIT 1:

omg.. selinux issues on a VFAT partition?!! wtf?!

EDIT 2:

solved!!! thx [MENTION=6979267]nailyk[/MENTION] !! you made my day :)

.
[G4 Android Development] nailyk:
Always glad to help :)

But I wonder why this partition is fat formatted. Really bad idea from the OEM. The only reason I see is some of your hardware looks directly into the partition (like modem).
[G4 Android Development] kessaras:
hi stead ! i was really curious how multi-rom twrp, dual boot patcher and efi droid work and i thought to ask the dev that mostly spends his life in the bootloaders recoveries and partitions sessions.

Stead, now someone tried to port efi droid too for the g4. How do those work ?

They write their link in the bootloader to link to their app before the boot session or do they patch the bootloader ?

Won't that cause a confusion if the partition doesn't have enough space for 2 kernels and roms ?
[G4 Android Development] steadfasterX:
Lol i just started to do the same and have plans for porting it to other devices too. The idea of efidroid is amazing.

Actually it works this way: you will install it as a boot image. Some ppl say efidroid is a 2nd stage bootloader while this is a bit misleading because before efidroid loads aboot will load ;) so tbh efi droid is the 3rd bootloader.how does that sound? Right not good. so they say second stage bootloader instead. Lol. I think u got it.

So at the end efidroid replaces the boot image (thats why you need to have an unlocked device) and load custom ROMs or recoveries whatever which are located in /data normally. Just without the need to patch a kernel or ROM for it.

Regarding the kernel to load idk because all the above is just theoretical knowledge taken mostly from here

http://www.androguider.com/2016/10/efidroid-takes-booting-to-completely.html?m=1

and of course https://www.xda-developers.com/efidroid-is-a-second-stage-bootloader/amp/

Hope to get some practice in this soon :rolleyes:

.
[G4 Android Development] XeniX_Force:
oh nice

so you're making one for our g4 as well
[G4 Android Development] steadfasterX:
I need ALPHA testers :)

I have created a new build based on twrp branch android.7-1 instead of 6.0 with dozens of fixes and enhancements!

The tester should create backups BEFORE trying that new build!

The tester should be able and willing to catch recovery logs and/or dmesg if needed and requested!

^^ THIS IS IMPORTANT and you can check my FAQ to find out how.

The tester should test the following (order is not important - well you need to backup before restore but thats all ;) ):

flashing ROMs :)

backup a MM based ROM (no compression, no encryption)

restore the MM based ROM (no compression, no encryption)

backup a N based ROM (no compression, no encryption)

restore the N based ROM (no compression, no encryption)

backup a STOCK (or STOCK based) ROM (no compression, no encryption)

restore a STOCK (or STOCK based) ROM (no compression, no encryption)

important: backup a ROM (no compression, no encryption) & restore another version of any ROM where the

firmware

files have changed! This should work now!

backup & restore of any ROM

with compression

in backup settings enabled!

backup & restore of any ROM

with encryption

in backup settings enabled

backup & restore of any ROM

with compression PLUS encryption

enabled

Interested? Write me a PM with subject: "TWRP alpha"

.
[G4 Android Development] skdubg:
backup a N based ROM (no compression, no encryption)

- working (boot, system, data, firmware partition)

restore the N based ROM (no compression, no encryption)

- working (boot, system, data, firmware partition)

flashing ROMs

- working (recovery.log)
[G4 Android Development] kessaras:
[MENTION=5545101]steadfasterX[/MENTION] the new 3.1.0 as merged your changes from beta 5 ?

if you want more testers send me too. my h815 is not my main, so i can help at anything without fear
[G4 Android Development] steadfasterX:
bigbiff has merged my tree so it should be the same then beta-5 plus twrp 3.1.0 changes but tbh i havent checked it yet.

It definitively does

not

contain the /firmware fix as I haven't released it yet.

[MENTION=2350282]skdubg[/MENTION] , [MENTION=5529370]Mr.FREE_Bird[/MENTION]:

I uploaded 1 second ago the newest 3.

1

.0-0 ! Totally untested yet :) It is the same then the official plus /firmware backup/restore fix.

so.. if u like do the same above with that version instead.

Same link as send already.

thx

.
[G4 Android Development] Mr.FREE_Bird:
Oh I was still testing your previous TWRP test build but I will give your recent build a try. I will inform you about how well it works using the same testing procedure :good: .
[G4 Android Development] skdubg:
used 3.1.0 build1 for backup/restore partitions (no encryption/no compression):

- boot

- system

- data

- firmware

no errors
[G4 Android Development] Mr.FREE_Bird:
[MENTION=5545101]steadfasterX[/MENTION]

flashing ROMs :)

Works just fine, I have even tested a aroma debloating script and that works fine to.

backup a MM based ROM (no compression, no encryption)

Works as it should, I have backed up a MM Stock based ROM once with compression and once without compression both times without encryption.

restore the MM based ROM (no compression, no encryption)

Also works with both backups I took.

backup a N based ROM (no compression, no encryption)

Same story as with MM/Stock based ROM, no problems.

restore the N based ROM (no compression, no encryption)

Same story as with MM/Stock based ROM, no problems.

backup a STOCK (or STOCK based) ROM (no compression, no encryption)

All good.

restore a STOCK (or STOCK based) ROM (no compression, no encryption)

All good.

Haven't tested the remaining steps yet...

Only one problem, I forgot that the recovery log contains all info of what you do when in recovery mode. While I was testing TWRP 3.1.0.0 I was really busy with moving and deleting files... so the logs I took turned out to be pretty useless because they contained everything I did beside making backups and flashing ROM's/ZIP's.

If you really need logs of all the steps, than I am willing to re-do all the steps I tested.
[G4 Android Development] tqwzUX6fn39GZMEzSnDF:
I've just installed new TWRP and noticed that date is now incorrect again. But can be solved with same method as before.
[G4 Android Development] steadfasterX:
Thanks mates! Really appreciated that you take your time to test all this. Now I'm looking forward to compression and backup-encrypt tests ;)

[MENTION=5529370]Mr.FREE_Bird[/MENTION] no its ok. We have other testers which can provide logs which is very amazing btw :D

This is strange. Will it persists when you reboot into TWRP again? You installed the latest 3.1.0 (official one) correct?

.
[G4 Android Development] tqwzUX6fn39GZMEzSnDF:
Yes, 3.1.0 is installed correct. I've rebooted and checked again: TWRP is 3.1.0 and backup creates correct date.

I will check if this is still true when flashing next weekly. "Unfortunately" I am on the latest already and will have to wait until next tuesday.
[G4 Android Development] skdubg:
used version 3.1.0 build1 to update/flash rom (no encryption/no compression):

- flashed aosp based 7.1.1 --> no errors
[G4 Android Development] marn3us:
Hi Stead, if you need someone to test compressed backup with an N ROM I can do it :)

Do you want me to use official 3.1.0 on twrp site or some other build?

Ps: I am using F2FS though, don't know if that creates any problem
[G4 Android Development] steadfasterX:
Wait! ok back to the start: What do you had done exactly?

Flashed TWRP 3.1.0 official then a new CM weekly? Then you had this problem?

or

just flashed TWRP 3.1.0 official and then the problem were there?

If this problem happens again

catch the recovery logfile

! Do this BEFORE fixing and attach it in your report. Then fix it as you have done and reboot into TWRP again and catch the recovery log again!

See my FAQ #4A in this thread for a catch recovery log howto.

Not the official because it misses the firmware fix.

So my latest alpha -> I send u a PM.

I need tests for compressed backups and also for backups with a password set (means it will be encrypted). Could u do that?

Report back here + attach recovery log(s).

Create a full backup without compression and password first because they are working (just for the worst case).

f2f2 is no problem.

.
[G4 Android Development] tqwzUX6fn39GZMEzSnDF:
I've flashed Linage weekly on wednesday and yesterday TWRP 3.1.0 only. I haven't checked within the last 2 or 3 weeks if date is still correct or not (but it was correct some weeks ago), but after flashing TWRP yesterday I wanted to do a backup and noticed incorrect date.

I guess one of the Lineage weeklys has caused the incorrect time again and therefore mentioned that I will check this after flashing new weekly next tuesday / wednesday.
[G4 Android Development] marn3us:
What I have tested so far:

- Creating a compressed backup (of a N ROM) -> Working fine

- Restoring that backup -> working fine

Everything worked smooth with no errors whatsoever (also I was using F2FS so I can confirm it works with that, too) :)

I haven't had time to test encryption yet, I will do it when I can if no other testers do it before.

Thanks a lot [MENTION=5545101]steadfasterX[/MENTION]!
[G4 Android Development] casabato:
I used version 3.1 to make a backup. I think that the backup is fine but I saw this message during execution:

"TWRP could not locate partition / system image."

What does it mean?
[G4 Android Development] seetru:
the download for h811 from TWRP is not compressed, is this needed or can it be compressed and still work fine

https://dl.twrp.me/h811/twrp-3.1.0-0-h811.img.html

the h815 0ne is compressed to half of h811 size

https://dl.twrp.me/h811/twrp-3.1.0-0-h815.img.html
[G4 Android Development] [Jaco69]:
Sorry for stupid question, but are you working to solve bugs in official 3.1.0-0 version or what? Do you suggest to update to 3.1.0 official?

Inviato dal mio LG-H815 imperiale usando Tapatalk
[G4 Android Development] steadfasterX:
I need the recovery log!

Sorry but the twrp site is messed up! Please do not use that image! Wait or use my latest beta instead.

No do not update! I strongly recommend to either wait for 3.1.0-1 official or using my latest beta instead.
[G4 Android Development] seetru:
thank you
[G4 Android Development] casabato:
Thanks for the reply and the confirmation that there is a problem.

After that problem on the "system image" I have done a rollback, back to TWRP-3.0.2-0-H815 version.

I'll wait for an update.
[G4 Android Development] kessaras:
recovery.log of a full backup

nub :D

what did you do ? did you only create a backup and saw that error or you tried to recover from the backup ?

im gonna do the same and send him the log.

~EDIT: the backup was successful -_-

i just made a full backup and it was fast too, 211 seconds. [MENTION=5545101]steadfasterX[/MENTION] , tomorrow ill send the rest of the logs
[G4 Android Development] kth hannes:
I had the issue that I can't install the .IMG. I had tried but it had only deleted the actually recovery. So I had to it as an "new" install over adb. And there was also some problems...

Gesendet von meinem LG-H815 mit Tapatalk
[G4 Android Development] casabato:
I just made a full backup too, but using v3.1 it was 10 GB, with v3.0.2 it was 14GB, then something was excluded. Maybe was excluded the system image partition.
[G4 Android Development] steadfasterX:
[MENTION=5461026]kessaras[/MENTION] he uses the OFFICIAL 3.1.0-0 and you used my beta :)
[MENTION=4808211]casabato[/MENTION] I need the recovery log.
[G4 Android Development] kessaras:
recovery log

Flashing

1. CR droid 2.4 over 2.2

(it wiped my system, a mistake from the op)

2. Flashing llama sweet kernel

3. after reboot to recovery, flashing magisk flashable zip to get root.

4. flashing aroma gapps

(because of the faulty wipe from cr)

[MENTION=5545101]steadfasterX[/MENTION] , dirty flashing cr forced encryption code on me. i can't boot.

how do i get paseed that problem now ? i wasn't encrypted to begin with.

EDIT2:

the only way i know to remove encryption is fastboot erase userdata. But now where do i find a full stock rom zip to flash it and restore the partitions ?

also i can't use kdz im on linux.
[G4 Android Development] steadfasterX:
I read your log file while driving in my car so maybe I miss some things but the log tells me that you have flashed magisk on already rooted system?!

*****************************

Magisk v11.1 Boot Image Patcher

*****************************

- Mounting /system(ro), /cache, /data

! System installed root detected, mount rw :(

I don't know if this is a good idea?

When you wipe the data partition in TWRP encryption should be removed . Yes you will lose all your data
[G4 Android Development] kessaras:
The log doesn't have everything, cause suddenly i was encrypted without knowing the pass.

I dirty flashed cr over cr and suddenly , encryption was forced on me.

flashing magisk is a "must" since days. Substratum stoped working without systemless root.

All roms since a week have magisk pre-installed. Thats what we do on all other phones.

Our devs here in g4 are lazy to add magisk root in their builds so we have to manually flash it.

Wiping data didn't remove encryption. The only way to remove encryption is to "fastboot erase userdata". But now how do i restore the gpt table without having the bin to flash the gpt table and LG gives kdz and not .zip ?

i can flash kdz with fastboot ? no.

i can flash kdz on linux ? no.

so how do i fix it now ?

im not sending it to lg , no way. I'll throw it in the trash if i don't fix it.

EDIT: wait a couple of minutes. i think i found a way. ill update my post in a few.

EDIT2:

Ok. i fixed it. twrp can fix the partition tables too.

All good with partition. Now i need to see if i really removed encryption. I must have. erase userdata leaves no trace of anything in there.
[G4 Android Development] steadfasterX:
The command fastboot erase will wipe the partition and NOT removing it completely!

This is the same as advanced wipe - then wipe /data. They both do the same thing.

Tbh all this has nothing to do with this thread. It would have been better if you create a new thread for non TWRP related probs :angel:

Regarding kdz on Linux:

check my github. You can extract the images and then flash by fastboot.

.