For me, all the ‘please be quiet, this can’t work’ feel much more like noise than people sharing actual technical details of the problem
I’m asking them to prove it is not just technical mumbo-jumbo; because it sure sounds a lot like it.
Maybe Idid not write it clear enough:
I can receive and send WhatsApp messages with my C2 on mobile connection without wifi. Is this prove enough?
But you can proof it yourself on an older sailfishos version. Just remove the APN config for your sim card from the file /system/etc/apns-conf.xml and you will see that most of android apps say that they don’t have internet connection on mobile while native still have.
But I have to admit that it sounds really strange.
This sounds a lot like the issue that has plagued Xperia 10 III users for months, if not for years ([4.6.0.13] Xperia 10 III: Android apps mobile data connectivity - worse then ever). If the issue appeared, mobile data was not available to any Android apps, except Whatsapp.
So it seems the same issue is permanently present in the current state of SFOS 5.0.
You could look into how opengapps script rebuilds the system.img of android, just skip downloading/extracting gapps and its apks, you just need the mounting/extracting insert your modified apn.xml here, then squash to get an .img in the end with your modifications
Edit: one example of the script Sony 10 III - Dual SIM (arm64) | Sailfish OS 4.6 | Android 11 | Open GApps pico installation script · GitHub
Just comment out the install_opengapps step, rest can be easily modified to inject your own versions of files into the extracted system.img before it gets squashed back
Edit2: what you see in /opt/appsupport/rootfs is that system.img mounted, if you kill appsupport files there disappear, so you need to make changes to the img before starting appsupport
Hmm, could it be that @hschmitt got his mobile connection working by copying a working apns-conf.xml
to the /system/etc
directory?
That sounds a lot less hassle (=risky) than manipulating the system.img
And is easier to undo just before Jolla releases a new SailfishOS version with an official fix of this problem.
The script makes a backup copy of the original system.img in its workdirectory, you can always do it manually too just in case, but if you want to modify system part of appsupport rebuilding the img is the way to go (and you can also always follow the clean reinstall of appsupport guide to download it again from scratch, worst you can get is appsupport not starting and going into bootloop, just replace system.img with the backup and you’re good)
Looks like android has broken dns resolving, I can open http://35.180.139.74 in android firefox just fine on mobile data, so whatsapp is just using a list of IP addresses to communicate and skips domain names
edit: and here’s a pastebin of a minimally changed opengapps script that skips the whole gapps and just adds your own /home/defaultuser/apns-conf.xml into the system.img, modify lines 93 and 94 as needed set -eWORKDIR=/home/.appsupport_systemimg_patchTMPWORKDIR="$WORKDIR/tmp" - Pastebin.com
You seem to be right. Although Internet connections over mobile data on the Jolla C2 do not work for Android apps, WhatsApp makes an exception.
The problem is that AppSupport isn’t aware of the network connection. There’s a component that injects the mobile data state in, and it’s quite a big job to migrate that to support the C2 as it has a very different hardware interface for that. Any app that asks Android if there’s a network connection when on mobile data will be told that there isn’t one and so refuse to work. But Whatsapp doesn’t bother asking - it just tries to connect to things and as there is really network available then it works. DNS would also be broken, but it’s another symptom rather than the cause of the problem.
The migration is ongoing, but as I said it’s a substantial amount of work so is taking some time.
FB Messsenger also rreceice and send text (no photos/videos) messages, even if it shows “No internet connection”.
After this post I expierenced also photo delivery over mobile nerwork
I bet someone is now trying to make a quick hack that answers “yes, there is a network connection” to any Android app asking for it. Sounds like this would make a lot of stuff work while waiting for the real implementation.
Knowing what you found out with the DNS I have made couple of android apps work on mobile data by writing static hosts into /etc/hosts. I succeeded with some and failed with others. It is not really a nice hack but al least you can try to make some apps you rely on to work until it is fixed. Here is what I did.
- Install tcpdump
devel-su pkcon install tcpdump
- Find out what DNS names are being resolved by the app you want to fix. To do this. Connect to your wifi, launch appsupport and run the app while having tcpdump running in the terminal. This will only show DNS traffic that involves port 53.
devel-su tcpdump -i wlan0 port 53
Try to gather all hosts and corresponding addresses that were resolved by the app. For example I got the following:
21:49:33.928189 IP 192.168.100.186.45609 > familyshield.sse.cisco.com.domain: 23265+ A? m.mbank.pl. (28)
21:49:33.932844 IP familyshield.sse.cisco.com.domain > 192.168.100.186.44098: 23265 2/0/0 CNAME m.global.mbank.pl., A 185.210.158.228
(67)
21:49:33.933132 IP familyshield.sse.cisco.com.domain > 192.168.100.186.45609: 23265 2/0/0 CNAME m.global.mbank.pl., A 193.41.230.108 (
67)
21:49:34.308477 IP 192.168.100.186.44098 > familyshield.sse.cisco.com.domain: 20579+ A? api.skp.mbank.pl. (34)
21:49:34.308654 IP 192.168.100.186.45609 > familyshield.sse.cisco.com.domain: 20579+ A? api.skp.mbank.pl. (34)
21:49:34.343708 IP familyshield.sse.cisco.com.domain > 192.168.100.186.44098: 20579 1/0/0 A 185.210.158.249 (50)
- Edit /etc/hosts and append the address - domain name pairs from the previous step. From the above tcpdump output I have added the following:
185.210.158.228 m.mbank.pl
185.210.158.228 m.global.mbank.pl
185.210.158.249 api.skp.mbank.pl
- Make the /etc/hosts visible to android apps. Edit the file /opt/appsupport/etc/appsupport.conf.d/10-hybris.conf and add the following line into the [Config] section
Mounts=/etc/hosts system/etc/hosts none bind,create=file 0 0
- Disable wifi, restart appsupport, check if your app is now working on mobile data. Repeat for all of the apps you want to work on mobile.
I updated my C2 to 5.0.0.55, but AppSupport still has no mobile internet.
The Android settings for “Network and Internet” show “No sim card”. I am convinced that it is something provider specific. My provider is O2 Germany. I posted my APN config in this thread earlier which I could use to make it work with my Xperia 10 II with 4.6. Can I provide any logs or debug output?
Same problem on my C2 with 5.0.0.55, WeTell/Vodafone Germany.
I got the same issue and fixed it by completely removing AAS as I mentioned here
It will of course wipe all android apps and their configurations.
Hi,
for me it works with/since sfos update 5.0.0.55 on C2.
I couldn’t surf with Fennec outside before, now it works and even banking apps work when I’m not in wifi.
BUT I had to hard remove Appsupport (also to get spoofing working correctly for banking).
I also realized that my Android would be always in English even if I switch SFOS to let’s say German. Now after reinstalling appsupport my Android is in German (check in android settings page). Maybe thats related and shows a wrong configuration between sfos and android?
I also dont have to toggle wifi on/off, mobile on/off or restart appsupport it just works actually even better than under sfos 4.* on my Sony
It works now for me.
I stopped AppSupport, disabled SIM 1, enabled SIM 1, started AppSupport.
Thank you, I can confirm this method worked for my C2 as well!