Halium / projectmanagement

143 stars 32 forks source link

[device-port] [mido] Xiaomi Redmi Note 4 (Snapdragon) #71

Open Herrie82 opened 6 years ago

Herrie82 commented 6 years ago

Tree: halium-7.1

We haven't tested the Halium rootfs (yet), we just knows it works with our LuneOS build where we use the basic output from the Halium Android build.

mathieujobin commented 6 years ago

I look forward the Note 5 to be supported now

adarsh-ms commented 6 years ago

Hey,Good to know that some one is porting for redmi note 4.Is this work still in progress or discontinued?

Herrie82 commented 6 years ago

In general the port works for LuneOS, so manifest, kernel etc should be OK, libhybris works. Due to the fact that we're moving to a new house I didn't have much time lately to play with this . A lot of it is based off the work from @piggz for SailfishOS.

god-s-perfect-idiot commented 6 years ago

Kudos to you.. Keep up the good work .

pratik-narain commented 6 years ago

How can I contribute to this port? Let's run Ubuntu touch on our devices.

Herrie82 commented 6 years ago

@pratik-narain Well in general all bits needed should be there really. The device manifest with working kernel for LuneOS & SFOS. Adaptations for Ubuntu Touch should be minimal if any. Also the fixup-mountpoints is there in hybris-boot: https://github.com/Halium/hybris-boot/blob/master/fixup-mountpoints#L1126

mathieujobin commented 6 years ago

Xiaomi phones are moving fast.

newest models are the A2 Lite, the A2 and the M8

anyone thought of grabbing one of those putty and do a device port?

Herrie82 commented 6 years ago

M8 is a bit pricy as a phone to tinker with. A1 port is going pretty well so far. A2 doesn't have Android 7.1 and with no support for Android 8 and 9 in libhybris (yet) this will be problematic. I suspect support for Android 8 and/or 9 will be added to libhybris at some point (there's WIP PR for 8 already). I'm not sure what Halium's plans are for 8 or 9. It could be they go to 9 directly, that's probably more for the Halium team to comment

Herrie82 commented 6 years ago

I'm sure @bhush9 or @krnlyng might be able to give some more insight into the libhybris & Halium plans.

mathieujobin commented 6 years ago

Thank you, this is helpful insight.

if I get an A1 device to install Halium on it, will I be able to run Plasma Mobile on top?

Herrie82 commented 6 years ago

@mathieujobin Difficult to say, however we got LuneOS working on it based on Halium 7.1 and normally this would mean that Plasma Mobile, SFOS and Ubuntu touch would work too, however you migth need some tweaks here and there.

Bx16 commented 6 years ago

Hi, any chance for support Redmi 5 Plus (vince)? It's very similar to mido, it got fully working SFOS. @Herrie82

Herrie82 commented 6 years ago

@bx16 It should be really straight forward. We've now done ports for Tissot (A1) and Rosy (RedMi 5) as well. By following the changes there, you should be able to do a port for the Vince!

Bx16 commented 6 years ago

@Herrie82 I did it. I'm playing with Ubuntu but I have problem with working graphic.

library "libgui.so" wasn't loaded and RTLD_NOLOAD prevented it

piggz commented 6 years ago

Out of interest, are any 'distros' based on halium yet?

Herrie82 commented 6 years ago

@piggz Well LuneOS uses it to the extend it can. Basically we use Halium's minimal Android, but the rest is our own build system.

minlexx commented 5 years ago

Tried mido, can confirm, it compiles, and then "just works" (well, mostly, at first glance)...

PlaMo "edge" 18.04 rootfs

photo_2018-12-01_21-24-40

I was able to run konsole from plasmashell gui once, next times it crashed every time (but works, without nice shell intergration, if started from ssh session). Other apps give rendering bugs, like repeated texture with red "X" sign or other parts of screen:

photo_2018-12-01_22-02-37

^^ this is angelfish started from plasma GUI, below angelfish started from SSH:

photo_2018-12-01_22-05-18

minlexx commented 5 years ago

Host dmesg:

Mer Boat Loader Refusing to boot. See /diagnosis.log (in initrd only)

Phone:

~ # cat /diagnosis.log 
CONFIG_AUTOFS4_FS=y not found in /proc/config.gz

~ # zcat /proc/config.gz | grep AUTOFS
CONFIG_AUTOFS4_FS=m

Why is that?

doniks commented 5 years ago

Seems you configured it as m module instead of y

PS: I didnt mean to close this issue, I just hit the wrong button

minlexx commented 5 years ago

configured it as m module instead of y

I meant to ask @Herrie82 , because his fork of kernel is in manifest 😉

mathieujobin commented 5 years ago

Finally I got an A2 device, I would love to run KDE Plasma on it, ideally in a Dual boot setup with Android

doniks commented 5 years ago

configured it as m module instead of y

I meant to ask @Herrie82 , because his fork of kernel is in manifest 😉

Ah, in that case ... maybe @Herrie82 s kernel actually works with modules and you can remove/change the test from init

minlexx commented 5 years ago

kernel actually works with modules

Yeah, you have to manully sudo insmod /system/lib/modules/wlan.ko to get Wi-Fi working.

I was just wondering why it was done this way (modular) even for CONFIG_AUTOFS4_FS (I know ways to fix that, probably will have to do my own fork of kernel :laughing: )

Herrie82 commented 5 years ago

@minlexx Modules are actually used by Mer/SFOS and LuneOS to control the WiFi, BT etc. There are some historic reasons for this. My kernel is largely based on @piggz one with some additional modifications we needed for LuneOS. CONFIG_AUTOFS4_FS came directly from @piggz source. I didn't touch that. Seems it's required for SFOS in some way as per https://github.com/piggz/android_kernel_xiaomi_msm8953/blob/pgz-14.1-eb8/arch/arm64/configs/mido_defconfig#L4639

sy-per commented 5 years ago

@Bx16 It should be really straight forward. We've now done ports for Tissot (A1) and Rosy (RedMi 5) as well. By following the changes there, you should be able to do a port for the Vince!

The port for redmi 5 (rosy) is finished?

Herrie82 commented 5 years ago

@sy-per Yes we have Rosy working with LuneOS, since we're using the same kernel as Halium, Halium and other distros should be straightforward.

SourceDiver42 commented 5 years ago

I've got a somewhat booting port of UT for this device but I'm also having problems with the wlan module. Apparmor has to be deactivated for debugging purposes and many programs like the camera app throw a syscall 389berror and I'm too dumb to find out how to add a syscall to the arm side of the kernel.

sy-per commented 5 years ago

@sy-per Yes we have Rosy working with LuneOS, since we're using the same kernel as Halium, Halium and other distros should be straightforward.

How to get the port? there is a git with everything?

mathieujobin commented 5 years ago

Who do I need to bribe to get Plasma on a Redmi 7 ?

gopikrishnanrmg commented 5 years ago

Host dmesg:

Mer Boat Loader Refusing to boot. See /diagnosis.log (in initrd only)

Phone:

~ # cat /diagnosis.log 
CONFIG_AUTOFS4_FS=y not found in /proc/config.gz

~ # zcat /proc/config.gz | grep AUTOFS
CONFIG_AUTOFS4_FS=m

Why is that?

I also got the same issue. What is the problem? I am new to porting.

Roker2 commented 5 years ago

TheMuppets Xiaomi vendor don't exist. It is trouble.

mathieujobin commented 5 years ago

Rajeev,. It's a Linux kernel config optionYou need to change the m (module) for a y (yes) in a file before you compile the kernel /proc/config is an output file of what was the config during compilation

On Mon, Aug 12, 2019 at 16:40, Gopikrishnan Rajeevnotifications@github.com wrote:

Host dmesg: Mer Boat Loader Refusing to boot. See /diagnosis.log (in initrd only)

Phone: ~ # cat /diagnosis.log CONFIG_AUTOFS4_FS=y not found in /proc/config.gz

~ # zcat /proc/config.gz | grep AUTOFS CONFIG_AUTOFS4_FS=m

Why is that?

I also got the same issue. What is the problem? I am new to porting.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Roker2 commented 4 years ago

@Herrie82 , how to install LuneOS? , I want to try it.

Herrie82 commented 4 years ago

@Roker2 Basically you need to have Android 7.1.x on it, then install TWRP and format the data partition to remove the encryption. Afterwards you can simply ADB sideload the ZIP from the following location (latest "stable" release) from 2 weeks ago:

http://build.webos-ports.org/releases/eggnoglatte/images/mido/

Roker2 commented 4 years ago

@Herrie82 , it is worked... I was thinking, that I will never see something like it. Good job! And I didn't think, that all sensors are worked. So, about bad things. 1) I can not open camera program 2) I see artefacts while scrolling 3) When display darkens, I tap to display and display is dark 4) OTA is not worked 5) some lugs?

But... It is amazing work. I want to follow updates and check build logs. And one thing... Merge please last kernel changes from Google :) https://android.googlesource.com/kernel/common/+/refs/heads/android-3.18 Last kernel version is better, right?

And about following. Where can I follow to updates?

Roker2 commented 4 years ago

And one more. Now Official LineageOS 14.1 doesn't exist. I used this, it is worked. If you flash from pie/oreo - you need to format /data.

Herrie82 commented 4 years ago

@Herrie82 , it is worked... I was thinking, that I will never see something like it. Good job! And I didn't think, that all sensors are worked. So, about bad things.

  1. I can not open camera program
  2. I see artefacts while scrolling
  3. When display darkens, I tap to display and display is dark
  4. OTA is not worked
  5. some lugs?

But... It is amazing work. I want to follow updates and check build logs. And one thing... Merge please last kernel changes from Google :) https://android.googlesource.com/kernel/common/+/refs/heads/android-3.18 Last kernel version is better, right?

And about following. Where can I follow to updates?

  1. Camera is currently not working on our 7.1 based devices. We're looking into a solution for this. This is for all our 7.1 based targets.
  1. I haven't seen this, could be Qt bug. I haven't tested Mido in a while myself, since it's my daily Android phone for now. What kind of bugs?
  2. This is a known problem, we're looking into. Seems to be related to an update with did with regards to webOS OSE components (probably sleepd).
  3. Notification of new version will work, however the update process itself is currently being reworked.
  4. Lugs? Logs or bugs?

We have an IRC channel on Freenode called #webos-ports, logs can be found at (daily: http://logs.nslu2-linux.org/livelogs/webos-ports.txt and archive: http://logs.nslu2-linux.org/livelogs/webos-ports/).

We're also on Twitter @webosports and post updates to www.webos-ports.org

Roker2 commented 4 years ago

@Herrie82 , it is worked... I was thinking, that I will never see something like it. Good job! And I didn't think, that all sensors are worked. So, about bad things.

  1. I can not open camera program
  2. I see artefacts while scrolling
  3. When display darkens, I tap to display and display is dark
  4. OTA is not worked
  5. some lugs?

But... It is amazing work. I want to follow updates and check build logs. And one thing... Merge please last kernel changes from Google :) https://android.googlesource.com/kernel/common/+/refs/heads/android-3.18 Last kernel version is better, right? And about following. Where can I follow to updates?

  1. Camera is currently not working on our 7.1 based devices. We're looking into a solution for this. This is for all our 7.1 based targets.
  2. I haven't seen this, could be Qt bug. I haven't tested Mido in a while myself, since it's my daily Android phone for now. What kind of bugs?
  3. This is a known problem, we're looking into. Seems to be related to an update with did with regards to webOS OSE components (probably sleepd).
  4. Notification of new version will work, however the update process itself is currently being reworked.
  5. Lugs? Logs or bugs?

We have an IRC channel on Freenode called #webos-ports, logs can be found at (daily: http://logs.nslu2-linux.org/livelogs/webos-ports.txt and archive: http://logs.nslu2-linux.org/livelogs/webos-ports/).

We're also on Twitter @webosports and post updates to www.webos-ports.org

  1. Sorry, lags (not smooth animations)

Thank you for information about updates.

And one more. Can you send worked Halium image? I want to try to boot UBPorts.

Herrie82 commented 4 years ago

The Halium images can be found at: http://build.webos-ports.org/halium-luneos-7.1/

The ones with mido in the name. The latest one is: http://build.webos-ports.org/halium-luneos-7.1/halium-luneos-7.1-20190301-29-mido.tar.bz2

aviwad commented 4 years ago

Hi! How would I go about installing Plasma Mobile, UBports, or Phosh on the LuneOS image of Halium on my Xiaomi Redmi Note 4? Sorry for the noob question!

OleSTEEP commented 3 years ago

Hello, I wanted to build Halium 9.0 for my mido, but it ended in failure. I used the manifest from a recent repository update, downloaded the latest source code, and followed the official build instructions. As a result, I got this: build/target/product/core_64_bit.mk:33: error: _nic.PRODUCTS.[[device/xiaomi/mido/lineage_mido.mk]]: "build/target/product/halium.mk" does not exist. I also tried to simply comment out the problematic line, but this of course did not help. How can I solve this problem? I tried looking for a similar issue in other issues, but I couldn't find anything. Full terminal log here: https://pastebin.com/gpVc3x1r P.S. Sorry for google translate

Herrie82 commented 3 years ago

@OleSTEEP halium.mk is added by hybris-patches. I usually run the following at my end on kUbuntu 20.04:

hybris-patches/apply-patches.sh --mb source build/envsetup.sh export USE_HOST_LEX=yes export USE_CCACHE=1

breakfast lineage_mido-userdebug mka systemimage vendorimage

OleSTEEP commented 3 years ago

@OleSTEEP halium.mk is added by hybris-patches. I usually run the following at my end on kUbuntu 20.04:

hybris-patches/apply-patches.sh --mb source build/envsetup.sh export USE_HOST_LEX=yes export USE_CCACHE=1

breakfast lineage_mido-userdebug mka systemimage vendorimage

Thank you, now the build continues nearly without problems.

yyqwerty commented 2 years ago

@Herrie82 Hello. I'd like to know if you're in touch on this topic. Some years ago you provided a link to Halium images for Redmi Note 4X (mido), but links seem to be inactive now. I decided to port Ubuntu Touch on my mido device and it is said that halium images are needed, but I can't figure out what version of halium I should use now - 7.1, 8.1, 9.0. I'll be glad to have some comments about it.

Herrie82 commented 2 years ago

7.1 and 9.0 can both work. Some mido Halium images we use for LuneOS are at https://github.com/webOS-ports/halium-images/releases

gopikrishnanrmg commented 2 years ago

@Herrie82 Hello. I'd like to know if you're in touch on this topic. Some years ago you provided a link to Halium images for Redmi Note 4X (mido), but links seem to be inactive now. I decided to port Ubuntu Touch on my mido device and it is said that halium images are needed, but I can't figure out what version of halium I should use now - 7.1, 8.1, 9.0. I'll be glad to have some comments about it.

Hello, I ported Ubuntu touch to mido 2 years ago using Halium 7.0. I also believe there is already a port of Ubuntu touch using Halium 9.0 for mido as I saw someone who was attempting it by the time I finished my port. Please check in the Ubuntu touch telegram group as well.

Roker2 commented 2 years ago

@Herrie82 Hello. I'd like to know if you're in touch on this topic. Some years ago you provided a link to Halium images for Redmi Note 4X (mido), but links seem to be inactive now. I decided to port Ubuntu Touch on my mido device and it is said that halium images are needed, but I can't figure out what version of halium I should use now - 7.1, 8.1, 9.0. I'll be glad to have some comments about it.

Hello, I ported Ubuntu touch to mido 2 years ago using Halium 7.0. I also believe there is already a port of Ubuntu touch using Halium 9.0 for mido as I saw someone who was attempting it by the time I finished my port. Please check in the Ubuntu touch telegram group as well.

I tried to make device tree for 7.1 UBports using @Herrie82 device tree and UBports santoni device tree. I cherry-picked all commits d: