[G4 Android Development] aoleary:
Frequently Asked Questions (FAQ)

Note, I have shamelessly kanged this from the LOS16 thread by [MENTION=5545101]steadfasterX[/MENTION]

Q #01: I want to report an issue. What is the proper way to do so?

I'm glad that you are asking: before doing so check the KNOWN ISSUES topic in the OP!

If your issue is not listed there click here to proceed:

If your issue is not listed there follow the directions here briefly and I may can fix it:

logcat GUIDE

If you encountered a kernel panic follow FAQ #6 in this post instead.

Ensure you have done a

full

CLEAN install before doing so (refer to FAQ #2 for what that means).

Warning: NO SUPPORT when:

- magisk is installed (known to cause issues sometimes - regardless of the ROM or version)

- Xposed is installed (known to cause issues sometimes - regardless of the ROM or version)

If you have installed any of these UNINSTALL or better do a FULL CLEAN install (see FAQ #2) before doing anything else. Often enough these above causes several issues like battery draining, problems on booting and much more. Even when they may work properly you should re-produce your issue without them first and follow the above to grab the log.

Magisk is a great piece of software and besides that it is Open Source which SuperSu never was.

I just saying I do not "support" issues with LOS when you have Magisk installed. Why? It is (like Xposed) extendable with modules (made by whoever) and those can cause billions of issues.

Other then that magisk was sometimes the reason for battery drain etc. Magisk modifies the boot "process" and sits very deep in the system (which is needed to make it work ofc) but that has the potential to make a system/ROM unstable or result in strange behaviors.

so in order to support a specific issue I have to be sure the ROM is in a "clean" state, no magisk, no xposed. The LOS root-addon is tested with LOS and made for it so that is not an issue but for the rest there are so many things which can going wrong..

Q #02: I want to install clean, how? What is a clean install? What is the recommended way to flash a new ROM version?

A clean install ensures that there are no leftovers from any previous install. One can say that there are 2 phases of a clean flash:

1) regular

2) full - when you (still) encounter issues

Usually the regular one is fully ok when flashing a new ROM version but if you encounter strange issues nobody else is reporting or if a release post is recommending it you should do a full clean install instead.

A

regular clean

install can be done like this:

WIPE -> Advanced -> select: System + Cache

Flash the ROM

reflash root addon/magisk if you want root

reflash opengapps if you want to use Google crap

A

full clean

install needs 2 steps more then the regular:

follow the steps for regular clean

go back in WIPE -> touch the "FORMAT data" button and type "yes" to format the internal storage (you will LOOSE ALL YOUR DATA - obviously)

REBOOT -> Recovery

Flash the ROM

reflash root addon/magisk if you want root

reflash opengapps if you want to use Google crap

It is absolutely recommended to create a backup before and COPYING IT to your PC(!) before doing the above.

Q #03: It looks like the CPU cores 5 and 6 are disabled - how can I fix that?

TLDR;

There is no fix required! it is fully ok when those are idle. they get hot plugged whenever needed.

Details:

we have 2 clusters of CPU cores resulting in a Hexa-core CPU set: (4x1.4 GHz Cortex-A53 & 2x1.8 GHz Cortex-A57)

the big one (2 CPU cores - higher performance = more battery drain, more heat which potentially causing the: bootloop issue) and the little (4 CPU cores - less battery drain but a bit slower) are handled dynamically based on the load of your device.

the big cluster will run ONLY when it is NEEDED - i.e. high load.

so when you look closer: those are not DISABLED they are IDLE which is a big difference.

Q #04: I get a kernel panic or green/purple/blue screen how to grab logs for this?

You need a ROM with pstore fully enabled and

working

(pstore = debug kernel panics/oops happened in a ROM)!

All builds starting from

2019-08-15

on support pstore due to: commit#1, commit#2, commit#3

This is a 2-site change if you want to make use of it in TWRP you must install the latest TWRP "PREVIEW" release as well (TWRP is only able to show pstore logs when the ROM is able to write them so I needed to fix pstore in the ROM first (see above commits #1 + #2 )).

Besides those 2 patches these kernel configs were set: PSTORE

You can check if a ROM does support writing pstore logs by:

as soon as possible on a fresh boot:

adb shell
dmesg | grep "ramoops|pstore"

[ 0.000000] cma: Found ramoops_region@0, memory base 0x000000001fe00000, size 2 MiB, limit 0xffffffffffffffff
[ 0.000000] cma: CMA: reserved 2 MiB at 0x000000001fe00000 for ramoops_mem
[ 0.200846] cma: Assigned CMA region at 0 to ramoops.78 device
[B][ 3.957553] console [pstore-1] enabled[/B]
[B][ 3.957939] ramoops: attached 0x200000@0x1fe00000, ecc: 16/0[/B]
[ 3.958079] drv probe : 200 ramoops 3744
[ 6.262463] SELinux: initialized (dev pstore, type pstore), uses genfs_contexts

or (if you are not fast enough) this ensures mostly the same check:

adb shell
ls -la /dev/pmsg0

crw-rw-rw- 1 camera camera 254, 0 2015-01-05 04:54 /dev/pmsg0

If you get

no

output your ROM does

not

support pstore logs.

From now on when you encounter a kernel panic and you are able to reboot

without

taking out the battery (taking out the battery will erase RAM):

1) reboot (without taking out the battery!) to either TWRP or (if you have root access) to your ROM

2) grab everything need from here: /sys/fs/pstore/ (e.g. adb pull /sys/fs/pstore/)

If you don't have a pc near you can do it directly from the device as well:

Enable the terminal app in developer options or download any

Open the terminal app.

su

cd /sdcard/Download

tar czf pstore.tgz /sys/fs/pstore

Attach pstore.tgz to your post.

It is crucial important that you do this only after the reboot happened . It's not important "when" though - as long as the device stays powered on.

Developers

note:

convert PMSG log

tr -cd '\11\12\15\40-\176' < pmsg-ramoops-0 > readable-pmsg.txt