-
Download and setup Java 11+, put this jar of APKEditor and this jar of Uber APK Signer somewhere on the same folder, then open the terminal/command prompt in that folder.
-
Decompile the RedAQ APK with this command:
java -jar APKEditor*.jar d -i REDAQ_FILENAME.apk -o redaq -
Find the smali file called
AppEntry.smaliunder the foldersredaq -> smali -> classes -> air -> salsicha -> redaq -
Open it with any text editor/code editor
-
Locate
.method private InvokeWrapperOnCreate()Vinside of the file and find the.end methodthat belongs to it (somewhere aroundinvoke-direct {p0, v0, v1}, Lair/salsicha/redaq/AppEntry;->InvokeMethod(Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;) -
Below the
.end methodpress Enter twice (create 2 newlines) and paste this code:
.method public checkPermissions()V
.locals 4
.prologue
const/4 v3, 0x1
.line 1
# check if the Android API > 23
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x17
if-ge v0, v1, :cond_a
# if Android API < 23, do nothing
return-void
.line 2
:cond_a
const-string v0, "android.permission.WRITE_EXTERNAL_STORAGE"
const-string v1, "android.permission.READ_EXTERNAL_STORAGE"
.line 3
# use checkSelfPermission method from the Activity class
invoke-virtual {p0, v0}, Lair/salsicha/redaq/AppEntry;->checkSelfPermission(Ljava/lang/String;)I
move-result v2
if-nez v2, :cond_1e
.line 4
invoke-virtual {p0, v1}, Lair/salsicha/redaq/AppEntry;->checkSelfPermission(Ljava/lang/String;)I
move-result v2
if-eqz v2, :cond_2d
.line 5
:cond_1e
const/4 v2, 0x2
new-array v2, v2, [Ljava/lang/String;
.line 6
const/4 v3, 0x0
aput-object v0, v2, v3
.line 7
const/4 v3, 0x1
aput-object v1, v2, v3
.line 8
const/16 v0, 0x64
.line 9
# use requestPermissions method from the Activity class
invoke-virtual {p0, v2, v0}, Lair/salsicha/redaq/AppEntry;->requestPermissions([Ljava/lang/String;I)V
.line 10
:cond_2d
return-void
.end method
- Then, right below
invoke-direct {p0, v0, v1}, Lair/salsicha/redaq/AppEntry;->InvokeMethod(Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;, select this entire codeblock and copypaste it:
.line 389
:goto_44
invoke-virtual {p0}, Lair/salsicha/redaq/AppEntry;->checkPermissions()V
7a (optional). To allow screen recorders to capture the audio of the game, add android:allowAudioPlaybackCapture="true" with 1 space on the right side android:label="@string/app_name" under redaq -> AndroidManifest.xml.
7b. Create a signing certificate for the APK, you can change these values to whatever you want:
keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "cn=Android Debug,o=Android,C=US"
-
Afterwards, build the edited APK with:
java -jar APKEditor*.jar b -i redaq. The built APK should have a name likeredaq_out.apk. -
Finally, sign the APK file with the created keystore:
java -jar uber*.jar -a redaq_out.apk --ks debug.keystore --ksAlias "androiddebugkey" --ksKeyPass "android" --ksPass "android", uninstall the original app and install the newly patched APK, its filename should end with-aligned.apk. Everything should be working now, the game would now ask you for file permissions at startup and you can now load bot files in Android 11+ normally. (Just be sure to select the file or else you will disconnect)