MarcoG3 / WhatsDump

Extract WhatsApp private key from any non-rooted Android device (Android 7+ supported)
https://plainsec.org
GNU Lesser General Public License v3.0
268 stars 58 forks source link

Failed to install Android SDK #35

Open Tomme61 opened 4 years ago

Tomme61 commented 4 years ago

I tried to run the windows exe and it fails to install Android SDK. When updating SDK from manager, the following exception occurs: [INFO] SDK tools directory already exists, skipping download & extraction... [INFO] Updating SDK from manager... Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema at com.android.repository.api.SchemaModule$SchemaModuleVersion.(SchemaModule.java:156) at com.android.repository.api.SchemaModule.(SchemaModule.java:75) at com.android.sdklib.repository.AndroidSdkHandler.(AndroidSdkHandler.java:81) at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73) at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema 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) ... 5 more [ERROR] Could not update SDK Manager [ERROR] Failed to install Android SDK

Could somebody help me how to resolve this issue, please?

Thanks a lot in advance!

Kohado commented 4 years ago

Hi man! Do you tried install and actualize your java on system before? It worked here after that.

As I understand it the SDK can only be installed after java is "ok" on the system.

Tomme61 commented 4 years ago

Hi, Thank you very much for your quick answer. I checked the Java versions and I had an older version of jdk. After updating I now have Java 8, update 231, build 1.8.0_231-b11 and jdk-13.0.1 Unfortunately, there is still the same problem, just a few numbers changed (see below).

Do you have any other idea?

Thanks again in advance.

[INFO] SDK tools directory already exists, skipping download & extraction... [INFO] Updating SDK from manager... Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema at com.android.repository.api.SchemaModule$SchemaModuleVersion.(SchemaModule.java:156) at com.android.repository.api.SchemaModule.(SchemaModule.java:75) at com.android.sdklib.repository.AndroidSdkHandler.(AndroidSdkHandler.java:81) at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73) at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 5 more [ERROR] Could not update SDK Manager [ERROR] Failed to install Android SDK

Kohado commented 4 years ago

If memory fails, mine is version 234 (I think) But it is important to check if you install a new version of java, you set java_home to a new version.

If not, at some point, the fetch script or java fetch a previous version from the previous directory.

I don't know much about java. But no script is not finding one of the necessary settings.

Attempts to verify that the directory is updated to the version. (In your case 231) Check if everything is ok. And remember to perform installation and changes as root

It seems to me that something is missing from your java.

Tomme61 commented 4 years ago

I tried again on a different computer with Windows 7 Professional (64 bit), but with the same result. I agree with you that it seems that something is missing in Java. I have no experience with Java at all, so maybe I made a mistake: I installed Java SE (64 bit version) and Java JDK. On the Windows 7 computer I have both installations in the folder C:\Program Files\Java. I set the JAVA_HOME variable to C:\Program Files\Java\jdk-13.0.1 is this correct?

Thanks for any comment, which could help to solve this issue.

One more question: I have Eset antivirus running. Might this be a problem?

Kohado commented 4 years ago

I believe the antivirus does not disturb in this case. Well, I ran the script and all the installation on linux system. I didn't get to test it on windows. Linux installation can be a bit more complicated for those without familiarity, a few hours or minutes in front of the PC can help without much difficulty.

From what I understand from your comment, everything seems ok. The script runs in Python 2.7. It would be interesting to check if when you are running the script is failing to run on some other version of python. 3.x or something like that.

Remember to run on python 2.7, on linux, the command is also used on root user. Try to open the powershell script to see if anything can solve it. Remembering that I'm not an expert on the subject either. Just someone also seeking knowledge, but as far as I can help, I'll be here.

Ps: Sorry for the delay, a lot of work this week.

Tomme61 commented 4 years ago

I'm sorry for the late reply, had a lot of work either. I found this thread on StackOverFlow in which they say that this error occurs with Java jdk versions higher then 9. The recommendation is to downgrade to V8. I installed Java jdk 8.231 and really this error didn't occur anymore. The android sdk started to install and shows several license agreements. After the last license it shows: Accept? (y/N): All SDK package licenses accepted

and here it stucks. After waiting several minutes nothing happend and I interrupted with Ctrl + Shift + C and then it shows me the following error message:

Traceback (most recent call last): File "C:\Python27\Scripts\whatsdump.py", line 244, in main() File "C:\Python27\Scripts\whatsdump.py", line 78, in main if not sdk.install(): File "C:\Python27\Scripts\src\android_sdk.py", line 59, in install s2 = self._run_cmd_sdkmanager("--list") File "C:\Python27\Scripts\src\android_sdk.py", line 216, in _run_cmd_sdkmanager return self._run_cmd(CommandType.TOOLS_BIN, 'sdkmanager', args, wait, input, show) File "C:\Python27\Scripts\src\android_sdk.py", line 245, in _run_cmd wait, input, show) File "C:\Python27\Scripts\src\android_sdk.py", line 267, in _run_raw_cmd proc.wait() File "C:\Python27\lib\subprocess.py", line 693, in wait _subprocess.INFINITE) KeyboardInterrupt

Do you have any idea, why it stucked? Thanks again for your comments and help in advance.

Kohado commented 4 years ago

If my memory fails, installing the SDK requires an Internet connection. It's worth a try again and see if your internet is ok. It seems to me that the SDK installation failed.