Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Failed install obfuscated apk. #167

Closed
cissusnar opened this issue Aug 10, 2023 · 4 comments
Closed

Failed install obfuscated apk. #167

cissusnar opened this issue Aug 10, 2023 · 4 comments
Labels
question Further information is requested

Comments

@cissusnar
Copy link

I use the following command being a test on my apk(apk is download from google play console and without obfuscat),
docker run --rm -it -u $(id -u):$(id -g) -v "${PWD}":"/workdir" obfuscapk -p -o Rebuild -o NewAlignment -o NewSignature my.apk

then install with :
adb install my_obfuscated.apk

it will failed with:
Performing Streamed Install adb: failed to install my_obfuscated.apk: Failure [INSTALL_FAILED_INVALID_APK: INSTALL_FAILED_INVALID_APK: Failed to extract native libraries, res=-2]

how can i fix this problem?

@cissusnar cissusnar added the question Further information is requested label Aug 10, 2023
@cissusnar cissusnar changed the title obfuscated apk install failed. Failed install obfuscated apk. Aug 10, 2023
@ClaudiuGeorgiu
Copy link
Owner

Hi, that command just rebuilds the apk without any obfuscation, since it already fails at this step maybe your app is using some protection against repackaging or there is some issue with apktool (the underlying tool used to decompile and rebuild the apk, maybe this issue is somehow related to the problem).

@cissusnar
Copy link
Author

Thanks for your reply : )
I build a custom docker image with the latest apktool(2.8.1), it still failed.
I'll try build a new apk.
thank you again : )

@cissusnar
Copy link
Author

Finally I successfully installed the apk, obfuscation and encryption were successful, but I manually used zipalign for 4kb alignment, and manually signed the apk with apksigner.

But the app can't run, prompting Unknown Source error, this is a typical Proguard error, I don't use Android's Proguard for obfuscate because it needs to manually set the rules, it is easy to cause Unknown Source and crash, so I hope find A tool that does not need to manually set rules and automatically obfuscate.

it seems that Obfuscapk still needs to manually specify exclusion rules, which is contrary to my original intention : (

But still thanks to your work : )

@ClaudiuGeorgiu
Copy link
Owner

Thank you for trying Obfuscapk and reporting your findings 👍🏻

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants