• 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 for porting to xiaomi 4 cancro

Scheduled Pinned Locked Moved Porting
27 Posts 5 Posters 7.8k 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.
    • D Offline
      doniks @kuailexs
      last edited by 2 Dec 2017, 08:26

      @kuailexs the dmesg shows

      [   1.685900] trampoline: Starting adbd
      [    1.686754] trampoline: Running multirom
      [    1.697731] multirom: Running MultiROM v33
      [    1.697950] multirom: Loading MultiROM status...
      [ 1.697990] multirom: Loading fstab "/mrom.fst
      

      not sure how you got multirom in there when you are porting ubports. Can you elaborate a bit on how you built and installed ubports?

      1 Reply Last reply Reply Quote 0
      • K Offline
        kuailexs
        last edited by 2 Dec 2017, 08:59

        Use the ubp-5.1 branch, installed with rootstock-ng.
        Import backports. Use Kernel Configuration https://github.com/kuailexs/android_kernel_xiaomi_cancro-1/blob/cm-12.1/arch/arm/configs/cyanogen_cancro_defconfig.

        BOARD_KERNEL_CMDLINE := console=tty0 vmalloc=500M androidboot.hardware=cancro user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 selinux=permissive androidboot.bootdevice=msm_sdcc.1

        added 70-cancro.rules.
        used ubports/device-files common Overwrite system files.
        Use multirom install bootimage Select Inject multirom after installation.

        This will be able to boot animation.

        Source used: cm-12.1 branch
        https://github.com/kuailexs/android_kernel_xiaomi_cancro-1;
        https://github.com/kuailexs/android_device_xiaomi_cancro;

        UB 16.04 on Xiaomi 4
        UB 20.04 on Xiaomi 6

        D 1 Reply Last reply 2 Dec 2017, 13:03 Reply Quote 0
        • D Offline
          doniks @kuailexs
          last edited by doniks 12 Feb 2017, 13:36 2 Dec 2017, 13:03

          @kuailexs what does the dmesg look like without multirom? And out of personal interest: how do you "import backports"?

          K 2 Replies Last reply 2 Dec 2017, 14:13 Reply Quote 0
          • K Offline
            kuailexs
            last edited by 2 Dec 2017, 14:05

            use this : https://github.com/ubuntu-phonedations/backports

            Follow this commit : https://github.com/ubports/android_kernel_oneplus_msm8974/commit/d7444c1827296f5096688ab041538e070bf1108c

            UB 16.04 on Xiaomi 4
            UB 20.04 on Xiaomi 6

            1 Reply Last reply Reply Quote 0
            • K Offline
              kuailexs @doniks
              last edited by 2 Dec 2017, 14:13

              @doniks can not get dmesg log whitout multirom.
              can not connection adb. not bootloop.
              will not create a few directories in the '/data' directory . android-data system-data user-data

              UB 16.04 on Xiaomi 4
              UB 20.04 on Xiaomi 6

              D 1 Reply Last reply 4 Dec 2017, 07:06 Reply Quote 0
              • D Offline
                doniks @kuailexs
                last edited by 4 Dec 2017, 07:06

                @kuailexs said in Need help for porting to xiaomi 4 cancro:

                @doniks can not get dmesg log whitout multirom.
                can not connection adb.

                Can you try this to get a log:
                https://docs.halium.org/en/latest/porting/debug-build/index.html#reading-kernel-logs

                not bootloop.
                will not create a few directories in the '/data' directory . android-data system-data user-data

                Honestly, I don't really understand what you're saying. Can you elaborate a bit more?

                K 4 Replies Last reply 4 Dec 2017, 07:20 Reply Quote 0
                • K Offline
                  kuailexs @doniks
                  last edited by 4 Dec 2017, 07:20

                  @doniks My English is too poor, I do not know how to describe it.This is translated by Google.

                  UB 16.04 on Xiaomi 4
                  UB 20.04 on Xiaomi 6

                  1 Reply Last reply Reply Quote 0
                  • K Offline
                    kuailexs @doniks
                    last edited by 4 Dec 2017, 07:26

                    @doniks I will try to modify the startup script.It may be able to get the log.I will try it.It is possible to change the kernel parameters. I first try to get log without multirom.
                    Thank you !

                    UB 16.04 on Xiaomi 4
                    UB 20.04 on Xiaomi 6

                    1 Reply Last reply Reply Quote 0
                    • K Offline
                      kuailexs @doniks
                      last edited by 4 Dec 2017, 07:34

                      @doniks I said that if use multirom can mount ubuntu system files and create three runtime-related folders (including: android-data system-data user-data). Without multirom. Did not create those three folders. I do not know if I have not successfully mounted ubuntu system (system.img). When not multirom, can not boot to the boot animation. Nor is the bootloop. Temporarily I still can not get the log without multirom

                      UB 16.04 on Xiaomi 4
                      UB 20.04 on Xiaomi 6

                      1 Reply Last reply Reply Quote 0
                      • K Offline
                        kuailexs @doniks
                        last edited by 5 Dec 2017, 02:11

                        @doniks I get dmesg without multirom,I got dmesg use this : https://github.com/ubports/ubports-boot
                        https://github.com/kuailexs/porting-log/blob/master/dmesg-withoutmultirom
                        Please help me to see

                        UB 16.04 on Xiaomi 4
                        UB 20.04 on Xiaomi 6

                        1 Reply Last reply Reply Quote 0
                        • T Offline
                          Tonoxis
                          last edited by Tonoxis 12 May 2017, 02:29 5 Dec 2017, 02:27

                          I see you have syspart on the kernel's cmdline, but not datapart (if that's still used in ubports-boot), if this is still used then that may be the reason why it's not creating your data directories. However system-data should be created by the rootfs (it contains overrides for certain items in directories on the system image like /etc/init/*.override, /var, etc.)

                          MultiROM doesn't create these folders specifically, that's done by system-image-upgrader during installation of the Ubuntu Touch rootfs. So ensure that you have a valid Ubuntu Touch rootfs on your device, system.img should be in /data and I think ubuntu.img as well (not sure, I mainly use MultiROM with my Nexus 7). Other than that, It looks like your ramdisk is booting and running properly, at least to me. You may wish to remove the breakpoint from the kernel cmdline and get the last_kmsg from recovery instead to get a more full, detailed log including what happens after the ramdisk's execution (which isn't shown in your log as the ramdisk pauses it's init execution for the breakpoint).

                          I would suggest letting the system sit for about 1 minute before rebooting over to recovery to do this, do note that to see the Ubuntu logs, you MUST start into recovery right after rebooting the system, it MUST NOT attempt to start anything but recovery or you'll find yourself with a different log file (for instance, the recovery image will rewrite the last_kmsg with it's own if it was the last thing to start up before a reboot). So if you can do an adb reboot recovery, or a reboot recovery from your ramdisk to boot into recovery, that will help a ton!

                          To get the last_kmsg from recovery:

                          • Ensure you boot straight into recovery after rebooting the system from it's boot animation.
                          1. Once the device is in recovery and plugged into the machine, simply type adb pull /proc/last_kmsg.

                          There you go. This should help since any of us attempting to assist can see the messages from past the ramdisk (your current log only shows the end of the ramdisk startup, but not Ubuntu's startup which is what we want.)

                          Though those Kernel oops in the log (you can find these with the --- cut here --- style lines) could have something to do with things, but it looks like the only issues are with a crypto driver for the platform not being able to create a sysfs entry (not sure if qcrypto.0 is essential to your platform or not), though I don't have this device myself, so I can't give you an answer there.

                          EDIT: I also noticed this interesting line in the logs, I'm not sure what it is though [system] Activated service 'com.canonical.SystemImage' failed: Launcher could not run (out of memory)

                          This may be why your system isn't starting.

                          K 2 Replies Last reply 5 Dec 2017, 03:48 Reply Quote 0
                          • K Offline
                            kuailexs @Tonoxis
                            last edited by 5 Dec 2017, 03:48

                            @Tonoxis
                            No breakpoint, no way to get any log. Can not restart.black screen. More than five drive letters on the computer. Can only be forced to shut down. Can not get last_kmsg
                            0_1512445460349_ff1b97df-2335-454e-98df-ce5294708b7b-图片.png

                            UB 16.04 on Xiaomi 4
                            UB 20.04 on Xiaomi 6

                            1 Reply Last reply Reply Quote 1
                            • K Offline
                              kuailexs @doniks
                              last edited by kuailexs 12 May 2017, 14:38 5 Dec 2017, 14:37

                              @doniks Good news. Now it can boot up. thank you for your help

                              UB 16.04 on Xiaomi 4
                              UB 20.04 on Xiaomi 6

                              1 Reply Last reply Reply Quote 0
                              • K Offline
                                kuailexs @Tonoxis
                                last edited by 5 Dec 2017, 14:59

                                @Tonoxis Good news. Now it can boot up. thank you for your help

                                UB 16.04 on Xiaomi 4
                                UB 20.04 on Xiaomi 6

                                1 Reply Last reply Reply Quote 0
                                • K Offline
                                  kuailexs
                                  last edited by 6 Dec 2017, 00:04

                                  0_1512518646384_1ca35734-46a4-4576-98be-9c10014f69be-图片.png /media/feifei/linux/68606daaac13f3f4.jpg

                                  UB 16.04 on Xiaomi 4
                                  UB 20.04 on Xiaomi 6

                                  F 1 Reply Last reply 7 Dec 2017, 15:06 Reply Quote 1
                                  • T Offline
                                    Tonoxis
                                    last edited by 6 Dec 2017, 04:13

                                    Great news! What did you change to have it boot up (for future reference)? Was it the datapart kernel cmdline variable? As for the 5 volumes appearing in Nautilus, you may have entered QCOM_DL. If you're entering QCOM_DL while attempting to get into recovery, that means your recovery image is bad and needs re-flashed.

                                    K 1 Reply Last reply 6 Dec 2017, 05:37 Reply Quote 0
                                    • K Offline
                                      kuailexs @Tonoxis
                                      last edited by 6 Dec 2017, 05:37

                                      @Tonoxis The reason is that there is no 'ro.product.device=cancro' in build.prop, not loading 70-cancro.rules

                                      UB 16.04 on Xiaomi 4
                                      UB 20.04 on Xiaomi 6

                                      T 1 Reply Last reply 6 Dec 2017, 20:21 Reply Quote 0
                                      • T Offline
                                        Tonoxis @kuailexs
                                        last edited by 6 Dec 2017, 20:21

                                        @kuailexs Ah wonderful! Glad it was something minor instead of something huge!

                                        1 Reply Last reply Reply Quote 0
                                        • F Offline
                                          flohack @kuailexs
                                          last edited by 7 Dec 2017, 15:06

                                          @kuailexs Excellent Xie-Xie!

                                          Can you tell us what works:

                                          Boot - OK
                                          Bluetooth
                                          Camera
                                          Cellular Radio
                                          GPS
                                          Graphics
                                          Resume
                                          Rotation
                                          Sound
                                          Touch
                                          Wifi

                                          These are the main features we need to call it a good port. Good Luck!

                                          BR

                                          My languages: 🇦🇹 🇩🇪 🇬🇧 🇺🇸

                                          K 1 Reply Last reply 8 Dec 2017, 02:03 Reply Quote 0
                                          • K Offline
                                            kuailexs @flohack
                                            last edited by 8 Dec 2017, 02:03

                                            @Flohack Most do not work

                                            Boot - OK
                                            Bluetooth
                                            Camera
                                            Cellular Radio
                                            GPS
                                            Graphics - OK
                                            Resume
                                            Rotation
                                            Sound - OK
                                            Touch - OK
                                            Wifi

                                            UB 16.04 on Xiaomi 4
                                            UB 20.04 on Xiaomi 6

                                            1 Reply Last reply Reply Quote 1
                                            11 out of 27
                                            • First post
                                              11/27
                                              Last post