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

Flashing Ubuntu Touch to ZUK Z1

Scheduled Pinned Locked Moved Porting
15 Posts 4 Posters 9.8k Views 1 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.
    • C Offline
      ChrisLuck
      last edited by ChrisLuck 30 Dec 2015, 13:05

      Hi, I am now back at the state where I can successfully compile UT. All .img files are generated.
      Now i am using fastboot to flash boot and recovery and everything seems to be fine.
      Recovery boots without errors (The keys are weird, i have no button to 'select' an entry, only up/down are working, but thats another topic)

      Ok, then i am trying to flash the system with:
      ./rootstock-touch-install Downloads/debug/vivid-preinstalled-touch-armhf.tar.gz phablet/out/target/product/ham/system.img

      After that, i can't boot it because i am stuck at the vendor-logo.
      Back in recovery i have no last_kmsg file.

      I took a look at the directory structure using adb shell while the phone is in recovery and i noticed the following:
      I have the folder /data, but it is empty, besides a 'media' folder (which is empty).

      Do you have any idea what is wrong here?

      1 Reply Last reply Reply Quote 0
      • C Offline
        ChrisLuck
        last edited by 30 Dec 2015, 14:01

        The problem seems to be, that recovery isn't mounting

        /dev/block/platform/msm_sdcc.1/by-name/userdata as /data

        I mounted it manually now, then flashed the system.img but it still doesn't boot.
        Maybe that is also because it doesnt mout userdata correctyl.

        Can someone please help me? Where can i adjust those mountpoints?

        1 Reply Last reply Reply Quote 0
        • Z Offline
          zeeshanhyder
          last edited by 30 Dec 2015, 18:32

          Dont use ubuntu's recovery. It sucks way too much. Use TWRP. Ubuntu's recovery is very unstable. Use it only to check if your kernel build is fine. If your data is empty then ubuntu's system.img is not getting created. Also you need 70-device.rules file where you specify all the udev rules for ubuntu's init to mount dev folder properly. And also adbd.conf to configure adbd on preboot so you get logcats. Check here how they have done.

          https://github.com/ubuntu-touchCAF/project_rootstock/tree/ubuntu-touch

          1 Reply Last reply Reply Quote 0
          • C Offline
            ChrisLuck
            last edited by ChrisLuck 31 Dec 2015, 10:56

            Thanks for the hint.
            I assume i have to modify the content of the config files to match my productID and vendorID?
            But where can i get the udev file for my device? I read the UT porting guide and it says:

            You can create the udev rules file by invoking the following command while Ubuntu is booted:
            adb shell cat /var/lib/lxc/android/rootfs/ueventd*.rc|grep ^/dev|sed -e 's/^/dev///'|awk '{printf "ACTION=="add", KERNEL=="%s", OWNER="%s", GROUP="%s", MODE="%s"\n",$1,$3,$4,$2}' | sed -e 's/\r//'

            BUT i cant boot ubuntu yet... So where to get the udev rules? do i have to create them manually?
            I tried to use mariogrip's udev rules for his oneplus one (same system on chip) but it still doesn't boot 😞

            1 Reply Last reply Reply Quote 0
            • Z Offline
              zeeshanhyder
              last edited by 31 Dec 2015, 21:20

              No you You have to use your phone's current udev rules file to port udev rules to Ubuntu readble format. More specifically all /dev rules in your Android udev files need to be copied to Ubuntu udev. You can check Mako's udev to get the ideas how to copy Android udev rules to Ubuntu readable one.

              1 Reply Last reply Reply Quote 0
              • C Offline
                ChrisLuck
                last edited by 1 Jan 2016, 12:14

                Part of my problem was, that the BoardConfig.mk form cyanogenmod declares the variables

                BOARD_KERNEL_TAGS_OFFSET := 0x01E00000
                BOARD_RAMDISK_OFFSET := 0x02000000

                Those variables are not used by the ubuntu makefiles, so i changed those two lines to:

                BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02000000 --tags_offset 0x01E00000

                Sadly, it still doesn't boot.

                Z 1 Reply Last reply 5 Jan 2016, 05:52 Reply Quote 0
                • Z Offline
                  zeeshanhyder
                  last edited by 5 Jan 2016, 05:45

                  can u send me link to last_kmsg? I am getting them now. When your device bootloops reboot back to bootloader directly and then boot (not flash) recovery.img from ubuntu build. Then get the last_kmsg and dmesg with following command:

                  adb shell cat /proc/last_kmsg > last_kmsg

                  And then pastebin it and send me link. I'll see if i can help.

                  1 Reply Last reply Reply Quote 0
                  • Z Offline
                    zeeshanhyder @ChrisLuck
                    last edited by 5 Jan 2016, 05:52

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • C Offline
                      ChrisLuck
                      last edited by 5 Jan 2016, 12:16

                      I have no bootloop. The phone just gets stuck, showing me the vendor-logo (no lsusb entry and no adb).
                      I can user power+volup+voldown to get into recovery but i never had the /proc/last_kmsg file.

                      What i did so far:
                      I unpacked my boot.img and double checked that all parameters (pagesize, base, ramdisk-offset, tags-offset) are exactly the same as in the boot.img from a recent cyanogenmod nightly.
                      I also made sure that the dt.img is exactly the same by repacking my boot.img with the dt.img from cyanogenmod.

                      Z 1 Reply Last reply 5 Jan 2016, 17:03 Reply Quote 0
                      • Z Offline
                        zeeshanhyder @ChrisLuck
                        last edited by 5 Jan 2016, 17:03

                        @ChrisLuck Dont worry about lsusb. Even i am not getting that right now. Give me your github sources link. Let me look at that. I am getting recovery logs now. Thankfully. But unfortunately there's not much support out there so progress is very slow.

                        1 Reply Last reply Reply Quote 0
                        • F Offline
                          frantisheq
                          last edited by frantisheq 2 Mar 2016, 11:18 3 Feb 2016, 11:18

                          @ChrisLuck can you publish sources? i am porting CM to lenovo vibe z2 pro and i'd like to port ubuntu to it. thank you

                          1 Reply Last reply Reply Quote 0
                          • C Offline
                            ChrisLuck
                            last edited by ChrisLuck 2 May 2016, 09:21 5 Feb 2016, 09:21

                            @frantisheq That looks like a nice phone to me, never heard about it before. You might have more luck than me with this one as it is running KitKat 🙂
                            I got the Z1 booting into adb but that is all i achieved. Everything that relies on the vendor-blobs (like graphics, network ...) is not working. The reason for this is most likely the fact, that I only have vendor blobs for android 5.1.1 which don't match the Kitkat Android that is used in Ubuntu Touch.

                            I will not upload my sources as i don't know how to do that in a clean way but i would love to help you in getting your port booting to adb.

                            Since your phone is not supported by Cyanogenmod (that's where I got the kernel and device sources for mine) your best bet might be to use the device/kernel from the oneplus one. The SOC is the same, so booting (without graphics and so on) might work with those sources.

                            One problem you will have is, that you can't get the device tree sources for your device. One way to get around this is to dump your Android boot.img and extract the dt.img from there with the unpackbootimg tool.
                            Note: There is a difference between the 'device' folder in your build directory and the device-tree i am talking about right now. That is something that confused me in the beginning.
                            You can get an introduction to device trees here.

                            I am also a beginner at all of this but I would love to help, so let me know if you need help 🙂

                            1 Reply Last reply Reply Quote 0
                            • F Offline
                              frantisheq
                              last edited by 9 Feb 2016, 13:17

                              thanks, i have kernel sources for 4.4 nad 5.0 and already working CM12.1 here http://forum.xda-developers.com/t/k920
                              i'll just try to port cm11 first and then we'll see

                              1 Reply Last reply Reply Quote 0
                              • F Offline
                                Frano212
                                last edited by 16 Mar 2016, 11:03

                                Hi, I'd really love to have Ubuntu touch on my zuk but I know barely anything.
                                Can someone help me? Thanks

                                1 Reply Last reply Reply Quote 0
                                • C Offline
                                  ChrisLuck
                                  last edited by 16 Mar 2016, 14:08

                                  Hi Frano212,
                                  I stopped working on the port. It does boot up into adb but graphics and so on are not working. It is very hard to get help, so i will just buy the new meizu pro 5 ....

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