-
Notifications
You must be signed in to change notification settings - Fork 21
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
add support for simulating wifi #8
base: lineage-18.1
Are you sure you want to change the base?
Conversation
I think it's need an auto-adjusting mechanizm like detecting the cfg80211 and virt_wifi ko, if exists, set a property into waydroid_base.prop. |
This is not working for me: $ sudo waydroid shell -- ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wifi_eth@if29: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:16:3e:f9:d3:03 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::216:3eff:fef9:d303/64 scope link
valid_lft forever preferred_lft forever
3: wlan0@wifi_eth: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 00:16:3e:f9:d3:03 brd ff:ff:ff:ff:ff:ff |
It lack of an automative action of connecting virtwifi. |
I'm not sure I understand. |
if [ ! -d /sys/class/net/wlan0 ]; then | ||
/system/bin/ifconfig eth0 down | ||
/system/bin/ip link set eth0 name wifi_eth | ||
/system/bin/ifconfig wifi_eth up | ||
/system/bin/ip link add link wifi_eth name wlan0 type virt_wifi | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs rework.
- Do NOT rename
eth0
like that, people will not be happy to have their main ethernet connection be renamed like that.- Not to mention that systems can have different names instead of
eth0
.
Most distros have nowerdays changed to useeno1
as default for example...
- Not to mention that systems can have different names instead of
- Not all systems have their wifi named
wlan0
.
It's better to find an automated way of finding what name the wifi card(s) use.
Maybe something like:wificards=( $(iwconfig 2>/dev/null | grep 'IEEE 802.11' | cut -d ' ' -f 1) ) for wifi in "${wificards[@]}"; do ... done
Last but not least, i would prefer it much more to use netdev files to setup this virt_wifi
link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides i don't really understand the need for all this renaming of links anyhow 🤷♀️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that part is to be moved to the host couldn't the virtual wlan setup be handled by the already existing https://github.com/waydroid/waydroid/blob/main/data/scripts/waydroid-net.sh? I'd prefer not adding dependencies on random systemd components for core fixes like "apps not detecting any networking" if that can be avoided
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree about the place to move that part.
But strongly disagree with the "random systemd components" with same arguments for usage of non-systemd solutions on a systemd
based system which most distro's use these days...
- Pssttt they already make use of
systemd
stuff, seewaydroid-container.service
😉
If they want to be totally politically correct they should implement all this stuff they do now in scripts, inside a compiled C++ binary that directly calls kernel functions...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The init script is different because that's just the entrypoint and easily replicatable anywhere, if other waydroid parts depend on systemd handling something it'll just be broken elsewhere silently
Any progress ? |
@warlice it will need some testing first