Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Apk Signer in the cli is broken - Error initialising store of key store #53

Closed
akshay-sha opened this issue Jun 22, 2022 · 13 comments
Closed

Comments

@akshay-sha
Copy link

akshay-sha commented Jun 22, 2022

OUTPUT :

java -jar revanced-cli-1.7.0-all.jar -a YouTube_v17.23.35_Original.apk -c -d emulator-5554 -o revanced_yt.apk -b revanced-patches-1.9.1.jar


[added] amoled
[added] minimized-playback
[added] disable-create-button
[added] premium-heading
[added] custom-branding
[added] disable-shorts-button
[added] disable-fullscreen-panels
[added] old-quality-layout
[added] hide-cast-button
[added] microg-support
[added] general-ads
[added] video-ads
[added] seekbar-tapping
[skipped] upgrade-button-remover: Incompatible package.
[skipped] tasteBuilder-remover: Incompatible package.
[skipped] background-play: Incompatible package.
[skipped] exclusive-audio-playback: Incompatible package.
[skipped] codecs-unlock: Incompatible package.
[success] amoled
[success] minimized-playback
[error] disable-create-button:
app.revanced.patcher.patch.implementation.misc.PatchResultError: disable-create-button depends on integrations but the following error was raised: Integrations have not been merged yet. This patch can not succeed without the integrations.
	at app.revanced.patcher.Patcher.applyPatch(Patcher.kt:242)
	at app.revanced.patcher.Patcher.applyPatches(Patcher.kt:282)
	at app.revanced.patcher.Patcher.applyPatches$default(Patcher.kt:275)
	at app.revanced.utils.patcher.PatcherKt.applyPatchesVerbose(Patcher.kt:58)
	at app.revanced.cli.patcher.Patcher.start$revanced_cli(Patcher.kt:20)
	at app.revanced.cli.command.MainCommand.run(MainCommand.kt:106)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
	at picocli.CommandLine.access$1300(CommandLine.java:145)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
	at picocli.CommandLine.execute(CommandLine.java:2078)
	at app.revanced.cli.main.MainKt.main(Main.kt:7)
[success] premium-heading
[success] custom-branding
[success] disable-shorts-button
[success] disable-fullscreen-panels
[success] old-quality-layout
[success] hide-cast-button
[success] microg-support
[success] general-ads
[success] video-ads
[success] seekbar-tapping
[aligning & signing]
org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi$BCKeyStoreException: java.io.IOException: Error initialising store of key store: java.lang.SecurityException: JCE cannot authenticate the provider BC
	at org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi.engineSetKeyEntry(Unknown Source)
	at java.base/java.security.KeyStore.setKeyEntry(KeyStore.java:1167)
	at app.revanced.utils.signing.Signer.newKeystore(Signer.kt:27)
	at app.revanced.utils.signing.Signer.signApk(Signer.kt:56)
	at app.revanced.cli.signing.Signing.start(Signing.kt:19)
	at app.revanced.cli.command.MainCommand.run(MainCommand.kt:111)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
	at picocli.CommandLine.access$1300(CommandLine.java:145)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
	at picocli.CommandLine.execute(CommandLine.java:2078)
	at app.revanced.cli.main.MainKt.main(Main.kt:7)
Caused by: java.io.IOException: Error initialising store of key store: java.lang.SecurityException: JCE cannot authenticate the provider BC
	at org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi.makePBECipher(Unknown Source)
	at org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi$StoreEntry.<init>(Unknown Source)
	... 15 more```
@Hafiz-SE
Copy link

facing the same issue here

@akshay-sha
Copy link
Author

akshay-sha commented Jun 22, 2022

Workaround for now

**Use Uber Apk Signer - Github Repo Link to sign the generated apk.

Guide

  • Generate the revanced Apk using revanced-cli
    java -jar revanced-cli-1.7.0-all.jar -a YouTube_v17.23.35_Original.apk -c -d emulator-5554 -o revanced_yt.apk -b revanced-patches-1.9.1.jar -m integration.apk

  • Create your own release key using keytool
    keytool -genkey -v -keystore my-release-key.keystore -alias aliasname -keyalg RSA -keysize 2048 -validity 10000

  • Sign the generated APK with the above create release-key using Uber Apk Signer
    java -jar uber-apk-signer-1.2.1.jar -a revanced_yt.apk --ks my-release-key.keystore --ksAlias aliasname

@akshay-sha akshay-sha changed the title The ApK Signer in the cli is broken - The ApK Signer in the cli is broken - Error initialising store of key store Jun 22, 2022
@akshay-sha akshay-sha changed the title The ApK Signer in the cli is broken - Error initialising store of key store The Apk Signer in the cli is broken - Error initialising store of key store Jun 22, 2022
@Hafiz-SE
Copy link

Hafiz-SE commented Jun 22, 2022

Workaround for now

**Use Uber Apk Signer - Github Repo Link to sign the generated apk.

Guide

  • Generate the revanced Apk using revanced-cli
    java -jar revanced-cli-1.7.0-all.jar -a YouTube_v17.23.35_Original.apk -c -d emulator-5554 -o revanced_yt.apk -b revanced-patches-1.9.1.jar -m integration.apk
  • Create your own release key using keytool
    keytool -genkey -v -keystore my-release-key.keystore -alias aliasname -keyalg RSA -keysize 2048 -validity 10000
  • Sign the generated APK with the above create release-key using Uber Apk Signer
    java -jar uber-apk-signer-1.2.1.jar -a revanced_yt.apk --ks my-release-key.keystore --ksAlias aliasname

file not found integration.apk

@akshay-sha
Copy link
Author

akshay-sha commented Jun 22, 2022

Download (ReVanced Integrations) and put in the same folder.

@akshay-sha
Copy link
Author

Download (ReVanced Integrations) and put in the same folder.

Also rename as you require.

@Hafiz-SE
Copy link

Worked! Thanks

@TheJeterLP
Copy link
Contributor

You have to use Zulu JDK as said in instructions. This error happens when you're not using it.

@DaTigerYT
Copy link

Workaround for now

...

Aligned and signed, but "App not installed as parcel conflicts with an existing package". Also, it attempts to update the app rather than create a new one, I thought non-root devices were supposed to create a new application instead?

@TheJeterLP
Copy link
Contributor

Workaround for now

...

Aligned and signed, but "App not installed as parcel conflicts with an existing package". Also, it attempts to update the app rather than create a new one, I thought non-root devices were supposed to create a new application instead?

They are, do you have a previous version of revanced installed?

@DaTigerYT
Copy link

Workaround for now

...

Aligned and signed, but "App not installed as parcel conflicts with an existing package". Also, it attempts to update the app rather than create a new one, I thought non-root devices were supposed to create a new application instead?

They are, do you have a previous version of revanced installed?

Not of ReVanced but of YouTube (of course, pre-installed / can't uninstall). I do also have regular YouTube Vanced installed.

@DaTigerYT
Copy link

DaTigerYT commented Jun 22, 2022

You have to use Zulu JDK as said in instructions. This error happens when you're not using it.

Tried again with Zulu installed and received same error.

image
image

I didn't restart the device or even close & re-open cmd prompt (I didn't have to for the apk signer or when I installed ADB SDK), so those could be reasons why there were no change... (I would try again with those changes but I'm an hour late for work)

@TheJeterLP
Copy link
Contributor

TheJeterLP commented Jun 22, 2022 via email

@oSumAtrIX
Copy link
Member

This is the wrong place for support

@ReVanced ReVanced locked as off-topic and limited conversation to collaborators Jun 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants