ANdroid - Run APK file after edited using apktool

2020-08-13 08:05发布

问题:

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]

回答1:

you should sign to apk before install.

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

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



回答2:

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.