Skip to content

Instantly share code, notes, and snippets.

@kairusds
Last active August 2, 2025 18:33
Show Gist options
  • Save kairusds/a6b08d53be83e480c2f7c31cb6d6ed4c to your computer and use it in GitHub Desktop.
Save kairusds/a6b08d53be83e480c2f7c31cb6d6ed4c to your computer and use it in GitHub Desktop.
redaq apk file perms and screen recording audio patch in android 10-13
  1. 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.

  2. Decompile the RedAQ APK with this command: java -jar APKEditor*.jar d -i REDAQ_FILENAME.apk -o redaq

  3. Find the smali file called AppEntry.smali under the folders redaq -> smali -> classes -> air -> salsicha -> redaq

  4. Open it with any text editor/code editor

  5. Locate .method private InvokeWrapperOnCreate()V inside of the file and find the .end method that belongs to it (somewhere around invoke-direct {p0, v0, v1}, Lair/salsicha/redaq/AppEntry;->InvokeMethod(Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;)

  6. Below the .end method press 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
  1. 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"
  1. Afterwards, build the edited APK with: java -jar APKEditor*.jar b -i redaq. The built APK should have a name like redaq_out.apk.

  2. 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment