Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google play doesn't update apps #3

Closed
SG5 opened this issue Aug 1, 2016 · 17 comments
Closed

Google play doesn't update apps #3

SG5 opened this issue Aug 1, 2016 · 17 comments

Comments

@SG5
Copy link

SG5 commented Aug 1, 2016

In play market work all except update/install app.
It just shows message "searching network..."
https://imgur.com/GSAX2Dc
Android 5.1

@vvviperrr
Copy link
Collaborator

yes, there is kind issue, i described it in readme:

Issues: Some apps do not recognize the reverse tethered internet connection due to ConnectivityManager policy. Just leave WiFi or 3g connection active, connection will go through SimpleRT anyway.

@SG5 SG5 closed this as completed Aug 1, 2016
@Sur3
Copy link
Contributor

Sur3 commented Apr 15, 2017

Please reopen...
It seems Android just shows no activeNetwork because it wants a VPN to have an UnderlyingNetwork for that, and you can set the own Network as underlyingNetwork...
https://issuetracker.google.com/issues/37109422:
"can you use VpnService#setUnderlyingNetworks to solve this issue? Once the VPN is established, find the Network object of the VPN and then pass it to setUnderlyingNetworks."
"you can try setting your own network as the underlying network. getAllNetworks will return an array of networks, and you can inspect those to find out which one is your own (e.g., by calling getLinkProperties)"
Please fix that. Thanks.

@vvviperrr
Copy link
Collaborator

can you use VpnService#setUnderlyingNetworks to solve this issue

yes, its possible, but this stuff supported only in API>=22, when i want to have one apk build for all api's >=14. i need to research how to do that (i am more linux coder than android).

@Sur3
Copy link
Contributor

Sur3 commented Apr 15, 2017

i am more linux coder than android

I Know what you mean, me too. :D
But you could at least look if android.os.Build.VERSION.SDK_INT >= 22 and then set the Underlying Network and otherwise skip it. ^^"

@vvviperrr
Copy link
Collaborator

sure, i'll fix it asap

@thardie
Copy link

thardie commented Jun 23, 2017

I tried the method suggested by Sur3 (Waiting for network to be connected, then calling setUnderlyingNetworks on the VPN builder object with the now connected network object. I also tried calling reportNetworkConnectivity for the network object, and still doesn't work. Browser and Google play still report no network. Here's some debug. Note the last line with "isDefaultNetwork-false". I'm wondering if a network of VPN can never be the default network...

06-22 16:56:45.977 2449-3230/system_process D/Vpn: setting state=CONNECTING, reason=establish 06-22 16:56:45.978 2449-3230/system_process D/VpnJni: Address added on tun0: 10.1.1.37/24 06-22 16:56:45.979 2097-2428/? E/Netd: Failed to destroy IPv4 sockets on 10.1.1.37: Invalid argument 06-22 16:56:45.980 2097-2428/? E/Netd: Error destroying sockets: Unknown error -22 06-22 16:56:46.000 2449-3230/system_process D/ConnectivityService: registerNetworkAgent NetworkAgentInfo{ ni{[type: VPN[], state: CONNECTING/CONNECTING, reason: (unspecified), extra: (none), failover: false, available: false, roaming: false, metered: false]} network{110} nethandle{472462838494} lp{{InterfaceName: tun0 LinkAddresses: [10.1.1.37/24,] Routes: [0.0.0.0/0 -> 0.0.0.0 tun0,::/0 unreachable,] DnsAddresses: [8.8.8.8,] Domains: MTU: 0}} nc{[ Transports: VPN Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED]} Score{0} everValidated{false} lastValidated{false} created{false} lingering{false} explicitlySelected{false} acceptUnvalidated{false} everCaptivePortalDetected{false} lastCaptivePortalDetected{false} } 06-22 16:56:46.000 2449-2549/system_process D/ConnectivityService: NetworkAgentInfo [VPN () - 110] EVENT_NETWORK_INFO_CHANGED, going from null to CONNECTING 06-22 16:56:46.001 2449-3230/system_process D/Vpn: setting state=CONNECTED, reason=agentConnect 06-22 16:56:46.001 2449-3230/system_process I/Vpn: Established by com.viper.simplert on tun0 06-22 16:56:46.002 28088-28088/? D/TetherService: 2 - Print network 06-22 16:56:46.002 28088-28088/? D/TetherService: 2 - Network: 110 06-22 16:56:46.004 28088-28088/? D/TetherService: 2 - LP: {InterfaceName: tun0 LinkAddresses: [10.1.1.37/24,] Routes: [0.0.0.0/0 -> 0.0.0.0 tun0,::/0 unreachable,] DnsAddresses: [8.8.8.8,] Domains: MTU: 0} 06-22 16:56:46.004 2449-13602/system_process D/ConnectivityService: reportNetworkConnectivity(110, true) by 10081 06-22 16:56:46.005 2097-2438/? E/Netd: Failed to dump IPv4 sockets for UID: Invalid argument 06-22 16:56:46.005 2097-2438/? E/Netd: Failed to close sockets while adding UidRanges{ 0-99999 } to network 110: Invalid argument 06-22 16:56:46.006 2449-2549/system_process D/ConnectivityService: NetworkAgentInfo [VPN () - 110] EVENT_NETWORK_INFO_CHANGED, going from CONNECTING to CONNECTED 06-22 16:56:46.006 2449-2549/system_process D/ConnectivityService: Adding iface tun0 to network 110 06-22 16:56:46.008 28088-28088/? D/TetherService: 2 - Done print network 06-22 16:56:46.008 28088-28088/? D/TetherService: SimpleRT Connected! 06-22 16:56:46.028 28088-28088/? V/SIMPLE_RT_JNI: Java_com_viper_simplert_Native_start: tun_fd = 36, acc_fd = 35 06-22 16:56:46.146 28088-28107/? D/libEGL: loaded /system/lib/egl/libGLESv2_mali.so 06-22 16:56:46.168 2449-2549/system_process D/ConnectivityService: Setting DNS servers for network 110 to [/8.8.8.8] 06-22 16:56:46.177 2449-2549/system_process W/ConnectivityExtension: ConnectivityExt jar file not present 06-22 16:56:46.182 2449-2549/system_process W/ConnectivityExtension: ConnectivityExt jar file not present 06-22 16:56:46.187 2449-28114/system_process D/NetworkMonitor/NetworkAgentInfo [VPN () - 110]: Network would not satisfy default request, not validating 06-22 16:56:46.208 2449-2549/system_process D/ConnectivityService: Sending CONNECTED broadcast for type 17 NetworkAgentInfo [VPN () - 110] isDefaultNetwork=false

@Sur3
Copy link
Contributor

Sur3 commented Jun 23, 2017

2449-28114/system_process D/NetworkMonitor/NetworkAgentInfo [VPN () - 110]: Network would not satisfy default request, not validating 06-22 16:56:46.208 2449-2549/system_process
At least it tries to set it as default network, some properties just seem not to be satisfied, probably because of the missing extension..
2449-2549/system_process W/ConnectivityExtension: ConnectivityExt jar file not present 06-22 16:56:46.182 2449-2549/system_process W/ConnectivityExtension: ConnectivityExt jar file not present 06-22 16:56:46.187

@thardie
Copy link

thardie commented Jun 23, 2017

Any ideas what the missing extensions are? I'd love to get this fixed...

@thardie
Copy link

thardie commented Jun 23, 2017

Looks like that ConnectivityExt is a red herring, and you can find a lot of other people mentioning it and seems unrelated.

What I did find doesn't bode well. That "would not satisfy default request" messages comes from this code:
// Don't bother validating networks that don't satisify the default request. // This includes: // - VPNs which can be considered explicitly desired by the user and the // user's desire trumps whether the network validates. // - Networks that don't provide internet access. It's unclear how to // validate such networks. // - Untrusted networks. It's unsafe to prompt the user to sign-in to // such networks and the user didn't express interest in connecting to // such networks (an app did) so the user may be unhappily surprised when // asked to sign-in to a network they didn't want to connect to in the // first place. Validation could be done to adjust the network scores // however these networks are app-requested and may not be intended for // general usage, in which case general validation may not be an accurate // measure of the network's quality. Only the app knows how to evaluate // the network so don't bother validating here. Furthermore sending HTTP // packets over the network may be undesirable, for example an extremely // expensive metered network, or unwanted leaking of the User Agent string. if (!mDefaultRequest.networkCapabilities.satisfiedByNetworkCapabilities( mNetworkAgentInfo.networkCapabilities)) { validationLog("Network would not satisfy default request, not validating"); transitionTo(mValidatedState); return HANDLED; }

The comment explicitly says VPN networks are excluded, and I've seen this capability flag that's on by default called "NOT_VPN". I think the system is hard coded not to ever consider a VPN as a default network.

@Sur3
Copy link
Contributor

Sur3 commented Jun 24, 2017

VPNs which can be considered explicitly desired by the user and the // user's desire trumps whether the network validates.
The question is then HOW can a user explicitly desire a VPN, probably there is an option somewhere, but I suppose the underlying network needs to be set anyway also for this user-based validation.
Probably we could also ask in the google ticket why it doesn't work.. https://issuetracker.google.com/issues/37109422

@thardie
Copy link

thardie commented Jun 24, 2017

That's fine if you control your internet connection, but in my example, I put a google map up, and it uses the system's location services, which uses the system's default connection. Changing the App's connection still doesn't let the map load.

I'm to the point where for my specific application, I'm going to modify the base OS, so I can change the default network requirements.

Is there another way we could do this? IE, not use VPN for the connection, but instead RNDIS?

@Sur3
Copy link
Contributor

Sur3 commented Jun 27, 2017

Hi thardie.
I don't know what you mean by 'control my internet connection', you mean it is possible to set a specific connection for an app, how is that done?
And could you provide your apk and/or patch to set the underlying network, I'd like to try it myself.

Greetz
Sur3

@thardie
Copy link

thardie commented Jun 27, 2017

By "control my connection", I meant in my app, I can make a call to set what type of network I want to be connected to. Then any sockets or communication I initiate from my app will use that connection. However, if I ask a system service for something, and it in turn needs to talk to the internet, it will use the system's connection, and not my app. Location services is one such example.

In terms of modifying the underlying network, I would have to modify the OS itself. I'd have to do this with cyanogenmod for example. I really would like to find another way.

I still don't have this working, so I don't have anything to give you yet. :(

@Sur3
Copy link
Contributor

Sur3 commented Jan 14, 2018

@vvviperrr any update on including that pr from eugene?

@robinpaulson
Copy link
Owner

@Sur3 @eugene-sevostianov-sc . Given that PR is a couple of years old now and apparently can't be merged, is either of you interested in fixing it up so it will work?

Thanks

@nanaceba
Copy link

nanaceba commented Sep 30, 2021

@robinpaulson you can close it, #40 is merged with change from @Sur3 9b63526

@robinpaulson
Copy link
Owner

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants