Thanks, I tried the patched framework you sent me. adb appears as soon as the animation starts.
Buttons now work on down as they should.
However, I'm getting a lot of crashes from Media Storage, ksync and other apps. Even KOReader crashes with this patched framework. Will have to revert, unfortunately.
Related logs:
https://pastebin.com/raw/GuKPaFLm.
I guess it happens because you removed framework.jar\res\debian.mime.types and other resources from the jar.
UPDATE: I restored res and android folders in the framework.jar and now everything works. I only removed provider and telephony from android subdirectory.