yashsingh1/xdaforums huggingface dataset:
[MeMO Pad 7 Original Android Development] lambdadroid:
Part of this seems to be something in Android. It is quite picky about the WiFi signal strength. (It works much better on Linux.)

Not sure how to improve this, you can try posting a logcat here (see https://wiki.lineageos.org/logcat.html), although I'm not convinced I will be able to help you.
[MeMO Pad 7 Original Android Development] mike0800:
OK i cannot link to my log files, damm, 10 Post rule

How can i get around this?

Otherwise, You have done great work!! Too bad, there is no way for me to bring LineageOS to my HuaweiG07, because of locked bootloader... 55€ for unlocking, no.

Merry Christmas!

Edit: Links in PM, send to You. :)
[MeMO Pad 7 Original Android Development] lambdadroid:
I haven't shared anything for a while, but I've been quietly working on some new things.

First, I have decided to abandon LineageOS 14.1 (Android 7.1.2 Nougat), skipped LineageOS 15.1 (Android 8.1 Oreo) and moved directly to LineageOS 16.0 (Android 9 Pie).

The port of LineageOS 16.0 is mostly done, but I've been delaying it for several months now due to problems with the hardware accelerated video codecs from Intel. As I have mentioned before, they are one of the few remaining proprietary parts of this ROM, and the version from Nougat is no longer working on Pie. They have updated binaries, but they do no longer support older Intel CPUs like the one in this tablet.

At the moment, the only possible solution within sight is that they have said that they will eventually open-source it sometime early this year. Then I can properly investigate and eventually get it working again.

Since I haven't been doing much work lately, I figured it would be a good time to share a test build. I'm not sure if it is very useful - watching videos is one of the main remaining usage scenarios for this tablet but with software codecs the battery is going to drain much more quickly - but maybe some of you like to test experimental stuff...

There were a lot of changes and cleanup for Pie, including a kernel upgrade to 4.19.x. Currently missing features are:

Hardware accelerated video codecs

SELinux enforcing

WireGuard

Few minor optimizations

Note: The builds below are intended for testing only. They are insecure, and likely unstable. You need to do a full factory reset before flashing them.

TWRP: twrp-recovery-3.2.3-20190109-UNOFFICIAL-me176c.img

Flashable ZIP: lineage-16.0-20190111-UNOFFICIAL-me176c.zip lineage-16.0-20190109-UNOFFICIAL-me176c.zip

Have fun!
[MeMO Pad 7 Original Android Development] jerbear294:
Yeah, I had noticed the 16.0 progress silently chugging along on GitHub, and was considering building a copy myself, but I wasn't sure if it was even in a usable state.

I really only use my tablet for video these days, but not for extended periods, so I will flash the test ROM tonight and report back with any issues.

I suppose this is a good time to test the reliability of the userland WireGuard implementation as well.
[MeMO Pad 7 Original Android Development] jerbear294:
Used the ROM for a bit last night, and "unstable" is an understatement- I think there's a serious memory leak, as after a few minutes the entire system locks up after some minor graphical artifacting.
[MeMO Pad 7 Original Android Development] lambdadroid:
You might be running of out RAM because the zram swap is disabled. (It was causing kernel panics on Linux 4.14, and I have not re-tested using 4.19 yet). It's no surprise that the tablet will quickly run out of memory with 1 GB RAM. Without swap space, it will just lock up completely.

Try this boot image (flash using Fastboot): https://drive.google.com/uc?id=1Nybtjuxtw1e9QaREoBqX4VBooPfywq-X&export=download

Obviously each new Android version requires more system resources. There might be additional potential to save some RAM using a configuration similar to Android Go. It uses less RAM at the cost of more required CPU power. I have read that it is possible to apply that to custom ROMs, but have not investigated any further yet.

If this boot image does not help, please try to get the relevant log using logcat and post it here. I have recently made some changes to the graphics implementation that could be also related.
[MeMO Pad 7 Original Android Development] jerbear294:
The 4.19 kernel appears to have the same issue. You're probably right about it being graphics driver related. I can still get notification sounds and can audibly hear the home button if I tap it. I've attached a logcat from my tablet in this frozen state.

Interestingly, if I let the screen timeout, I can wake the system back up and the lock screen will work properly. However, when unlocking the device, I'm greeted to just the background being rendered.

These seem to be the relevant lines, which are spammed across the logcat:

01-10 15:38:00.038 262 262 E HwcComposer: executeCommands failed because of Status(EX_TRANSACTION_FAILED): 'FAILED_TRANSACTION: '
01-10 15:38:00.038 262 262 E HWComposer: prepare: validate failed for display 0: NoResources (6)
01-10 15:38:00.038 262 262 E SurfaceFlinger: prepareFrame for display 0 failed: -75 (Value too large for defined data type)
01-10 15:38:00.038 262 262 W HwcComposer: discarding stale data from message queue

I snipped some of the logcat in order to try fitting it in XDA's text upload limit (in vain), but it's just more of the spammed line.

https://ptpb.pw/BpKf

Here's some more problems I've found with the ROM, in order of severity:

Setting a lockscreen pattern prevents the device from booting properly. It will freeze at the lock screen, and SystemUI will crash after a short while. SystemUI will later recover, and this process continues indefinitely. I have not tested PIN or password unlock. The only remedy (short of just deleting the locksettings related files in TWRP) is a factory reset.

Might be related in some form, but the lockscreen portion of Settings crashes after a pattern is set.

Viper4Android seems to automatically open itself on boot. This doesn't happen on my Essential phone, which is also running Lineage 16.

Lawnchair's blur setting doesn't work properly. Perhaps it's a Mesa deficiency? Not a large deal anyways, I wasn't planning on using the feature.
[MeMO Pad 7 Original Android Development] lambdadroid:
Sorry, this might have been confusing. The new boot image contains the same kernel, I have just re-enabled the zram swap. Does it cause any new issues, or just the same?

Hmm, I have seen these errors before, but only on another device after suspend. This ROM should still have suspend disabled. Nevertheless, I will need to investigate this anyway. I will try to reproduce it on my device. Does this happen without any third party apps installed (i.e. just the ROM, no gapps, no magisk, etc)?

The link seems to be broken at the moment: I get "503 Backend fetch failed.". Can you upload it somewhere else? https://gist.github.com would be preferred.

Both confirmed. Will investigate.

I will delay issues with third party applications/modifications for now. There is no stable version of LineageOS 16.0, so it is very well possible that other ROMs pick additional fixes that are not merged yet.
[MeMO Pad 7 Original Android Development] jerbear294:
I didn't notice anything, although currently I'm only getting uptime of five or six minutes with this ROM, so it's possible the system just hasn't been on long enough for any issues to manifest.

Yes. After doing a factory reset and a full ROM reflash, the issue is still present with only the first party applications installed.

Not just you; that site seems to have went down yesterday. I will use GitHub Gist for all future logcats.

https://gist.github.com/jerbear64/87d8150c96488e4184378ad3f61a9525

Here's a logcat from today, on the fresh installation:

https://gist.github.com/jerbear64/55cf112088bcf049199b86e31a2a1cae

In the case of the Essential phone, it's very much an upstream build. The builds are by one of the Lineage developers; the only reason the 15.1 builds weren't made official was because at the time a lot of GApps packages didn't play well with A/B partitioning, so the builds contain GApps by necessity. From my understanding the Essential phone is on track to becoming official when 16.0 releases, and this is reflected in the unofficial builds.
[MeMO Pad 7 Original Android Development] lambdadroid:
Thanks, I will try to reproduce the graphics problem now, fixed lock screen in https://github.com/me176c-dev/andro...mmit/b4e71419aa4e667c7d8b8c0fe768eccd36cf86f1
[MeMO Pad 7 Original Android Development] lambdadroid:
Good guess, there is indeed a leak in my implementation of the Graphics Composer HAL - although not a memory leak. There is a serious leak of file descriptors:

K013:/proc/221 # cat cmdline
/vendor/bin/hw/android.hardware.graphics.composer@2.1-service.drmfb
K013:/proc/221/fd # ls
0 10840 11684 12527 13370 14213 15057 15900 16744 17588 18430 19275 20117 20961 21804 22648 23491 24334 25178 26020 26865 27708 28551 29395 30237 31080 31924 3277 412 4964 5807 6650 7494 8337 9180
1 10841 11685 12528 13371 14214 15058 15901 16745 17589 18431 19276 20118 20962 21805 22649 23492 24335 25179 26021 26866 27709 28552 29396 30238 31081 31925 3278 4120 4965 5808 6651 7495 8338 9181
10 10842 11686 12529 13372 14215 15059 15902 16746 1759 18432 19277 20119 20963 21806 2265 23493 24336 2518 26022 26867 2771 28553 29397 30239 31082 31926 3279 4121 4966 5809 6652 7496 8339 9182
100 10843 11687 1253 13373 14216 1506 15903 16747 17590 18433 19278 2012 20964 21807 22650 23494 24337 25180 26023 26868 27710 28554 29398 3024 31083 31927 328 4122 4967 581 6653 7497 834 9183
1000 10844 11688 12530 13374 14217 15060 15904 16748 17591 18434 19279 20120 20965 21808 22651 23495 24338 25181 26024 26869 27711 28555 29399 30240 31084 31928 3280 4123 4968 5810 6654 7498 8340 9184
10000 10845 11689 12531 13375 14218 15061 15905 16749 17592 18435 1928 20121 20966 21809 22652 23496 24339 25182 26025 2687 27712 28556 294 30241 31085 31929 3281 4124 4969 5811 6655 7499 8341 9185
10001 10846 1169 12532 13376 14219 15062 15906 1675 17593 18436 19280 20122 20967 2181 22653 23497 2434 25183 26026 26870 27713 28557 2940 30242 31086 3193 3282 4125 497 5812 6656 75 8342 9186
10002 10847 11690 12533 13377 1422 15063 15907 16750 17594 18437 19281 20123 20968 21810 22654 23498 24340 25184 26027 26871 27714 28558 29400 30243 31087 31930 3283 4126 4970 5813 6657 750 8343 9187
...
K013:/proc/221/fd # ls | wc -l
32767

There was a missing call to close() that was causing new and new file descriptors to be opened. When it hits the maximum number of allowed file descriptors (32768), the screen freezes and the errors start happening. With each display change, only a few more were opened, so it happened only after a few minutes.

I've fixed this in https://github.com/me176c-dev/drmfb-composer/commit/b133d7b3579814d259fdb7136882ad92b73a169c

I've uploaded a new flashable ZIP with the lock screen and graphics fixes: lineage-16.0-20190111-UNOFFICIAL-me176c.zip

Let me know if it fixes these two issues. Thanks!
[MeMO Pad 7 Original Android Development] jerbear294:
Looks like both of those issues have been resolved.
[MeMO Pad 7 Original Android Development] jerbear294:
Signature spoofing is currently also missing from the LineageOS builds, it appears. MicroG (correctly) complains that the ROM doesn't support it. I also got the chance to test WireGuard's userland implementation, and while it works fine, on both my Essential phone and this tablet it's quite the battery hog compared to the kernel implementation.

I also noticed that LiveDisplay is currently broken, and has no effect.
[MeMO Pad 7 Original Android Development] lambdadroid:
Both should be trivial to add again for the final release build.

Will check. They refactored that feature quite a bit in Oreo and Pie, and I have a slight feeling that it may only work for qcom devices by default...
[MeMO Pad 7 Original Android Development] jerbear294:
Auto rotation seems to be fully broken, as opposed to not working after a reboot like previously.

To avoid cluttering the thread, would you prefer I report issues via Github?
[MeMO Pad 7 Original Android Development] lambdadroid:
There is not much other discussion going on in this thread, so I don't really mind. However, I tend to forget about issues if I don't test them immediately, so GitHub is usually the preferred place for issues.
[MeMO Pad 7 Original Android Development] simthadim:
Thank you very much!

I use my tablet just to play around so will give it a go for sure (recently cracked the screen, though :( ), .

Is the Pie build so-far still affected by the deep sleep issue?
[MeMO Pad 7 Original Android Development] lambdadroid:
Yes, although I've made some progress on that front. On Arch Linux, I can now reach the deep sleep state (S0i3) and suspend and wake up without major problems. (Although WiFi seems to get disabled on suspend...)

On Android, things are not looking that great. For some reason, it sometimes doesn't suspend properly, or doesn't wake up anymore. Need to look into it again.
[MeMO Pad 7 Original Android Development] lambdadroid:
New LineageOS 16.0 test build with some fixes for problems reported by [MENTION=5479482]jerbear294[/MENTION].

Changelog:

Fixed some file descriptor leak in the Graphics Composer HAL implementation that were causing the screen to freeze after a few minutes

Fixed accelerometer (note: still not working after reboot, power off and power on). It's a rather complicated BIOS issue that I've worked around by writing to some memory addresses in https://github.com/me176c-dev/me176c-acpi/commit/06c814052d998f7ca2087f813033c09d88096c19

Fixed LiveDisplay (note: like on Nougat, color transformations are not done efficiently in hardware. Enabling LiveDisplay will eventually cause the battery to drain more quickly): https://github.com/me176c-dev/andro...mmit/66ba1c3dc7a99d5aa22e927d5110f12181aba715

Re-enable ZRAM swap

Note: MTP should work on all LineageOS 16.0 test builds (forgot to mention this in the initial post)

Note: The builds below are intended for testing only. They are insecure, and likely unstable. You need to do a full factory reset before flashing them.

TWRP: twrp-recovery-3.2.3-20190109-UNOFFICIAL-me176c.img (not updated)

Flashable ZIP: lineage-16.0-20190119-UNOFFICIAL-me176c.zip
[MeMO Pad 7 Original Android Development] troyjrf:
Can I flash this ROM with my K01A? Please help. I've tried flashing esp.img but I get error message that says "flash_cmds error" thank you
[MeMO Pad 7 Original Android Development] lambdadroid:
Never flash this ROM as-is on other devices, it contains device specific code. It should be simple to port it to other, similar tablets with BayTrail SoCs, but it requires some minor changes.

However, unfortunately the K01A has a Cloverview (Intel® Atom™ Z2520) CPU with a PowerVR GPU instead of a Intel Graphics GPU. No open-source graphics implementation exists for these GPUs, and this ROM is not going to work at all on your device. Sorry :(
[MeMO Pad 7 Original Android Development] lambdadroid:
I'm looking for some specific Bluetooth testing with a new LineageOS 16.0 build to make sure it still works correctly.

First test with the previous build from https://xdaforums.com/showpost.php?p=78712449&postcount=472

Check if Bluetooth is working correctly (e.g. try pairing another device).

Write down:

WiFi mac address (Settings -> Network & internet -> Wi-Fi -> Wi-Fi preferences -> Advanced -> MAC address)

Bluetooth mac address (Settings -> Connected devices -> Pair new device -> Address on the bottom)

Then do a factory reset and install the new build: lineage-16.0-20190120-UNOFFICIAL-me176c.zip

Check again if Bluetooth is still working correctly.

Write down the new Bluetooth mac address.

PM me the old and new WiFi/BT mac addresses. (You probably don't want it publicly available on the Internet...)

I want to check if the WiFi/BT mac addresses are unique, and will only use it for comparison with my device.

Thanks!
[MeMO Pad 7 Original Android Development] jerbear294:
I've written down the old BT/WiFi MAC addresses, and am currently in the process of factory resetting and flashing the new build. I'll DM in about 15 minutes.
[MeMO Pad 7 Original Android Development] lambdadroid:
[MENTION=7869425]Simon555[/MENTION] [MENTION=5479482]jerbear294[/MENTION]

Thanks to both of you for testing. As I suspected, the WiFi mac address is fine, but the BT address is not unique anymore... I guess I will need to write some code to change it.

Do you know if this also happens on LineageOS 14.1 / Nougat?
[MeMO Pad 7 Original Android Development] lambdadroid:
To set a proper BT MAC address, I'm now looking for ~3 dumps of the "factory"/"config" partitions. They contain the MAC addresses that were used in the stock ROM, but several times in different locations. Not sure if each device is configured in the same way.

You can get it from stock/TWRP/LineageOS 14.1/LineageOS 16.0 or literally anywhere as long as you have root. The easiest way is using ADB:

adb shell
# cd /sdcard
# dd if=/dev/block/by-name/factory of=factory.img
# dd if=/dev/block/by-name/config of=config.img
# zip partitions.zip factory.img config.img
# exit
adb pull /sdcard/partitions.zip

And send me partitions.zip via PM (should be <= 1 MB). Thanks!
[MeMO Pad 7 Original Android Development] Simon555:
Not sure right now, I didn't really use Bluetooth much on that ROM.. I'm going to flash LOS 14.1 to get the factory partition dumps, so I'll check that out too
[MeMO Pad 7 Original Android Development] Nαi:
Addition: you must first dial in the shell:

su
[MeMO Pad 7 Original Android Development] lambdadroid:
Thanks to [MENTION=7869425]Simon555[/MENTION], [MENTION=9049073]Nαi[/MENTION] and [MENTION=5479482]jerbear294[/MENTION] for sending in partition dumps. I've compared them and there were a few minor differences, but I found a file with the mac addresses which exists on all partition dumps.

Two days ago I was randomly browsing through the Intel repositories on GitHub (sometimes there are quite interesting projects being released there). And I found MediaSDK_OMX_IL, which is exactly the remaining proprietary part of the hardware accelerated (video) codec implementation. It turns out that Intel has already open-sourced it at the end of the last year, but did not announce it anywhere yet. (A week ago they said they would open-source it until Feb 15...)

Obviously I got to work immediately. :) As expected, they uploaded the version that does no longer work on this tablet (it only supports newer Intel chipsets). However, with the help of the source code and several hours of time, I managed to get to find workarounds to make it work on this tablet and Pie. I'm not sure how stable it is, but it seems to work for simple decoding/encoding. (Note: Like on Lineage 14.1, still affected by GPU hangs with certain videos, see https://github.com/me176c-dev/android_device_asus_K013/issues/52)

I also used the chance to fix the hardware accelerated (video) encoder that has been broken on LineageOS 14.1 the whole time. It appears to work, although it does not perform as good as I hoped - the device still feels quite slow while using the screen recorder.

I have compiled a new test build for those of you interested in testing it.

Note: The builds below are intended for testing only. They are insecure, and likely unstable. You need to do a full factory reset before flashing them.

TWRP: twrp-recovery-3.2.3-20190109-UNOFFICIAL-me176c.img (not updated)

Flashable ZIP: lineage-16.0-20190125-UNOFFICIAL-me176c.zip
[MeMO Pad 7 Original Android Development] Nαi:
Thanks for work, but I have some problems with the latest build. After turning off the tablet and connecting the charging, the tablet did not want to turn on, as well as to charge. I pulled out with tweezers the battery wires, plugged it in and turned tablet on again. In the notification there was a problem with temperature.

And yet once It was all the same, but without notification about temperature.

What really did not like in logcat:

01-01 06:09:01.212 185 185 W hwservicemanager: getTransport: Cannot find entry android.hardware.memtrack@1.0::IMemtrack/default in either framework or device manifest.
01-01 06:09:01.213 391 391 E memtrack: Couldn't load memtrack module
01-01 06:09:01.213 391 391 W android.os.Debug: failed to get memory consumption info: -1
01-01 06:09:01.243 300 313 I ServiceManager: Waiting for service 'package_native' on '/dev/binder'...
01-01 06:09:01.273 391 391 I IntentFirewall: Read new rules (A:0 B:0 S:0)
01-01 06:09:01.284 391 391 W libprocessgroup: Failed to remove /acct/uid_1003/pid_379: Device or resource busy

01-26 20:02:53.458 391 405 W android.os.Debug: failed to get memory consumption info: -1
01-26 20:02:53.493 391 405 E memtrack: Couldn't load memtrack module

01-01 06:08:54.405 191 191 I vold : Vold 3.0 (the awakening) firing up
01-01 06:08:54.406 191 191 V vold : Detected support for: ext4 f2fs ntfs vfat
01-01 06:08:54.413 191 191 W vold : Failed to LOOP_GET_STATUS64 /dev/block/loop5: No such device or address
01-01 06:08:54.413 191 191 W vold : Failed to LOOP_GET_STATUS64 /dev/block/loop7: No such device or address
01-01 06:08:54.414 191 191 W vold : Failed to LOOP_GET_STATUS64 /dev/block/loop4: No such device or address
01-01 06:08:54.414 191 191 W vold : Failed to LOOP_GET_STATUS64 /dev/block/loop3: No such device or address
01-01 06:08:54.414 191 191 W vold : Failed to LOOP_GET_STATUS64 /dev/block/loop2: No such device or address
01-01 06:08:54.414 191 191 W vold : Failed to LOOP_GET_STATUS64 /dev/block/loop6: No such device or address
01-01 06:08:54.414 191 191 W vold : Failed to LOOP_GET_STATUS64 /dev/block/loop1: No such device or address
01-01 06:08:54.414 191 191 W vold : Failed to LOOP_GET_STATUS64 /dev/block/loop0: No such device or address
01-01 06:08:54.416 191 191 I vold : [libfs_mgr]fs_mgr_read_fstab_dt(): failed to read fstab from dt

Full logcat: https://dropmefiles.com/517657

And TWRP not work MTP.
[MeMO Pad 7 Original Android Development] lambdadroid:
That's weird. What exactly is this "notification" you are talking about? Where does it appear? In a log file or on the screen?

Does this happen every time?

Edit: I just tried it myself and can reproduce it. I haven't tested offline mode charging on LineageOS 16.0 yet because I don't use it myself.

I would recommend everyone to use https://github.com/me176c-dev/me176c-boot#using-the-stock-charger for offline mode charging. Then you will always be able to charge, no matter which state your system is in.

Additional note: If this happens to you again you can also press the power button for ~10 seconds to force the tablet to power off. Then you don't need to open the case.

There is nothing unusual in these logs. The parts you have posted all look harmless. The MTP code in TWRP has not been updated for newer kernels yet (there is a WIP change but not merged yet).
[MeMO Pad 7 Original Android Development] Nαi:
On the screen. In the curtain of notifications.

Inability to charge in off state? Unfortunately, yes. And then I can not turn on the device.

Found that, can load in bootloader, and later OC Android.

Will use, thanks.

Ok, grasp.
[MeMO Pad 7 Original Android Development] lambdadroid:
I have seen a weird notification after booting a few times. Unfortunately, it always disappeared so quickly that I have not been able to read it.

I'll definitely try to fix it before the first "stable" release. Thanks for reporting!