UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. maylton
    3. Best
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Groups 0

    Posts

    Recent Best Controversial
    • Porting halium to LeEco Le Max2 aka x2 (x820)

      Here you have the steps I followed to port halium to LeEco Le Max2 and what I’ve archieved so far.

      Setup sources

      Follow the Porting Guide for halium-7.1 here https://docs.halium.org
      my manifest: https://gist.github.com/maylton/bc1243ce24fd0ad3646f63f8b9720d41
      

      For this I choose to use @shenoy_13 kernel for Le Max2 which he used for building SailfishOS and already has some configs for halium. Instead of adding it to my manifest I just cloned it to my local repository with the following command:

      git clone - b hybris-14.1 https://github.com/VigneshShan/android_kernel_leeco_msm8996 kernel/leeco/msm8996

      I had to remove hs20-osu from device/leeco/msm8996-common/msm8996.mk
      and removed the line ‘include frameworks/base/packages/SettingsLib/common.mk’ from device/leeco/msm8996-common/doze/Android.mk

      Kernel Image

      kernel config: kernel/leeco/msm8996/arch/arm64/configs/lineage_x2_defconfig

      These are the changes I have made to the kernel:

      CONFIG_NET_NS=y
      CONFIG_EPOLL=y
      CONFIG_TIMERFD=y
      CONFIG_SIGNALFD=y
      CONFIG_RD_GZIP=y
      CONFIG_UEVENT_HELPER_PATH=""
      CONFIG_TMPFS_XATTR=y
      CONFIG_NETFILTER_XT_CONNMARK=y
      CONFIG_PROC_FS=y
      CONFIG_INOTIFY_USER=y
      CONFIG_SYSFS=y
      CONFIG_SCHED_DEBUG=y
      CONFIG_ANDROID_RAM_CONSOLE=y
      CONFIG_ANDROID_RAM_CONSOLE_ENABLE_VERBOSE=y

      Building kernel

      source build/envsetup.sh
      breakfast x2
      mka mkbooting
      mka build hybris-boot

      build system image

      mka build systemimage

      test and debug

      Follow steps here http://docs.halium.org/en/latest/porting/debug-build/

      Build hybris-recovery
      My phone bootlooped so I had to build hybris-reocery with mka build hybris-recovery

      Install rootfs.img and system.img

      Defaut halium-installer from https://github.com/Halium/halium-scripts did not work for me, só I used this one https://raw.githubusercontent.com/reivilibre/halium-scripts/master/halium-install-hostbuild by @reivilibre

      I had to change default system image partition size in the installer from 160MB to 560MB since my system image has 523MB.

      So I installed with ./halium-install-hostbuild halium-rootfs-20170630-151006.tar.gz system.img

      I rebooted, logged in telnet 192.168.2.15
      Once phone bootloops after ‘echo continue > /init-ctl/stdin’ i had to disable lxc with the following tips (must be logged in telnet):

      ~ # cd /target/
      /target # TERM=linux HOME=/root TH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH chroot . /bin/bash
      root@(none):/# systemctl disable lxc@android
      root@(none):/# systemctl mask lxc@android
      root@(none):/# exit
      ~ # echo continue > /init-ctl/stdin

      I rebooted to TWRP and followed the steps to create an password in:
      http://docs.halium.org/en/latest/porting/debug-build/logging-in.html

      Now I’m stuck at the point that i can’t connect ssh because when i configure it and try to connect i got the following message:

      ssh: connect to host localhost port 22: Connection refused

      posted in Porting
      M
      maylton