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

Error message from signapk.jar #4

Open
ChunghaSung opened this issue Jul 29, 2019 · 3 comments
Open

Error message from signapk.jar #4

ChunghaSung opened this issue Jul 29, 2019 · 3 comments

Comments

@ChunghaSung
Copy link

Hi,

when I tried to sign the apk after instrumentation, it shows this error when I ran this command:
java -jar signapk.jar testkey.x509.pem testkey.pk8 sootOutput/ex1-1.apk ex1-1_signed.apk

Exception in thread "main" java.lang.NoClassDefFoundError: sun/misc/BASE64Encoder
at com.android.signapk.SignApk.addDigestsToManifest(SignApk.java:169)
at com.android.signapk.SignApk.main(SignApk.java:325)
Caused by: java.lang.ClassNotFoundException: sun.misc.BASE64Encoder
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 2 more

I couldn't find any source code for this jar so it is hard to figure out the problem.
Can I just sign the app in my own way? such as using jarsigner provided by bash command?
I am not sure if this affects the result.

@ChunghaSung ChunghaSung changed the title Error message from sinapk.jar Error message from signapk.jar Jul 29, 2019
@archer29m
Copy link
Member

First of all, yes you can sign the app using any approach. Just make sure that sometimes you need to delete the META-INF file inside the instrumented apk file before signing the app.
The above command should also work. There is no specific dependency for the signapk.jar file to cause missing things. The error that you are getting is because of your java version I guess (might be 9 or 10) that is why I think it cannot find BASE64Encoder class. Please use Java 8 for all experiments (that's the java version that we used because at that time soot was only working with java 8).

@NavinShankar
Copy link

Hi,
Back to the same topic again, I'm facing the same issue with Java version 15.0.1.
is there any other option to resolve this concern

@virogu
Copy link

virogu commented Apr 24, 2022

Is there any other option to resolve this concern,my project and gradle all require jdk11+, but the "sinapk.jar" require jdk1.8, how should I do? Is there a newer version of "sinapk.jar" compatible with this error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants