wa-avd-docker icon indicating copy to clipboard operation
wa-avd-docker copied to clipboard

Scan WhatsApp web barcodes remotely

Open Nottt opened this issue 5 years ago • 17 comments

This would be very great.

Do you have any ideas on how to implement this? I assume you'll use ffmpeg? I could try to look at this

Nottt avatar Nov 24 '19 06:11 Nottt

Hey @Nottt ! I'd be keen to pick this up again and see if you can help. It was a combination of ffmpeg and v4l2loopback (https://github.com/umlaeute/v4l2loopback) as far as I can remember. I'll try find the WIP script I had set up.

I'd like to stream a VNC feed via the v4l2loopback kernel module into the Android AVD... WIP. This would allow one to scan WhatsApp web barcodes remotely.

BenSchZA avatar Nov 25 '19 08:11 BenSchZA

Hey @Nottt ! I'd be keen to pick this up again and see if you can help. It was a combination of ffmpeg and v4l2loopback (https://github.com/umlaeute/v4l2loopback) as far as I can remember. I'll try find the WIP script I had set up.

I'd like to stream a VNC feed via the v4l2loopback kernel module into the Android AVD... WIP. This would allow one to scan WhatsApp web barcodes remotely.

Hi, was this ever working? I was keen to look at this as well

blackchineykh avatar Jun 23 '20 16:06 blackchineykh

Any luck so far? I really need a Whatsapp server, but currently I am stuck at this part:

image

Would be awesome if we can feed an image containing the QR code to the device camera feed.

Dark3clipse avatar Dec 16 '20 17:12 Dark3clipse

Any luck so far? I really need a Whatsapp server, but currently I am stuck at this part:

image

Would be awesome if we can feed an image containing the QR code to the device camera feed.

What are you using for the emulator? I was thinking if a remote stream could be sent to the back camera then this would be the solution

blackchineykh avatar Dec 17 '20 02:12 blackchineykh

I have a remote x86 server that runs docker. Launched an android image using docker-compose and connect to it using vnc. However, vnc input does not work so I used rulers (KRuler) and adb commands to provide input.

adb connect remote
adb shell input keyevent <key> # for typing
adb shell input tap <x> <y> # for touch events

Dark3clipse avatar Dec 17 '20 08:12 Dark3clipse

I will try tonight to use v4l2loopback to feed Whatsapp the QR code. Gonna follow this guide: https://stackoverflow.com/questions/6165618/how-to-mock-a-picture-in-android-emulator-camera#35526103

I will report whether it works, maybe make a pull request.

Dark3clipse avatar Dec 17 '20 13:12 Dark3clipse

used this but for android avd emulator: https://github.com/tulir/mautrix-whatsapp/wiki/Android-VM-Setup my plan is still to move whatsapp into a jail on a server, will try this docker image

xeniter avatar Dec 18 '20 19:12 xeniter

I coukd get it running, not with this docker container, but my guess is that this shoudl work

Used docker-android (https://github.com/budtmo/docker-android), Used akvcam (https://github.com/webcamoid/akvcam) and finallyu ffmpeg with some crazy stuff to get going ...

Did some crazy work over the week, that includes multiple tries with android-x86 . Mainly since i wanted to get this running as a VM and running emulator on nested virtualization is not supported. Realized all the futille efforts were in vain, since android-x86 supports only uvccam,

Rolled back to a physical machine and ran docker-android with novnc . This is much better and finally could get the thing rolling ...

image

cosmo83 avatar Dec 20 '20 10:12 cosmo83

Thanks for the recent discussions, everyone. It's no secret this repo is a bit stale and needs a lot of community effort. Very open to accepting PRs. once the holiday season is over I'll be spending more time on this project. If there is a different method to get this working then we should go with that as the goal of this project is to get avd working in a docker container

smashah avatar Dec 20 '20 16:12 smashah

hi, created PR, don't know if you would like to have everything from it: https://github.com/open-wa/wa-avd-docker/pull/13 at least it was possible to scan qr code from browser in container, however you need the v4l2loopback loaded already on host (modprobe v4l2loopback)

xeniter avatar Dec 20 '20 16:12 xeniter

@cosmo83 hello, can you please reach me? i have paid job about it, can you install same thing on my computer? [email protected]

0xhex avatar Dec 27 '20 21:12 0xhex

Thanks for the recent discussions, everyone. It's no secret this repo is a bit stale and needs a lot of community effort. Very open to accepting PRs. once the holiday season is over I'll be spending more time on this project. If there is a different method to get this working then we should go with that as the goal of this project is to get avd working in a docker container

Winter is over now :D There is some news on better method ?

laruche avatar Mar 09 '21 16:03 laruche

Yes tell your friends using signal and get rid of the data stealing messenger.

if they are still ignorant here is my PR: https://github.com/open-wa/wa-avd-docker/pulls you have to "modprobe v4l2loopback" on the host to get video running after that start android with camera support /app/start-avd-with-cam.sh and scan the QR from desktop opened in the browser for example

xeniter avatar Mar 09 '21 20:03 xeniter

I've already use your pr :) and its work like a charm But i would like to use it on cloud :) and my ovh server doesn't have usb port :D So @cosmo83 solution look like intersting :D

About Signal.... In Morocco is really complicated because whatsapp is our SMS :/ And people use it since Whatsapp beginning, they don't care about there data I work with Local Artisan, mostly illiterate So install new app, no way :D

laruche avatar Mar 09 '21 21:03 laruche

I made it!!!! using l4l2loopback =)

Screenshot at 2021-07-16 11-52-13

mzalazar avatar Jul 16 '21 14:07 mzalazar

I made it!!!! using l4l2loopback =)

Screenshot at 2021-07-16 11-52-13

Thats awesome news! Can you send how were you able to achieve this? I need to do the same

blackchineykh avatar Jul 16 '21 15:07 blackchineykh

I used some "crazy stuff" (using ffmpeg) like cosmo83 said... the TRICKY part is to generate the qr image, I'm using @open-wa/wa-automate and everytime I launch the program (logged out of course) it generates a QR code, I save that code into a image png and I send that image to my v4l2loopback device. Please excuse my english... only basic =)

mzalazar avatar Jul 17 '21 07:07 mzalazar