Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install .apk after decoding and rebuild (Apktool, Apkstudio)

I decoded an apk file with apktool and I didn't change anything. After that I just build it again and then I tried to install the apk but i got the below error even after some basic change.

What I did using windows cmd:

apktool d somename.apk -o testfolder

then

apktool b testfolder

and:

adb install somename.apk
        pkg: /data/local/tmp/somename.apk
Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION]
rm failed for -f, No such file or directory

I did it with apkstudio and the result was the same.

$ adb install -r "somename.apk"
    pkg: /data/local/tmp/somename.apk
Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION]
rm failed for -f, No such file or directory
Process exited with code 0

Was it a system app? No.

Can someone help me about it?

like image 553
user3118109 Avatar asked Jan 30 '16 08:01

user3118109


1 Answers

I Know it was answered before but for more clarification , you can sign it by these commands.

First Generate the Key :

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

Second sign it :

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name

IF you Don't like to enter a password after previous command or do it in bash file, use this :

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore [Your Key Store] [Address/YourApk.apk] alias_name  -storepass [Your Password]
like image 198
malloc Avatar answered Oct 20 '22 00:10

malloc