[G4 Android Development] steadfasterX:
New PREVIEW releases

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

when to use

)!

twrp-3.3.1-PREVIEW-196_g4_MM and N

twrp-3.3.1-PREVIEW-200_g4_O and P and datamedia

Release date: 2019-08-08/2019-08-09

Status:

without

data/media patch*: considered to be STABLE

including

data/media patch*: UNSTABLE (known issues for backup & restore)

TWRP sources changelogs:

without data/media patch

including data/media patch

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

O flavor

N flavor

MM flavor

Summary changelog (read the linked changelogs above for ALL changes):

fix in P flavor: kernel was (possibly) build on wrong branch (oreo)

new in O, P, datamedia flavors: enable pstore commit#1, commit#2, commit#3 (pstore = debug kernel panics/oops happened in a ROM)

This is a 2-site change as 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 the ROM also must have these kernel configs set: PSTORE

You can check if your 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 what you need from here: /sys/fs/pstore/

Download:

without

data/media backup/restore: sfX leech server (compatible with all G4 models and containing all flavors)

including

data/media backup/restore: sfX leech server (read the notes)

*Notes:

Since build #191 I split regular TWRP builds:

without

my data/media patch and those

including

my experimental data/media patch - as it turns out it is not as production ready as thought.

The data/media version can be found from now on here only: http://leech.binbash.it:8008/TWRP/datamedia/ and it is always based on Android Pie (almost identical to the P flavor - just with the datamedia patch on top). It will also lack behind as the TWRP sources need to be manually included from upstream and I do that rarely only.

The new and

high experimental

feature to backup data/media (so your internal storage) is a WIP (work in progress) but I would love to hear your feedback of the current implementation and the current known issues.

If you encounter any issue check the known issues first and if it is not listed share the recovery.log or even better open a new issue there.

.