92lleo / WhatsappWebToGo

[android] WhatsApp Web client for your phone/tablet with media support
https://f-droid.org/packages/io.kuenzler.whatsappwebtogo
MIT License
270 stars 43 forks source link

Usage without having the app installed on a phone #25

Open T-vK opened 4 years ago

T-vK commented 4 years ago

I realize this is not a trivial feature request, but it would be cool if you could use this app without having whatsapp installed on any phone. For example by having whatsapp run inside of an emulator on a server. Then we'd just have to send the QR code to that server and pass it to whatsapp through a fake camera interface. Monkeyrunner could help opening the menu in Whatsapp.

WPFilmmaker commented 4 years ago

+1, anbox project is very promising, and this https://github.com/fython-tools/DocUIProxy-Android albeit abandoned might be useful

92lleo commented 4 years ago

Hi guys, before doing anything with the app (only thing would be extracting the qr code), the "fake" whatsapp instance has to be set up. I think this is out of scope of the application. If something like this does exist and has a proper api, we can look into extracting the qr code to that api. Best, Leo

WPFilmmaker commented 3 years ago

@92lleo did you hear of this? soon whatsapp web should allow user to use whatsapp without a phone being connected to the internet so maybe we are moving towards the solution to this ticket? :)

https://wabetainfo.com/whatsapp-messenger-beta-for-ios-2-21-60-11-whats-new/

davralin commented 3 years ago

Just stumbled upon this project, and saw this issue.

If anyone is interessted, this might serve as a good starting point for running whatsapp "off" your phone.

https://docs.mau.fi/bridges/go/whatsapp/android-vm-setup.html

raffaem commented 2 years ago

Just stumbled upon this project, and saw this issue.

If anyone is interessted, this might serve as a good starting point for running whatsapp "off" your phone.

https://docs.mau.fi/bridges/go/whatsapp/android-vm-setup.html

I did it thanks to your suggestion. I am so happy right now! :)

The instructions in the link are a bit out of date.

Here how you can have WhatsApp on your PC:

  1. Download Android Studio
  2. Uncompress it, run android-studio/bin/studio.sh
  3. Install using default options. It will install the Android SDK as well
  4. Open it and create a virtual phone in Tools->Device Manager. In the "Virtual" tab, click on "Create Device". Choose a phone model, and an Android version. It will download the Android OS to install in the phone
  5. After installation, find out the ID of the virtual phone with
    ~/Android/Sdk/emulator/emulator -list-avds
  6. Run the virtual phone with:
    ~/Android/Sdk/emulator/emulator -no-boot-anim -avd MYID
  7. Download the WhatsApp APK from the WhatsApp website, and drag the APK over the Phone window to install it
  8. Open WhatsApp and register it, having the confirmation SMS send over to your phone
  9. [OPTIONAL] Install Watomatic to tell your contacts you are switching to Signal :)
  10. [OPTIONAL] If you want to have WhatsApp on your phone with WhatsappWebToGo, then install WhatsappWebToGo in your phone, open it and it will show a QR code to scan. Close your previous instance of the virtual phone you have opened. Re-open it with webcam support using:
    ~/Android/Sdk/emulator/emulator -no-boot-anim -camera-back webcam0 -avd VIRTUAL_PHONE_ID

    if it doesn't open, try to run:

    rm  /home/raffaele/.android/avd/VIRTUAL_PHONE_ID.avd/*.lock

    and try again. Now just have the WhatsApp on your virtual phone scan the QR code on your real phone. Done!

To run the virtual phone in headless mode, I have tried with:

~/Android/Sdk/emulator/emulator -no-boot-anim -no-audio -no-window -avd VIRTUAL_PHONE_ID

as suggested in the link, but it crashes :( I have opened a bug report to Google.

T-vK commented 2 years ago

I've been able to run Android including WhatsApp using Docker in the past which is headless by default. I don't know which Docker image I used though and it's been at least 2 years.