Ask / Submit

( USB tethering not working anymore

Tracked by Jolla (Rejected)

asked 2018-11-01 12:00:12 +0200

malibu1106 gravatar image

updated 2018-11-11 14:18:38 +0200

Andy Roid gravatar image

Hi guys.

Since last update the usb tethering isn't working anymore, I know that this trick isn't officialy supported ( sadly .. ), but is there any way to get it working again ?

thanks. Nice day.

edit retag flag offensive close delete


@malibu1106 What device you have?

spiiroin ( 2018-11-02 11:05:30 +0200 )edit

Hi. I have a jp1 .

malibu1106 ( 2018-11-03 14:24:27 +0200 )edit

Same problem with Jolla Phone 1. The connection is not tethered with my Linux laptop or desktop since the update to It was with previous Sailfish version.

This option, even if not officially supported, was highly appreciated! I hope that Jolla will fix it.

tg ( 2018-11-05 17:58:57 +0200 )edit

I do have the same problem since with Sony Xperia X and as host computer a Linux system. Does anybody have an idea on how to debug this?

thargor ( 2018-11-06 15:43:52 +0200 )edit

I have this same problem on Jolla C, used to work before.

ixevix ( 2018-11-09 15:11:47 +0200 )edit

7 Answers

Sort by » oldest newest most voted

answered 2018-11-12 12:33:24 +0200

ixevix gravatar image

updated 2018-11-16 21:05:00 +0200

Update: this is probably a better fix:

Match your /etc/usb-moded/dyn-modes/connection_sharing.ini with the following:

name = connection_sharing
module = none
network = 1
network_interface = rndis0
appsync = 1

sysfs_path = /sys/class/android_usb/android0/functions
sysfs_value = rndis
softconnect_path = /sys/class/android_usb/android0/enable
softconnect = 1
softconnect_disconnect = 0
idProduct = 0A02
dhcp_server = 1
nat = 1

which is basically the same as in developer_mode-android.ini but with some added stuff for connection sharing. I am also trying to get this fix into the repo. Also no need to reboot you can just do systemctl restart usb-moded after editing the file.


Add to /etc/usb-moded/dyn-modes/developer_mode-android.ini

nat = 1
nat_interface = rmnet_data0

And select "Developer mode" when pluggin in after reboot.

Full story:

Got it working! Just enable "Developer mode" when it asks what you want after plugging in the USB cable... Nvm, that just shows the rndis0 device. Still doesn't work.

This way you can manually enable it for now (replace device names for what you have):

on sailfish:
sysctl net.ipv4.ip_forward=1

iptables -t nat -A POSTROUTING -o rmnet_data0 -j MASQUERADE
iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i rndis0 -o rmnet_data0 -j ACCEPT

on linux machine:
ip route add default via dev enp0s20f0u3u4u3

Ok... To fix this just add

nat = 1

to bottom of file /etc/usb-moded/dyn-modes/developer_mode-android.ini and reboot. Then it just works. ...

Ok seems it still doesn't work and you need to enable the ipv4 forwarding AND add the iptables rules still after.

But it creates the gateway automatically on the linux computer.

Final fix was to add to /etc/usb-moded/dyn-modes/developer_mode-android.ini

nat_interface = rmnet_data0

Then it works after reboot.

sources for reference

edit flag offensive delete publish link more


Too bad I don't understand anything about this answer. There should be free Linux lessons for everyone who buys Jolla/Sailfish.

Mukaparska ( 2018-11-12 15:55:57 +0200 )edit

Ideally this fix should be incorporated into some package so you could just install the package and be done with it.

ixevix ( 2018-11-12 16:01:17 +0200 )edit

You're my hero. I got it working.

Sinikivi ( 2018-11-16 20:38:39 +0200 )edit

Well, 'usb tethering' should remains a different option than 'developer mode'. The use cases are not the same!

PhixGre ( 2018-11-28 20:00:26 +0200 )edit

These edits got it working for me under, but now I have updated to it has broken again. The problem seems to be that the required package versions are inconsistent:

[root@Sailfish nemo]# pkcon install usb-moded-connection-sharing-android-connman-config
... snip ....
Fatal error: File './armv7hl/droid-hal-version-f5122-0.2.1-1.2.12.jolla.armv7hl.rpm' not found on medium 'https://store-'

The version of droid-hal-version-f5122 that is installed is 0.2.1-1.2.6

Edit: Inspired by this question which looks very similar to my problem, I tried "pkcon refresh". usb-moded-connection-sharing-android-connman-config then installed successfully and I could get USB tethering to work again. :)

pakman ( 2019-01-18 01:13:55 +0200 )edit

answered 2019-01-21 11:37:49 +0200

Philippe De Swert gravatar image

updated 2019-01-21 19:19:45 +0200

rozgwi gravatar image

Simple fix is to install connection sharing with connman

pkcon install usb-moded-connection-sharing-android-connman-config

Then you need to fix up the config file as it seems connman now treats the USB connection as an ethernet device and not a gadget device anymore.

Edit /etc/usb-moded/dyn-modes/connection_sharing-android-connman.ini

Change the last line from:

connman_tethering = /net/connman/technology/gadget


connman_tethering = /net/connman/technology/ethernet

Also you need to edit the /etc/connman/main.conf and add this line:

TetheringTechnologies = wifi,bluetooth,gadget,ethernet

And things should work again (after connman/usb_moded restart / reboot). At least it did on my XA2.

I noticed connman is also compiled with --disable-gadget for some mysterious reason, that might be the actual right fix.

edit flag offensive delete publish link more


this did the trick for me on, thanks!

cartron ( 2019-01-24 09:53:19 +0200 )edit

answered 2018-11-02 09:04:59 +0200

jeskata gravatar image

updated 2018-11-02 09:06:12 +0200

This works as before for me. After a reboot I run a script to set up routing and iptables rules. After that I just "up" the interface on the computer and set it as default route. Same scripts as before.

edit flag offensive delete publish link more


I'm using windows seven, and usually, i just put the usb cable .. :)

malibu1106 ( 2018-11-03 02:05:49 +0200 )edit

answered 2018-11-11 15:22:39 +0200

einmaleins gravatar image

Updated my Xperia X to yesterday successfully. But I'm not able to get internet connection via USB on my Linux PC anymore. I tried to re-install usb-moded-connection-sharing-android-config. After reading that there is also usb-moded-connection-sharing-android-connman-config I tried that instead. No success. lusb gives me ID 05c6:0afe Qualcomm, Inc. Is this the right device information for "modem"-mode? I would be happy if someone has a work-around for this as it is a necessary feature for me since I got used to it when I had my N9.

edit flag offensive delete publish link more

answered 2018-11-05 13:39:17 +0200

Andy Roid gravatar image

I too have a Jolla 1, and I too tried to tether to a Windows system via USB & saw this regression in Is it necessary to try USB tethering to a Linux system for reference?

On plugging the USB cable, I get & select the 'Internet sharing' option; but there is no Internet on the Windows system, and the 'USB' section in the 'Settings' says it is in charge-only mode.

FWIW, WiFi hotspot works, but isn't as battery-friendly or as localized as USB tethering.

edit flag offensive delete publish link more


Are there docs or discussion threads that could help with debugging this? I couldn't get much from dmesg on the Jolla 1.

What's with the packages for this? I had usb-moded-connection-sharing-android-config installed, but now I saw & tried installing usb-moded-connection-sharing-android-connman-config too ... didn't help.

The release notes don't say anything, but the changelog mentions changes in the connman package for tethering.

Andy Roid ( 2018-11-06 05:51:03 +0200 )edit

answered 2018-11-05 14:05:15 +0200

jeskata gravatar image

updated 2018-11-05 14:06:09 +0200

Had my Xperia act up the other day, after disconnecting and later reconnecting USB it would no longer forward traffic. Could ssh in and ping out from the phone though. Re-running my iptables script (and flushing tables) did not help, only a reboot did.

OTOH, previous versions have occasionally done the same too but that was after using Flight Mode.

edit flag offensive delete publish link more

answered 2018-11-28 08:37:24 +0200

jeskata gravatar image

updated 2018-11-28 08:37:53 +0200

Have had my Xperia X loose tethering once in a while now (using method of run a script to set up routing and iptables rules, after that I just "up" the interface on the computer and set it as default route). Started investigating further and see ip_forwarding is still 1, iptables rules are still there and I can ping out if I ssh into the phone.

But I have an interface rmnet_data1 instead of rmnet_data0 that is configured in iptables script. Will try to make an alternate script for that.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools



Asked: 2018-11-01 12:00:12 +0200

Seen: 1,999 times

Last updated: Jan 21