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

Need help porting to Xiaomi Mi A1 (tissot)

Scheduled Pinned Locked Moved Porting
24 Posts 8 Posters 5.4k Views 5 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.
    • T Offline
      turanmahmudov
      last edited by 14 Apr 2022, 13:45

      Hello everyone. First time trying port.

      I followed this documentation:
      https://docs.ubports.com/en/latest/porting/build_and_boot/H9_build.html

      My manifest file for the device is like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <manifest> 
          <remote name="hassan556"
                  fetch="https://github.com/hassan556/"
                  revision="refs/heads/halium-9.0" />
          
          <project path="device/xiaomi/tissot" name="android_device_xiaomi_tissot" remote="hassan556" />
          <project path="device/xiaomi/msm8953-common" name="android_device_xiaomi_msm8953-common" remote="hassan556" />
      
          <project path="kernel/xiaomi/msm8953" name="android_kernel_xiaomi_msm8953" remote="hassan556" />
      
          <project path="vendor/xiaomi" name="proprietary_vendor_xiaomi" remote="hassan556" />
      </manifest>
      

      My device was Android 9 before starting to port. I tried 2 methods:

      1. I flashed TWRP, installed ubports_GSI, then flashed halium-boot.img.
      2. Downloaded rootfs and GSI as it mentioned in the docs, installed with halium-install script, then flashed halium-boot.img

      Both methods work and I have access to device ssh.

      The problem is device stuck in bootloader. As I understood lxc doesn't start properly.

      I can get the logs you need to debug.

      Thanks.

      1 Reply Last reply Reply Quote 1
      • T Offline
        turanmahmudov
        last edited by turanmahmudov 14 Apr 2022, 14:04

        Some logs

        # lxc-info -n android

        Name:           android
        State:          STOPPED
        

        # lxc-start -n android -F
        https://gist.github.com/turanmahmudov/c3d63bb83f1e1f5243e46f74c0dfdb69

        # systemctl status lxc@android

        Failed to get properties: No such interface ''
        

        # lxc-checkconfig
        https://gist.github.com/turanmahmudov/adf424781d093b48f252064404c7c3a0

        # dmesg
        https://gist.github.com/turanmahmudov/9f92bd0a9771b3988bb1bd88604af43e

        F 1 Reply Last reply 15 Apr 2022, 07:02 Reply Quote 1
        • T Offline
          turanmahmudov
          last edited by 14 Apr 2022, 19:01

          @Flohack can you please help with this? or tag someone who can help me?

          1 Reply Last reply Reply Quote 1
          • C Offline
            cliffcoggin
            last edited by 14 Apr 2022, 19:11

            Be patient. We all have real lives to lead before looking here.

            1 Reply Last reply Reply Quote 1
            • F Offline
              flohack @turanmahmudov
              last edited by 15 Apr 2022, 07:02

              @turanmahmudov try to start container in foreground and see for errors. The lxc-start command has a flag for that

              My languages: 🇦🇹 🇩🇪 🇬🇧 🇺🇸

              T 1 Reply Last reply 15 Apr 2022, 07:22 Reply Quote 1
              • T Offline
                turanmahmudov @flohack
                last edited by 15 Apr 2022, 07:22

                @flohack this?
                # lxc-start -n android -F
                https://gist.github.com/turanmahmudov/c3d63bb83f1e1f5243e46f74c0dfdb69

                1 Reply Last reply Reply Quote 0
                • T Offline
                  turanmahmudov
                  last edited by 15 Apr 2022, 08:36

                  lxc errors fixed with disabling schedtune in kernel defconfig. now lxc container starts.

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    turanmahmudov
                    last edited by 15 Apr 2022, 08:44

                    new dmesg output:
                    https://gist.github.com/turanmahmudov/232c2552842b32bd0ca545277959f139

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      turanmahmudov
                      last edited by 15 Apr 2022, 19:56

                      GUI loads. The device is very very slow.
                      No WiFi, No Bluetooth, No SIM, No GPS, No Sound

                      1 Reply Last reply Reply Quote 0
                      • L Offline
                        Lakotaubp
                        last edited by 15 Apr 2022, 22:48

                        I thought the GSI was no longer supported or us this something else?

                        T 1 Reply Last reply 16 Apr 2022, 09:38 Reply Quote 0
                        • T Offline
                          turanmahmudov @Lakotaubp
                          last edited by 16 Apr 2022, 09:38

                          @lakotaubp yes, GSI didn't work for me. I built halium-boot.img and system.img
                          The device boots into Lomiri UI, apps work.
                          All the other stuff doesn't work. I will start from scratch.

                          1 Reply Last reply Reply Quote 0
                          • T Offline
                            turanmahmudov
                            last edited by 18 Apr 2022, 12:10

                            Source code:
                            https://github.com/xiaomi-tissot-ubuntu

                            Sound works, Sensors work, GUI works
                            No WiFi, No Bluetooth, No Cellular

                            I am still trying to make WiFi work. Will give manifest file and install instructions.

                            1 Reply Last reply Reply Quote 0
                            • T Offline
                              turanmahmudov
                              last edited by 22 Apr 2022, 21:35

                              GitLab CI method works.

                              Source:
                              https://gitlab.com/turanmahmudov/xiaomi-tissot/

                              Kernel & Device Source:
                              https://github.com/xiaomi-tissot-ubuntu

                              Instructions

                              • Get boot.img and system.img here:
                                https://gitlab.com/turanmahmudov/xiaomi-tissot/-/jobs/2362910100/artifacts/browse/out/

                              • Get vendor.img here:
                                https://gitlab.com/turanmahmudov/xiaomi-tissot/-/blob/master/prebuilt/vendor.img

                              • Get the latest TWRP with Treble Manager for tissot here:
                                https://forum.xda-developers.com/t/recovery-treble-twrp-3-3-1-0-with-tissot-manager.3976117/

                                • Format Data in Wipe option (to remove Stock encryption), then Reboot into Recovery again.
                                • In TWRP, go to Advanced > Treble Manager and repartition the device by following the wizard.
                              • Flash Ubuntu in fastboot mode:
                                fastboot flash vendor vendor.img
                                fastboot flash boot boot.img
                                fastboot flash system system.img

                              What doesn't work / Issues

                              • Camera
                              • GPS
                              • Fingerprint
                              A 4 Replies Last reply 30 Dec 2022, 09:49 Reply Quote 5
                              • C Offline
                                Cesar Herrera
                                last edited by Cesar Herrera 5 Aug 2022, 21:03 8 May 2022, 17:18

                                I have Xiaomi Mi A2 and a car Citroen C4. I have paired the phone but only hear the calls in it, not in the car. I can't listen the phone's music in the car. If you can do it in A1, it would be the solution for A2.

                                1 Reply Last reply Reply Quote 0
                                • raptoR Offline
                                  rapto
                                  last edited by 17 May 2022, 18:27

                                  I tried to follow the instructions. Now it says "the system has been destroyed". ¿Any chance of recovery?

                                  raptoR 1 Reply Last reply 17 May 2022, 20:57 Reply Quote 0
                                  • raptoR Offline
                                    rapto @rapto
                                    last edited by 17 May 2022, 20:57

                                    @rapto Never mind. Started from 'flash stock rom' and retrying...

                                    raptoR 1 Reply Last reply 17 May 2022, 20:59 Reply Quote 0
                                    • raptoR Offline
                                      rapto @rapto
                                      last edited by 17 May 2022, 20:59

                                      @rapto Nope. System destroyed again. There must be something I am not doing right.

                                      1 Reply Last reply Reply Quote 0
                                      • A Offline
                                        almas @turanmahmudov
                                        last edited by 30 Dec 2022, 09:49

                                        @turanmahmudov Thank you for sharing :smiling_face_with_heart-eyes: :heart_suit: . Is it your last build?

                                        1 Reply Last reply Reply Quote 0
                                        • A Offline
                                          almas @turanmahmudov
                                          last edited by 30 Dec 2022, 12:16

                                          @turanmahmudov I just finished flash and can not boot. It's with a white screen with three color bar and mi logo. How can I boot or ssh to my phone? Please help me.

                                          1 Reply Last reply Reply Quote 0
                                          • A Offline
                                            almas @turanmahmudov
                                            last edited by 30 Dec 2022, 12:28

                                            This post is deleted!
                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post