hacks: add a makefile and a README

This commit is contained in:
Mis012 2023-01-19 17:09:58 +01:00
parent 27f3d288dd
commit cdb62dcd83
2 changed files with 20 additions and 0 deletions

15
hacks/README.md Normal file
View file

@ -0,0 +1,15 @@
##### what's this?
This contains examples of overriding classes inside the apk that you are launching,
currently for the purposes of avoiding having to make stuff not crash that we don't even
care about. (ideally we would figure out why it crashes and make sure it doesn't do that,
but it's hard to motivate oneself to do that when the issue is with something that has no
place being part of the app to begin with)
##### how to apply the override?
Currently, the way to apply an override is to use the `Makefile` to compile `classes3.dex`,
and then to add this file to the `api-impl.jar`, making it part of bootclasspath.
If it's enough to have it be part of classpath, then adding support for specifying multiple
classpath entries would also solve this issue; otherwise a way to specify additional
bootclasspath entries would be needed.

5
hacks/ctr2/Makefile Normal file
View file

@ -0,0 +1,5 @@
all:
javac -source 7 -target 7 -cp ../../*/src/api-impl/hax.jar com/google/android/youtube/player/*.java
dx --dex --output=classes3.dex com/google/android/youtube/player/*.class
default:
all