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

    Port to Xiaomi mi4 - SSH connection refused

    Scheduled Pinned Locked Moved Porting
    xiaominew deviceporting
    12 Posts 4 Posters 3.1k Views 3 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.
      • S Offline
        SynnyG_R @kuailexs
        last edited by

        @kuailexs thanks for your reply ! Can it be used to boot latest ubports rootfs aka 16.04 ? Because as far as I know official builds have been rebased on LineageOS 7.1 !

        Also regarding my ssh issues, did you experienced it too ?

        kuailexsK 1 Reply Last reply Reply Quote 0
        • kuailexsK Offline
          kuailexs @SynnyG_R
          last edited by

          @synnyg_r can not boot 16.04 , 15.04 only.
          and not test to use ssh, I useed telnet ,like : telnet 192.168.2.15.
          https://github.com/Halium/halium-boot
          we can connect ubuntu touch with telnet ,ssh can be use to connect plasma mobile

          UB 16.04 on Xiaomi 4
          UB 20.04 on Xiaomi 6

          S 1 Reply Last reply Reply Quote 0
          • D Offline
            doniks @SynnyG_R
            last edited by

            @synnyg_r, Port to Xiaomi mi4 - SSH connection refused

            Everything went nicely as the device has correctly booted (it show "GNU/Linux Device on rndis0 10.15.19.82" through a dmesg -w, here is the result : https://pastebin.com/qTubjaQU) but I'm not able to access the device through SSH. Even if I followed the instructions at http://docs.halium.org/en/latest/porting/debug-build/logging-in.html, ssh phablet@10.15.19.82 does nothing, as a ping to it. The thing that I didn't understand is the tutorial mention the .82 ip but in my case it's still unreachable after the modification. So I tried to SSH to 10.15.19.100 (the address you have to set), and now the device is reachable BUT I get a pretty "connection refused" error.

            .100 is your local build machine. .82 is the ut device

            I used the latest rootfs available on UBports server, is a problem known with it ?

            I think there were at some point ... not sure of latest state.

            1. try redoing the ip link stuff, sometimes your local network manager gets into your way with the new network interface
            2. check ssh -vvv ...
            3. check kernel log from device

            You DID set a password to use for ssh right?

            S 1 Reply Last reply Reply Quote 1
            • S Offline
              SynnyG_R @doniks
              last edited by

              @doniks Thanks for your explanation !

              1. Regarding the ip link stuff, I did them several times but my device is acting weird and seems to reset what I do. By looking at the network manager, it try to connect to the wired network but fail after a while ! So when I set the ip thanks to "ip address add 10.15.19.100 dev enp0s20u1", it's done successfully and I can ping myself aka .100 but after a while nothing has the set up is reset.
                Something strange is that when I used "code dmesg -w" I saw "IPv6: ADDRCONF(NETDEV_UP): enp0s20u1: link is not ready". Can it have a link with my issue ?

              2. When .100 is reachable (ping), 82 is not, meaning that I can't connect to it through ssh. so the -vvv thing show it try to connect but timeout after a while.

              3. Regarding the kernel logs, I just saw that CONFIG_ANDROID_RAM_CONSOLE and CONFIG_ANDROID_RAM_CONSOLE_ENABLE_VERBOSE were set to n... So I'll rebuild the boot img with these param to y in order to be able to pull the log from the device.

              For the password, the install script has not asked me to set the phablet password so I used the instructions at http://docs.halium.org/en/latest/porting/debug-build/logging-in.html to set the password thanks to "passwd phablet"

              D 1 Reply Last reply Reply Quote 0
              • S Offline
                SynnyG_R @kuailexs
                last edited by

                @kuailexs I tried telnet but it resulted the same as with SSH, timeout as the host is unreachable 😕

                1 Reply Last reply Reply Quote 0
                • D Offline
                  doniks @SynnyG_R
                  last edited by

                  @synnyg_r ok. Lets see the kernel logs once you rebuilt. Also can you connect to halium rootfs? And pm works a bit better with halium as of now, try that also!

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    SynnyG_R @doniks
                    last edited by

                    @doniks I've rebuilt the halium-boot.img but even with the correct config last_kmsg is not generated (for your information here is my defconfig : link ). In theory as there isn't a random reboot that occured, does this log should be generated ?

                    Regarding halium rootfs or pm I admit that I didn't try, I will now.

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      doniks
                      last edited by

                      I think normally (but yeah "normal" only goes so far in android world) the last_kmsg should always be there provided you reboot and don't power on/off!

                      quick look at your config, mer checker complains about CONFIG_ANDROID_LOW_MEMORY_KILLER (and some "optional" ones, not sure the impact, but might be worth a try if you can enable them. But I've also not set all the optional ones in my port)

                      halium and pm - definitely check them first.

                      S 1 Reply Last reply Reply Quote 1
                      • S Offline
                        SynnyG_R @doniks
                        last edited by

                        @doniks huh, I’ve run it several times until there was no error, even this one ! I’ll redo it another time ^^

                        Anyway thanks to your advice and by using pm rootfs, I’ve managed to have a working telnet session (obviously because pm failed to boot) and thanks to kmsg file, I’ve found that the system img was too big for the partition ! So I took a look at the system.img file I built, its size is 220Mb where the size used in halium-install is... 160Mb ! So this is probably the reason why the rootfs img isn’t mounted with ub and pm (and so why the device wasn’t reachable through ssh). I’ve increased the size in the script, pushed the imgs to the device but I’ll only be able to test it tomorrow, you know family and such 😛

                        See you tomorrow for the next episode ! ^^

                        1 Reply Last reply Reply Quote 2
                        • S Offline
                          SRIDHARDV
                          last edited by

                          @synnyg_r
                          If you flashed via script halium-install-standalone.sh dont forget to add argument with -p ut
                          halium-install-standalone.sh -p ut path/to/rootfs.tar.gz path/to/system.img

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