Halium / projectmanagement

142 stars 32 forks source link

[device-port] [h870] LG G6 #115

Open rymdllama opened 5 years ago

rymdllama commented 5 years ago

Tree: halium-7.1

Kernel config

A bunch of tweaks were needed. Mine is found here: https://pastebin.com/NC9Uj0Mg The file can be found in: kernel/lge/msm8996/arch/arm64/configs/lineageos_h870_defconfig

fixup-mountpoints

    "H870" | "h870")
        sed -i \
        -e 's /dev/block/bootdevice/by-name/system /dev/block/sda14 ' \
        -e 's /dev/block/bootdevice/by-name/cache /dev/block/sda15 ' \
        -e 's /dev/block/bootdevice/by-name/userdata /dev/block/sda17 ' \
        -e 's /dev/block/bootdevice/by-name/persist /dev/block/sda13 ' \
        -e 's /dev/block/bootdevice/by-name/modem /dev/block/sda18 ' \
        -e 's /dev/block/bootdevice/by-name/sns /dev/block/sda5 ' \
        -e 's /dev/block/bootdevice/by-name/drm /dev/block/sda4 ' \
        -e 's /dev/block/bootdevice/by-name/mpt /dev/block/sda3 ' \
        "$@"
    ;;

Notes

I got som small problems with conflicts between the h870 and the g6-common repos, such as duplicate APKs. Will look further into it.

jbruechert commented 5 years ago

Please create a pull request with your fixup mountpoints at the https://github.com/halium/hybris-boot repository. Your kernel config needs to be pushed to your kernel git repository.

tanevanwifferen commented 4 years ago

My extra changes:

fixup mountpoints:

rename modem from sda to sde

duplicate lib definitiions

comment out vendor/lge/g6-common/Android.mk

comment out everyting in vendor/lge/msm8996-common/Android.mk

comment out vendor/app/DolbyVisionService/DolbyVisionService.apk in device/lge/g6-common/proprietary-files.txt

comment out everythiing in vendor/g6-common/android.mk

device misses files

cp -r vendor/msm8996-common/proprietary vendor/lge/msm8996-common

cp -r vendor/h870 vendor/lge/h870

cp -r vendor/g6-common/proprietary vendor/lge/g6-common

fix wifi permission

commit patches at bottom of 'debugging wifi' page

CONFIG_ANDROID_PARANOID_NETWORK=n

fix flags for lxc script

CONFIG_NET_CLS_CGROUP=n CONFIG_NETPRIO_CGROUP=n CONFIG_DEVPTS_MULTIPLE_INSTANCES=y CONFIG_MACVLAN=y CONFIG_VLAN_8021Q=y CONFIG_NETFILTER_XT_TARGET_CHECKSUM=y CONFIG_UNIX_DIAG=y CONFIG_PACKET_DIAG=y CONFIG_NETLINK_DIAG=y CONFIG_IP6_NF_TARGET_MASQUERADE=y CONFIG_VETH=y

lxc crashes with can't allocate memory

# CONFIG_CGROUP_SCHEDTUNE is not set < not sure about this one, just leaving it also works CONFIG_SHED_TUNE=n

I"m stuck at graphics now. I get two errors. one is with test_hwcomposer:

the library is on the device on /vendor/lib64

the other with test_egl

I have read somewhere that the halium rootfs only loads 32 bits libraries, so I will try to boot ubports now. Maybe that 'll work. Thought I'd share my progress until now.

tanevanwifferen commented 4 years ago

running plasma doesn't seem to change anything. Still getting

library "libscalar.so" not found

when testing test_hwcomposer. If anyone knows how to fix this, please tell me. I've tried moving stuff in the kernel, but that broke other references, so I stopped going that way. I also tried appending /vendor/lib64 to /etc/ld.so.conf, and then running ldconfig, which didn't work. Tried rebooting too.

the test_egl and test_glesv2 tests now give different errors, the libgui.so seems to be loaded now, I guess? The new error is just a failure.

assertion 'eglGetError() == EGL_SUCCESS' failed ..

stefanomelchior commented 4 years ago

Hello, I just got a h870 to support your porting. I hope to bring in my experience in porting UT on tenshi (BQ U Plus, almost finished). @tanevanwifferen, did you save and upload last changes on official repo?

tanevanwifferen commented 4 years ago

oh great, thank you. It is my first port ever, and also my first kernel experience ever. No, I haven't put anything in an official repo yet, was hoping someone more experienced could set it up correctly.

rymdllama commented 4 years ago

Love to see that this was revived. I actually made most of the changes @tanevanwifferen suggested at one point, but as my G6 is my main phone I haven't been able to keep working on this. Big thanks to you too @stefanomelchior

tanevanwifferen commented 4 years ago

I must say I'm a bit blown away with how much work this is, and how much knowledge I miss. For me it's also my main phone, and I thought I'd just bang out the port in a weekend or so. Not sure if I have the time the rest of the year to work on this, and I'm not sure if I even want to. Maybe when my knowledge is a bit better.

I've bought a cheap htc 10 in the mean time, in which the porting is a bit further, and I'd like to get that up. Maybe when I've switched my sim cards that I can come back to the lg. But for now every app crashes, and there's no radio, so there's a lot of work to do there too.

doniks commented 4 years ago

@tanevanwifferen Lol. "porting is a strange sadism"

Remember, everybody picking up a port is up against a very steep and high learning curve. I doubt that there are many ports that have been whipped together in a weekend. Now, of course I can't tell you whether this is how you want to spend your free time, but rest assured it is hard for everyone. There are no unicorns out there from whom porting is easy ;)

tanevanwifferen commented 4 years ago

haha I know, everyone goes through the same learning curve. But it was really stressful not having a phone, expecting that it would work (even a bit) after a couple of hours / days of coding. Just had to alter my expectations. I must say I really enjoy doing it, but not with a phone that I am expected to be reachable on. And not under the pressure that I set myself on. But I'm not giving up yet. I was close, but then you guys started responding too. That makes a big difference :)

stefanomelchior commented 4 years ago

@tanevanwifferen @rymdllama (maybe it is better to have this conversation on telegram, rather than on Github) did you set up a github/gitlab repo and sync all your latest changes in order to start working? I just downloaded those from Halium. Manifest is in, but fixup-mountpoints is missimg; tanevanwifferen's changes are missing in the official repo too @doniks is it possible to get wite access to repo in order to upload past and future stuff? as I said I would like to bring in my experience in porting tenshi (BQ U PLus), and try to give continouty to past work. This is a pretty new and cool device, which deserves to be part of UT/PM/LuneOS/... community devices. thanks

doniks commented 4 years ago

@stefanomelchior not sure I understand you right. You can make pull requests to all Halium repos

stefanomelchior commented 4 years ago

Actually I can do it for tenshi device, as JBBgameich gave me write access a long time ago, but right now I would need it only for h870 device

doniks commented 4 years ago

i still don't understand where you want write access to! Can you give a link?

Edit: Ah, I guess you mean here: https://github.com/rymdllama/ , to cooperate there you should speak to rymdllama Please align amongst you whether this makes sense, otherwise @stefanomelchior I suggest you create your own forks of the kernel etc and make a pr against halium to switch the manifest over to your repos.

stefanomelchior commented 4 years ago

@doniks thanks, that is what I was planning to do.

tanevanwifferen commented 4 years ago

I have PR'd fixup-mountpoints to the repo, and have pushed my changes to local repos. Also created a manifest which references my forks. @rymdllama do you want to be the maintainer, or should I or @stefanomelchior take over?

For my changes use this manifest, note that I moved the vendor folder from /vendor to /vendor/lge

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
    <remote name="tanevanwifferen" fetch="https://github.com/tanevanwifferen/"/>
    <project path="device/lge/h870" name="android_device_lge_h870" remote="tanevanwifferen" revision="halium7.1"/>
    <project path="device/lge/g6-common" name="android_device_lge_g6-common" remote="tanevanwifferen" revision="halium7.1"/>
    <project path="device/lge/msm8996-common" name="android_device_lge_msm8996-common" remote="tanevanwifferen" revision="halium7.1"/>
    <project path="kernel/lge/msm8996" name="android_kernel_lge_msm8996" remote="tanevanwifferen" revision="halium7.1"/>
    <project path="vendor/lge" name="proprietary_vendor_lge" remote="tanevanwifferen" revision="halium7.1"/>
</manifest>
stefanomelchior commented 4 years ago

With rootfs-arm64 from http://ci.upports.com, what I just tested and works:

stefanomelchior commented 4 years ago

@rymdllama I just created a call for testers in UBports forum. Can you share to Tane and me a telegram's account in case you want to keep on working on h870? Thanks You'll see I forked your repos to work on my branch

rymdllama commented 4 years ago

@stefanomelchior I'd love to keep working on it. Here is my telegram, hit me up and we'll keep talking there.

on-app commented 2 years ago

@rymdllama Is it different way to port it to G7 Thinq, or it is about change some in this port for G6? Thx!

stefanomelchior commented 2 years ago

G7 Thinq

Hi @on-app , it is pretty different because, first, G6 port is based on halium-7.1 (like Android 7.1 or LineageOS 14.1 based), second the device is different and its initial Android is an earlier version. So far, I don't have time to start a halium-9 (Android 9 or LOS 16) based port on G6 or halium-10 (Android 10). You might ask to @aribk from UT porting since he had tried to do it on G4

on-app commented 2 years ago

G7 Thinq

Hi @on-app , it is pretty different because, first, G6 port is based on halium-7.1 (like Android 7.1 or LineageOS 14.1 based), second the device is different and its initial Android is an earlier version. So far, I don't have time to start a halium-9 (Android 9 or LOS 16) based port on G6 or halium-10 (Android 10). You might ask to @AriBK from UT porting since he had tried to do it on G4

got that, thx! then better to try with PinePhone.