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

Android 8.0+ compatibility - reading WifiConfigStore.xml #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

blinkingtwelve
Copy link

This adds Android 8.0+ compatibility, and fixes #1 .

Tested on Android 9 with the LineageOS AddonSU.

It reads both the wpa_supplicant.conf and the WifiConfigStore.xml files, if they exist, and merges the result. In the case of duplicate SSIDs the WifiConfigStore.xml will win - which makes sense, as in the case that both files are present we're probably running on an upgraded device, and then the latter is authoritative because it's the one in use.
Anyway, if one doesn't like seeing results from the one or the other, one can just set an invalid path in the settings.

I've also reworked and simplified the su wrapper. As su can take as a direct argument the command you want to run, spawn a root shell to which to "type" this command over stdin — the way it was done before, in ExecuteAsRootBase.java — is unnecessary. And as now there is no longer a shell involved, the new code is robust with respect to, say, characters in file paths which would previously need to be shell-escaped because the shell would split/interpret the argument otherwise. Actually, as any such escaping wasn't done before in ExecuteAsRootBase.java, the "WPA Supplicant File Path" setting up until now actually used to offer a way to run arbitrary shell commands as root 🦖 — of minor concern, since the user was probably only a confirmation dialog away from popping a root shell on their phone anyway 😄

@IzzySoft
Copy link

IzzySoft commented Dec 3, 2020

@aario just wondering, as you didn't respond here: are you still maintaining this app? If not, would you be willing to transfer maintenance to @blinkingtwelve? He has volunteered for that, we at F-Droid (I'm one of the maintainers there) would just need your confirmation for that. Development can continue in his fork if you prefer that, or you could make him a "member" here. In either case, credits will remain to you as the original developer of course 😉

@IzzySoft
Copy link

@aario any word?

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

Successfully merging this pull request may close these issues.

Doesn't work in Oreo
2 participants