[HN Gopher] A patch to enable Windows Subsystem for Android to r...
___________________________________________________________________
A patch to enable Windows Subsystem for Android to run on Windows
10
Author : quyleanh
Score : 176 points
Date : 2023-02-05 12:06 UTC (10 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| wereallterrrist wrote:
| I really wish MS would remove the TPM requirement, so that I
| could stop sympathizing with the people who seem to have an
| obsessive hobby with making maintenance burdens for themselves,
| or will opine about Linux maintenance while spending countless
| unaccounted time mucking with Windows like this -_-.
| trelane wrote:
| > I really wish MS would remove the TPM requirement
|
| That's not going to happen. For one, having a more secure OS is
| actually a good thing, but especially for the even larger
| amounts of control they'll gain over your computer as they move
| to Pluton and beyond. Imagine, for instance, having your bank
| verify your OS and software running before doing business with
| you. Remote attestation is definitely in the plans, see e.g.
| https://twitter.com/marypcbuk/status/1478416836647657479
|
| You could keep hoping Microsoft will do what you want with
| their OS, or you could get out while you can.
| wereallterrrist wrote:
| I haven't run Windows in a very, very long time, maybe I was
| too subtle with my dig at this type of content (a day after
| the "slimmed down" Win11 image was posted and discussed
| widely).
| knaik94 wrote:
| These artifial limitations and heavy handed approach from MS are
| only encouraging me to delay even more. Similarly, proper
| transparecy for the new Windows Terminal is gated behind windows
| 11. It makes me never want to use terminal even though it's
| available.
|
| This is working as well as it does on Windows 11. Root access
| with magisk is working as intended and I set up Play services and
| the subsystem was able to successfully log in. There is hardware
| accelerated x264 playback, I was able to play 1080p youtube with
| very few problems. The playback occasionally stutters and the
| youtube player itself occasionally crashes, but that feels
| unrelated to the underlying ability to playback video. Graphics
| happen via "Subsystem OpenGL ES Translator" because this is
| effectively virtualized. Graphics performance on my rtx 2070
| (laptop) are buttery smooth, but interfacing with a touch only UI
| with software mapping is weird at times.
|
| I have no issues with storage or sideloading. The only part where
| I had to take steps outside of the standard guide was to
| reinstall a specific appx and manually register a manifest.xml.
| It looked like it was working without this step but then wouldn't
| reopen after opening the very first time. I had to enable
| developer options in both the android system settings and windows
| subsystem settings, they are two seperate things and I am not
| sure if they are supposed to sync. Enabling dev options and usb
| debugging in just android wasn't enough, there was a seperate
| setting in "windows subsystem for android settings".
|
| Android system storage is a VHDX, I have been unsuccessful trying
| to mount it. There's no easy way to transfer files back and forth
| between android and windows. I am not sure if samba will work
| since it is the same ip. The only other option seems to be ADB.
|
| This has all of the basically all of the downsides of
| hypervisors. Bluetooth also isn't working.
| mdaniel wrote:
| I was reading the linked repo in step 2
| <https://github.com/LSPosed/MagiskOnWSALocal#magisk-on-wsa-wi...>
| and saw this message, which seems like utter nonsense:
|
| > For fork developers: Please don't build using GitHub Actions,
| as GitHub will count your forked GitHub Actions usage against
| this upstream repository, which may cause this upstream
| repository gets disabled by GitHub staff like MagiskOnWSA because
| of numerous forks building GitHub Actions, and counting the
| forks' Action usage against this upstream repository.
|
| is that even remotely true?
|
| If there's any "disabled by GitHub staff" going on, it's likely
| due to DMCA nonsense, not due to forks having their GitHub
| Actions billed against the upstream repo. Related to that, I'm
| surprised to see the submitted repo distribute icu.dll and
| winhttp.dll, versus telling interested parties to extract them
| out of the Win11 ISO. I bet Microsoft won't bother striking the
| repo over 2 random dlls but why roll the dice?
| LiamPowell wrote:
| Rather than hosting the build artifacts, MagiskOnWSA asked
| users to fork the repo and run a GitHub action to build a 2GB
| file. Given that they had over 100,000 forks (or at least 200TB
| of identical artifacts), it's pretty clear why GitHub disabled
| their repo.
| GiorgioG wrote:
| I use WSA to use the Audible.com app since Audible/Amazon have
| abandoned their Windows client. It just works..props to
| Microsoft!
| k__ wrote:
| Can I use Twitter Spaces on my Windows PC with that?
| Rexogamer wrote:
| I thought they were supported on web (at least for listeners)?
| 323 wrote:
| You can install Twitter app from Windows Store if you want
| Spaces on Windows.
| trelane wrote:
| Man, these names keep being disappointing. Initial reaction:
| Sweet! Now people can run their Windows apps on Linux/ Android. A
| second later: oh, bah. More X-on-Windows.
| gfiorav wrote:
| Windows Subsystem for X.
|
| Basically means: Windows made a KVM to trick any code into
| think it's running on X natively.
|
| Works pretty well tbh.
| Sakos wrote:
| No, the name is definitely confusing. It's only named that
| way for historical reasons.
| zahllos wrote:
| Even historically there isn't a particularly well defined
| set of requirements for a subsystem. The closest to win32
| was the subsystem for Unix applications, that loaded
| psdll.dll and used PE format executables even in the "Unix"
| environnement. WSL1 used elf files and required a custom
| execution process: bash.exe called com which called into
| the kernel to set up a special lightweight process
| supporting Linux syscall translation/implementation.
| Wsl2/wsa are Hyper-V based.
| asveikau wrote:
| They claimed it was for trademark reasons. I think it's
| bullshit. They could have come up with a better phrasing
| that still puts the word Windows first, and whatever
| additional criteria that legal was worried about. They just
| don't care about making sense.
|
| Even making it "Windows subsystem for Android
| applications", a one word addition, would be clearer.
| windowshopping wrote:
| I'm confused, I thought WSA was for Windows 10 in the first
| place? I have it running on my Win10 laptop...
| petodo wrote:
| you are either confusing WSA with something or you don't have
| W10
| junon wrote:
| WSA? or WSL?
| windowshopping wrote:
| Ohhh you're right god I misread the hell out of this.
| 2h wrote:
| > I thought WSA for Windows 10 in the first place
|
| this isn't valid English. can you clarify what you were trying
| to say?
| windowshopping wrote:
| I typo'd and left out the word "was" after WSA.
| numpad0 wrote:
| WSA(MS Android Emulator) requires 11 and memory integrity, else
| it silently crashes during VM bootup. WSL(bash on Windows) do
| not.
| ajot wrote:
| How does WSA compare to Anbox or Waydroid? Apart from running on
| Windows, I mean more performance wise and ability to run
| different apps.
| aruggirello wrote:
| Anbox is old stuff. Waydroid is improving with each release
| (which happened several times in the last few months), and it's
| great overall, but tricky to set up properly: kernel modules,
| mutter (if your desktop is under X), and the Google activation
| step for your new device; then houdini and possibly other stuff
| (eg. to fake wifi if using ethernet, Magisk...). Once you do
| that, it's almost as native and it usually supports your GPU.
| Sakos wrote:
| I think the benefit of WSA is that Microsoft is significantly
| more trustworthy (shoot me, fml) than whoever is making the
| popular Android emulator of the day.
|
| edit: Just noticed Anbox and Waydroid are open source projects
| for Linux. Can't say much about them. I was thinking in terms
| of other Android emulators on Windows like BlueStacks.
| vlovich123 wrote:
| Wouldn't this be a patch of WSA from whoever is making this?
| This isn't a Microsoft project...
| Sakos wrote:
| I was just answering the question in general, not in
| regards to the above patch. The patch would need to be
| evaluated to see how it works and whether it's safe.
| cleanchit wrote:
| Lol wine is way better and reliable than wsl.
| Kukumber wrote:
| WSA is a VM
|
| Anbox/Waydroid are containers, they are native
| loxias wrote:
| I tried to use Anbox a few times over the last 4 years, it
| doesn't work.
|
| I'm sure I could get it to work on a dedicated system, where I
| matched whatever point release of the kernel and userspace it
| was designed to run with, but on a normal debian (I think it
| was buster) install it "shat the bed" so to speak and didn't
| even offer the reward of actually running the apps I wanted to.
| jeroenhd wrote:
| My experience with Anbox and Waydroid on recent Linux kernels
| wasn't great. The kernel modules required were a major problem
| that made my laptop unbootable several times and just didn't
| want to load on my desktop.
| nirav72 wrote:
| WSA is really useful for when no desktop apps are available for
| consumer IOT/Home automation devices and you don't want to
| install it on your phone.
| xnx wrote:
| This is great. Also hoping someone creates a patch/hack that
| allows Google Play Games for Winwos
| (https://play.google.com/googleplaygames) to run any Android app.
| 2h wrote:
| I wonder if you can use a proxy with this, I would like to run
| this through MITM Proxy to see the requests made by different
| Android apps. Current I am using Android Studio or GenyMotion
| ohgodplsno wrote:
| Unless you found a way to break HTTPS, that won't do. Android
| uses certificate pinning, and any MITM attempt (such as running
| through a proxy) won't even send the requests through.
| 2h wrote:
| No, Android doesn't. Some apps do. And in many cases, the
| pinning code can be removed in real time with Frida. Please
| don't spread misinformation.
| ohgodplsno wrote:
| Android apps do not trust anything out of the system
| default CA since Android 7.0, which is "light" pinning.
| https://android-developers.googleblog.com/2016/07/changes-
| to.... Additionally, certificate pinning can be done in
| multiple ways, and your Frida bypass will not do anything
| in the case of a simple reimplementation of pinning for
| OkHttp means you now have to find also that code (which has
| most likely been proguarded and obfuscated) to replace.
|
| The only ways your certificate works are:
|
| * Your self signed certificates are marked as trusted in
| the app manifest (which, since it isn't your app, you have
| to rebuild an APK to modify the network_security_config)
|
| * There's a leftover "accept everything" in the manifest,
| and that can only work with debug builds.
|
| * You ran it through apktool/equivalent to insert a
| permissive network_security_config (which only has this
| ability since 2022, but other scripts have existed before).
|
| Running it through Frida for that purpose is needlessly
| overkill.
|
| Please know your shit.
| 2h wrote:
| you missed the step, where you can just install a
| certificate to
| /system/etc/security/cacerts
|
| which unlocks most current Android apps. so maybe learn
| your own tactics, before commenting further.
| oefrha wrote:
| The system volume on WSA is a static image and can't be
| mounted as readwrite the last time I checked. You pretty
| much have to use something like MagiskTrustUserCerts.
| 2h wrote:
| > can't be mounted as readwrite
|
| yeah it can. you just mount it as tmpfs.
| tyingq wrote:
| If it works at all like WSL, you might want to look at wsl-
| vpnkit.
|
| https://github.com/sakai135/wsl-vpnkit
|
| It's not a proxy, but would give some idea how to shim into the
| middle.
|
| Uses gvisor-tap-vsock underneath:
| https://github.com/containers/gvisor-tap-vsock
| logbiscuitswave wrote:
| This is great.
|
| I really hate Windows 11. It doesn't run on several of my
| computers due to its system requirements and for those that it
| does run on I find the UX to be such a huge step backwards that I
| find myself continually fighting with the shell rather than
| actually getting work done. So, I've been steadfastly sticking to
| Windows 10 on machines where I need Windows.
|
| There's so many things completely artificially gated to Windows
| 11. The new Apple Music Preview which is gated to 11 can be
| easily patched to run on 10 just by editing the manifest. I've
| found many other "Windows 11 only" things to be entirely "paper"
| limitations. I tried to hack WSA onto 10 a while back but quickly
| realized it was more than a manifest change and lost interest
| because it wasn't important enough to me to pursue further.
|
| I'm glad someone took the time to figure it out and I tip my hat
| to the folks that took the time to debug and reverse engineer
| this solution. The relative simplicity of the resulting hack to
| run WSA on Windows 10 shows that it seems to be more of an
| unwillingness to backport some new APIs rather than any sort of
| deep technological changes in the OS.
| extheat wrote:
| I agree, the shell changes are a big step backwards for the
| sake of some eye candy. Personally I use ExplorerPatcher [1] to
| restore most of the shell UI back to stock Win10, and it's been
| working pretty well for me without any problems.
|
| [1] https://github.com/valinet/ExplorerPatcher
| super256 wrote:
| I recently switched from the windows 11 task manager to the
| windows 7 legacy task manager. I'm delighted how the legacy
| task manager just opens instantly and doesn't lag for a second
| when switching from process to service tab etc.
|
| Same for the start menu: I installed start11 yesterday and the
| old start menu is just sooo much faster.
|
| My CPU is a few years old (i7 8700k), and I thought about
| upgrading because windows 11 was always so laggy, but this
| showed me that Microsoft is only releasing poor software as
| their flagship product.
| iforgotpassword wrote:
| When Windows 10 came along, people happily moved over from 8.x,
| as it was such an improvement. Those who stuck with 7 decided
| to still stick with 7 for a while longer.
|
| When 7 came around, same thing: most Vista users happily
| switched, XP users held out until the bitter end.
|
| Every time the sentiment was similar to the comment I'm
| replying to. Somehow people must be forgetting that the
| previous thing they had was already better then the current
| thing. Maybe helped by the fact that the next thing seems to
| suck even more.
|
| Wait until support for 10 ends and 12 has full screen unmutable
| video ads. 11 will only seem half bad.
| voidfunc wrote:
| The difference between 7 and basically every other Windows OS
| since XP was that it was actually really really good. They
| took Vista and fixed most of the things that pissed everyone
| off about it. I don't remember a lot of problems with 7 at
| all.
|
| Then they scrapped it for 8 which was a UX disaster. Win10
| was OK, but still quirky as hell with lots of weird 8 carry
| over. I loathed when I finally upgraded from 7 to 10.
|
| I've been using Win11 Pro for gaming mostly and it's OK but
| not great once I moved the task bar back to the left. I dunno
| why anyone felt that was worth mucking with. What I really
| resent about Win11 is the desire to connect my Microsoft
| account to everything.
|
| Someday I'm gonna seriously give the Steam/Proton thing a try
| on Linux. I'm battle scarred from trying to game on Linux in
| the early 2000's... but I need to give it another chance. I'd
| much rather stay on my Linux host for both work and fun
| rather than just work.
| jakogut wrote:
| Do it. I've been gaming solely on Linux for the last five
| years. Sure, you miss out on a handful of popular triple-A
| multiplayer titles with incompatible anti-cheat, but I
| don't miss them. Also, the more users Linux gets, the less
| it will be ignored by developers and publishers.
| doubled112 wrote:
| Do it. Peer pressure!
|
| I've been trying to game on Linux for a long time too. Have
| been dabbling on and off for a long time.
|
| I can honestly say that it is better than ever.
|
| You really need a distro that stays up to date. Fedora,
| OpenSUSE Tumbleweed, Arch, something like that. Ubuntu is
| probably a close runner up since they release their HWE
| updates once in a while.
|
| When I say up to date, it is the kind of up to date where
| some of the new improvements in Proton/Steam/DXVK need
| Nvidia drivers/Mesa published this month. Although I'd have
| loved to use Debian stable everywhere, it was the wrong fit
| for this purpose, and only caused me pain.
| heywhatupboys wrote:
| i really loved Vista, don't really get the hate. I recently
| used a computer with vista, and oh boy it is BEAUTIFUL!
| more prettier than modern flat bland paint-made Windows
| iforgotpassword wrote:
| Ok then, but in which ways was it better than 7? I'm
| firmly in the "Vista was pretty unpolished" camp, and it
| wasn't helped by the fact that like the majority of
| people, I first experienced it on underpowered hardware,
| adding insult to injury. The story goes that during
| development, Microsoft overestimated the advances that
| would be made regarding raw computing power, extrapolated
| from previous years where we did in fact move crazy fast.
| So when 7 rolled along, half of the performance issues
| were solved by hw finally catching up, the other half
| were tweaks and fixes by MS. The UI I think was improved
| across the board. So that's why I'm curious what the
| Vista fans loved so much about it compared to 7.
| mavhc wrote:
| Vista was a multi year beta test for 7
| mst wrote:
| Vista had a lot of genuine security improvements for
| corporates, the extent to which you could create a much
| more reliable environment with judicious use of group
| policy was actually genuinely impressive.
|
| Honestly, apart from the horrible mistake they made
| around UAC prompting, most of the rough edges didn't
| bother me and once I got used to it and could just follow
| the paths I'd beaten previously to get it to do what I
| wanted it to, for me it was "mostly just another slightly
| different Windows UI atop a kernel+OS layer that for my
| purposes appeared to Just Work.
|
| I am well aware this was not the experience a lot of
| people had with Vista.
| lmm wrote:
| > Ok then, but in which ways was it better than 7?
|
| The way I remember it it was less gratuitously flashy, or
| at least easier to switch back into a win2k-like mode.
| Doesn't 7 force you to use a GPU-accelerated desktop or
| something?
| tstrimple wrote:
| Based on my admittedly shoddy memory, I believe most of
| the hate against Vista was due to its early release and
| lack of drivers with moving to a new model requiring
| signing. This broke a lot of legacy drivers and thus the
| hardware no longer worked without the manufacturers
| providing an update. I was mostly on newer hardware so
| didn't have the compatibility issues a number of users
| experienced with that migration.
| dtx1 wrote:
| > Someday I'm gonna seriously give the Steam/Proton thing a
| try on Linux. I'm battle scarred from trying to game on
| Linux in the early 2000's... but I need to give it another
| chance. I'd much rather stay on my Linux host for both work
| and fun rather than just work.
|
| I sometimes forget to even look up Linux compatibility on
| steam games causeI assume they work, especially with single
| player games. We are at what feels like 98% compatibility
| and it's usually at worst looking up a few cmdline switches
| on protondb
| nickphx wrote:
| Proton works great with the exception of some online titles
| that require useless anti-cheat software or wacky drm.
| aruggirello wrote:
| BTW for those considering this WSA thing, in Linux land
| we have Waydroid!
| CamperBob2 wrote:
| _When Windows 10 came along, people happily moved over from
| 8.x, as it was such an improvement_
|
| That's... not how I remember it. What I remember is that
| people hated the first Windows 10 builds so much that
| Microsoft not only couldn't give it away for free, but they
| had to use deceptive techniques -- essentially leveraging
| Windows Update as a malware distribution channel -- to force
| them to upgrade.
| albertopv wrote:
| That's not I remember it. My company at that time
| completely skipped windows 8, I can count with an hand the
| people I knew that used windows 8 at all, almost everybody
| jumped from 7 to 10.
| CamperBob2 wrote:
| I didn't say anything about Windows 8, except to comment
| that it makes a convenient straw man for historical
| revisionism.
|
| The market share of Windows 10 versus _Windows 7_ speaks
| for itself.
| smolyeet wrote:
| The reception of 10 was pretty good and a step in the right
| direction from the tablet/desktop aio that was 8 and 8.1.
| Plus it was free and didn't have as many restriction to
| upgrade as say 11. It was a challenge for enterprise but
| people adopted 10 fairly quickly. Even if you google the
| stats of it :
|
| https://www.businessinsider.com/windows-10-adoption-rate-
| vs-...
| CamperBob2 wrote:
| It didn't "sell." Upgrades were free (and still are,
| AFAIK.)
|
| Windows 8 was widely (and correctly) perceived as a
| disaster, so it's not a valid benchmark for market share
| comparison. Windows 7 was the target Microsoft wanted to
| hit, and that didn't happen until Q4 2018:
| https://windowsreport.com/windows-10-7-market-share/
| iforgotpassword wrote:
| Yeah admittedly it's been a while, and it didn't help that
| most of my peer group was in the 7 camp, but after some
| initial hesitation and "let's wait for others to try it
| first", Windows 8 folks seemed rather happy about the free
| upgrade. I can think of only one person from my group that
| really loved 8 and only just switched when 8.1 support
| ended.
| nikanj wrote:
| So many of the Windows 11 changes are just...odd. Like no
| longer being able to disable taskbar grouping, or the explorer
| right-click menu getting half the options hidden under "show
| more"
|
| One would think there was some reasoning behind this, but it
| all just seems like "let's make it different because if it's
| the same people complain that there's nothing new in Windows
| 11"
| accoil wrote:
| Oh wow, and 7+ Taskbar Tweaker can't fix the grouping
| either[^1]. I use it in Win 10 to ungroup without labels as
| that's not a configurable option.
|
| Looks like the dev has moved to Windhawk, and that at least
| has partial support for ungrouping[^2].
|
| [1]: https://ramensoftware.com/7-taskbar-tweaker-and-a-first-
| look...
|
| [2]: https://ramensoftware.com/windhawk-mods-for-the-
| windows-11-t...
| loxias wrote:
| Now, if only there was a clean and performant way to run Android
| apps on my existing Debian system...
|
| Currently, I've had the best experience (programs work and do
| what they're supposed to) with Android-x86, but it's generally a
| few versions out of date and running a whole qemu instance is
| heavyweight.
| aruggirello wrote:
| Doesn't Waydroid run under Debian?
| loxias wrote:
| It might, I haven't tried it (though maybe I should).
|
| I thought (maybe incorrectly) it was "super bleeding edge",
| depending on changing and bloating so many aspects of my
| existing setup as to make the setup useless to me for
| existing tasks. For instance, I don't have (and don't want)
| GNOME installed, or any sort of desktop environment, or
| wayland -- I'd probably have to relearn how to accomplish the
| tasks I ordinarily do, and it's not worth the cost.
|
| Still, perhaps I should try making a VM. :)
| __anon-2023__ wrote:
| Can waydroid work in docker? I like to try out apps in
| docker. Recently I did it with the heroku cli. Much simpler
| use-case though.
| mouse_ wrote:
| Chrome is also capable of running Android software, there used to
| be a hack for doing so. See here:
| https://arstechnica.com/gadgets/2014/09/hack-runs-android-ap...
|
| Unfortunately this was quickly patched, and I suspect this
| Windows Subsystem for Android hack will be as well.
| unnouinceput wrote:
| I doubt. Microsoft definition of Windows nowadays is "we don't
| care what your operating system is, your executables should run
| on our WinOS as well". And if somebody actually does this port
| from 11 to 10, they'll be happy about it. More developers will
| run from other OS'es to Win
| mouse_ wrote:
| bet
| leni536 wrote:
| I doubt that they are super happy about it. Many of their
| newer software are gatekeeped to Win11 without a strong
| reason. They are pushing people to switch to 11.
| wkat4242 wrote:
| 11 and also edge. They still care a lot whether people use
| their stuff.
|
| The whole reason behind WSL was to stop the Exodus of cloud
| developers to running Linux on their laptops (though most
| of them at my work still prefer it over WSL)
| sh4rks wrote:
| Is there a reason to not switch?
| asveikau wrote:
| They removed support for lots of perfectly adequate and
| capable hardware. There are no legit reasons for this,
| and I would say for e-waste concerns it probably enters
| into unethical territory.
| MallocVoidstar wrote:
| It requires TPM, and for a while AMD's software TPM
| implementation was buggy and caused stutters. That got me
| to push back my update to 11 to 'at least a year from
| now'; I don't want to suffer a bug while waiting for a
| BIOS patch if there's another issue like that.
| chx wrote:
| Well, there are features missing.
|
| Given how every monitor in existence is wide , it's super
| odd you can't drag the taskbar to the side, it's bottom
| only. https://www.windowscentral.com/microsoft-explains-
| why-you-ca...
|
| The Win 11 context menu is just irritating, it displays a
| lot of unnecessary things and the "real" context menu is
| hidden under "show more options"
|
| You can see much more at
| https://github.com/valinet/ExplorerPatcher/ -- and this
| project fixes them, too.
| odo1242 wrote:
| They stopped supporting this in 2017. Before this, you could do
| this without any hacks, just a chrome extension called Arc
| Welder made by Google.
___________________________________________________________________
(page generated 2023-02-05 23:01 UTC)