eloff66
The file I modify is called libhwui/PaintImpl.cpp which is part of the Android graphics stack. Here is a link to the file in the Android source code:
https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android10-release/libs/hwui/hwui/PaintImpl.cpp
you can view my modified version on my Github here:
https://github.com/georger45/Android/blob/main/HWUI-PaintImpl-AADisabled.cpp
the changes I made are on lines 97-100 and 168-173
You can't modify the files in the Android system installed on your phone, not least because they are all compiled files (the human readable source code has been turned into machine code that cannot be read or edited by humans) so you have to download the source code to a linux pc (all Android development is done on linux), modify it as required, compile it, and then install the compiled file(s) on the Android phone in place of the originals. In practice you can't even do that because the system partition (which contains all the system files) is locked down and cannot be modifed. Which is where Magisk comes in. This software makes it possible to replace system files at boot time so when you boot up your phone Magisk loads into RAM your modified system file(s) rather than the original one(s) installed in the system partition. This is the 'systemless' root solution, so called because it doesn't modify the system partition. Here is an outline of the procedure:
- Create Android development environment in a linux VM in Virtualbox (if using Windows)
- Download the Android source code (30GB+)
- Make the necessary source code changes
- Compile the source code (using the Android tools that came with it)
- Create a Magisk module containing the desired compiled file(s)
- Unlock the phone's bootloader
- Install Magisk on the phone
- Use the Magisk app to install the Magisk module from step 5 and reboot
You will need a powerful PC with a lot of RAM (at least 16GB, probably more) to compile the source code and there are a lot of complicated and important details to each step.
Alternatively you could just download and install my Magisk module, if you don't mind installing 'unkown' software in your phone. (I know it's perfectly safe because I made it but you obviously don't know that!)
Those changes will disable AA in the Android system and most (but not all) apps but NOT in Android browsers. For reasons I am not aware of, all Android browsers use their own internal text rendering software (separate from the Android system software) to render website text (but not the browser UI text, strangely that's rendered by the system) so website text will continue to be antialiased even after all the above unless AA is turned off inside the browser itself. Only Firefox (Beta and Nightly versions only) plus various forks of Firefox allow this. To proceed:
type 'about:config' (without the quotes) into the Firefox address bar and in the search box that appears, enter:
gfx.text.disable-aa
that entry will then appear below, toggle the setting from false to true and close and re-open firefox
I'm happy to answer any questions you might have about any of that (!).
Also, you said in your post that you could solve all your problems disabling edge and font smoothing on Windows 11. Did you disable it everywhere? I never could get rid of it in the Windows settings app and the other modern windows 10 areas.