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

Support Non-Rooting devices #62

Closed
IHNEL opened this issue Jan 16, 2019 · 21 comments
Closed

Support Non-Rooting devices #62

IHNEL opened this issue Jan 16, 2019 · 21 comments
Labels

Comments

@IHNEL
Copy link

IHNEL commented Jan 16, 2019

Hi @Mygod
I understand that this code need to execute some commands with super-user permission and it only works on rooted devices. But I'm curious to make it work on non-rooted device too.

Is there any way to make internet sharing via Wifi Direct on non-rooted devices? Any hint are appreciated.

Cheers

@Mygod
Copy link
Owner

Mygod commented Jan 16, 2019

This app requires root to make changes to iptables and ip rule. This restriction is imposed by Linux kernel.

If you want to create a Wi-Fi repeater, you can try alternatives like PdaNet+ and NetShare-no-root-tethering. (note: these apps are neither free nor open source)

But if you don't feel like paying for those apps or you just want to share your VPN (for WLAN or mobile hotspot), you can alternatively use this app with a proxy server, e.g. Proxy Server (disclaimer: I have not tried this app), and set up your clients to use your Android device as proxy.

By the way, here are some other features you should be able to get with this app without root:

  • View connected devices for system tethering and monitor them; (also get country flags based on their MAC addresses)
  • Create a hotspot that has only LAN connections;
  • Turn on/off system tethering if you can't do it already;
  • Play around with settings and the user interface in general. 😛

@Mygod Mygod added the wontfix label Jan 16, 2019
@Mygod Mygod closed this as completed Jan 16, 2019
@samnet
Copy link

samnet commented Jan 18, 2019

@Mygod
Thanks for this answer. This is something I am VERY interested in.
I have 2 questions, please:

  • When you say "Toggle tether switches if you can't do it already", what do you mean?
  • The Proxy Server app works (I tried it: in conjunction with a WiFi-direct connection and some elementary client side configuration, traffic is routed to the Internet) but isn't open source. Do you know of some code that could help us build a simple proxy server?

@samnet
Copy link

samnet commented Jan 18, 2019

This app requires root to make changes to iptables and ip rule. This restriction is imposed by Linux kernel. To share Wi-Fi without root, you can try alternatives like PdaNet+ and NetShare-no-root-tethering. (note: these apps are neither free nor open source)

But if you don't feel like paying for those apps, you can alternatively use this app with a proxy server, e.g. Proxy Server (disclaimer: I have not tried this app), and set up your clients to use your Android device as proxy.

By the way, here are some other features you should be able to get with this app without root:

  • View connected devices for system tethering and monitor them;
  • Create a hotspot that has only LAN connections;
  • Toggle tether switches if you can't do it already;
  • Play around with settings and the user interface in general. 😛

Another remark:
Using the Proxy Server way only works if you want to repeat a WiFi network on which you are connected, it seems to me. If you try while being connected on 4G, it won't work. Correct me if I am wrong :).

@Mygod
Copy link
Owner

Mygod commented Jan 22, 2019

When you say "Toggle tether switches if you can't do it already", what do you mean?

I updated the original comment.

The Proxy Server app works (I tried it: in conjunction with a WiFi-direct connection and some elementary client side configuration, traffic is routed to the Internet) but isn't open source. Do you know of some code that could help us build a simple proxy server?

https://lmgtfy.com/?q=linux+proxy+server

Using the Proxy Server way only works if you want to repeat a WiFi network on which you are connected, it seems to me. If you try while being connected on 4G, it won't work. Correct me if I am wrong :).

You are wrong. :)

It's theoretically possible at least but for now I'm not interested.

@IHNEL
Copy link
Author

IHNEL commented Jan 22, 2019

@Mygod
Could you please lets me know if we are able to support non-rooted devices by using custom iptable command?
Below is the link to another open source which use the custom iptable seems.

ref: https://github.com/staf621/ki4a/blob/3e3099ebbfa08cdad18fde064f6c5751227068ec/src/main/java/com/staf621/ki4a/ki4aService.java#L439

@Mygod
Copy link
Owner

Mygod commented Jan 22, 2019

You do not need root to run iptables binary. You need root to communicate to the kernel to modify iptables. If you can bypass that, it would be considered a security loophole.

@IHNEL
Copy link
Author

IHNEL commented Jan 22, 2019

Does it make sense if we will modify the iptables first out side , then execute it in app?

FYI: I am investigating about the possibility of solution to route all network traffics.

@Mygod
Copy link
Owner

Mygod commented Jan 22, 2019

You either find a way to talk to kernel directly or talk to netd indirectly. Either way, I'm sure Google will be happy to give you money if you managed to do that (and probably fix it in their next security update).

@JReming85
Copy link

Anyone have luck going rootless using Shizuku?

Ordered a new Pixel 8 pro, and don't want to root this time, so looking into alternatives for root abilities without rooting to run some of my favorite apps.

@kayrus
Copy link

kayrus commented Mar 31, 2024

@Mygod I would also like to see Shizuku support. In some cases, ADB can be executed as root, thereby granting Shizuku root privileges, enabling it to modify iptables.

@JReming85
Copy link

JReming85 commented Mar 31, 2024 via email

@supermansaga
Copy link

Already checked, does not give access to use iptables. Just gives the ability to see the filesystem

Meaning technically no luck, even if they are willing to look into it further?

@JReming85
Copy link

JReming85 commented Mar 31, 2024 via email

@kayrus
Copy link

kayrus commented Mar 31, 2024

Already checked, does not give access to use iptables. Just gives the ability to see the filesystem

did you start shizuku in root mode through adb? while adb has full root access, there is nothing that can limit shizuku to run iptables.

photo_2024-03-31_22-07-04

@JReming85
Copy link

You would need root access for that feature.

This thread is for rootless

@kayrus
Copy link

kayrus commented Mar 31, 2024

I'm using lineageos that allows to run adb in root mode. I'm looking for the shizuku support because I don't want to install magisk.

@supermansaga
Copy link

Correct, unless another rootless method is found, this isn't possible for now. On the bright side, i switched to using pairvpn. It's made by the people who created PDAnet. It's pretty much the same concept of this just 1 extra step. 1. Start your hotspot 2. Connect the client 3. Start/Connect PairVPN It creates a vpn tunnel from the client to the phone via the hotspot so all traffic comes from the phone bypassing the tether counter. Works great and is just as fast and reliable as being just in the hotspot, and unlike 0danet or other alternatives, doesn't require config or proxys

I need my phone to be already on VPN and share the vpn connection back to my desktop. Pairvpn doesn't seem to allow me to do it. It rather says, "This device has an active VPN connection. You need to disconnect it first before connecting PairVPN because chained VPN is not supported."

@JReming85
Copy link

I'm using lineageos that allows to run adb in root mode. I'm looking for the shizuku support because I don't want to install magisk.

There are plenty of su managers out there that only need root like supersu.

@JReming85
Copy link

Correct, unless another rootless method is found, this isn't possible for now. On the bright side, i switched to using pairvpn. It's made by the people who created PDAnet. It's pretty much the same concept of this just 1 extra step. 1. Start your hotspot 2. Connect the client 3. Start/Connect PairVPN It creates a vpn tunnel from the client to the phone via the hotspot so all traffic comes from the phone bypassing the tether counter. Works great and is just as fast and reliable as being just in the hotspot, and unlike 0danet or other alternatives, doesn't require config or proxys

I need my phone to be already on VPN and share the vpn connection back to my desktop. Pairvpn doesn't seem to allow me to do it. It rather says, "This device has an active VPN connection. You need to disconnect it first before connecting PairVPN because chained VPN is not supported."

Do you need the VPN to access services or resources behind it?

If it's just to hide tether, then it's no longer needed.

If you need to access local services behind the VPN, then you can try using a proxy or wireguard.

There is software like proxifier that can tunnel all or selected apps through a proxy, or wireguard which should be able to be ran alongside the vpn

@kayrus
Copy link

kayrus commented Apr 1, 2024

There are plenty of su managers out there that only need root like supersu.

I don't want to use su managers. I'd like to enable root access only via adb and shizuku. Don't ask why.

@JReming85
Copy link

JReming85 commented Apr 1, 2024

There are plenty of su managers out there that only need root like supersu.

I don't want to use su managers. I'd like to enable root access only via adb and shizuku. Don't ask why.

Well shizuku i don't think it's the right tool for you then. It only gives access to the filesystem, nothing beyond that.

Also it looks like the github repo might be dead

AppOps or tasker may be able to do something for you though but not sure

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

No branches or pull requests

6 participants