- Enable debugging usb in your phone and connect it to your computer via usb cable.
- Ensure your computer recognize your device: adb devices
- If not, start the server: adb start-server. Or restart: adb kill-server and then: adb start-server
- List all installed packages: adb shell pm list packages
- Find the package you want to download and copy the full package name. Example: com.example.app
- Get the apk path: adb shell pm path com.example.app
- Copy the result path and pull: adb pull /url/to/app/example.apk
- Done! Now you have the apk in your current working directory.
- Once you have decompiled apk, go to file AndroidManifest.xml
- Search for the tag <application> and put inside the attribute: android:debuggable="true"
- Done! Don't forget to save it.