12

I have an APK file name : Splash.apk. First i decode it using apktool

apk d Splash.apk

Then i edit Manifest, XML. Finally I export project to APK file name : EditedSpash.apk.

apk b Splash

When i run EditedSpash.apk on emulator. I got error. Do you explain it for me ?

adb install EditedSplash.apk

Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
green.android
  • 731
  • 3
  • 7
  • 22

3 Answers3

31

you should sign to apk before install.

1)keytool -genkey -keystore (name).keystore -validity 10000 -alias (name) -keyalg rsa

2)answer some question (ex:name, company...

3)after make keystore file,you combine apk and ketstore

if these file are located same directory

jarsigner -keystore (name).keystore -verbose LunarLander.apk (name)

apk size increase 2kb+;

after this install apk to avd

binarytrails
  • 516
  • 4
  • 14
dmnlk
  • 2,995
  • 2
  • 25
  • 30
1

Need to sign your APK

First, gen a new keystore

keytool -genkey -v -keystore Key_Name.keystore -alias Alias_Name -keyalg RSA -keysize 2048 -validity 10000

Then, sign apk (after entering pw, it will not show anything for a while):

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore Key_Name.keystore My_APP/dist/My_APP.apk Alias_Name

Done. U can verify the signature by:

jarsigner -verify -verbose -certs My_APP/dist/My_APP.apk

Note that Keytool and Jarsigner are from Java Development Kit.

(Optional) Optimize the apk for better performance: zipalign -v 4 My_APP/dist/My_APP.apk My_APP-aligned.apk

Jacky Chan
  • 11
  • 1
-1

Please specify how are you generating the apk file becausw to generate the apk file we need to generate it using certifiate it may be debug certificate or the release certificate if the generated apk dont have any of them will through the error so generate the apk using eclipse it will automatically generate the apk file using debug certificate.

Piyush Agarwal
  • 25,608
  • 8
  • 98
  • 111