yashsingh1/xdaforums huggingface dataset:
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] raul16:
1. when initially install LOS 18.1 from any other ROM (stock or custom) it is required to format /data in TWRP. if your SDCard was setup as external you should format that too to avoid issues (like encryption);

2. within same version (aka LOS 18.1) dirty flash of the update will do just fine. GApps should survive (backup and restore via addon.d scripts). Magisk modules must be removed (via .app) and Magisk unistall (in TWRP only) before flash to avoid bootloops; after flash of the update need to wipe cache & dalvik then reboot to system.

3. check what freespace you have on your internal memory as seems to be full (no space); move (what you can - like pictures. music, movies, games) from internal to external (removable) memory or as an option integrate your external memory into internal memory ...

4. Magisk is a very useful app if you need to install modules that add to system functionality (not available as is in LOS 18.1 /system) usually called mods;

or you need to pass Google CTS for using banking / netflix apps. LOS18.1 does not alter build fingerprint nor hide open bootloader which fail to pass basic CTS (!); magisk hide solve that ;)

or you need to have root access for some special apps that require it to enable extra functionalities (that are useful to you);
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] ondrasouk:
I installed the build 20210912 over 20210712.

Found out that banking app from my bank (cz.moneta.smartbanka) is causing kernel panic "BUG: scheduling while atomic" after some SELinux denials when it tries to open /proc/<PID>/net/unix or /proc/<PID>/net/tcp (where <PID> is PID of this app). I am not sure if this app is the only app that is problematic sometimes i see exact lines with denials but the phone is not running to this bug. (logs.zip/dmesg-ramoops-1.log and dmesg-ramoops-0.log) This problem was not there with build 20210712.

Uninstalation or force killing of this app helps in lowering the frequency of random reboots (I am not happy about this method...), but there is other cause for random reboots that don't generate ramoops like this one (no luck in catching last kernel message).

In the logs i have encountered few warning alongside this:

This happens in loop (almost every few seconds, dmesg is completely spammed by this) when phone is stuck at splash screen (to be able to connect to the phone you will need to tick on something like "always enable ADB for this fingerprint" on normal boot to be able to connect even when the phone is locked or booting up): (from logs.zip/stucksplash.txt, HTop reports that zygote (and zygote64) is heavily using CPU)

msm_pm_qos_update_request: update request 100
[ 4576.590618] ------------[ cut here ]------------
[ 4576.590633] WARNING: CPU: 3 PID: 2217 at ../../../../../../kernel/htc/msm8996/kernel/power/qos.c:583 pm_qos_update_request+0x58/0x64()
[ 4576.590637] pm_qos_update_request() called for unknown object

This is always in dmesg after start (1.1s - 1.7s), maybe it's some lead for the broken battery percentage (I don't have any older logs from before to compare): (logs.zip/startupwarn.txt)

[ 1.434233] FG: fg_check_ima_exception: Initial ima_err_sts=0 ima_exp_sts=0 ima_hw_sts=88
[ 1.434300] ------------[ cut here ]------------
[ 1.434331] WARNING: CPU: 1 PID: 177 at ../../../../../../kernel/htc/msm8996/include/linux/of.h:770 fg_probe+0x1724/0x2d50()
[ 1.434340] Modules linked in:
[ 1.434361] CPU: 1 PID: 177 Comm: kworker/u8:3 Not tainted 3.18.140-lineage #394
[ 1.434370] Hardware name: HTC Corporation. MSM8996v3 PME PVT (DT)
[ 1.434397] Workqueue: events_unbound async_run_entry_fn

Hope this helps.

If I can help you by bisecting the kernel i will be happy to help you. I do not know how to flash the compiled kernel binary or generate zip file for install. I have long experience with GNU/Linux systems so build of kernel or setup for bisecting is for me easy, but Android and embded Linux is for me like some kind of blackbox. Probably I need to take the vmlinuz binary and repack it with extracted initramfs from original boot.img to make new modified boot.img. But I don't know the exact steps to produce something that boot up.

Thank you for your work @raul16 .

PS: Sorry for my bad english.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] raul16:
On warning issue - only appear once during probing devices . could not (yet) figure it out. not impacting usability.

On the "BUG: scheduling while atomic" this came up once schedulers fix for cgroup; haven't notice it (see #221) before posting 0912 version.

I've look into it and reverted suspicious commits, as such, i expect that in next release will no longer have this bug. (actually i could not replicate it even on 0912).

If you want to build & flash only kernel you could find on XDA several tutorials on how to do it.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] GoodKingWenceslas:
Hi Raul16,

Thank you so much for the fantastic port to our particular phone.

You answered all of my questions, except I am still confused about one point.

I have ~20gb of Internal memory that's free. It's a 32gb device and all I installed with LineageOS and gApps and Brave Browser. Even "Settings" says I am not using anything that can be removed.

Do you have any pointers to how I recover this situation? I tried to look for an article but everyone assumes that my phone is actually full.

If there's diagnostics or something I can run, I'm happy to give it a go.

Re: Magisk... I appreciate the explation. Basically, "side loading" is how you explained it.

Really appreciate the support.

Thanks again

GKW
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] raul16:
check your apps / GApps permissions granted - maybe no access to files granted (1)

detail the steps you take to flash LOS 18.1 & GApps (2)
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] GoodKingWenceslas:
I left notes for myself in case I forgot what I did. I forgot what I did.

QUOTE

I followed these instructions,

https://xdaforums.com/t/rom-11-0-pme-lineageos-18-1-unofficial.4221753/

UNQUOTE

Now, it appears that I did not follow step 11 which says "configure your apps permissions".

So... I have now done this.

I went into "Settings" and selected "Apps and notifications"

I could not see anything in particular here that may be a problem (eg. Play Store has no permissions).

I then went to "Play Store" and searched for "Brave" and select "Install". I receive an error notification saying "Not enough storage space". I had previously installed Brave (which may have happened prior to installing Gapps).

I then went back into settings and I saw "Storage 12% used - 84.54GB free"

Within Storage, it says "Internal 8.90GB used of 32GB" and "SD card 3.37GB used of 64GB"

Now, to the best of my knowledge, I followed the instructions for installing LineageOS using steps 2-8 and step 10. I also explicitly downloaded your suggestion of NikGApps for R MindTheGapps ... I also used TWRP 3.5.2_9-0-pme

If you can suggest anything else I can try, I am happy to do it. If you want a blow-by-blow description of TWRP, I can always re-do it.

I'm currently receiving an error for ANY app that requires an update (eg. Google, Speech Services by Google, Google Calendar). If I click them, it takes me to a screen saying "Free Up Space" which says "No Installed Apps Found".

Thanks for the help!

GKW
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] lpedia:
@GoodKingWenceslas, I haven't had this particular problem myself, but I have seen a lot of others (with other phones / OS versions) complaining of a similar issue ... so it's not uncommon.

Clearing Play Store and Play Services cache and data often seems to be the solution. There's also a Google Support item Fix Play Store opening, loading, and downloading issues. One of the things it suggests is uninstalling and re-installing Play Store updates. I'd try that if clearing cache/data doesn't help, because when you install gapps, the Play Store app and Play Services that come with it are usually not the latest version, so the first thing the Play Store app will do is update itself. Maybe the update didn't quite work.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] GoodKingWenceslas:
Thanks ipedia.

I'll keep that in mind. I decided to restart from scratch and I made the following notes.

QUOTE

Step 1 - Enter TWRP

1. Power down phone

2. Hold power and volume down for about 10-15 seconds (until you see HTC logo)

3. Select "Reboot to bootloader" (and phone will soft-reboot)

4. Select "Boot to recovery mode" (and phone will soft-reboot)

Step 2 - Wipe Internal Memory

1. Swipe to allow modifications (see blue bar at bottom of screen)

2. Select "Wipe"

3. Select "Data" and enter "yes" [note: you must type in "yes", otherwise the encryption won't be erased and you won't be able to access the phone]

5. Select "Reboot System" and you'll have to do "Step 1" to enter TWRP again

6. Plug phone into PC and copy LineageOS and MindTheGApps to the External Storage of the phone] ... [might need HTC Driver installed to do this]

Step 3 - Install LineageOS

1. From TWRP (step 1), Select "Install"

2. Change storage to External Storage (in my case Micro SD Card)

3. Select the LineageOS zip file

4. Make sure "Reboot after installation is complete" is checked

5. Swipe to confirm flash (blue bar at bottm of screen)

Phone will reboot. Go through installation process until you see the standard android screen

Step 4 - Install MindTheGApps

1. Connect the phone to your PC and copy MIndTheGapps zip file to your External Storage

2. Reboot into TWRP

3. From TWRP (step 1), Select "Install"

4. Change storage to External Storage (in my case Micro SD Card)

5. Select the MindTheGapps zip file (eg. MindTheGapps-11.0.0-arm64-20210920_084011.zip)

6. Make sure "Reboot after installation is complete" is checked

7. Swipe to confirm flash (blue bar at bottm of screen)

Phone will reboot (hopefully). If not, reboot and restart Step 4

Go through installation process until you see the standard android screen

Step 5 - Post Installation

1. You'll have to set up your External Storage (you'll be warned and double tap the warning screen)

UNQUOTE

At the moment, I can now install Brave again. Android says there are no updates. If there are any problems, I will share my findings.

You are welcome to use my notes as you see fit. If it helps other beginners, then all the better.

Thanks again

GKW
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] lpedia:
Thanks for the update! Glad to hear it's working now!

Could be that the original problem was a faulty Play Store update. Assuming you installed the same gapps this time as in previous attempt/s?
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] GoodKingWenceslas:
It's a good question.

I had previously installed Gapps.

It's possible that Play Store may have corrupted. I know my wife sometimes has problems with Play Store, however, her (occasional problem) is that apps will update forever (or just fail to update). She clears the cache and it normally recovers.

I was suspicious of a permission problem (as in rwx permission in the OS) somewhere that was locking Android's ability to update.

When I installed LineageOS, I think I rebooted durning its first configuration because it took quite a while. I had this niggling feeling (as a veteran software developer among my many hats) that I had accidentally caused a problem through good intention.

I had done very little to the phone, so, my gut feeling said "just wipe and start again". Third time around, you know the ropes much better.

I'm definitely learning about Android rapidly. But technology is now only a tool for me so I will probably never master Android or any other tech again.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] lpedia:
It could have been filesystem permissions - maybe something hadn't been set correctly when you interrupted the first boot. Probably not advisable to interrupt it and then boot without re-flashing. You'd never know what it didn't finish doing. Except via strange errors. :)

It's always a bit hard to know how long to leave it doing the bootanimation loop ... at what point can one say it's stuck rather than just taking its sweet time? I'd consider this device stuck if first boot went on for longer than 10 minutes. After that, it should come up within about a dozen bootanimation loops.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] shadabkiani:
@GoodKingWenceslas Glad to hear the problem is fixed now. I think it was because you didn't format the Data partition in recovery before (the option where you have to manually type 'yes' to continue). Secondly, I suggest you use NikGapps as they are recommended by most developers because of their stability.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] raul16:
@GoodKingWenceslas to check missing perms and grant access use the Privacy in settings. let GApps have the file perms, but check all of them as you might need to grant some more (for updates, sync account for calendar, mail, etc...)

@lpedia missing file perms blocked any updates via GApps.

I recommend to use (as GApps) only Nik GApps or MindTheGApps as validated to work on R (A11); while OpenGApps seems to have issues on R (!)

I prefer Nik's core version as better preserves battery.

For better Android OS & GApps integration it is recommended that the installation of both to be done in a single step - aka merge step 3 & 4 (from @GoodKingWenceslas post

#249) at flashing stage - select LOS.zip to install and select add zip to install and select your GApps.zip to install and then reboot to system. By installing both LOS & GApps in single step will better integrate and system perms will be granted as required.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] raul16:
new build available lineage-18.1-20211014-UNOFFICIAL-pme.zip

log:

October 2021 Security patch

los: upgrade A11 from r43 to r46 build RQ3A.211001.001

pme: code upstream, backport + optimizations

pme: kernel charging, scheduling while atomic bug
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] bermano:
Just tried latest build from raul16.

I think This ROM running smoothly for it functionality,

all features work properly, with a little issues on the battery indicator.

my previous OS was LOS 16 from fagyi, battery indicator was fine.

switch into this ROM, battery indicator seem drain battery too fast when screen is on (phone in use). but on standby mode (screen turned off) it seem OK.

I turn off the phone at 10% then charge the battery (with the phone turned off), few minutes later (I guess about 10 minutes) then check charging process already at 43%, , so may be this just about counting issue.

The Plus side:

my NFC worked with this ROM but only read mifire 1k tags and card, the signal strength is perfect (sadly, can not read all of my e-money card from few different local bank)

my previous OS : Original ROM Oreo 8.0.1 and LOS 16. none of both can read passive tag and card (but NFC beam always worked for file transfer)

*sorry for my bad English
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] shadabkiani:
There is a bug with battery indicator with this ROM. If you have rooted your phone with Magisk, then the workaround is posted in post #76 https://xdaforums.com/t/rom-11-0-pme-lineageos-18-1-unofficial.4221753/post-85150389
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] bermano:
thank you shadabkiani, i will check
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] shadabkiani:
@raul16 The reboot-loop issue is still there and it's very annoying. When I reboot, it just gets stuck on HTC logo for some time, then reboots, then gets stuck again. It keeps happening and maybe after 7 or 8 tires it finally boots up successfully. Can I share any log file that you can analyze to diagnose what keeps the phone from booting up?
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] raul16:
besides the logs (dmesg ramoops) of last boot loop please provide more info on reboot - reboot from system or recovery ? magisk with modules installed ... to be able to understand your specific context.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] shadabkiani:
Logs have been attached. I took the logs after I rebooted my phone just now, and it took 7 or 8 times before booting successfully.

Rooted with Magisk and ACC module (for charging) installed.

It doesn't matter where I reboot from, whether I simply reboot the phone, or power it off and then turn back on, or I go to recovery and then reboot, or I go to download mode and reboot from there, nothing matters. It just goes into reboot-loop for 7 or 8 times, or maybe more, and then boots up on its own will.

(P.S. the reboot-loop means that it loops before the bootanimation, you know when HTC logo appears. Once the bootanimation comes, it boots up good.)

You know what, I will try a different strategy this time and let you know. I will not root my phone this time, use NikGApps core version instead of basic one, see how it goes.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] shadabkiani:
@raul16 Update: I just reflahed the ROM with NikGApps Core version. No apps installed yet. Now I have rebooted the phone a number of times and that reboot-loop issue hasn't happened yet. So now I know it was wrong with some app beffore that used to cause the issue, not the ROM. I will update you after some more tests.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] KEB64:
Thank you for the update. Running very well here.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] shadabkiani:
@raul16 Update: So now I have installed all the regular apps that I use. Now when I reboot, it generally reboot-loops once before booting successfully. That means it boots up on 2nd try. But its still better than before.

I have not rooted the phone yet. Now I beleive it was the Magisk module ACC for charging that was causing trouble before. Anyway, I will install and test then let you know.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] ondrasouk:
I don't use ACC hack for correcting the battery percentage and I have random reboots (mostly after first drawn frame (or before the ads loads) of web page in Chrome) and sometimes the phone starts at fourth try.

The "scheduling while atomic" bug is still there.

BTW: Tried compiling the near mainline linux-msm kernel. The phone booted...well that's it. After a day I have produced working display, but...well everything else is not working (tried building PostMarketOS, because for Android i would need to build my ROM for this development and mainly i don't know Android stack and hate Java...) For now i don't have time for creating patches for bringing drivers and functionality from downstream CAF kernel and getting it working in PostMarketOS or other Linux distros, so for now i will be using Android. I will have more time after may, so maybe next year I will have something "working" (hope the radio will not be a big blocker).
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] raul16:
based on logs attached the kernel panic is due to Chrome (process ThreadPoolForeg aka Thread Pool Foreground that seems to stack overflow).

i use Google (from NikGapps) and webview (based on Chromium) and no such issues.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] Kasazza:
Hello everybody,

I am coming from LOS 17 (fagyi): I installed latest TWRP 3.5.2-9.0 and did step 1 and step 2.

But the zip files of ROM and NikGapps copied in folders of internal memory: is it mandatory to copy them in to a external MicroSD?

Is it possible to install in the same time in 2 steps first ROM then GAPPS and then after only one reboot? I do not need to installl any other add-on like Magisk and so on.

Thanks, Andrea
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] raul16:
copy needed files into internal memory. no need to use external SD Card.

factory reset would be recommended in TWRP

you can add more zip's to install in TWRP, so after ROM you can add NikGapps (and add-ons if needed), then after flash ok just reboot to system.

first boot will be longer. configure phone and you're done if no Magisk required. (for passing CTS)
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] Kasazza:
Factory reset and format ("yes") already done. Amd already restarted TWRP aftyer it.

Tomorrow I start programming it: smartphone left over the office desk ;)

Already read of the very long lasting first boot (possible half an hour... NOT BAD!)

I did not understand when it is useful to add add-on packages singularly by the list of NikGapps, or when is i t possible to add them after the first deploy installing them normally by Play Store!

Andrea
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] raul16:
first boot (rom+core nikgapss) should take ~5 min not longer...

you can either pick up nik or play store app for normal / standard apps like gmail / maps / yt/ music

for special apps like vanced manager, yt vanced, music vanced use add-ons and flash them after rom & core/basic (!) in one install then boot. this will insure proper installation and permissions.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] Kasazza:
Installed latest build, with latest NikGapps 2021/10/18 Base version

After first start updated Google Play Services and installed Google Drive, News and GBoard

I have noticed two little issues:

1) The official APP of Italian Health Government Office Minister COVID19 Green Pass Check does not recognize them as good! I Don't know if it's a issue related to a non-official ROM (probably) or to tne disabled encryption...

2) Play Store does not recognize as already mine a APP bought in the past, and it tells me to pay for install...

Probably it needs to be resetted and reinitialized, anyway very good... I stay tuned for nest releases

Bye from Italy, Andrea
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] raul16:
on the reported issues:

1/ what does the app check actually ? here in Romania we just dowload the EU Green Pass (Vaccine Certificate in EU form) wich is an signed PDF document we show when needed.

maybe the app require CTS pass (from Google) and then you might need Magisk hide ;

2/ same user so should be OK unless again CTS verification (like for GPay !) then again Magisk hide required.

also in both cases look for missing permissions that might be required for those apps.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] raul16:
new build available lineage-18.1-20211107-UNOFFICIAL-pme.zip

log:

November 2021 Security patch

los: Bump Security String to 2021-11-05 [build RQ3A.211001.001]

pme: device code cleanup
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] yemreyazici:
bro What are you using as camera app? stock or gcam
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] raul16:
stock
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] yemreyazici:
Thx bro. I will set it up soon. Do you have any suggestions? I'm currently using stock 8.0

Do you have work for Android 11 and 12?
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] raul16:
to set it up follow steps in post #1. this is android 11.

do a full backup of your phone before to be able to recover.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] yemreyazici:
I downloaded the rom. but in the installation, the google account is constantly returning to the wifi section in the login section. what is your suggestion
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] yemreyazici:
edit: fix it problem but new problem: sms not coming why? @raul16
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] shadabkiani:
You have to set default apps for dialer and messaging. Go to Settings and then Apps. You will find default apps settings there.
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] yemreyazici:
şm waiting sms came but new problem. charge very slow why?
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] shadabkiani:
It's not slow actually. The phone is charging fine. The bug is that battery percentage doesn't show correctly. If you have rooted your phone with Magisk, then the workaround is posted in post #76 https://xdaforums.com/t/rom-11-0-pme-lineageos-18-1-unofficial.4221753/post-85150389
[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] mirok:
Thank you for keeping this device alive. <3