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!
Today I had time to test it
I can confirm that I can now set up a code for the lockscreen.
When it comes to connection with ssh/telnet, I can report that
- the device goes into developer mode and stays there without switching back
- with
ifconfig
I see that there is a device with the address 192.168.2.13 when I plug in the phone - the connection with ssh/telnet doesn’t work, because the connection is refused:
ssh: connect to host 192.168.2.13 port 22: Connection refused
The output of ifconfig
:
enxa2a479ad08d2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.13 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::e3cc:f90f:347a:37b1 prefixlen 64 scopeid 0x20
ether a2:a4:79:ad:08:d2 txqueuelen 1000 (Ethernet)
RX packets 7 bytes 760 (760.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 24 bytes 4122 (4.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
and of route
:
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 enxa2a479ad08d2
192.168.2.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp166s0
It still amazes me that you have the same address range on your wifi.
- Does it work if you disable your laptop wifi?
- What about setting the same address statically as the one from the Xperia? Maybe there’s another host you’re trying to connect to with the same IP on SSH.
You can get the MAC of the ip by inspecting with thearp
command and compare to the one of the phone - There are a couple of threads like Q: Had to setup new my Linux laptop, now can't ssh to Sailfish phone no more. What can I do?
@RosSigudottir do you have ssh or telnet over usb, out of curiosity?
The developer option shows me an ip over usb but I never managed to reach it, not even with ping so I guess it’s not working.
For me, networks are a closed book, so unfortunately I don’t get what you mean
I tried the steps you described:
- Disabling wifi doesn’t change anything
- I tried with the command
ifconfig enxa6e4ca642714 192.168.2.14
you proposed above (interface replaced by the actual device name, seems to change everytime I connect the phone). I get aConnection refused
as answer, it doesn’t complain a missing route. I don’t think it tries to connect to another device, as the device only shows up withifconfig
as soon as I connect my phone. - Success! I had a look in the thread you linked and in the third post (https://forum.sailfishos.org/t/q-had-to-setup-new-my-linux-laptop-now-cant-ssh-to-sailfish-phone-no-more-what-can-i-do/16687/3) it was proposed to use the
-v
option for ssh. Although this should only turn on the verbose mode, as far as I understand, after a lot of debugging output I suddenly was asked to confirm the fingerprint. As soon as I confirmed, I was asked for the password of my phone and then I was logged in
I don’t know why that worked (in the line above I tried the same command without -v), and in fact I can’t really say what worked. The strange thing is: withinfonfig
I see my phone connected as192.168.2.14
, because I tried to set a static IP. But the successfull connection was with ssh into192.168.2.15
.
This is all very confusing (at least for me), but now I can ssh into my phone
Now that I can log into the phone I faced two issues:
- It seems that I can’t make the fingerprint reader work. I can register one or two fingerprints with the preinstalled community app, but after registration they seem to be not recognised.
- I can’t delete the unencrypted home, because in step 2 of the instructions, the device always claims that the umount doesn’t work because the resource is busy
But otherwise: it works really nicely, thank you so much
Very quicky for the last part:
- I think I may have drawn the fingerprint circle only for registration in that app. To use it to unlock the device you need a patch to modify the lock screen: Project: patch-lockscreen-touchArea (install patchmanager and you’ll find it in web catalog)
- I think this is because when ssh-ing, it defaults the working directory to /home/defaultuser. This means you need to change directory to e.g. root, then devel-su and stop the user session & umount. You can find the processes using /home with a command such as
lsof /home
Cool, it worked
Unfortunately I can’t test this anymore: I lost my phone on my bike trip
That means that I have to find a new one (and the money for buying one…)
Oh boy, this is not good news:( Once again you were right about encryption and devicelock being needed…
In this case encryption was not so super important, because at the journey it acted more like a toy which I was trying out, while my Xperia 10 III still acted as my main device. But if I had set it up properly, I would have been really glad to have it encrypted
I hope I’ll find another one for a good price when I’m back home.
But nevertheless, it was an interesting journey with you fixing the issues. Thanks a lot, I can absolutely recommend your port to anyone considering this device!
Version 4.6.0.13 available now for testing at Release 4.6.0.13 Prerelease · sailfishos-on-tucana/Readme · GitHub
I have not tested this myself, only the devel version. Update should be again:
# ssu re 4.6.0.13
# version --dup
There are no changes impacting the port in the upstream since 11 vs 13 were only appsupportr related, but I have inserted one adaptation change, the signalling of the cutout presence which should by default move the clock a little lower. I will update the clock patch anyway but sometimes later.
One thing to note if you use waydroid: you Need to comment apparmor in /var/lib/waydroid/lxc/waydroid/config · Issue #30 · sailfishos-open/waydroid · GitHub until the next waydroid version is packaged in chum.