The Following 18 Users Say Thank You to Presence For This Useful Post: | ||
![]() |
2012-11-28
, 10:45
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#2
|
The Following User Says Thank You to marmistrz For This Useful Post: | ||
![]() |
2012-11-28
, 11:40
|
Posts: 2,102 |
Thanked: 1,937 times |
Joined on Sep 2008
@ Berlin, Germany
|
#3
|
The Following 3 Users Say Thank You to michaaa62 For This Useful Post: | ||
![]() |
2012-11-28
, 11:45
|
|
Posts: 304 |
Thanked: 266 times |
Joined on Apr 2011
@ Apeldoorn area, Netherlands
|
#4
|
![]() |
2012-11-28
, 14:57
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#5
|
Wow just wow.
All the work the OP has done and you ask for a ****ing deb file. Be happy he already figured this out.
@Presence
Thanks, going to try it out when I get home
The Following User Says Thank You to marmistrz For This Useful Post: | ||
![]() |
2012-12-03
, 20:47
|
Posts: 7 |
Thanked: 23 times |
Joined on Sep 2012
|
#6
|
The Following 2 Users Say Thank You to Presence For This Useful Post: | ||
![]() |
2013-01-04
, 17:34
|
Posts: 238 |
Thanked: 131 times |
Joined on May 2011
@ Bulgaria
|
#7
|
Now comes the hard part. There's a few places we need to fix things to make prey work with Maemo. First edit the file prey/modules/geo/core/functions and add the line "wifi_points=${wifi_points//\\/}" under the if statement so it looks like this:
....
if [ -n "$wifi_points" ]; then
wifi_points=${wifi_points//\\/}
current_location_json....
get_current_location() {
if [ -n "$wifi_points" ]; then
local query=$(echo $wifi_points | tr -d '}"\\' | \
awk 'BEGIN {RS=","; FS=":"}
/mac_address/ { gsub(/ /,"", $2); printf
(crontab -l | grep -v prey; echo "${new_delay}" "${full_path}/prey.sh > /var/log/prey.log") | crontab -
(crontab -l 2> /dev/null | grep -v prey; echo "${1}" "${full_path}/prey.sh > /var/log/prey.log 2>&1") | crontab -
(crontab -l 2> /dev/null | grep -v prey; echo "${1}" "${full_path}/prey.sh > /var/log/prey.log 2>&1") | crontab -
(crontab -l | grep -v prey; echo "${new_delay}" "bash4 ${full_path}/prey.sh > /home/opt/prey/prey.log") | crontab -
"if [ "`whoami`" != "$logged_user" ]; then"
if [ "`whoami`" != "root" ]; then
![]() |
2013-01-04
, 17:47
|
Posts: 2,292 |
Thanked: 4,135 times |
Joined on Apr 2010
@ UK
|
#8
|
I have no real interest in this. I'm an Arch Linux user myself, so I have no idea how to package a .deb file. The point of this was to document how I took the stock package released by Prey and got it working on Maemo. If anyone else wants to take what is here and package it into a .deb file, they are more than welcome to.
The Following 2 Users Say Thank You to sixwheeledbeast For This Useful Post: | ||
![]() |
2013-01-28
, 20:59
|
Posts: 7 |
Thanked: 23 times |
Joined on Sep 2012
|
#9
|
this one is not problem,sorry if i ask to much from you but if someone is able to instаlled successfully,any help it will be very useful
regards
![]() |
2013-02-04
, 16:23
|
Posts: 7 |
Thanked: 23 times |
Joined on Sep 2012
|
#10
|
The Following User Says Thank You to Presence For This Useful Post: | ||
I've updated Prey to 0.5.9 on my N900 after seeing it was released and finding the geo module was no longer working on 0.5.3 due to Google changing their API. I've also gotten the rest of prey working, including the gateway IP address and the webcam (using gst-launch). The webcam on the N900 takes rather dim pictures, so you'll just have to hope that any would-be thief uses it in a well lit area.
I've changed this post quite a bit, so I've uploaded the old one here if anyone still wants to take a look at 0.5.3:
http://sprunge.us/RMFF
I've also made quite a few more changes this time around to get everything working, so to make it easier, I've just made a .tar.gz file of my working version to download. I'll go ahead and list out the changes at the bottom of this for those who are curious.
Installation
First, download my tar file (attached to this post). A note here: I've remove the GPL license file and the pixmaps image folder from the archive to get it under the 488KB upload limit on this forum. I've attached the license in a separate file so as to not break the terms of the GPL.
Once you download it, you will need to place it on your phone with whatever method you what (I used sftp). Then, untar the file to /home/opt/prey:
Next we'll need to get curl working. Install curl from extras-devel. Note that curl will not work right away. Maemo holds back the update to libcurl3 for some reason (no idea why here, but I haven't found any negative effects from updating it).
Next we will need bash4 (the regular bash package will not work correctly), wireless-tools, gstreamer-tools and imagemagick.
Last we need to set up cron. You may be able to use fcron here, but I used cron since the prey script tries to call `crontab` several times.
/etc/event.d/cron:
Once that is done, it should be ready to test. Mark the device as missing in the control panel and set the frequency to whatever you want (I use 10). Note that it will update your crontab entry based on this. I also set it to recieve every bit of data that it can. Everything should be working at this point, but note that I've hardcoded the modified files time to 1 hour and the path to /home/user/MyDocs. If you would like to change this, look at the manual changes section below to see where to edit it.
After that, wait and make sure you recieve a report after 10 minutes, or you can run prey.sh manually to check as well. I'd also reboot and test it as well just to make sure cron was set up correctly.
If you've gotten several reports and everything looks good, then congrats, you're done!
Manual Changes
This section is for anyone who is interested in the changes I made to the stock Linux Prey version (Download here: http://preyproject.com/download) to get everything working. I've you've downloaded my version and followed the directions above, you do not need to make these changes.
Applied this bug fix affecting Prey 0.5.9. Geolocation results came back incorrect, based on IP address only instead of nearby WIFI points, without this fix:
https://github.com/TAWood/prey-bash-...ae7e0a2b90e57a
config:
Prey switched to using SSL to submit reports and curl on Maemo fails when trying to verify the certificate, so the --insecure option needs to be added (if anyone can figure out a better way, let me know).
Update the crontab line to use bash4.
Change the whoami line to check for root instead of $logged_user:
Remove -p option and redirect errors to /dev/null.
Busybox find doesn't support -mmin, so I've changed this to -mtime. Also used /home/user/MyDocs as the directory to search and removed the regex hiding hidden files since most of Maemo's files in MyDocs are in hidden directories (.images, .sounds, .documents, etc).
Changed streamer to gst-launch here. Also just emptied the capture_video() function since it was using streamer doesn't seem to be needed.
Last edited by Presence; 2013-02-04 at 16:26.