Git Product home page Git Product logo

Comments (3)

valinet avatar valinet commented on July 3, 2024

As it currently stands, no, it won't. This patches bytes in the file. Those bytes represent instructions for the specific architecture the file is intended to run on. I have implemented the patch for amd64, because that's what I use and that's what I had access to regarding disassembly tools. Since amd64 and ARM64 instruction sets are completely different, a completely different patch has to be developed for AMD64. This is the only if not the one of the few methods for such a patch, since this part of the OS is completely closed source, so one can't compile their own version.

The principle of this patch probably applies to the ARM64 version of Windows as well, but the actual content has to be different, according to the particular architecture. If we look at uDWM.dll from ARM64 Windows 11, and identify the CTopLevelWindow::GetEffectiveCornerStyle function in there as well based on the symbols, what has to be changed is the actual bytes that we write. I don't know exactly with that at the moment, I know much less ARM assembly than x86, but basically make that function return 0 (on amd64, it's a simple mov rax, 0; ret, or xor rax, rax; ret). That should be it. The rest of the program should be left intact, even not bothering to compile it as native ARM64, as ARM64 Windows emulates amd64 and you run it one time only and it does very few things, so how slow or battery consuming can it be...

Also, I can't test this at all, since I do not have an ARM64 machine.

Patching manually is an option as well. Find the address of CTopLevelWindow::GetEffectiveCornerStyle and write corresponding bytes there to achieve what I said above. You can use PDBDownloader to download the symbol file for uDWM.dll manually, and then pdbdump to search for GetEffectiveCornerStyle in it, as described here: valinet/ExplorerPatcher#183. Substract the base address from that (usually 0x400000, but idk exactly on amd64) and then, in some hex editor, go there and change the bytes to do the equivalent in ARM64 of amd64's mov rax, 0; ret and that should be it.

from win11disableroundedcorners.

Serentty avatar Serentty commented on July 3, 2024

Making that patch doesn’t seem too hard. I’ve done minor edits like this before. If I find the time I might try at some point.

from win11disableroundedcorners.

valinet avatar valinet commented on July 3, 2024

Yeah, indeed, it’s not that hard, please consider contributing back if you pull it off eventually. It’s hard for me to push something, beside having to research the assembly a bit, also I have absolutely nothing to test it on…

from win11disableroundedcorners.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.