Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[device-port] [oneplus3] Port to OnePlus 3(T) #63

Open
vanyasem opened this issue Mar 3, 2018 · 64 comments

Comments

@vanyasem
Copy link
Member

commented Mar 3, 2018

Tree: halium-7.1

  • Create manifest: oneplus_oneplus3.xml
  • Boot image and system image build successfully
  • Device boots into rootfs, usb: Manufacturer: GNU/Linux Device appears in dmesg on host.
  • LXC container starts and does not crash
  • libhybris tests
    • test_gps
    • test_hwcomposer
    • test_lights
    • test_vibrator
    • test_wifi
    • test_sensors
    • test_audio
    • test_camera
    • test_input
    • test_nfc
    • test_recorder
  • Test various rootfs

Working prebuilt images for OP3 / OP3T: halium.ivanismy.name/op3

Sidenote 0: OnePlus 3 and OnePlus 3T have a universal LineageOS build. The port was tested on both devices

Sidenote 1: As @UniversalSuperBox suggests me not to fork the vendor repo, it has to be manually patched. You need to remove vendor/oneplus/oneplus3/proprietary/etc/thermal-engine.conf:system/etc/thermal-engine.conf from vendor/oneplus/oneplus3/oneplus3-vendor.mk

Sidenote 2: Some tests are broken in Halium 7.1. They won't work until they get fixed

Sidenote 3: Current kernel config misses some important kernel flags and thus drops into telnet by default. If you tell it to continue booting, it successfully boots into the rootfs

Sidenote 4:
/dev/input/event0 - Power - qpnp_pon
/dev/input/event1 - Nothing - hbtp_vm
/dev/input/event2 - Mode switch - tri-state-key
/dev/input/event3 - Nothing - fpc1020
/dev/input/event4 - Touchscreen - synaptics
/dev/input/event5 - Volume buttons - gpio-keys
/dev/input/event6 - Back and Recents buttons - synaptics
/dev/input/event7 - Nothing (Doesn't exist on OP3) - msm8996-tasha-mtp-snd-card Headset Jack
/dev/input/event8 - Nothing (Doesn't exist on OP3) - msm8996-tasha-mtp-snd-card Button Jack
/dev/input/mouse0 - Nothing - Err: Inappropriate ioctl for device

Sidenote 5: You have to run echo sta > /sys/module/wlan/parameters/fwpath in order to enable Wi-Fi

This is a co-op port by @vanyasem and @mariogrip
Thanks to @sk8higher and @Stefano0101 for testing the port

@sk8higher

This comment has been minimized.

@PhotonMike

This comment has been minimized.

Copy link

commented May 27, 2018

This project looks awesome and I would like to test, but I can't find a sane tutorial. I don't know if I should post this here, but it seems like these problems only exist on this phone:
With halium-install from the halium-scripts repo the install fails on unpacking the rootfs
With JBBgameich/halium-install the install seems to work, but after issuing the command to continue the boot from telnet, the phone only has a white LED and a blank screen. Also /target only contains the data folder.

@vanyasem

This comment has been minimized.

Copy link
Member Author

commented May 28, 2018

@PhotonMike that's okay, it's expected. everything you've mentioned is expected

@PhotonMike

This comment has been minimized.

Copy link

commented May 28, 2018

I somehow got it to work today and it successfully boots and has graphics, but the touch isn't working. But with an OTG adapter and a mouse, it works.
I know people hate getting asked for ETAs, but when is touch going to be sorted?
This is a really cool and useful OS for Linux and OSS enthusiasts and thanks for your work!

@vanyasem

This comment has been minimized.

Copy link
Member Author

commented May 29, 2018

@PhotonMike could your please provide me with some pictures?

@PhotonMike

This comment has been minimized.

Copy link

commented May 29, 2018

I only have a crappy picture, as I had to take it with my laptop's webcam:
https://imgur.com/a/LSkd4c8

@vanyasem

This comment has been minimized.

Copy link
Member Author

commented May 31, 2018

Regarding touch: https://phabricator.mynameisivan.ru/P34 (udevadm info /dev/input/event4)
It needs a magic udev rule in order to work. See last udev rule here: 70-yuga.rules (don't forget to change event1 to event4).

@vanyasem

This comment has been minimized.

Copy link
Member Author

commented May 31, 2018

That didn't really fix the issue ^
Investigating :P

@vanyasem

This comment has been minimized.

Copy link
Member Author

commented May 31, 2018

Plasma udevadm info after the fix above

@hu19960925

This comment was marked as off-topic.

Copy link

commented Aug 24, 2018

I love Ubuntu touch very much, but I won't transplant. I'm glad to see you transplanting. I don't see the progress of transplanting, and I don't know where to go. I add three mobile phones. I haven't seen any updates lately, I hope you can see the migration.

@CodingMarco

This comment has been minimized.

Copy link

commented Sep 6, 2018

@PhotonMike How did you get graphics working? I also have an ssh connection right now and I think this might also be interesting for others...

@Halium Halium deleted a comment from hu19960925 Sep 8, 2018

@hu19960925

This comment was marked as off-topic.

Copy link

commented Sep 15, 2018

想参与其中。不知道如何操作。

@SohnyBohny

This comment was marked as off-topic.

@hu19960925

This comment was marked as off-topic.

Copy link

commented Sep 16, 2018

@

@hu19960925 https://t.me/UBports_Chinese

需要翻墙才可以。

@ezraholm50

This comment has been minimized.

Copy link

commented Sep 17, 2018

Could anyone tell me what to do to contribute to this port

@hu19960925

This comment was marked as off-topic.

Copy link

commented Sep 17, 2018

有人能告诉我如何为这个港口做贡献吗?

继续移植就可以了

@hu19960925

This comment was marked as off-topic.

Copy link

commented Sep 17, 2018

我应该怎么联系你们呢。本人十分期待一加三手机 ubuntutouch. 可以发红包提高下大家的积极性。想加入其中但是不知道需要学习哪方面知识。

@hu19960925

This comment has been minimized.

Copy link

commented Oct 2, 2018

Hello, is this an Ubuntu touch for op3?

@PhotonMike

This comment has been minimized.

Copy link

commented Oct 4, 2018

This is Halium, which is a foundation many mobile Linux distros use, like Ubuntu Touch or Plasma mobile. This is not Ubuntu Touch itself, this is what is needed to get Ubuntu working on the OnePlus 3.

@idontknow420

This comment has been minimized.

Copy link

commented Oct 7, 2018

is halium working perfectly for oneplus 3 ? how to get builds

@PhotonMike

This comment has been minimized.

Copy link

commented Oct 7, 2018

@idontknow420 just check the first message in this issue.

@vanyasem

This comment has been minimized.

Copy link
Member Author

commented Oct 7, 2018

I need a new tester for this device. Reach out to me at https://t.me/vanyasem

@sk8higher

This comment has been minimized.

Copy link

commented Oct 7, 2018

@vanyasem can I help?

@hu19960925

This comment has been minimized.

Copy link

commented Oct 8, 2018

我需要一个新的测试器。向我伸出手https://t.me/vanyasem

I have the equipment. How do I join the test

@idontknow420

This comment has been minimized.

Copy link

commented Oct 9, 2018

Sorry, i don't have this mobile . I asked because i want to confirm myself before buying this op3 for plasma / ubport stable build. :) i hope very soon we will get this stable build.

Thank you in advance.

@kiranreddyrebel

This comment was marked as off-topic.

Copy link

commented Oct 21, 2018

hi, any updates for this op3 ?

@vanyasem

This comment has been minimized.

Copy link
Member Author

commented Feb 13, 2019

@Davidescion this port is not consumer-ready. unless you are a developer, you should not install the images

@kiranreddyrebel

This comment has been minimized.

Copy link

commented Feb 13, 2019

May we know if mariogrip has any minimal working port ? This device is powerful than other devices. It has 6GB RAM . I don't know why development has stopped.

@Davidescion

This comment has been minimized.

Copy link

commented Feb 13, 2019

@vanyasem I might not be a developer but I’m familiar with this kind of thing, I just wasn’t able to get the phone to the infamous black screen with white led and I was wondering what did I do wrong.

@Davidescion

This comment has been minimized.

Copy link

commented Feb 13, 2019

@kiranreddyrebel he probably doesn’t have that much time and touch in a real issue

@testingweb624

This comment has been minimized.

Copy link

commented Feb 19, 2019

Hi, did anyone tried UB OTA-7 with this port halium. It has new libhybris and N drivers linker to make halium port easy , new android-caf Mir platform for qualcomm display.

@Stefano0101

This comment has been minimized.

Copy link

commented Feb 19, 2019

Hi testingweb624,
I did try, it built successfully hybris-boot, halium-boot and system.img, but I can't ssh into phone for some strange reason. Trying to set ssh and have this issue: sudo ip link set enp0s20f0u1 address 02:11:22:33:44:55
RTNETLINK answers: Device or resource busy What to do to set the ssh? Anyone?

@testingweb624

This comment has been minimized.

Copy link

commented Feb 19, 2019

check this @Stefano0101 https://forums.ubports.com/topic/431/porting-halium-to-nexus-7-deb
Here it has some steps to do for connecting to ssh. It may help you.

@testingweb624

This comment has been minimized.

Copy link

commented Feb 19, 2019

Hi, @Stefano0101 ,plz check above link.

If you don't mind can you paste the commands from your history (terminal) , How you exactly followed to succesfully build the Halium images. ?

@Stefano0101

This comment has been minimized.

Copy link

commented Feb 19, 2019

@testingweb624 , when I find a little time I upload it. Or/and I can share the files if you're interested.

@testingweb624

This comment has been minimized.

Copy link

commented Feb 19, 2019

I will run in my vps server, i just need the commands bro. Thank you for asking.

have checked above link. its helpful try those.

@Stefano0101

This comment has been minimized.

Copy link

commented Feb 19, 2019

@idontknow420

This comment has been minimized.

Copy link

commented Feb 20, 2019

@Stefano0101

This comment has been minimized.

Copy link

commented Feb 20, 2019

@idontknow420 not a problem, let me know if you have any success with it.

@vanyasem

This comment has been minimized.

Copy link
Member Author

commented Feb 23, 2019

The image server is up again

@testingweb624

This comment has been minimized.

Copy link

commented Feb 23, 2019

any improvements in op3 ? @vanyasem
just casually asking bro .

@Vince1171

This comment has been minimized.

Copy link
Member

commented Mar 7, 2019

if anyone want to test UT on Oneplus3
https://github.com/Vince1171/OnePlus3-T-Halium-Prebuild/
It in early stage, so don't expect much
I'll PR the changes soon

@Vince1171 Vince1171 self-assigned this Mar 28, 2019

@Cheshirean

This comment has been minimized.

Copy link

commented Jun 25, 2019

Hello! I am having problems installing UT on my device. Using the prebuild images, I followed the instructions from here - https://github.com/Vince1171/OnePlus3-T-Halium-Prebuild/
As a result, after a reboot, I get a screen with the words "charging ?? / 100" and that's it. There is no telnet, no ssh ... What am I doing wrong?

@Vince1171

This comment has been minimized.

Copy link
Member

commented Jun 25, 2019

@Cheshirean you are on charging mode (your phone is off and charging)
so you just have to power it up.
And I suggest you to use the v0.6 as I fixed the "charging ??/100". Now there is a proper charging animation

@Cheshirean

This comment has been minimized.

Copy link

commented Jun 26, 2019

@Cheshirean you are on charging mode (your phone is off and charging)
so you just have to power it up.
And I suggest you to use the v0.6 as I fixed the "charging ??/100". Now there is a proper charging animation

It's strange, I just made a "reset" of the fastboot before this ...
Nevertheless, the question remains the same. Trying yesterday again, I get either the same message or a hanging OnePlus logo. And I also do not have access to the device either on the ssh or telnet...

@Vince1171

This comment has been minimized.

Copy link
Member

commented Jul 4, 2019

@Cheshirean you are on charging mode (your phone is off and charging)
so you just have to power it up.
And I suggest you to use the v0.6 as I fixed the "charging ??/100". Now there is a proper charging animation

It's strange, I just made a "reset" of the fastboot before this ...
Nevertheless, the question remains the same. Trying yesterday again, I get either the same message or a hanging OnePlus logo. And I also do not have access to the device either on the ssh or telnet...

there was an error in my docs
the link to the rootfs was pointing to the edge rootfs (which is broken on OP3(t) )
this is link to the correct rootfs
https://ci.ubports.com/job/xenial-rootfs-armhf/lastSuccessfulBuild/artifact/out/ubports-touch.rootfs-xenial-armhf.tar.gz

@Cheshirean

This comment has been minimized.

Copy link

commented Jul 9, 2019

there was an error in my docs
the link to the rootfs was pointing to the edge rootfs (which is broken on OP3(t) )
this is link to the correct rootfs
https://ci.ubports.com/job/xenial-rootfs-armhf/lastSuccessfulBuild/artifact/out/ubports-touch.rootfs-xenial-armhf.tar.gz

I tried with the new rootfs, it worked. I am successfully connecting via ssh. But i have new problem:

phablet@ubuntu-phablet:~$ anbox-tool install
Anbox kernel is not installed! Please flash this first!

I also saw the update README.md, but have not yet had time to test them. Probably should build new images

@Cheshirean

This comment has been minimized.

Copy link

commented Jul 9, 2019

Tried to build images with the manifest specified here. As a result:

$ breakfast oneplus3
build/core/product_config.mk:268: *** No matches for product "lineage_oneplus3".  Останов.
build/core/product_config.mk:268: *** No matches for product "cm_oneplus3".  Останов.
build/core/product_config.mk:268: *** No matches for product "lineage_oneplus3".  Останов.
Device oneplus3 not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
Found repository: android_device_oneplus_oneplus3
Traceback (most recent call last):
  File "vendor/cm/build/tools/roomservice.py", line 263, in <module>
    default_revision = get_default_revision()
  File "vendor/cm/build/tools/roomservice.py", line 117, in get_default_revision
    return r.replace('refs/heads/', '').replace('refs/tags/', '')
AttributeError: 'NoneType' object has no attribute 'replace'
build/core/product_config.mk:268: *** No matches for product "lineage_oneplus3".  Останов.
build/core/product_config.mk:268: *** No matches for product "lineage_oneplus3".  Останов.

** Don't have a product spec for: 'lineage_oneplus3'
** Do you have the right repo manifest?
@Vince1171

This comment has been minimized.

Copy link
Member

commented Jul 9, 2019

@Cheshirean try with breakfast halium_oneplus3-userdebug

for the Anbox issue, are you sure you're using my prebuild boot image?
anbox binder should be integrated

@Cheshirean

This comment has been minimized.

Copy link

commented Jul 9, 2019

@Vince1171, i was sure to your answer... You can give a link to exactly the right images and I will recheck? Thanks)

@Vince1171

This comment has been minimized.

Copy link
Member

commented Jul 9, 2019

@Cheshirean https://github.com/Vince1171/OnePlus3-T-Halium-Prebuild/releases
Anbox binder is integrated since v0.4
As there is an issue with the permission of anbox-tool, you'll need this command in order to install it sudo python3 /system/halium/usr/bin/anbox-tool install
and be aware that anbox is not stable at all, even on officially supported device

@Cheshirean

This comment has been minimized.

Copy link

commented Jul 16, 2019

@Vince1171, i'm trying v0.4 and etc., and all work fine. Thanks for your help

@kiranreddyrebel

This comment has been minimized.

Copy link

commented Jul 20, 2019

Hi, any new updates on this device please.

@Vince1171

This comment has been minimized.

Copy link
Member

commented Jul 20, 2019

@kiranreddyrebel
You can find news/updates for Ubuntu Touch here
For other OS's, there are no news unfortunately

@49616e

This comment has been minimized.

Copy link

commented Aug 11, 2019

I've been trying to build an image to use with plasma mobile, but something SELinux related is causing issues:

[ 17% 3845/22153] build /home/user/halium/out/target/product/oneplus3/obj/ETC/sepolicy_intermediates/sepolicy
FAILED: /bin/bash -c "(/home/user/halium/out/host/linux-x86/bin/checkpolicy -M -c 30 -o /home/user/halium/out/target/product/oneplus3/obj/ETC/sepolicy_intermediates/sepolicy.tmp /home/user/halium/out/target/product/oneplus3/obj/ETC/sepolicy_intermediates/policy.conf ) &&
(/home/user/halium/out/host/linux-x86/bin/checkpolicy -M -c 30 -o /home/user/halium/out/target/product/oneplus3/obj/ETC/sepolicy_intermediates//sepolicy.dontaudit /home/user/halium/out/target/product/oneplus3/obj/ETC/sepolicy_intermediates/policy.conf.dontaudit ) && (/hom
e/user/halium/out/host/linux-x86/bin/sepolicy-analyze /home/user/halium/out/target/product/oneplus3/obj/ETC/sepolicy_intermediates/sepolicy.tmp permissive > /home/user/halium/out/target/product/oneplus3/obj/ETC/sepolicy_intermediates/sepolicy.permissivedomains ) && (if [
\"userdebug\" = \"user\" -a -s /home/user/halium/out/target/product/oneplus3/obj/ETC/sepolicy_intermediates/sepolicy.permissivedomains ]; then echo \"==========\" 1>&2;               echo \"ERROR: permissive domains not allowed in user builds\" 1>&2;             echo \"Li
st of invalid domains:\" 1>&2;          cat /home/user/halium/out/target/product/oneplus3/obj/ETC/sepolicy_intermediates/sepolicy.permissivedomains 1>&2;                exit 1;                 fi ) && (mv /home/user/halium/out/target/product/oneplus3/obj/ETC/sepolicy_inte
rmediates/sepolicy.tmp /home/user/halium/out/target/product/oneplus3/obj/ETC/sepolicy_intermediates/sepolicy )"
vendor/cm/sepolicy/qcom/mpdecision.te:2:ERROR 'unknown type sysfs_devices_system_iosched' at token ';' on line 40157:
allow mpdecision sysfs_devices_system_iosched:file { { getattr open read ioctl lock } { open append write lock } };
#line 1 "vendor/cm/sepolicy/qcom/mpdecision.te"
checkpolicy:  error(s) encountered while parsing configuration
/home/user/halium/out/host/linux-x86/bin/checkpolicy:  loading policy configuration from /home/user/halium/out/target/product/oneplus3/obj/ETC/sepolicy_intermediates/policy.conf
[ 17% 3845/22153] host C: sefcontext_compile <= external/libselinux/utils/sefcontext_compile.c
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/user/halium'

#### make failed to build some targets (08:01 (mm:ss)) ####

I've commented out the SELinux lines for now to get it to build, any ideas on how to fix it properly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.