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

Network name auto restore #31

Closed
FQrabbit opened this issue Jul 28, 2018 · 16 comments
Closed

Network name auto restore #31

FQrabbit opened this issue Jul 28, 2018 · 16 comments
Assignees
Labels
vendor-specific Definitely not my fault
Milestone

Comments

@FQrabbit
Copy link

Hi~

[Wireless Relay] When trying to change [Network Name], the wireless relay automatically turns off and reopens, the network name restores the default name.

Device :Google Nexus 6P Android: 8.1.0

vpnhotspot-2701422247909376597.log

@Mygod
Copy link
Owner

Mygod commented Jul 28, 2018

You might be using an outdated wpa_supplicant driver since this issue is usually seen on Android 5.x devices. Are you using Google's official ROM?

Also, an Xposed module with package name starting with com.chelpus seems to be messing with your system's normal functionalities. Try disabling Xposed to see if that helps.

@FQrabbit
Copy link
Author

photo_2018-07-28_10-38-54
I am using Lineage OS,
I try to close Xposed
But I guess it may be a driver problem.

@FQrabbit
Copy link
Author

vpnhotspot-2532532893296176957.log
I tried to turn off Xposed. After restarting the phone, it is still the same problem. Maybe it is really a problem that has been driven for too long. 👎

@Mygod
Copy link
Owner

Mygod commented Jul 28, 2018

Yeah at this point I'm afraid your phone doesn't support specifying repeater credentials. I'm using Lineage OS 15.1 on my other device and it's working well. Maybe you could try other ROMs?

@FQrabbit
Copy link
Author

OK, I'll try to replace the ROM, thank you for your answer.

@Mygod
Copy link
Owner

Mygod commented Jul 28, 2018

I read a bit about VNDK and it seems like your problem might be resolved by replacing [/system]/vendor/bin/hw/wpa_supplicant. Could you try that instead?

P.S. Be warned that this could break your Wi-Fi or even brick your device.

@Mygod
Copy link
Owner

Mygod commented Jul 28, 2018

Also since you are using Lineage OS on an open source device, maybe you can ask your ROM maintainer to update wpa_supplicant driver (platform/external/wpa_supplicant_8).

@Mygod
Copy link
Owner

Mygod commented Jul 28, 2018

Hmm but if you're using Project Treble, system updates won't do anything because wpa_supplicant is placed in /vendor. Maybe check for /vendor updates?

@Mygod Mygod reopened this Jul 28, 2018
Mygod added a commit that referenced this issue Jul 28, 2018
This reverts commit df304fe.

This kind of addresses #31. Apparently we can't predict which wpa_supplicant is bundled into the system by inspecting Android version, especially now that it is put into /vendor/bin/hw (see also Project Treble: https://source.android.com/devices/architecture/vndk/).

It might be cool if someone makes a Magisk module that replaces wpa_supplicant to the latest version.
@Mygod Mygod added help wanted vendor-specific Definitely not my fault labels Jul 28, 2018
Mygod added a commit that referenced this issue Jul 28, 2018
This reverts commit df304fe.

This kind of addresses #31. Apparently we can't predict which wpa_supplicant is bundled into the system by inspecting Android version, especially now that it is put into /vendor/bin/hw (see also Project Treble: https://source.android.com/devices/architecture/vndk/).

It might be cool if someone makes a Magisk module that replaces wpa_supplicant to the latest version.
@FQrabbit
Copy link
Author

I am looking for the maintainer of the ROM. 🌝

@Mygod
Copy link
Owner

Mygod commented Aug 18, 2018

I found a device that I can reproduce this issue on. It seems like a new network is generated in p2p_supplicant.conf every time after wpa_supplicant is started and P2P GO is requested. I'll see what I can do about it.

@Mygod Mygod self-assigned this Aug 18, 2018
@Mygod
Copy link
Owner

Mygod commented Aug 20, 2018

Okay. After some very intense debugging, I see this is a very complicated bug in AOSP that can only be triggered through use_p2p_group_interface=1. I'll open an issue later.

EDIT: See https://issuetracker.google.com/issues/112810624.

@Mygod
Copy link
Owner

Mygod commented Aug 21, 2018

Okay this patch to external/wpa_supplicant_8 should hopefully fix the issue.

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index e9107b3b..32059352 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -7290,8 +7290,6 @@ static int nl80211_set_param(void *priv, const char *param)
        if (os_strstr(param, "use_p2p_group_interface=1")) {
                wpa_printf(MSG_DEBUG, "nl80211: Use separate P2P group "
                           "interface");
-               drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_CONCURRENT;
-               drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_MGMT_AND_NON_P2P;
        }
 #endif /* CONFIG_P2P */
 
diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
index 7064ce1d..f9404fe2 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -823,8 +823,6 @@ static int wpa_driver_nl80211_get_info(struct wpa_driver_nl80211_data *drv,
        if (info->p2p_concurrent) {
                wpa_printf(MSG_DEBUG, "nl80211: Use separate P2P group "
                           "interface (driver advertised support)");
-               drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_CONCURRENT;
-               drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_MGMT_AND_NON_P2P;
        }
        if (info->num_multichan_concurrent > 1) {
                wpa_printf(MSG_DEBUG, "nl80211: Enable multi-channel "

@snakwu

This comment has been minimized.

@Mygod
Copy link
Owner

Mygod commented Jan 24, 2019

Upon further inspection, this bug can occur from Android 5 to 9. In fact, take darcy for example, this bug does not occur in Android 7.0 but is present on Android 8.0 (both are official ROMs). I will have to conclude that this is a ROM/vendor-specific bug and suggest everyone that encounters this bug to contact their vendors and see what they can do about this.

@Mygod
Copy link
Owner

Mygod commented Mar 16, 2019

Huh, I am surprised and delighted to find out that Google has fixed this in Android Q.

@Mygod Mygod mentioned this issue Apr 5, 2019
2 tasks
@Mygod Mygod self-assigned this Apr 5, 2019
@Mygod
Copy link
Owner

Mygod commented Jun 10, 2019

Fixed via #90.

@Mygod Mygod closed this as completed Jun 10, 2019
Mygod added a commit that referenced this issue Apr 22, 2020
Fixes #153.

Basically, this "forward"-ports a workaround for Android 9- thanks to Jimmy Chen.
As a consequence, #31 might reoccur if you turn off safe mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vendor-specific Definitely not my fault
Projects
None yet
Development

No branches or pull requests

3 participants