Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save swablueme/7779bc359cbe73b5e494e143aee88fda to your computer and use it in GitHub Desktop.
Save swablueme/7779bc359cbe73b5e494e143aee88fda to your computer and use it in GitHub Desktop.
1. Download latest apktool version.
2. Create a folder anywhere in the PC and put all the apktool.jar in the folder
3. Open command prompt.
4. Navigate to the folder where you placed apktool.jar
5. For decompiling use the command "d". The "d" stands for decompile.
apktool<version>.jar d name-of-the-app.apk
6. After the app is correctly decompiled, a new folder will be created in the same folder where you placed your app. This contains all the xml's and smali files which can be edited for different mode's.
7. To recompile the app use the following command " B ". The "b" simply means recompile. The final modded app will be in the "dist" folder located inside the original app folder created by apktool.
apktool<version>.jar b name-of-the-app-folder
8. To check if the final mod has been applied correctly you may use d2j-dex2jar and jd-gui-1.6.6.jar to visualise the output.
//step a: this creates the dex2jar jar
d2j-dex2jar<version> modified.apk
//step b: download jd-gui-1.6.6.jar and drag the dexjar jar onto it which visualises the code you have changed in java
https://i.imgur.com/l10nfnC.png
Signing the apk
1. Download uber-apk-signer
2. java -jar uber-apk-signer.jar --apks modified.apk
3. paste your apk file on your phone and install it
@swablueme
Copy link
Author

swablueme commented Sep 29, 2022

https://github.com/ThePBone/revanced-patches/tree/spotify-disable-capture-restriction-patch
The two changes required for capture restriction lifting is:
in AndroidManifest.xml

  1. android:allowAudioPlaybackCapture="true"
    image

for the ALLOW_CAPTURE_BY_ALL (an int value of 1) from https://developer.android.com/reference/android/media/AudioAttributes#ALLOW_CAPTURE_BY_ALL
AudioAttributes.Builder
setAllowedCapturePolicy -> needs to be set to 1 for ALLOW_CAPTURE_BY_ALL
image

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