QEMU + sdcard image = COOL
And yeh it finaly works ubercool.
After 3 hrs struggling around i made it work:
- core i5 with quemu (linux) and the .img file
pi@raspberrypi ~ $ ./whatsspy-public-startup ------------------------------------------------- (Re)starting WhatsSpy Public Check gitlab.maikel.pro for more info. ------------------------------------------------- [update] Checking for updates. Fetching origin HEAD is now at 4d9d9e7 Auto-update to last version [stop] Stopping any existing tracker session (may take a while). No screen session found. [rights] Setting rights. [start] Starting tracker session. pi@raspberrypi ~ $ cat /proc/cpuinfo processor : 0 model name : ARMv6-compatible processor rev 7 (v6l) BogoMIPS : 829.49 Features : swp half thumb fastmult vfp edsp java tls CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xb76 CPU revision : 7 Hardware : ARM-Versatile PB Revision : 0000 Serial : 0000000000000000 pi@raspberrypi ~ $
First impression it runs sligthly faster than on a native
pi b+ board
(700 Mhz clock).
If there is interest i will write a
HOWTO. Following the the steps together with a cup of coffee...
10 minutes max ... for setting all up :)
Assignee removedToggle commit list
👍please write HOWTO.
👍some people did not get this working, do you know what might went wrong?
Definitivei know why :) That's why i started writing the
Why not easy installing it on a debain / ubuntu system?
HOWTO - (Run Whatsspy Public in QEMU)
Many people have tried and failed to use the imagefile (which is to be used to boot in raspberry).
Purpose of this GUIDE is to modify virtually any bootable SD-CARD image for a Raspberry-Pi (Versions A/B/+/2)
and make the image-file (usually a .img) instantly usable for the QEMU-emulator.
imagefilehas to be edited only
once. After that it can be used and moved and copied back and forth within
any instanceof a tracker on
any platform. Consider the
You can start tracking on a
Windows machineand let the tracker run for
a while, gather informations, add more users, change/adapt/upgrade anything on the running image, then
shutdownthe emulator, and then move the
Linux Server(which will run qemu) and continue Tracking where you left off ...
You can even
continueanytime later on a real Raspberry Pi by reversing the 3 initial changes and just copying the
imagefileback to a suitable
SD-Card. Yeh that's cool. period.
Just follow the simple steps below and become a proud owner of a virtual Raspberry Pi.
Allthough this is mainly written initially for Linux, I have included a Windows Section below.
Usefull hints and stuff you will find in Tips Section and you may want to look at the User-Reports here #250 (closed) and here #244 (closed)
Make sure every instance of any tracker on any platform (raspberry or pc or emulation) runs with a
$whatsappAuth = ['number' => '31555xxxx'
Neverattempt to run multiple instances simultaneously on any platforms with the
SAMEphonenumber for the tracker.
It may work for like 2-3 minutes after that, the trackers will cancel each other out and the phonenumber might be
blockedtemporarily or worse permanently from WhatsApp.
Here comes the solution:
For running whatsspy public in qemu we need to modify 3 sections of the image.
- a kernel for arm-cpu
- imagefile (that what goes on the SD-Card)
- knowledge of how to connect qemu to your lan
If one of following commands does not work, then try sudo command instead :)
First off, you need a qemu environment. I’ll assume you have a basic qemu installation going, but if not, get started with
apt-get install qemu-system qemu-user-static binfmt-support
Next, you will need to download the latest "whatsspy public" release image. Make a directory to use, make a tmp directory in it and then grab the image.
Download/copy/unzip the latest imagefile (which was meant to be copied onto SD-Card) into the current folder.
Imagefile Download Link : https://docs.google.com/uc?id=0B_mlyJwD3c1TMkFwQXFMSUVlQ2s&export=download
You also need a kernel:
Mount the image into tmp and edit 3 sections/files.
From the output of the file command, take the partition 2 'startsector' value and multiply by 512, and use this figure as the offset value $.
mount raspbian-whatsspy-public-update-29-3-2015.img -o offset=62914560 ./tmp
Now we edit 3 sections in the mounted image
1.) To be able to log into the emulated pi
Comment out the line in the file (use a # as the first character of the line) and save the file (CTRL+X, then "Y" for yes).
#Comment out the libcofi_rpi object like this
2.) Now you need to create a new file and edit it.
(This is a new file!)
Add the following to your new file:
3.) We need to adjust one setting for postgres, because the emulated rpi has only 256 Mb RAM...
Find this section:
# RESOURCE USAGE (except WAL)
# - Memory -
shared_buffers = 32MB # min 128kB
Change 32MB to 16MB and save the file.
Now umount the imagefile from ./tmp
umount ./raspbian-whatsspy-public-update-29-3-2015.img ./tmp
- Now we are ready for the first boot!
To check if the edited files work, we start qemu.
(networking might maybe not yet be effective, we check that later :)
Also check if you have a DISPLAY environment variable set, if not try:
There are two ways of activating networking in qemu,
with and without helper scripts, i prefer without.
qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda raspbian-whatsspy-public-update-29-3-2015.img -net nic -net tap,ifname=tap0,script=no,downscript=no
Now watch and enjoy the boot sequence :)
Maybe the emulated rpi will complain about disk-errors, no problem.
Chances are, that qemu complains about soundcard issues ... (we dont care :)
Qemu might give you a root shell (in the boot-window), run:
$ e2fsck /dev/sda2
Ctrl-Dto continue booting
Login as pi
At this point, you should have a Raspberry-Pi emulation within your host computer.
Check out how fast it runs!
I will show 2 ways how to connect
1) The correct way:
I did some experimenting with
tapdevices, the easiest way (IMHO) is to setup a
tap0 deviceon the hostmachine and connect the qemu-rpi to it.
Short: you build a
ethernet deviceand a
tap deviceon the host.
Check this debian link, at the section Networking, is pretty straightforward.
2) If this all sounds too
chinezeto you try this:
(We will redirect the internet-port of the machine running qemu)
Just add to the commandline for qemu : `-redir tcp:8888::80` You will be able to access the tracker via `ip:8888/` from your browser. If the qemu and browser are on same machine, then simply type `localhost:8888` in your browser.
After verifing that QEMU-Rpi has a network connection, we need to setup the tracker:
If you do
the secret(of the phonenumber the tracker will run with) jump straight to point 4.) here
or try to get it with
wart. If you have
the secretthen move on point 5.) here
To exit the QEMU window and get your mouse back use CTRL+ALT or CTRL+TAB
You might be tempted to alter the "-m 256" to something more useful like "-m 1024"?
You can't, you'll just get a black screen of nothing. The physical memory map on versatile hardware does not allow more than 256MB of space for RAM and as we're using the versatile kernel we can't have more.
du -hcommand on the Raspberry shows us :
pi@raspberrypi ~ $ df -h Filesystem Size Used Avail Use% Mounted on rootfs 2.9G 2.6G 135M 96% /
Ouch! Only 135 Megabytes diskspace left on the device...
Hah! This is ok you think ? - Then wait how quick it will be gone.
logfileshere and and some
.debfiles there (from updating) and
Disk full error!! ... and now?
Here the solution : (we will simply enlarge the raspbian partition)
You can choose
anysize you want, the example is for more
If the actual size was 4 Gigabytes then you will end up with an image of 15 Gigabytes.
The following instructions have to be done only
It's very easy,
beforeyou start qemu, just
cdinto the folder where your
Then enter this:
qemu-img resize raspbian-whatsspy-public-update-29-3-2015.img +11G
qemu-img.execommand, with same parameters)
Next you fire up (win)-qemu as usual.
Log in as
sudo ln -snf mmcblk0p2 /dev/root
Select the first option :
raspi-configtool by clicking Finish.
sudo shutdown -r now
Tadaaa!!! From now on you have 15 Gigabytes more Diskspace.
Qemu is limited to a max resolution of 800×600. You can run the raspbian GUI in it fine, but who wants to at that resolution. To get round this you can just use remote desktop to give the full 1920×1080.
Install the xrdp-server as user pi on qemu-rpi emulation:
sudo apt-get install xrdp
This will install XRDP which allows you to use Remote desktop to remote into the qemu instance and get full monitor resolution.
To use it, run the Remote Desktop application on the
machine you sitting at:).
Enter the RPi IP address, username and password and connect. You'll get a full size grey screen followed by the raspbian GUI.
For remote desktop viewers i recommend
vinagreis cool :)
WARNINGThis is 3rd Party Software. I would to recommend a
Virus Checkbefore blindly using any Software.
I am not a win user but this site looks promising: (It seems to have everything you need)
- Go into folder
w64then scroll down to the end to get the newest installer:
The most essential .exe is
(for arm-cpu in combination with the
SD-Card imagefile(from the
HOWTOabove) and boot parameters).
Now you have to mount the
2nd partitionof the
SD-Cardimagefile and edit the 3 Sections as described above in the
If your windows has no support for the linux
extfsfilesystem then check this link:
The most tricky part will be the network connection from win-qemu to your lan/internet via your network-card on the windows pc.
Two ways how to do that :
1) I would suggest to search for
Set up a
tap deviceand bridge it with your
ether-card. Some users had good results.
You would have to add this to the
commandlinefor win-qemu :
-net nic -net tap,ifname=OpenVPN
2) If this all sounds too
chinezeto you try this:
(We will redirect the internet-port of the machine running qemu)
Just add to the commandline for win-qemu :
You will be able to access the tracker via
ip:8888/from your browser.
If the qemu and browser are on same machine, then simply type
localhost:8888in your browser.
wineemulator on linux. It runs at about the same speed as a real Raspberry Pi.
It works! Fascinating
"wine ./"if on windows and
do no forgetto add the networking options)
wine ./qemu-system-arm.exe -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda raspbian-whatsspy-public-update-29-3-2015.img
Good LUCK! ... and don't hesitate to contact me for help.
👍 👍Linked to this issue from the homepage, nice job!
Any help how to set up QEMU in Windows 8.1 ?
WINDOWSsection to the
DISKSPACEsection to the
HOWTO(Enlarge your filesystem)
NETWORKINGsection, added a 2nd and
easymethod to access the
Thank you so much for you helpful answer
Greets from Germany :D
lol ++49 rulz .. oranje suxxx :))))
👍For this general purpose
Not managing to configure QEMU for Windows, I set it up in my Ubuntu VM. After running the first boot (step 3) and logging in, i get this one:
Is it correct? I'm wondering why there's no user interface(the raspbian GUI).
Where do I have to add "-redir tcp:8888::80" (Networking, second way)?
P.S.: Sorry for my noob questions
Just after last param of the the
qemu -bla -bla - .... .. -your-imagefile.img -redir tcp:8888::80
Then you can access the tracker from the browser. (but before must configure the raspi, logo).
There is also a switch/param for what keyboard layout to use, i will look it up.
I see two logins, lol
Zwere changed :)
Yes, y and z happened to me at first, but i got the fault myself :)
That means, the raspbian GUI is not needed?
not for using the emulation as tracker. after setting up the tracker you can
iconifythe vm. you dont need anything from raspbian. you can config some things but is not important. Here this commandline is what you need:
qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda raspbian-whatsspy-public-update-29-3-2015.img -redir tcp:8888::80
the only problem is that you have to leave the computer on. the tracker only tracks when the tracker/qemu is running. :)
what you need to do next is to log into
raspberryas pi and adapt the
config.phpas described here:
Look at step 4) or step 5) https://gitlab.maikel.pro/maikeldus/WhatsSpy-Public/wikis/getting-started-rpi-image/
Many thanks for you support
I think i will buy a RasPi and set up a proper tracker ;D
Then try get the
Raspberry Pi® 2 Model B 1 GB. Is maybe 10e more but faster and better, and fully compatible to Modell 1
Is there a
Conradshop near you? .. lol get it tomorrow :)
btw. your words: Greets from Germany :D - LÖL
There is allways a Conrad near somewhere. Meiner ist 3 Haltestellen von zuhause :)
Tip: get a 2A power-supply with Micro-USB for the RasPi
Kein Bedarf, hab zu tun :)
Keyboard layout can be changed with
sudo dpkg-reconfigure keyboard-configuration. http://www.raspberrypi.org/forums/viewtopic.php?f=26&t=18906
Yes try it. and also you might have to adapt the Timezone and Country settings.
Other question: Why is "-no -reboot" included in the "qemu-system-arm ..." code?
I am asking this because the command "reboot" didn't work...
-no-rebootmeans to exit instead of rebooting.
This switch is optional. I wanted the qemu program to end after a
Try without this switch and see what happens (nothing bad will).
Status changed to closedToggle commit list