Cannot recompile APK with APKtool

I decompiled the APK using APKTool 2.0 Beta 9 and then rebuilt everything without changing the sources. Then I rebuilt the APK using the following command:

java -jar apktool.jar build myfolder myapk.apk

But I can’t install the generated APK file on my phone. This tells me:

Application not installed.

Am I missing something? I didn’t even change the code.

+4
source share
2 answers

Your new recompiled apk is not signed and, according to the rules, you cannot install unsigned apk.

One good thing that I like is that you can sign the apk file yourself.

You will need to use "Keytool" to create your own certificate.

Here is the command:

keytool -genkey -v -keystore [nameofkeystore] -alias [your_keyalias] -keyalg RSA -keysize 2048 -validity [ ]

, .

, "jarsigner" apk.

jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore [ ] [ .apk ] [ ]

apk, .

EDIT - keytool jarsigner , PATH. "bin" jdk. //

+6

APK jarsigner:

$jarsigner -verbose -keystore my-release-key.keystore HelloWorld.apk alias_name

0

Source: https://habr.com/ru/post/1528880/


All Articles