YuvrajRaghuvanshiS / WhatsApp-Key-Database-Extractor

The most advanced and complete solution for extracting WhatsApp key/DB from package directory (/data/data/com.whatsapp) without root access.
MIT License
463 stars 59 forks source link

Better handling on non apt distros #50

Closed Leptopoda closed 3 years ago

Leptopoda commented 3 years ago

Installing dependencies... Hold on. Linux detected. Updating system. ./bin/linux_dependencies.sh: Zeile 21: apt-get: command not fount. Installing packages. ./bin/linux_dependencies.sh: line 28: apt-get: command not found. ./bin/linux_dependencies.sh: line 28: apt-get: command not found. ./bin/linux_dependencies.sh: line 28: apt-get: command not found. ./bin/linux_dependencies.sh: line 28: apt-get: command not found. ./bin/linux_dependencies.sh: line 28: apt-get: command not found. ./bin/linux_dependencies.sh: line 28: apt-get: command not found. ./bin/linux_dependencies.sh: line 28: apt-get: command not found. Done installing packages. Cheers. I understand that there is probably no need to add support for other package managers but finishing withDone installing packages. Cheers. is probably not the best choice xD

Also please add to the README that only apt is supported as of now

Thanks man for the great tool

YuvrajRaghuvanshiS commented 3 years ago

but finishing with Done installing packages. Cheers. is probably not the best choice xD

I don't have experience with bash scripting that's why it is linear and does not have checks and always ends with that.

I can quickly add support for your distro also, but you need to help me with some things.

  1. Your distro name : run in terminal $(uname) but this must have returned Linux that's why you received "Linux Detected"
  2. Your package manager (alternative to apt).
  3. Alternatives to following : adb curl grep tar openjdk-11-jdk p7zip-full scrcpy
Leptopoda commented 3 years ago

You could try something like this

if [ -f /etc/redhat-release ]; then redhat_install elif [ -f /etc/debian_version ]; then debian_install elif [ -f /etc/arch-release ]; then arch_install fi

Distro: Arch Package manager: Pacman Packages: android-tools, curl, grep, tar, jre11-openjdk-headless, p7zip (scrcpy is not in the official repo) And you should probably check for python aswell

the syntax would be something like sudo pacman -S android-tools curl grep tar jre11-openjdk-headless p7zip --noconfirm

tbh the installer doesn't need to cover all distros but better specifying the requirements in the readme would help (extreamly 7z as it is currently not mentioned)

YuvrajRaghuvanshiS commented 3 years ago

I wanted to make it as noob friendly as possible. That was the reason for automating the process of linux dependencies installation. In earlier stages it was mentioned in readme as you're saying.

But since there are so many distros and their PM, and variations in packages' names I should leave it like that and update readme itself as you're saying.

Leaving this open until readme is updated.