-
Notifications
You must be signed in to change notification settings - Fork 77
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
Intercepting Windows Subsystem for Android (WSA) with HTTP Toolkit #9
Comments
This probably means that WSA hasn't implemented Android's VPN APIs. That's annoying but not especially surprising (implementing an Android-only VPN subsystem within Windows sounds hard and not widely relevant, better to just skip it). That is awkward, and it will break HTTP Toolkit's automatic interception, but you should still be able to intercept WSA by manually configuring it instead. You'll need to configure the proxy settings there and make it trust HTTP Toolkit's certificate. The settings you'll need are available in the 'Anything' interception option in HTTP Toolkit. I've never actually tried WSA myself, so I don't know how to do that, but I'm sure there will be options somewhere. If you make any progress, or you hit any clear problems, can you share an update here? I'd be happy to help investigate further, or to write up the steps in the docs for others if you get this working. |
@pimterry would doing this lead to full trust and functionality of httptoolkit being able to see everything (that isnt pinned)? |
HTTP Toolkit Full System Trust WSA Involves rooting WSA then installing a system certificate manually. You can skip steps you've already done in regards to rooting. Note: You may not need to actually root WSA (I haven't tested it without root) but I reckon it's a good thing to have and it's not that hard. You will need:
You should add adb.exe and openssl.exe to your path to make this way easier. Otherwise, you'll need to use the full form of the path when executing it in folders.
|
Wow, amazing work @ethan-xd! Thanks so much for writing that all up, that's super useful 👍 |
to conclude, you run |
@ethan-xd Hey, thanks a lot for the in-depth guide. I'm currently trying to get it to work on the latest Retail WSA, which is actually Android 12 (2204.40000.19). Currently, rooting doesn't work (as per WSA-Community/WSA-Linux-Kernel#7 and having tried it myself), but I still went on. The problem that I'm actually encountering is that the certificate doesn't actually work even after copying it to The only thing that I haven't tried yet is getting an older version of WSA, but will have to look into 3rd party sources. |
https://github.com/LSPosed/MagiskOnWSA you can get a rooted instance here |
maybe it is a older version tho |
@blaconix Unfortunate to hear that the kernel file no longer works on Android 12. At the time I wrote it Retail was on 11. You can look into MagiskOnWSA like what @YuenSzeHong said, but be careful: it broke my Windows 11 install by not loading WSA ever again no matter how much I uninstalled and reinstalled components of it. I had to reinstall Windows to fix it. LSPosed/MagiskOnWSA#396 for more info on my error.
Also, @YuenSzeHong: I only just saw your previous message from 2 weeks ago, and the certificate auto-install on HTTP Toolkit didn't work for me even after I rooted. I had to install the certificate manually, because apparently the current versions of Android don't support installing the system certificates, but I could be wrong. |
if you mean that method, thas unfortunate, because that was working for me back then, and i did the same to my destop, also had rooted wsa installed |
That's where the manual setup comes in to mount |
That cert injection script (for system cert injection) does work on Android 12, everywhere I've tested (although I haven't tested WSL myself). Those scripts require root access though. The error there that only occurs in cases where HTTP Toolkit can't detect the root access it expects to be able to run that script in the first place. In which case it falls back to installing user certificates, which is semi-automatic (a single prompt) in Android <11, and then mostly manual via those instructions in Android 12+. Does that make sense? This means if you can set up WSL to give HTTP Toolkit root access, the system cert setup script should work automatically. It tests for root by running each of "su root whoami", "su -c whoami" and "adb root" + "whoami" via adb shells, and looking for the command that works and prints "root". I don't know how WSL handles all that though. |
Thanks for clarifying! I rooted with https://github.com/LSPosed/MagiskOnWSA, then just ran HTTPToolkit with ADB and everything works without additional setup. PS: I had to disable Advanced Networking in WSA Settings for HTTPToolkit to work correctly. |
Rooted WSA can now be found at https://github.com/LSPosed/MagiskOnWSALocal and I can confirm that it is working great out of the box. PS. For non-root WSA, you may use Microsoft Launcher (or other launcher) to go to setting and manually install CA cert (enable User Trust), but that's all I can do. |
As the above reply says you can use MagiskOnWSALocal to install WSA with Magisk, you then can open Magisk and enable Superuser on shell, which will then allow HTTP Toolkit to install the certificate without warning you about Android 12. |
it worked for me by using |
It seems that Microsoft are now officially killing WSA (https://www.osnews.com/story/138718/microsoft-kills-windows-subsystem-for-android/) and it will fully unsupported & unavailable for new users from March 2025. Given that, I don't think it's worth adding extra support for this, so I'm going to close this issue. If you do want to use HTTP Toolkit with WSA regardless, see the instructions above for the best workaround in the meantime. |
Unable to start http toolkit on windows subsystem for Android on windows 11 . Getting the following error
Anyway to resolve it?
The text was updated successfully, but these errors were encountered: