-
Notifications
You must be signed in to change notification settings - Fork 396
Patching
This page is for information related to how QuestPatcher patches APKs.
QuestPatcher can patch il2cpp unity Android applications that use 2018.x or 2019.x unity.
However, QP only supports arm64-v8a
and armeabi-v7a
apps.
Since the Oculus Store (now) requires apps to be 64 bit, QuestPatcher can patch any Unity app on the Quest.
Unity Android Mono is only armeabi-v7a
so all new Quest apps use il2cpp.
Some older apps may use Mono, and QuestPatcher is not able to patch these.
When QuestPatcher starts the APK is pulled from the quest to check if it is modded.
Once the user presses Patch my App!
the below happens:
- Decompile the APK using apktool.
- Replace
lib/arm64-v8a/libmain.so
(orlib/armeabi-v7a/libmain.so
) with eitherlibmain64.so
if v8a, orlibmain32.so
if v7a. These files are from the latest QuestLoader Release. - Add
libmodloader64.so
tolib/arm64-v8a/
orlibmodloader32.so
tolib/armeabi-v7a
. Make sure to rename it to justlibmodloader.so
. - Scan the unstripped unity repository for an unstripped libunity.so for the version of the app. If one is available, copy it to
lib/arm64-v8a/libunity.so
(orlib/armeabi-v7a/libunity.so
). - Add the following permissions to the
AndroidManifest.xml
:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
If you want hand tracking, add:
<uses-permission android:name="oculus.permission.handtracking"/>
<uses-permission android:name="com.oculus.permission.HAND_TRACKING"/>
<uses-feature android:name="oculus.software.handtracking" android:required="false"/>
- In the
<application
tag of the manifest, addandroid:requestLegacyExternalStorage = "true"
(andandroid:debuggable = "true"
if you want debugging support). - Save the manfiest.
- Recompile the APK using apktool.
- Sign the APK using uber-apk-signer.
The unpatched APK is then uninstalled and the patched APK installed.