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

    Posts

    Recent Best Controversial
    • [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