systemctl status sshd
shows it is active but dead.
devel-su systemctl start sshd
starts it, but I still can’t connect.
systemctl status sshd
shows it is active but dead.
devel-su systemctl start sshd
starts it, but I still can’t connect.
Ok, so I don’t know what inetd-like activation is done for sshd by systemctl, but I can confirm that no process exists until the first connection is made.
So it seems something needs to be fixed with either ssh or networking. This is not a problem I have with my device, so bear with me if I don’t know the answer.
To make the difference between a networking problem and a sshd starting problem, you could
a. ssh -l defaultuser localhost
from your phone’s Terminal. If that doesn’t work, check journalctl -b --no-pager
last lines (or add | grep ssh
to only see related messages)
b. enable telnet by “removing the /init_disable_telnet file from rootfs” as mal responded in the porters chat + reboot. Then telnet 192.168.2.15 2323
through USB. It might be needed to remove the usb cable and reconnect it if the connection is lost during boot (this works pretty earlier than GUI)
If that doesn’t work then it’s a networking issue in relationship with USB networking. Maybe the DHCP doesn’t work on Sailfishos side. You can manually set an IP from the 192.168.2.x class (except 15) with 24 netmask (255.255.255.0) for the USB network in Network Manager or whatever you’re using on the host computer.
Enabling telnet is also useful to debug in case encryption wizard does not start after installing the community encryption packages. I think this is the better bet for I am not sure sshd would have started by then anyway.
zypper in libsfosdevenc sailfish-device-encryption-community-wizard sailfish-device-encryption-community-settings sailfish-device-encryption-community-service sailfish-device-encryption-community-generator sailfish-device-encryption-community sailfish-device-encryption-community-droid
I absolutely don’t blame you and I very much appreciate your effort to help solving my problem and maintaining your port!
a) works, I can connect to localhost
b) if “rootfs” is equal to “/”, then there is no init_disable_telnet
nor is there one in “/system_root”.
I nevertheless tried telnet 192.168.2.15 2323
, as ps fax|grep telnet
showed that telnetd is running:
857 root /bin/busybox-static telnetd -b 192.168.2.15:2323
but I again got something similar like when I try to ssh into the device:
Trying 192.168.2.15…
telnet: Unable to connect to remote host: Keine Route zum Zielrechner
(with “Keine Route zum Zielrechner” meaning “No route to host”).
Btw. I somehow missed to install the packages on the first place, as I was trying to ssh into the device. I now tried it, and it complains about a missing libargon2-tools package which is not provided.
The repos enabled are
Is some repo missing here?
EDIT: I also tried to connect to a publicly available sftp server to test my ssh, and it works. So it seems the problem is not on the computer’s side.
By flashing the global MIUI-ROM first instead of the EU-variant I was able to boot to LineageOS and then flash SFOS. But that didn’t change anything:
I still can’t setup a device lock-code.
I noticed that it failed to mount sth., but I don’t know if this is relevant:
I observed what happens when I plug in the device with a USB-cable into my computer: it asks me which mode to use and then, when I choose “developer mode”. I see that it says “preparing for developer mode” and then switches back to only charge.
To illustrate I attached two more photos:
I also can’t connect it in MTP-mode, it switches to charging-only immediately. I tried different USB-cables, different ports and made shure that an Xperia 10 III that I have available was working in developer mode.
Not sure if that mount error is relevant if it flashes ok either.
Regarding MTP: I’m pretty sure it does not work yet. I may look into this again if it is a deal breaker, but let’s solve the encryption and device lock first.
Also, that developer mode enablement failure :hmm: Maybe try to stop/mask usb-moded
. I think I am disabling it now, but I don’t remember if locally only on my device.
About libargon2: It was an error that I did not package it along with the other encryption components, and I had it fetched from chum because my device already had chum repos, so I didn’t notice it was missing.
I have now packaged libargon2 in adaptation-community, you should zypper ref -r adaptation-community
and you should have access to it.
I would be curious if masking usb-moded would fix at least the telnet (pretty sure it won’t fix ssh). If that’s the case, we could look at logs from devicelock errors, maybe there’s something meaningful in journalctl when you try to set that, as it is very important for fingerprint setting too.
No, it is absolutely no dealbreaker, I just wanted to try if it works to add one more data point for fixing the problem of developer mode
It doesn’t seem so. I stopped it (it’s running per default). But I can’t ssh nor telnet to my phone. Btw.: Where should I look for init_disable_telnet
? I couldn’t delete it because I don’t know where it could be found
Just mask it then, and reboot. This would be how I use my device, maybe it works for you too. I think I don’t have ssh through USB indeed, but we’ll fix that later.
That file I supposed it was there, if it isn’t, you should have telnet
Unfortunately, the only thing that changed is that I am not asked anymore which mode I’d like to use when I plug it in, no connection with telnet
…
One thing that I was thinking about: Did you always flash your new releases or did you update on the phone? Maybe something in the configuration changed between the releases? As written above I started with 4.5.0.21.
To be fair, I don’t have telnet now either, so no need for re-flashing. I’m kind of stumped as I am pretty sure I worked through telnet when looking at the encryption wizard, so something must have changed since that time. I’m tailing through ~/var/log/zypp/history
and debugging through the (working still) ssh wifi connection.
Sorry, spoke to soon, host kernel was updated and not rebooted.
So, when I connect the cable in dmesg -w on my machine I see:
[ 72.460632] usb 1-1: new high-speed USB device number 5 using xhci_hcd
[ 72.603467] usb 1-1: New USB device found, idVendor=18d1, idProduct=d001, bcdDevice= 4.14
[ 72.603481] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 72.603486] usb 1-1: Product: Mi Note 10
[ 72.603491] usb 1-1: Manufacturer: Xiaomi
[ 72.603495] usb 1-1: SerialNumber: ab5fb9e6
[ 72.610566] rndis_host 1-1:1.0 usb0: register 'rndis_host' at usb-0000:00:14.0-1, RNDIS device, a6:5a:78:01:01:90
[ 73.211664] rndis_host 1-1:1.0 enp0s20f0u1: renamed from usb0
(the last two lines were missing before I rebooted after the kernel update on my host machine).
Other data points on the host machine:
$ ifconfig
enp0s20f0u1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.14 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::a48f:56ce:6f9c:5d33 prefixlen 64 scopeid 0x20<link>
ether a6:5a:78:01:01:90 txqueuelen 1000 (Ethernet)
$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default _gateway 0.0.0.0 UG 600 0 0 wlp2s0
192.168.2.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s20f0u1
L.E: I may try re-flashing this weekend. Meanwhile, out of curiosity, the other SailfishOS device allows you to connect through SSH + USB?
This is what I get with the Xiaomi connected::
$ dmesg -w
[84622.904460] usb 1-3: new high-speed USB device number 126 using xhci_hcd
[84623.129013] usb 1-3: New USB device found, idVendor=18d1, idProduct=d001, bcdDevice= 4.14
[84623.129029] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[84623.129034] usb 1-3: Product: Mi Note 10
[84623.129038] usb 1-3: Manufacturer: Xiaomi
[84623.129041] usb 1-3: SerialNumber: xxxxxxxx
[84623.142053] rndis_host 1-3:1.0 usb0: register ‘rndis_host’ at usb-0000:00:14.0-3, RNDIS device, a6:e4:ca:64:27:14
[84623.172974] rndis_host 1-3:1.0 enxa6e4ca642714: renamed from usb0
$ route
Kernel-IP-Routentabelle
Ziel Router Genmask Flags Metric Ref Use Iface
default speedport.ip 0.0.0.0 UG 600 0 0 wlp166s0
192.168.2.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp166s0
$ ifconfig
enxa6e4ca642714: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether a6:e4:ca:64:27:14 txqueuelen 1000 (Ethernet)
RX packets 5 bytes 320 (320.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 85 bytes 19398 (18.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
If I connect the Xperia 10 III in developer mode it looks like this:
$ dmesg -w
[85341.696387] usb 1-2: new high-speed USB device number 7 using xhci_hcd
[85341.916644] usb 1-2: New USB device found, idVendor=0fce, idProduct=0a02, bcdDevice= 2.23
[85341.916655] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[85341.916658] usb 1-2: Product: Xperia 10 III
[85341.916661] usb 1-2: Manufacturer: Sony
[85341.916663] usb 1-2: SerialNumber: yyyyyyyy
[85341.930494] rndis_host 1-2:1.0 usb0: register ‘rndis_host’ at usb-0000:00:14.0-2, RNDIS device, 52:9e:6a:8c:04:74
[85341.962572] rndis_host 1-2:1.0 enx529e6a8c0474: renamed from usb0
$ route
Kernel-IP-Routentabelle
Ziel Router Genmask Flags Metric Ref Use Iface
default speedport.ip 0.0.0.0 UG 600 0 0 wlp166s0
192.168.2.0 0.0.0.0 255.255.255.0 U 100 0 0 enxfe709ceaad3e
192.168.2.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp166s0
$ ifconfig
enxfe709ceaad3e: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.2 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::4c9b:7a0b:23e4:e827 prefixlen 64 scopeid 0x20
ether fe:70:9c:ea:ad:3e txqueuelen 1000 (Ethernet)
RX packets 12 bytes 1302 (1.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 67 bytes 9980 (9.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
So dmesg -w
looks pretty similar, if I didn’t overlook anything. route
with the Xiaomi connected lacks the route for the USB, if I interpret it correctly. And ifconfig
is different, too…
Yes, it works without any problems.
If you need more data points, it might be diffiult for me to generate them, as I will be travelling from tomorrow on for the next week. But if possible, I will try to look into it.
And again, thanks for your great work and your support!
Out of curiosity (and because I didn’t set up anything in 4.5 it was a 5 minutes-work), I flashed your 4.4.0.72-prerelease. I noticed one interesting thing: if I flash 4.4.0.72-prerelease, at least I can choose the developer mode (although I can’t ssh
into it) without the device switching to charging-mode by itself. Like 4.5, it doesn’t allow me to set up a device lock code. And, also like in 4.5, masking usb-moded doesn’t lead to allow me to telnet
the device.
This means that the dhcp server from the phone does not serve you an IP address. You could add one manually in the same range as 192.168.2.x for the usb connection.
It also means that you have exactly the same range on your network…?
I am trying to build a 4.6.x image which should also have a usb-moded fix (not for MTP unfortunately) and maybe that dhcp will work better.
Meanwhile something like sudo ifconfig enxa6e4ca642714 192.168.2.14
should work (maybe add /24
or netmask 255.255.255.0
to it). The name of the device seems to change each time though…
Update - since I considered it is not safe to update the 4.5.0.x testing build, I went ahead and created a 4.6.0.11 one, which turned out it was not ready because community OBS would be updated only when the release exits the EA phase… Luckily for me, @mal was kind enough to give me a hand and that worked in the end. Kudos mal!
I flashed testing and I reproduced the devicelock problem - it seems I have commented out an encsfa
plugin sometime earlier because it conflicted with fpd, but didn’t make the fpd required - as it is not supported at initial setup. I made it now, as it is complicated to update later.
Also, I have updated some usb-moded configurations as said earlier. I hope they work out of the box (telnet/ssh, no mtp). And went through home encryption, rebooting and all and all is good on my side, I have set up some instructions here for Early Access people;)
I can’t wait to try it out!
Thanks so much!
sorry if it was explained, but it is not clear to me how to upgrade to that version if you already have the 4.5 installed… should I overwrite the old one from TWRP?
Written from memory:
# ssu re 4.6.0.11
# version --dup
Wait, you also have the device? There’s so many of us !
If you also have the USB connection problem, the above commands can be issued from the Terminal app after enabling Developer mode, setting a password and using $ devel-su
to get root.
yes I have the device and the command worked like a charm, thanks for porting SFOS to this device!