UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. NVriezen
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 18
    • Groups 0

    NVriezen

    @NVriezen

    4
    Reputation
    8
    Profile views
    18
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    NVriezen Unfollow Follow

    Best posts made by NVriezen

    • [HTC J Butterfly 3] Error building mkbootimg - tools/metalava/manual not found

      Hello there 🙂

      Thanks for checking out my post.
      This is the first time I'm doing any android/linux porting.
      I figured I could try to port Ubuntu Touch to my HTC J Butterfly 3.
      Also know as HTC HTV31 or HTC b3uhl.

      I was lucky enough that someone had sources for LineageOS 16.0.
      However after following the porting guide I got stuck at making mkbootimg.
      The error I get is as follows:

      build/make/core/droiddoc.mk:188: error: FindEmulator: find: `tools/metalava/manual': No such file or directory
      22:28:23 ckati failed with: exit status 1
      
      #### failed to build some targets (02:26 (mm:ss)) ####
      

      I haven't noticed much wrong with my setup.
      The only thing that seemed weird was when I ran

      source build/envsetup.sh
      

      As it gave me the following ouput:

      including vendor/lineage/vendorsetup.sh
      

      I expected a bit more lines and also some lines mentioning HTC or my specific model.

      Another thing I tried was resyncing the repo and trying to apply those hybris patches as well.
      However applying the pathes also didn't work and gave me another error...

      Applying: (hybris) Fix __get_tls and related functions (>=Android 8)
      error: libc/bionic/ndk_cruft.cpp: does not match index
      error: libc/libc.arm.map: does not match index
      error: libc/libc.arm64.map: does not match index
      error: libc/libc.x86.map: does not match index
      error: libc/private/__get_tls.h: does not match index
      Patch failed at 0001 (hybris) Fix __get_tls and related functions (>=Android 8)
      The copy of the patch that failed is found in: .git/rebase-apply/patch
      When you have resolved this problem, run "git am --continue".
      If you prefer to skip this patch, run "git am --skip" instead.
      To restore the original branch and stop patching, run "git am --abort".
      

      Don't worry, I aborted the operation so I should be on the original branch again.
      But I don't know how to go from this.
      I tried to look in that droiddoc.mk file.
      Apart from seeing something about metalava I couldn't make much from it.
      Hopefully someone here can point me in the right direction again

      Thanks again for reading this 🙂

      posted in Porting
      NVriezenN
      NVriezen
    • RE: [HTC J Butterfly 3] Error building mkbootimg - tools/metalava/manual not found

      @nvriezen said in [HTC J Butterfly 3] Error building mkbootimg - tools/metalava/manual not found:

      @nero355 I guess it's not needed anymore.
      I managed to get telnet to work again.
      It seems I was setting it up incorrectly somehow, but this page in the Halium docs helped me.

      So now that I can connect to the phone again I can start looking into more what is going wrong.
      The first thing I noticed was that I don't see any /data folder when I run the ls command.
      I found in the Halium docs what the boot image is supposed to do, which is mounting the data partition. However when I run mount $DATA_PARTITION /data it returns that it couldn't find /data in fstab.

      Currently I am looking into stuff that could have gone wrong while flashing according to some other replies you gave in other threads.
      Especially this one here where someone also has the error umount: .halium-install-rootfs.hUAJA: not mounted
      The phone is flashing right now without any partitions being mounted in TWRP (cache and data were mounted all the previous times) to see if that makes any difference.

      Well that didn't work...
      It somehow rebooted TWRP halfway during flashing the rootfs to /data.
      So the flashing failed, twice.
      Now I'm reflashing the normal way as I also have seen more people with the umount error.
      Someone mentioned it had something to do with the phone not booting instead of the actual installer script.
      I don't know how though since the phone is not actually rebooting or anything when cleanup starts.
      Maybe if I look more closely to dmesg -w output that I can find a clue on what's happening

      posted in Porting
      NVriezenN
      NVriezen
    • RE: [HTC J Butterfly 3] Error building mkbootimg - tools/metalava/manual not found

      So this is the dmesg output filtered on initrd:

      [    3.050478] c1      1 initrd: checking filesystem integrity for the userdata partition
      [    3.093157] c1      1 initrd: checking filesystem for userdata took (including e2fsck) 0 seconds
      [    3.103620] c0      1 initrd: mounting /dev/mmcblk0p69
      [    3.126205] c1      1 initrd: Halium rootfs is /tmpmnt/rootfs.img 
      [    3.126831] c0      1 initrd: mounting system rootfs at /halium-system
      [    3.141646] c0      1 initrd: mounting  /tmpmnt/rootfs.img (user mode)
      [    3.146123] c0      1 initrd: mounting android system image (/tmpmnt/android-rootfs.img) ro, in /android-rootfs (rootfs mode)
      [    3.146215] c0      1 initrd: mounting android system image from userdata partition
      [    3.172121] c1      1 initrd: Android system image API level is 28
      [    3.172202] c1      1 initrd: boot mode: halium
      [    3.173274] c1      1 initrd: Normal boot
      [    3.205264] c0      1 initrd: device is halium_arm64
      [    3.212544] c1      1 initrd: Adding bind-mounts to /root/etc/fstab
      [    4.101235] c0      1 initrd: checking fstab /root/var/lib/lxc/android/rootfs/fstab* for additional mount points
      [    4.107906] c1      1 initrd: moving Android system to /android/system
      [    4.659792] c0    776 ########################## usb_info: Halium initrd Debug telnet on port 23 on rndis0 192.168.2.15 - also running udhcpd
      

      The whole dmesg output can be found here: https://0paste.com/343730
      The most interesting line is probably the one saying something about not being able to find init.

      posted in Porting
      NVriezenN
      NVriezen
    • RE: [HTC J Butterfly 3] Error building mkbootimg - tools/metalava/manual not found

      Made some great progress tonight after I got some help through the Telegram group!
      Turns out the error;

      [    4.128084] c0    769 run-init: opening console: No such device
      [    4.128224] c0      1 Target filesystem doesn't have requested /sbin/init.
      [    4.128896] c1    770 run-init: opening console: No such device
      [    4.129720] c0    771 run-init: opening console: No such device
      [    4.130458] c1    772 run-init: opening console: No such device
      [    4.131154] c0    773 run-init: opening console: No such device
      [    4.131946] c1    774 run-init: opening console: No such device
      [    4.133078] c0      1 No init found. Try passing init= bootarg.
      

      Had something to do with console=tty0 missing from the kernel cmdline.
      Basically I had to follow these step for Halium 7.1 even though I am using Halium 9.0.

      After that I also needed to use this fix because my phone uses arm64.
      But after that I was able to boot Ubuntu 16.04 correctly on my phone!!

      Unfortunately trying to get Lomiri to work (the GUI) didn't go so well.
      But that is for another day.
      I'm already happy that the phone now runs Ubuntu! 😄

      posted in Porting
      NVriezenN
      NVriezen

    Latest posts made by NVriezen

    • RE: [HTC J Butterfly 3] Error building mkbootimg - tools/metalava/manual not found

      Now I'm stuck at a new point. Which is that android lxc won't start.
      The device gives me the following error when trying to start it manually:

      root@ubuntu-phablet:~# lxc-start -n android -F
      lxc-start: conf.c: mount_entry: 1858 No such file or directory - Failed to mount "tmpfs" on "/usr/lib/aarch64-linux-gnu/lxc/dev"
      lxc-start: conf.c: lxc_setup: 3335 failed to setup the mount entries for 'android'
      lxc-start: start.c: do_start: 1248 Failed to setup container "android".
      lxc-start: sync.c: __sync_wait: 59 An error occurred in another process (expected sequence number 5)
      lxc-start: start.c: __lxc_start: 1802 Failed to spawn container "android".
      
      The container failed to start.
      Additional information can be obtained by setting the --logfile and --logpriority options.
      

      In the dmesg log I already saw that the camera and audio will not work.
      But that is really something for later.
      First I want to get the GUI running or just the system in general.
      I also can't reboot the device through the shell anymore.
      Making your own system image definitely is the harder way to port UT.

      posted in Porting
      NVriezenN
      NVriezen
    • RE: [HTC J Butterfly 3] Error building mkbootimg - tools/metalava/manual not found

      @doniks Well, just make sure that the thing about console=tty0 is not only mentioned on the Halium 7.1 page but also on the Halium 9.0 page in the docs.
      And that the docs points to the above mentioned fix for people with an arm64 architecture phone. That could just be in the errors section I think.

      Another thing I ran into was e2fsdroid giving me errors. I didn't realize this at first.
      So for people that see something like env: 'e2fsdroid' No such file or directory
      Just run mka e2fsdroid in the build directory because you probably miss it on your machine somehow.
      That made it finally possible for me to build a system image as well.

      posted in Porting
      NVriezenN
      NVriezen
    • RE: Trying to boot nexus 9

      @Carlo Did you apply the hybris patches btw?
      You definitely need those and may solve the issue if you haven't applied them yet.

      posted in Porting
      NVriezenN
      NVriezen
    • RE: Trying to boot nexus 9

      @carlo said in Trying to boot nexus 9:

      There is a thing I didn't see the first time. When I run breakfast flounder it sayes: Trying dependencies-only mode on a non-existing device tree. What does it mean?

      I get that same message. As far as I know that doesn't matter and you can just ignore it.
      If no other errors are popping up then the only thing I can recommend is going to the Telegram group and ask for help there.
      They already helped me out twice when I really was stuck and didn't have any clue anymore.

      posted in Porting
      NVriezenN
      NVriezen
    • RE: Trying to boot nexus 9

      @carlo said in Trying to boot nexus 9:

      @nero355 It "worked" but still not booting. Mabye some depencencies are missing.

      What worked exactly then?
      Did the flashing return without errors?

      If so, maybe something went wrong with making halium-boot.
      Make sure that when running the kernel configuration test there are no red lines popping up.
      If there are, even though the script says no errors were found, you need to fix them.

      posted in Porting
      NVriezenN
      NVriezen
    • RE: [HTC J Butterfly 3] Error building mkbootimg - tools/metalava/manual not found

      Made some great progress tonight after I got some help through the Telegram group!
      Turns out the error;

      [    4.128084] c0    769 run-init: opening console: No such device
      [    4.128224] c0      1 Target filesystem doesn't have requested /sbin/init.
      [    4.128896] c1    770 run-init: opening console: No such device
      [    4.129720] c0    771 run-init: opening console: No such device
      [    4.130458] c1    772 run-init: opening console: No such device
      [    4.131154] c0    773 run-init: opening console: No such device
      [    4.131946] c1    774 run-init: opening console: No such device
      [    4.133078] c0      1 No init found. Try passing init= bootarg.
      

      Had something to do with console=tty0 missing from the kernel cmdline.
      Basically I had to follow these step for Halium 7.1 even though I am using Halium 9.0.

      After that I also needed to use this fix because my phone uses arm64.
      But after that I was able to boot Ubuntu 16.04 correctly on my phone!!

      Unfortunately trying to get Lomiri to work (the GUI) didn't go so well.
      But that is for another day.
      I'm already happy that the phone now runs Ubuntu! 😄

      posted in Porting
      NVriezenN
      NVriezen
    • RE: Trying to boot nexus 9

      @carlo You can connect through telnet right?
      If you can, do dmesg there and drop the output in a pastebin.
      Then drop the link here so we can watch along what happens during boot.

      posted in Porting
      NVriezenN
      NVriezen
    • RE: [HTC J Butterfly 3] Error building mkbootimg - tools/metalava/manual not found

      After looking at a lot of github issues and other posts I think the problem lies in the After mounting rootfs.img it will start the systemd init from the rootfs step of the boot sequence (from the Halium docs).
      Unfortunately this is out of my league so I can't do much anymore.
      Hopefully someone with experience in the boot process of Linux/Ubuntu Touch can help out here.

      The log lines that pointed me to this are:

      [    4.101235] c0      1 initrd: checking fstab /root/var/lib/lxc/android/rootfs/fstab* for additional mount points
      [    4.103681] c0    755 cat: can't open '/root/var/lib/lxc/android/rootfs/fstab*': No such file or directory
      [    4.106813] c0    759 mkdir: can't create directory '/root/android/cache': File exists
      [    4.107906] c1      1 initrd: moving Android system to /android/system
      [    4.114412] c1      1 Begin: Running /scripts/local-bottom ... done.
      [    4.114583] c1      1 done.
      [    4.118526] c1      1 Begin: Running /scripts/nfs-bottom ... done.
      [    4.118872] c1      1 Begin: Running /scripts/init-bottom ... done.
      [    4.128084] c0    769 run-init: opening console: No such device
      [    4.128224] c0      1 Target filesystem doesn't have requested /sbin/init.
      [    4.128896] c1    770 run-init: opening console: No such device
      [    4.129720] c0    771 run-init: opening console: No such device
      [    4.130458] c1    772 run-init: opening console: No such device
      [    4.131154] c0    773 run-init: opening console: No such device
      [    4.131946] c1    774 run-init: opening console: No such device
      [    4.133078] c0      1 No init found. Try passing init= bootarg.
      

      Though stupid thing is that sbin/init does exist as I can see it through the telnet connection...

      posted in Porting
      NVriezenN
      NVriezen
    • RE: [HTC J Butterfly 3] Error building mkbootimg - tools/metalava/manual not found

      So this is the dmesg output filtered on initrd:

      [    3.050478] c1      1 initrd: checking filesystem integrity for the userdata partition
      [    3.093157] c1      1 initrd: checking filesystem for userdata took (including e2fsck) 0 seconds
      [    3.103620] c0      1 initrd: mounting /dev/mmcblk0p69
      [    3.126205] c1      1 initrd: Halium rootfs is /tmpmnt/rootfs.img 
      [    3.126831] c0      1 initrd: mounting system rootfs at /halium-system
      [    3.141646] c0      1 initrd: mounting  /tmpmnt/rootfs.img (user mode)
      [    3.146123] c0      1 initrd: mounting android system image (/tmpmnt/android-rootfs.img) ro, in /android-rootfs (rootfs mode)
      [    3.146215] c0      1 initrd: mounting android system image from userdata partition
      [    3.172121] c1      1 initrd: Android system image API level is 28
      [    3.172202] c1      1 initrd: boot mode: halium
      [    3.173274] c1      1 initrd: Normal boot
      [    3.205264] c0      1 initrd: device is halium_arm64
      [    3.212544] c1      1 initrd: Adding bind-mounts to /root/etc/fstab
      [    4.101235] c0      1 initrd: checking fstab /root/var/lib/lxc/android/rootfs/fstab* for additional mount points
      [    4.107906] c1      1 initrd: moving Android system to /android/system
      [    4.659792] c0    776 ########################## usb_info: Halium initrd Debug telnet on port 23 on rndis0 192.168.2.15 - also running udhcpd
      

      The whole dmesg output can be found here: https://0paste.com/343730
      The most interesting line is probably the one saying something about not being able to find init.

      posted in Porting
      NVriezenN
      NVriezen
    • RE: [HTC J Butterfly 3] Error building mkbootimg - tools/metalava/manual not found

      @nvriezen said in [HTC J Butterfly 3] Error building mkbootimg - tools/metalava/manual not found:

      @nero355 I guess it's not needed anymore.
      I managed to get telnet to work again.
      It seems I was setting it up incorrectly somehow, but this page in the Halium docs helped me.

      So now that I can connect to the phone again I can start looking into more what is going wrong.
      The first thing I noticed was that I don't see any /data folder when I run the ls command.
      I found in the Halium docs what the boot image is supposed to do, which is mounting the data partition. However when I run mount $DATA_PARTITION /data it returns that it couldn't find /data in fstab.

      Currently I am looking into stuff that could have gone wrong while flashing according to some other replies you gave in other threads.
      Especially this one here where someone also has the error umount: .halium-install-rootfs.hUAJA: not mounted
      The phone is flashing right now without any partitions being mounted in TWRP (cache and data were mounted all the previous times) to see if that makes any difference.

      Well that didn't work...
      It somehow rebooted TWRP halfway during flashing the rootfs to /data.
      So the flashing failed, twice.
      Now I'm reflashing the normal way as I also have seen more people with the umount error.
      Someone mentioned it had something to do with the phone not booting instead of the actual installer script.
      I don't know how though since the phone is not actually rebooting or anything when cleanup starts.
      Maybe if I look more closely to dmesg -w output that I can find a clue on what's happening

      posted in Porting
      NVriezenN
      NVriezen