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

Scan WhatsApp web barcodes remotely #4

Open
Nottt opened this issue Nov 24, 2019 · 17 comments
Open

Scan WhatsApp web barcodes remotely #4

Nottt opened this issue Nov 24, 2019 · 17 comments

Comments

@Nottt
Copy link

Nottt commented Nov 24, 2019

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

@BenSchZA
Copy link
Member

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.

@blackchineykh
Copy link

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

@Dark3clipse
Copy link

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.

@blackchineykh
Copy link

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

@Dark3clipse
Copy link

Dark3clipse commented Dec 17, 2020

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
Copy link

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.

@xeniter
Copy link
Contributor

xeniter commented Dec 18, 2020

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

@cosmo83
Copy link

cosmo83 commented Dec 20, 2020

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

@smashah
Copy link
Member

smashah commented Dec 20, 2020

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

@xeniter
Copy link
Contributor

xeniter commented Dec 20, 2020

hi, created PR, don't know if you would like to have everything from it:
#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)

@0xhex
Copy link

0xhex commented Dec 27, 2020

@cosmo83 hello, can you please reach me?
i have paid job about it, can you install same thing on my computer?
efekanpulatli@gmail.com

@laruche
Copy link

laruche commented Mar 9, 2021

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 ?

@xeniter
Copy link
Contributor

xeniter commented Mar 9, 2021

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

@laruche
Copy link

laruche commented Mar 9, 2021

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

@mzalazar
Copy link

I made it!!!! using l4l2loopback =)

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

@blackchineykh
Copy link

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

@mzalazar
Copy link

mzalazar commented Jul 17, 2021

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 =)

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

10 participants