UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    [Halium9-GSI] - Oneplus 3(T)

    Scheduled Pinned Locked Moved Oneplus 3/3T
    26 Posts 8 Posters 6.9k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • E Offline
        ernest
        last edited by ernest

        Edit : After 2 months as daily driver

        Ubports on this device is really nice and definitively faster than Halium 7.1

        I did notice a critical bug that I'm not able to identify the source exact, but I would think it's at android level => Rild. After some time ofonod is not anymore able to get cell signal information, ofonod is not crashing but simply not able to get modem information. Tragic side of the bug, the cell signal freeze and making you thinking everything is fine, while you cannot make and receive a call...
        I've made a small watchdog/hack reading the log of ofonod and when cell tower information is lost it kill Ofonod and Telepathy-ofonod (Otherwise it's loose it's DBUS-id). So far killing ofonod is the only way to get back cell tower signal. It happen randomly, sometime 4 times during an hour, sometime 4 time during the day...
        It's not a fix, but a dirty hack letting me using the phone daily without issue and studying this problem :).

        Except that the limitation relies on the GSI image rather than the port itself.

        I've updated the working/not working section thanks of Flo list.


        Hello,
        After working on the Halium 7.1 port OP3, i've gave a shot to the Halium 9 thanks to the help of the Halium telegram group especially Erfan.

        This use the great work of the Halium developpers and GSI image from Erfan.

        This is a proof of concept, only, and not supposed to be run as a daily driver, even if it's possible.
        The port is based on

        • A trebelized OP3(T) device,
        • A modified lineage OS (Trebelized) to acquire the vendors partition
        • The Ubports GSI from Erfan (Updated weekly).

        Becareful, this is not a standard H7.1 or H9 port but a H9-GSI port, I didn't try to build a device image with H9.

        It's running pretty smooth.

        To avoid confusion with Halium 7.1 I've created a dedicate repository : https://github.com/OP3-Halium.

        Sources:
        Kernel: https://github.com/OP3-Halium/android_kernel_oneplus_msm8996
        Device (Lineage base): https://github.com/OP3-Halium/android_device_oneplus_oneplus3
        Ubports GSI : look into https://t.me/ErfanGSI

        Compiles files:
        https://drive.google.com/drive/folders/1vnJEKkhO3xqH-fWWG55-yxwx5K1EeKq7?usp=sharing

        Status:

        • Working:
          Actors: Manual brightness
          Actors: Notification LED
          Actors: Torchlight
          Actors: Vibration
          Camera: Flashlight
          Camera: Photo (Yes zoom super slow)
          Camera: Video (Yes zoom super slow)
          Camera: Switch between back and front camera
          Cellular: Incoming, outgoing calls
          Cellular: MMS in, out
          Cellular: PIN unlock
          Cellular: SMS in, out
          Cellular: Change audio routings
          Cellular: Voice in calls
          Cellular: Adjust volume during a call
          Endurance: Battery lifetime > 24h from 100%
          Endurance: No reboot needed for 1 week
          GPU: Boot into UI
          GPU: Hardware video decoding
          Misc: Anbox patches applied to kernel
          Misc: AppArmor patches applied to kernel (Kernel 3.4, 3.10, 3.18)
          Misc: Battery percentage
          Misc: Offline charging
          Misc: Online charging
          Misc: RTC time is used after reboot
          Network: Bluetooth (Yes but cannot be stopped)
          Network: Flight mode
          Network: Hotspot
          Sensors: Automatic brightness (However Erfan modification requires custom .deb - Ask me)
          Sensors: Fingerprint reader (Yes ! thanks to Erfan)
          Sensors: GPS
          Sensors: Proximity
          Sensors: Rotation
          Sensors: Touchscreen
          Sound: Earphones
          Sound: Loudspeaker
          Sound: Microphone
          Sound: Volume control
          Ssh: yes
          OP3 specific : Finger print reader button calls Dash menu

        • Working with additional steps:
          Cellular: Carrier info, signal strength (loss sometime, need to flash the file OP3_GSI_Fix_V1.2.zip after Erfan GSI)
          Cellular: Data connection (Yes select 4G, depending of deb version icon might not be there)
          Network: Bluetooth (For better hardware compatibility Bluez 5.53 can be use : https://ci.ubports.com/job/ubports/job/bluez-packaging/job/xenial_-_even-newer-bluez/)
          Network: WiFi (To restart it easily, need to flash the file OP3_GSI_Fix_V1.2.zip after Erfan GSI)
          OP3 specific : Dash charging (need to flash the file OP3_GSI_Fix_V1.2.zip after Erfan GSI)
          OP3 specific : Tri state switch (upper position silent mode) (need to flash the file OP3_GSI_Fix_V1.2.zip after Erfan GSI)

        • Not working:
          Network: Bluetooth Call (Call got redirected to speaker :/)
          Misc: Shutdown / Reboot ( Most of the time no)
          Misc: Recovery image (Not with GSI)
          Misc: Reset to factory defaults (Not with GSI)
          (Network: NFC - disabled atm due to no middleware)
          USB: MTP access
          USB: ADB access
          USB: External monitor - only for devices that support it
          OTA / Update : To update the GSI image, an apt-get upgrade needs to be done below.

        Install:
        Everything to install is it there : https://github.com/OP3-Halium/Documentation

        Note:

        • Once you trebilized your phone, you can still use it as before and install non treble OS.
        • Until Ubports GSI future is properly define, to upgrade your system you need to mark on hold the following packages, otherwise your phone will not boot :
        sudo apt-mark hold hfd-service  hfd-service-tools libqt5feedback5-hfd lxc-android-config powerd qml-module-hfd  qtubuntu-android repowerd repowerd-data repowerd-tools
        
        • The zip OP3_GSI_Fix_V1.2.zip contains
          • Fix for Tri-state switch
          • Temporary fix Mobile Morph webview, as the form factor is not capture in GSI image
          • Fix battery management - allow to stop charging beyond defined battery %
          • Hack to restart ofonod when cell signal lost
          • Activate Dash charging
          • Fix wifi restart

        Anybody willing to help is welcome ^^ even for testing.

        Short video : https://gfycat.com/infamousorganicichneumonfly

        S 1 Reply Last reply Reply Quote 9
        • S Offline
          Stefano @ernest
          last edited by

          @ernest I will try it when will have a little time to test. Just a few questions here:

          Is Bluetooth calling working as well or not?
          Wifi - have you applied the same trick as H7.1 already and I don't need to do anything else to have it working?
          Flash light? Is it working after installing: sudo ubports-qa install PR-22
          and: sudo install indicator-power ?

          It would be great if it's working as you said, so switching between Android 9 and UT GSI/HAL 9 won't need reflashing firmware ( just to restore backup created with TWRP)

          Many thanks for your and others hard work to bring UT on Op3/3t

          E 1 Reply Last reply Reply Quote 0
          • E Offline
            ernest @Stefano
            last edited by

            @Stefano

            • Bluetooth is rootfs dependent mainly. Cf post of @peat_psuwit.
            • Wifi - Not yet, I've found a nicer solution for 7.1 too so I'll update both. But while wait I can tell you we the two files should go. I'll see how it goes on h7.1 but seems way smoother in H9. I hope my update will make smoother H7.1 too.
              As it's still under WIP and GSI is standardize, likely i'll create a patch OP3.
            • Flash ligth, i'm using a modified app .. an old indicator, I'll to recompile it for armhf rootfs.

            I'm not sure what the firmware change does... I didn't flash specific one for the ubports version and likely they're from latest official Oneplus image. I don't see much problem.
            Each time you'ill need to flash halium-boot, lineage modified and ubports GSi.

            1 Reply Last reply Reply Quote 2
            • J Offline
              joe
              last edited by joe

              Living proof (of concept):
              https://www.youtube.com/watch?v=UyOcQtNDZwM

              1 Reply Last reply Reply Quote 6
              • E Offline
                ernest
                last edited by

                Hello, just to let some potential users know that i've updated the first post and add created a OP3_GSI_Fix_V1.X.zip to fix / compensate OP3 specific bugs.

                1 Reply Last reply Reply Quote 1
                • D Offline
                  danqo6
                  last edited by danqo6

                  Can I ask about swipe to close app bug, is it still hard to close app?

                  E 1 Reply Last reply Reply Quote 0
                  • E Offline
                    ernest @danqo6
                    last edited by

                    @danqo6 sure, it's an issue in the GSI image, not phone dependent.

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      aanno
                      last edited by

                      Very interesting. So interesting that I've tried - but I already failed with 'treblezing' the device - and the rest of the documentation is even more thrilling...

                      I still got some general questions about GSI on 3T. Perhaps somebody reading this can answer them:

                      • Is 'treblezing' the future direction for 3T, i.e. will there be a 'vendor' system plus (device-independant) GSI images?
                      • Are GSI images android version dependant? I.e. will there be different GSI images for android 9, android 10, and so on?
                      • Is 'Halium9-GSI' a official Halium version? Will GSI be the direction Halium will take?
                      • I still haven't understood what modifications are needed on boot and kernel for GSI. Can somebody elaborate on this?
                      • [off-topic] It seems that there are other (unofficial) GSI image, e.g. lineage images. Is there a change that they run on 3T?
                      E 1 Reply Last reply Reply Quote 0
                      • E Offline
                        ernest @aanno
                        last edited by ernest

                        @aanno said in [Halium9-GSI] - Oneplus 3(T):

                        Very interesting. So interesting that I've tried - but I already failed with 'treblezing' the device - and the rest of the documentation is even more thrilling...

                        I still got some general questions about GSI on 3T. Perhaps somebody reading this can answer them:

                        • Is 'treblezing' the future direction for 3T, i.e. will there be a 'vendor' system plus (device-independant) GSI images?

                        Are you refering to OP3 ubports future ? I'm not in the position to decide. I've supported halium 7.1 port, add my small participation to previous amazing work by fixing there and there bugs + enabling bluetooth over 6 months. The results is still far from perfect significant bugs remains...and some hardware issue like the fingerprint reader.
                        I tooks me 2 weeks to enable the device for Erfan GSI ubports....and the result was great in term of daily usage (Once i found a counter measure to the ofono/rild bug, but still not a proper fix)
                        Now I'm testing V10

                        • Are GSI images android version dependant? I.e. will there be different GSI images for android 9, android 10, and so on?

                        Currently it's android 9 vendor depend.

                        • Is 'Halium9-GSI' a official Halium version? Will GSI be the direction Halium will take?

                        Good question, I'm not the one able to answer.

                        • I still haven't understood what modifications are needed on boot and kernel for GSI. Can somebody elaborate on this?

                        From the phone I'm limited in the answer but kernel requires modification to allows the android container and ubports to boot. I suggest to read the halium documentation and join telegram halium group.

                        • [off-topic] It seems that there are other (unofficial) GSI image, e.g. lineage images. Is there a change that they run on 3T?

                        I didn't try, due to my lack of interest in android in general.

                        S 1 Reply Last reply Reply Quote 2
                        • S Offline
                          Stefano @ernest
                          last edited by

                          @ernest hi @ernest could you shed some light on the performance, bugs, once you finish testing GSI v10? Thanks in advance.

                          E 1 Reply Last reply Reply Quote 0
                          • E Offline
                            ernest @Stefano
                            last edited by

                            @Stefano Sure, i'll do it, in a week or two.

                            S 1 Reply Last reply Reply Quote 1
                            • ? Offline
                              A Former User
                              last edited by

                              @ernest Where can I find this watchdog script you made? The PinePhone is suffering from similar problems that I have been trying to solve for a while, and (parts of) it might be useful there as well.

                              E 1 Reply Last reply Reply Quote 0
                              • E Offline
                                ernest @Guest
                                last edited by ernest

                                @kkeijzer said in [Halium9-GSI] - Oneplus 3(T):

                                @ernest Where can I find this watchdog script you made? The PinePhone is suffering from similar problems that I have been trying to solve for a while, and (parts of) it might be useful there as well.

                                I'm looking for a ratio between two output of ofono : battery_props_changed vs ril_netreg_get_signal_strength .
                                If there is too much battery_props_changed, I force ofonod and telepathy-ofono to restart.

                                I notice two issues and i've difficulty to assess if there are linked or not : ofonod doesn't mind that it is loosing the cell tower information ... Thus signaling to the stack above that everything is fine. I suspect an issue between rild and ofonod, however on H9, I didn't success to generate ril log 😕
                                Then the other issue, is that somethime the dbus id of ofono is not updated then telepathy-ofono and the apps are lost (impossible to close a call even if the call is already finish).

                                I didn't yet create a repo however this is the script https://paste.ubuntu.com/p/KHS5DMNw3y/

                                I need to assess if that is still valid or not in V10 in arm64 (V9 is armhf).

                                Ps : you need to have ofonod started in debug mod : exec ofonod -ddd -P provision,udev*,dun*,smart*,hfp_bluez5,stktest,sap

                                ? 1 Reply Last reply Reply Quote 0
                                • ? Offline
                                  A Former User @ernest
                                  last edited by A Former User

                                  @ernest A lot seems familiar. On the PinePhone the signal indicator always seems to work, but occasionally the modem just doesn't. So calls and texts don't come in and mobile data doesn't work any more.

                                  When I then try a dbus call like dbus-send --print-reply --system --dest=org.ofono /quectelqmi_0 org.ofono.Modem.SetProperty string:"Powered" variant:boolean:false, attempting to restart the modem, it will time out. So clearly something in oFono is stuck. (Normally that query should disable the modem and variant:boolean:true should power it up again.)

                                  The cleanest way to fix it is sudo service ofono restart (better than pkill -9 ofonod I'd say), after which mobile data starts working again. But then I run into the problem that the dialer app will show "No signal", and outgoing calls being impossible, with the logs printing something like:

                                  error: "org.freedesktop.DBus.Error.NameHasNoOwner" message: "Could not get owner of name 'org.freedesktop.Telepathy.Connection.ofono.ofono.connection_640ce7767735c59d6fbc2542a9a06c68': no such name" 
                                  

                                  The fix for that is running pkill telepathy-ofono (there doesn't seem to be a service to restart, and I'm not sure how this is spawned) with some sleep timers I'm still working on, but that also seems similar to what you're doing. It looks like you're sleeping 20 seconds after killing ofonod, probably to give it time to re-initialize, but upstart would only give an exit code when ofonod is back up. But still you'd probably need some time inbetween that way, because my experience is that killing telepathy-ofono right after upstart reports oFono as restarted won't work.

                                  My problem only is that I'm still looking for a way to do a non-destructive API call to figure out whether oFono is locked up or not. I can't look at RIL logs because there is no RIL on the PinePhone.

                                  On the PinePhone, sometimes the technology preference option disappears, and the org.ofono.RadioSettings.GetProperties call would return "operation already in progress", which is a trigger for me. But sometimes the modem also locks up without this happening, so it's not ideal.

                                  Maybe /usr/share/ofono/scripts/get-serving-cell-info could be useful for you. You could check if this stops fluctuating and have your counter look at that?

                                  E 1 Reply Last reply Reply Quote 0
                                  • E Offline
                                    ernest @Guest
                                    last edited by

                                    @kkeijzer
                                    Very interesting, it seems really similar what your are experiencing....

                                    I've played a lot with busctl to try to extract a proper bus call response/property without much success, using the ofonod script was ending with a timeout response or very long response that was not acceptable for a watchdog.
                                    I tried to switch on and off the modem through the ofono script and the results was not the expected one.

                                    It seems that ofonod doesn't or dbus update it's id then telepathy is lost. I'll try to stop the service in a cleaner way, thanks.

                                    Looking in sailfish ofonod github and forum, I didn't find a similar issue. Moreover OP3 with Halium7.1 doesn't present this bug.

                                    1 Reply Last reply Reply Quote 0
                                    • D Offline
                                      danqo6
                                      last edited by

                                      I started using v10 without modifications a week ago, most things are working fine and many rootfs issues was fixed with switching to android9 branches. Once a day I need to reboot phone due cellular network, opening camera is causing system crash, dash charging and tri-state switch probably don't work.

                                      E 1 Reply Last reply Reply Quote 1
                                      • E Offline
                                        ernest @danqo6
                                        last edited by

                                        @danqo6 which phone do you have a 3 or a 3T ?

                                        On the 3T the phone switch off when taking a picture...can find any relevant log so far 😕

                                        Look in my gdrive i've dropped a file fixing dash, phone cell and switch

                                        1 Reply Last reply Reply Quote 0
                                        • S Offline
                                          Stefano @ernest
                                          last edited by

                                          @ernest hi, how did the testing go? any major issues?

                                          E 1 Reply Last reply Reply Quote 0
                                          • E Offline
                                            ernest @Stefano
                                            last edited by

                                            @Stefano

                                            It seems way smoother, I've upload a fix for the GSI V10. However on the OP3T, taking a picture shutdown the phone ....
                                            So far I've no clue as the logs doesn't seems talkative and also I'm wondering if this issue is only for the 3T.
                                            I'm looking for help on this bug.

                                            1 Reply Last reply Reply Quote 1
                                            • poVoqP Offline
                                              poVoq
                                              last edited by

                                              Hmm, this seems interesting. If you say "way smoother", that is also compared to the normal Halium7 port?

                                              What about the bottom edge display? Does it have this partially desktop mode like on the Halium7 port as well, where many apps show the bottom edge as a button (like on convergent desktop) and thus break the layout of the app?

                                              Fairphone 5 (waiting for port)

                                              E 1 Reply Last reply Reply Quote 1
                                              • First post
                                                Last post