yashsingh1/xdaforums huggingface dataset:
[G4 Android Development] steadfasterX:
EMERGENCY BETA RELEASE

Normally i wouldn't release the current state of my new 3.0.2.2-BETA yet but you may have heard about bootlooping issues to TWRP with CM14 releases.

The reason is well known and well the short version is "Google is to blame".

Detailed version:

The main Android sources starts to make use of /misc partition for identifying boot commands.

CM synced that changes as usual.

When you then using e.g. the internal cmupdater it write a command to that /misc partition and initiates a reboot to recovery to apply changes (in this case updating CM).

TWRP don't know anything about /misc because this is disabled since years so it just starting up and you see the TWRP screen.

When you then try to reboot normally CM will detect the command it had written before in /misc partition which means "hey reboot to recovery to apply the changes (e.g. updating CM)".

Welcome to the TWRP bootloop.

The CM devs for our device has reacted fast and disabled the use of /misc in CM again so it shouldn't happen anymore with builds later then 5th of December but I don't like this as the final solution. Think about someone enables that again some when in the future? We will get the same error again. So I decided to dive into the root cause to find a future proof solution in this.

Solution:

Enable /misc partition in TWRP, easy right? BUT...

Doing so will leave you with one big issue: Normally you will open TWRP with the hardware key combo which displays the factory reset page. You will then bravely go through that steps and then TWRP just opens up. Well... this is true as long as /misc is disabled. The reason is that this factory reset command will be written in /misc as well so it get's executed now!

The full solution:

1) enable /misc to ensure we can handle commands written there in TWRP

2) ignore the factory reset command when written to /misc

3) change TWRP sources to make use of a new variable when building TWRP and the changes needed for step 2 (added, review in progress)

4) enable that var in device tree of TWRP (done in personal repo, official repo will follow when 3 done)

I'm glad to have the above working now but keep in mind that I cannot test h811 devices as I do own h815 only.

It should work the same way but I cannot test it.

Try the fixed version:

H811 users download this: http://xdaforums.com/devdb/project/dl/?id=22099

H815 users download this: http://xdaforums.com/devdb/project/dl/?id=22101

Please report back if everything is working for you - especially if you are a h811 user (check if you can install ROMs as well would be great)!

UPDATE

Thanks to [MENTION=5830858]draymond1987[/MENTION] this h811 build is

VERY WELL

tested!

Give him a thx click for his hard work here: h811 test result post

Cheers

steadfasterX

.
[G4 Android Development] marn3us:
[MENTION=5545101]steadfasterX[/MENTION] Thanks for your hard work as always!! :)
[G4 Android Development] draymond1987:
Hey Steadfast! I will gladly test this on H811 because I plan on starting completely fresh. My data storage is getting eaten alive, and it's probably because of dualbooting. So my question to you is, in a very ELI5, what should I be looking for? I rarely flash CM, but will flash CM based ROMS. Do you want me to download an old CM ROM and let CM update me to the newest version? Like, are OTA updates causing this bootloop thingy? I am willing to help you out, but I will admit when I fully don't understand.

I don't wanna flash ROM after ROM and that not help YOU.

EDIT: Do you also want me to make sure the hardware combination doesn't ACTUALLY format my phone? Because I do pull my battery a lot, to get back into recovery.
[G4 Android Development] draymond1987:
I'm going to give up for tonight, because the CM updater is taking forever to download, and I have switched to wifi and cellular. an hour or 2, is just getting on my damn nerves. Besides that though, flashing ROMs is perfectly fine. I flashed Xtreme ROM and then I flashed CM. I just now when into the hardware configuration to get into TWRP and booted up completely fine. No loss of any data, yay! But I have been trying to use CM's updater and have ran out of patience. I know it's not my connections, because other files are not this slow at all. Perhaps it's just CM's servers getting slammed.
[G4 Android Development] steadfasterX:
I flashed CM only because of fixing the issues there ;)

Well thanks for testing this on the H811 !! I'm really happy that flashing ROMs works now for h811 users ;)

If you really want to help me do the following tests:

Flash the CM 14.1 ROM but a version before the 5th of December (e.g. use one of November)

Try to update one version after the next (update from 29th nov to 30th etc) until you cannot update anymore because CM will deny booting into recovery (which should happen after installing the 5th december update)

Flash any Stock based ROM (just test if it installs)

Use the hardware key combo to display the factory reset page and go through the steps to open up TWRP - it should NOT factory reset just open TWRP

Directly after booting into TWRP exec: "adb shell grep Bootloader /tmp/recovery.log" and paste the output here

Then doing the base stuff:

Backup a full system (check my FAQ to make a backup of the EFS manually just to be sure!)

Restore the backup and check if everything is working

Do a wipe within TWRP and check that the data gets wiped

If you encounter problems please provide dmesg and recovery.log as described in my FAQ #4

Thanks for your help!

.
[G4 Android Development] draymond1987:
1.) CM 14.1 12-14-16 to 12-15-16 flashed without issue. Only thing is, I had to flash manually though!

2.) Data (internal) worked flawless on your version. I tried with the version I had installed before, but I got some red errors. â€œFormat data...type yesâ€

3.) Interestingly, I was able to update from 11-29-16 to 12-15-16 using CM's update system. I don't know why a days jump didn't work..hmm. I had to use Gen's unofficial builds because CM only stores the last 4-5 days on their servers.

4.) Tried flashing 12-11-16 to 12-15-16 but it fails to boot into recovery by itself to update, so I manually updated again.

5.) Booting Stock based ROM is perfect (Xtreme ROM).

6.) Data gets wiped perfectly fine, without touching /data/media/0 which would result in the whole device getting wiped.

7.) â€œI:Bootloader arg "--wipe_data" ignored because TWRP was compiled with TW_IGNORE_MISC_WIPE_DATAâ€ resulted when I typed in â€œ*"adb shell grep Bootloader /tmp/recovery.log.â€

8.) Backed up /system /boot /EFS /data then I wiped the phone â€œfactory resetâ€.

9.) Restored phone and booted up perfectly fine, with no missing data.

10.) So the only issue is that it will not automatically update CM. Even though I used Gen's version, it did update me to the OFFICIAL CM!

11.) I did get that silly E: error command (log) but it didn't prevent the phone from flashing CM at all.

Everything else seems to be in working order on the H811 ! :D

EDIT: I noticed SU kept disappearing, by the way. I had to manually flash it on CM and Stock.
[G4 Android Development] steadfasterX:
Dude great work! Thanks a lot. Your testing is

highly

appreciated!

reg. 1) : good. if you flash any CM version after the 5th of Dec it will prevent rebooting to recovery so that behaviour was expected

reg. 2) : perfect

reg. 3) : yes that was expected. Every CM version before the 5th of Dec is able to be upgraded to the latest or any intermediate one but upgrading from a CM version after the 5th of Dec will not work because CM prevents rebooting into recovery

reg. 4) : yes see above

reg. 5) : perfect

reg. 6) : perfect!

reg. 7) : perfect!

reg. 8+9) : perfect!

reg. 10) : expected due to a change in CM since 5th of Dec

reg. 11) : known issue in any TWRP version but this is harmless

I hope the CM devs will enable /misc again so the updater will work again some day.

Thanks again. Without your help I wouldn't be able to provide future versions for the h811 :highfive:

Yes this TWRP version does not provide supersu.

.
[G4 Android Development] draymond1987:
I honestly have no issues helping out. I constantly flash ROM after ROM. As long as I can't hard brick this phone, I'll test it for you LOL! Seriously, I constantly backup important data onto my computer before I wipe the SD or internal. I actually wiped extsd with your TWRP and it was all good. Like I said, all my dualboot ROMs were killing my storage, so I was glad I had an excuse to wipe my device :D

Just @ mention me or something, if needed. I do get emails, however.

---------- Post added at 06:04 PM ---------- Previous post was at 05:50 PM ----------

Many props for the credit, my good sir. I also hope you knew that I meant to @ mention me for any further testing, aha. I don't want you to think I'm 'full of myself' and wanted credit. Certainly my apologizes, if that's the vibe I gave off. I am a kind soul. I just don't want to miss a post or anything, if you need some testing done. Thank YOU for all your hard work, honestly!!
[G4 Android Development] steadfasterX:
haha yes for sure I knew what you meant but as said its highly appreciated to have such amazing testers so you should earn your creds ;)

@ all:

Updated the changelog page!

http://xdaforums.com/showpost.php?p=68249026&postcount=2

.
[G4 Android Development] draymond1987:
Hey [MENTION=5545101]steadfasterX[/MENTION] , I'm curious if you should tell people in the chabgelog that root needs to be flashed? Even though CM and the stock ROM I tried, I had to manually flash SU. I know we discussed that it's not included, but if people don't read the thread about this, they may drive the ROM developer crazy LOL!
[G4 Android Development] welder73:
Xtreme rom? 6.0?

From where? I can't find it on Xda...

And is there a version for H815?

Thank you in advance :)
[G4 Android Development] draymond1987:
http://xdaforums.com/tmobile-g4/development/rom-g4-h811-xtreme-rom-v1-0-7-28-15-t3167667

This is for H811 (The xtreme ROM) but this link here http://xdaforums.com/showpost.php?p=62165779&postcount=88

states that you could risk bricking on other variants. Maybe see if others have had success? Worse case, TWRP will throw you an error and refuse to flash it.

This TWRP is for both H815 and H811 :)
[G4 Android Development] welder73:
Tnx man :good:

I know that Twrp is for both models but I'm using Dual Boot Patcher,maybe I'll try it ;)
[G4 Android Development] steadfasterX:
New BETA released

http://xdaforums.com/showpost.php?p=68249026&postcount=2

[MENTION=5830858]draymond1987[/MENTION]: If u can then pls test:

upgrading from CM release of the 15th Dec to the latest one. That means: Install the 15th Dec as usual in TWRP and then use the CM updater to upgrade

factory reset when using the hardware key combo should NOT harm your data
[G4 Android Development] draymond1987:
Backing up current ROM. Gimmie like 5-10 minutes :D
[G4 Android Development] kessaras:
too late. installed it 1st and already used it without backup >:) fearless
[G4 Android Development] draymond1987:
You has H811 as well?
[G4 Android Development] kessaras:
h815. update is update. anything could go wrong even if the phone is owned by the dev :p
[G4 Android Development] draymond1987:
[MENTION=5545101]steadfasterX[/MENTION] everything works perfect on my end.

Updated to latest CM via updater.

Factory reset via hardware buttons does not mess with data.

Factory resetting, or just the standard wiping for ROMs, works flawlessly.

Restoring my previous ROM without issues. I'm on Xtreme ROM and that's why it took a bit. But every function is working proper on the H811 variant.

EDIT: spelling mistakes.
[G4 Android Development] steadfasterX:
Thank you very much guys !

Your reports are very appreciated!

.
[G4 Android Development] DarrenNewsgroup:
@steadfasterX

I had a problem updating to the latest TWRP (build 317) from within TWRP (I think it was 285). I have the recovery.log https://paste.omnirom.org/view/c8e5e742 and dmesg.txt https://paste.omnirom.org/view/285c1001 for your perusal. Hopefully that will tell you the exact version.

I would click "Install", click "Install Image", browse to my downloaded TWRP 317 .IMG file, tick "Recovery" for partition to flash image, then "Swipe to confirm Flash". At this point it failed to flash with red error message listing to the path to the .IMG file and ending with "(Not a directory)". Hopefully everything is in the linked log files above.

I solved the installation problem by downloading the build 317 .IMG file to my PC and following the instructions on the "About" under "The general guide seems to do not work properly when it comes to flashing so here is an additional howto which seems to work 100%". This meant that I had to hook my phone up to my PC and use "adb" and "fastboot" commands though so it was not as easy as upgrading from within TWRP. Note, I had always upgraded TWRP from within TWRP before and this was the first time it had failed.

I like the fact that the version now says BETA4 instead of ~SteadfasterX. I've not got anything against you putting your name on it, it just makes it clearer which version I am using (would be better if it said BETA4-build317 but that's really nit-picking).

Hopefully this might help some people

Darren
[G4 Android Development] Charles Broccoli:
Any way to change the temperature to Fahrenheit?
[G4 Android Development] steadfasterX:
Hey Darren

thx for reporting and

providing this solution to all

!

I know that some BETA has an issue with that image installation but that was a bug in TWRP sources and should be fixed since 285 (haven't checked that yet though...)..

When you had a build telling you 3.0.x~steadfasterX it should be 186 or earlier. I just wanted to keep it clear that this is not an official build and yes putting the build id itself would be nice but atm i use hard coded BETA-X ids instead (this change was introduced in build 285 because I want to keep track of that in logfiles for better debugging etc and I don't need my name there btw ;) ).

This has to be changed in TWRP sources. For this you have to open an issue for the TWRP devs: https://github.com/omnirom/android_bootable_recovery/issues

[MENTION=5830858]draymond1987[/MENTION] and [MENTION=5461026]kessaras[/MENTION] :

(and everyone else reading this! Please tell me your product model as well then)

Could you do me a favor? Please exec once:

adb shell cat /proc/cmdline

Once when in TWRP and once in booted Android!

It doesn't matter which ROM you're running

.
[G4 Android Development] DarrenNewsgroup:
Could I suggest then that you change the filenames of your downloads to include BETA4-build317 then. This way we users could see BETA4 on the TWRP screen and tie it up with the exact .IMG file?

Just a suggestion.
[G4 Android Development] steadfasterX:
I'll think about it.. ;)
[G4 Android Development] kessaras:
[MENTION=5545101]steadfasterX[/MENTION] here you go

adb shell cat /proc/cmdline > ~/<name of the file>

;)

device is h815 like in signature
[G4 Android Development] sejmand:
Has this behaviour something to do with the twrp problems?

Because after flashing cm14.1 I can't get beyond that lockscreen
[G4 Android Development] steadfasterX:
Thanks!

No redirecting that output to a file is not necessary.. its just 1 line which can be pasted here so ;)

yea I know you have a h815 was just for anyone else may participating ;)

Now I just need the same from a h811 device..

what twrp problem?

The problem you have is a ROM issue - not TWRP.

I would try to do an advanced wipe of /data from within TWRP (means loosing ALL your data)

.
[G4 Android Development] kessaras:
here is the right thread to talk about something inside twrp not cm14.1.

the disk partitions are :

/system /data /cache /etc

the others are mounted inside data.

/data/dalvik-cache /data/media/sdcard

The above are the partitions that we have access to wipe.

There are more partitions but are Not Listed and im glad they are not listed , because if we delete something in there, we might reflash bootloader , recovery and maybe even send the phone to manufacturer and kiss it buy buy , unless we use a kdz to restore them.

Those partitions are:

/dev (lists the i/o devices and the drivers how they i/o devices work)

/proc (lists the hardware and the drivers how it works)

/sys (same as proc)

factory reset only deletes the :

/data/app

/data/data

/data/user

it doesn't clean the /data partitions. all folders and files created are there.

advance wipe -> /data :

deletes everything in /data

format data :

deletes everything in data + mounted partitions in data such as /data/media/sdcard

yes when we flash a rom we dont really need to delete data, but we do it because its the easy way.

the hard way is to find which app has differences, fixes , or bugs and only delete that app data.

and yes advance wipe -> /data is ok because it cleans the /data partition in which is stored the data from all apps.

factory reset is useful Only if we did something and now we can't boot.

for example lets say i used an app to disable my launcher. oh my god now what ?

i factory reset and all settings revert back to default and boot my phone again and... Yes! my launcher is fine.
[G4 Android Development] sejmand:
Thanks a lot for your long explanation.

I tried it with my broken S3. Wiped data inside twrp.

Then it works!

I think I understand it know.

When I'm home tonight (Germany) I go one with my G4 h815... (third attempt)

Thx a lot, your post was a great help!

Looking forward, that know it will work.

update: doesn't work. I'm there. where I started...
[G4 Android Development] draymond1987:
This is in TWRP

adb shell cat /proc/cmdline
boot_cpus=0,1,2,3,4,5 sched_enable_hmp=1 sched_enable_power_aware=0 console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 msm_rtb.filter=0x37 androidboot.selinux=permissive lge.rev=rev_10 lge.battid=SW3800_VC0 lge.bootreason=Recovery_mode maxcpus boot_cpus=0-5 kswitch cc_mode=0 androidboot.bl_unlock_complete=true androidboot.dlcomplete=0 gpt model.name=LG-H811 bootcable.type=400MA androidboot.ddr_size=3221225472 androidboot.ddr_info=0x3b000501 fakebattery=disable lge.bootreasoncode=0x77665502 lge.hreset=off fips_allow_others=1 fips_panic=0 fips=0 androidboot.bootdevice=f9824900.sdhci androidboot.serialno=LGH8115b44a1c1 gpt lge.signed_image=false lge.dsv_id=DW androidboot.baseband=msm mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_jdi_nt36850_1440p_mipi0_cmd:1:qcom,mdss_dsi_jdi_nt36850_1440p_mipi1_cmd

In Android

adb shell cat /proc/cmdline
/system/bin/sh: cat: /proc/cmdline: Permission denied

Sorry for the delay , and if I did that wrong. Definitely not used to putting code into XDA. Also PM'd you [MENTION=5545101]steadfasterX[/MENTION] .

Noob question completely, and not related to thread. How the hell do I change the time on here, to my time zone.

---------- Post added at 06:53 PM ---------- Previous post was at 06:48 PM ----------

Also, screw GMail for not alerting me to the PM and @ mention. Thanks Obama! LOL.

Edit: I figured it out. Wow, I suck at life and partaking on forums.
[G4 Android Development] steadfasterX:
Thx pm'ed you as well ;) np

Can you do on android:

adb shell

su <---- you may be asked on android to allow access!

cat /proc/cmdline

Thx
[G4 Android Development] draymond1987:
# cat /proc/cmdline
sched_enable_hmp=1 sched_enable_power_aware=1 console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.selinux=enforcing msm_rtb.filter=0x37 androidboot.hardware=p1 lge.rev=rev_10 lge.battid=SW3800_VC0 lge.bootreason=Reboot_by_PowerKey maxcpus boot_cpus=0-5 kswitch cc_mode=0 androidboot.bl_unlock_complete=true androidboot.dlcomplete=0 gpt model.name=LG-H811 bootcable.type=400MA androidboot.ddr_size=3221225472 androidboot.ddr_info=0x3b000501 fakebattery=disable lge.bootreasoncode=0x77665501 lge.hreset=off fips_allow_others=1 fips_panic=0 fips=0 androidboot.bootdevice=f9824900.sdhci androidboot.serialno=LGH8115b44a1c1 lge.signed_image=false lge.dsv_id=DW androidboot.baseband=msm mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_jdi_nt36850_1440p_mipi0_cmd:1:qcom,mdss_dsi_jdi_nt36850_1440p_mipi1_cmd
[G4 Android Development] steadfasterX:
thx to the incredible BETA tester [MENTION=5830858]draymond1987[/MENTION] ;)

BETA-5 arrived!

Check it out here:

http://xdaforums.com/showpost.php?p=68249026&postcount=2

If nothing bad happens this may be the last BETA before merging with the official sources.

.
[G4 Android Development] kessaras:
hi [MENTION=5545101]steadfasterX[/MENTION] ! if you need any log, tell me. Updating now to beta 5

~EDIT: working :)

it remembers exactly at what folder i was last time i used it hehe nice. Also i saw f2fs. it works ?

it can format to f2fs and whats left is to get the llama kernel (since only llama and one more we have now) to work on f2fs ?
[G4 Android Development] steadfasterX:
All my Twrp builds support F2fs. Llama kernel supports it. But the most important thing is the ROM has to support it and genesixx said a while ago that this is not working well in N yet.
[G4 Android Development] DevUt:
f2fs performance is also very unpredictable and can give headaches to the common jack
[G4 Android Development] vmartinez39:
Hello, I installed TWRP Beta 5, best part is the date in autogenerate is finally fixed. Finally!!!!

Wanted to know if there is step I need to take in order to make proper LineageOS 7.1.1 backups to properly restore?

Do I need to format my partitions to F2FS or other steps?

I keep having issues when restoring my backups any LineageOS or 7.1.1 based ROM, it's not 100%

I'd like really to understand if I need to take any extra steps or if this is a known issue with N?

Thanks again
[G4 Android Development] steadfasterX:
F2fs is supported but that doesn't mean that you need to use it.

N is not supported/tested. If you want to help provide the recovery log and tell me exactly what is missing when restoring.

Check my FAQ #4 on the first page of this thread for a how-to.

#
[G4 Android Development] raptorddd:
[MENTION=5545101]steadfasterX[/MENTION] i used the h811 last week. and i had problems. restoring from twrp page official. from that build to yours.

i had

FC's.

also it would give me vpn/ caemera has stopped. even after i KDZ.

i did a orthodox cleaning this.

https://xdaforums.com/tmobile-g4/development/turbo-cleaning-proceure-h811-t3417606

then errors of FC dissapear. but all of the sudden after a few hours . my phone would do a hot reboot. as i can see screen beign on and dark and then lock screen would appear , kernel mod would kick in everytime. it kept on doing this over and over in minutes.. i could feel the screen hot while in pocket.. no LG logo during restart.. i reistall all again and had same problem.

then wnet back to the other twrp and problem is gone..
[G4 Android Development] steadfasterX:
I can't help without logs.
[G4 Android Development] raptorddd:
i know. but at that time i didnt know what it was. untill i decided to use other version. just wanted to let you know.
[G4 Android Development] raptorddd:
again..... this time i got some logs.. :D

this doesnt happen with the one at twrp website for h811.

as long as i use the phone and interact its good but when screen off. and i want to wake it up it sort of soft reboots or reboots withput going into LG logo. and even when its laying on table it does it over and over. takes a few minutes sometimes. i had this the last time i tried your build.. going back to the twrp official page. doesnt happen.?

last time i use it again official and no more .. yesterday i tried again your build and its happening.. not sure if its twrp related but seeems to only happen on this one.
[G4 Android Development] raptorddd:
okey... i need more testing but i think i found out the cause of soft reboot. when i downloaded a rom it had a launcher.. i use the launcer.. and it was installed as system if am not mistaken.. or maybe not LOL.. so i was placing as system app. while i was downloading some apps it started to soft reboot.. deleted launcher and went back to stock launcher from G4.. and it downloaded the apps no soft reboot.. so i think that was my problem. i will test more.. then ill change back to your twrp.. :fingers-crossed: