Shamna Sama
Shamna Sama

Reputation: 49

APK Compatibility Issue on Other Devices - Works Only on My Phone

Description: I have created and signed an APK using Termux, and it runs perfectly on my Xiaomi Note 11 Pro with Android 13. However, when I try to install it on other devices, I receive an "app not compatible" error. I have verified the APK is signed and have tried multiple methods to troubleshoot, but the issue persists.

Steps to Reproduce:

  1. Create the APK using msfvenom payload creation tool.
  2. Sign the APK using Termux with the following steps:
    keytool -genkey -v -keystore /data/data/com.termux/files/home/my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias new-key-alias
    apksigner sign --ks /data/data/com.termux/files/home/my-release-key.jks --ks-key-alias new-key-alias --ks-pass pass:your_keystore_password --key-pass pass:your_key_password --v1-signing-enabled true --v2-signing-enabled true --v3-signing-enabled true --out ./as2-signed.apk ./as2-rebuilt.apk
    
  3. Try to install the signed APK on another device with Android 13 or another version.

Expected Behavior: The APK should install and run on any compatible Android device.

Actual Behavior: The APK installs and runs only on my Xiaomi Note 11 Pro but fails with a compatibility error on other devices.

APK Details:

Troubleshooting Steps Taken:

  1. Verified APK signing using apksigner verify --verbose as2.apk.
  2. Checked the APK with aapt dump badging ./as2-signed.apk but received "assets could not be loaded" error.
  3. Attempted multiple signing methods and re-checked compatibility settings.

**Device Details:**
- **Device 1 (Works):**
  - Model: Xiaomi Note 11 Pro
  - Android Version: 13 TP1A.220624.014

- **Device 2 (Fails):**
  - Model: Redmi 12c
  - Android Version: 14UP1A.231005.007

**Questions:**
1. Are there any specific compatibility settings or configurations I might be missing?
2. Could the issue be related to specific permissions or features declared in the manifest?
3. Is there a better way to sign the APK to ensure broader compatibility?

Any help or suggestions would be greatly appreciated! Thank you!

Upvotes: 0

Views: 90

Answers (0)

Related Questions