• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

[Profile] [front Camera] Photo/email image of device intruder

Actually I couldnt be bothered to indulge you in your pointless conversation. You annoyed me quite early on but to satisfy the other readers of this thread, I will certainly offer one final comment on this matter, although I had previously decided to rise above it. Then from this post on, I will consider anything else you say with the content I feel you deserve.

So to everyone else, I replied to phonefreak asking what popup be was refering to admittedly completely missing anything posted by the member above. I also stated to phonefreak that we knew the task worked and we did not need to further confirm this above and beyond the confirmation we already had. I didn't know it was a suggestion from someone else. I thought it was phonefreaks idea and I wanted to assure him he did not need to do that as he already has his confirmation

Anyway, this guy puts forward an argument of "logic and reason" in a condescending manner. There was no need to be condescending but that is no matter. What really annoyed me was his condescending approach whilst ignoring the very fact that an argument of logic and reason only stands when supported by knowledge and fact which is unfortunately where this member's post fell down.

So now he engages me in yet another pointless argument to try to prove what? Who knows? Who cares? As a top poster here, creating guides, tips and Support, it's not uncommon that I get attacked by people trying to prove they know more or that I know less, so I can only assume that is the case here. Even if that is the case, I am not interested to be honest.

But I digress... the final comment on the matter that I mentioned earlier that I would give....

Phonefreak knows the task runs with a manual trigger. If the task runs, it can only be the context (trigger) that is failing. The task runs regardless of internet connectivity as incorrectly pointed out earlier. Sure, an email might not arrive but that is not an indication of trigger failure. We can quite clearly see sl4a running the script.

The moment we see "sendemailA.py started", we know the task is running. The python script starts regardless of network connectivity. It runs in airplane mode, which you can all feel free to test. So if the secure settings context is met and the task doesn't run, we KNOW the context isn't working because the sl4a status is not presented to the user. Nothing other than the context failing, could cause a proven working task to not work.

This is my final word on the matter. I hope we can keep this on topic from now on.

Apology? No. Reversal? No.


We can quite clearly see sl4a running the script.
Those words about the script are yours, not phonephreak’s. Unless there have been some PM’s exchanged here, we didn’t know for a fact how phonefreak checked for execution or non-execution of the task. He may have checked for receipt of an email on his computer. If the email action fails, one might incorrectly conclude the task has failed.

There are plenty of unknowns when diagnosing your own phone, let alone diagnosing someone elses phone based on few sentences.

Personally I thought it was worth spending 15 seconds to remove all doubt. There is at least one credible scenario (intermittent email connectivity, op checked for task non-completion based on email) where it would be worth it. I can probably come up with more. But that rather misses my point, which is that it’s easier and more productive to just check it rather then to spend multiple messages analysing it based on an assumption that you know everything there is to know about a phone which could be thousands of miles away in a situation described by a person whose expertise you don’t know.

Perhaps others may not agree with my suggestion. No problem there, we all approach things diffrently. But SUroot felt so strongly that it was a bad recommendation that he felt compelled to discredit the recommendation even AFTER it had already been completed. (January 25th, 2013, 11:21 AM). And after all this, even up to the latest post he still continues to fight tooth and nail to discredit a 15 second recommendation that was already completed before he started picking on it.

I will have to accept portion of blame for eventually escalating in less than proportional amounts to the tone directed against me. To forum members (excluding SUroot), I certainly apologize.
 
I do repeat, I did not know it was a recommendation at the time. I do not think it was a bad recommendation. Just a pointless one. I didn't engage you in the discussion. You engaged me. Your first post was reasonable but your second was very condescending. That is my problem. My problem is with you not with your recommendation.

Unfortunately, as much as I'd like you to leave this thread and never post in it again, that is against the spirit of AF. I leave you to yourself now. Any further off topic "battles" will need to be addressed by the moderators.
 
Hopefully I'm not bumping a dead thread and I just wanted to add some more information just in case others have issues. What I can confirm is 2 step verification was an issue with my setup. I used a spare gmail account without 2 step set up as the sending account and the email went through just fine. Originally used an account with 2 step enabled and the email would fail everytime. Also, %EMAIL_TO was set using the @gmail.com domain.

lastly, Pin unlock is the security setting I'm using and so far, no issues. (fingers crossed)
 
yup, good point. I go through the same thing every time I change Roms.

The tricky part is: When your phone asks for gmail password, it is NOT asking for your normal gmail password that you'd use to get into your account on a pc. It needs the Application-specific password (bunch of numbers) that gets sent to you from google when you follow directions at the link above.
 
does your phone need to be rooted for this to work? im on an s3 and have followed this guide but it is not working.

if i run it from the Tasker task edit window it will run but it will not work if i put in 2 incorrect patterns.

I tried this also with my Nexus 4 today. I also did the same here, by running it through the edit box, and it worked perfectly, but it would not for the life of me, run when I put in 2 incorrect patterns, PINs, or passwords.

Have you had any luck on that yet?
 
A BIG THANKS to SURoot! This works like a charm on my DROID RAZR!

Followed the instructions in the OP to the T and started getting emails :-D
 
This is a mid-level complexity profile that takes a photo of someone who incorrectly enters your pattern lock (in this example) twice and emails it to you.

This is based on multiple examples found but this is my own spin on it.

The filename of the photo is always the same so it overwrites itself, saving space because if, like me, you often put your pattern in wrong, you'll end up with a million pictures of yourself :)

Pre-requsites:

  1. SL4a apk - android-scripting.googlecode.com
  2. Secure settings - Google Play
  3. Folder \sdcard\sl4a\scripts containing - sendemailA.py
  4. Python - Install through SL4a as below:

    I have attached the profile exported xml, in a zip. Put this (extracted) in /sdcard/tasker/profiles/. You will still need to do the above and add your email address and password to the tasks below though, but should save some time. UNTESTED
Creating the profile:

Profile
  • Add (+) Profile, name "Intrusion"
Context
  • Select State > Plugin > Secure Settings > configuration Edit > Failed Login Attempts > (set your number, Tick "Device admin" and save
Task
  • New Task
  • + Media > Take Photo > Camera "Front" > Filename "Last-intruder" (and apply)
  • + Variable > Variable Set > name "%EMAIL_USER" to youremailaddress@here.com
  • + Variable > Variable Set > name "%EMAIL_PSWD" to youremailpassword
  • + Variable > Variable Set > name "%EMAIL_TO" to youremailaddress@here.com
  • + Variable > Variable Set > name "%EMAIL_SUBJECT" to "SGS3 INTRUSION ATTEMPT"
  • + Variable > Variable Set > name "%EMAIL_ATTACH" to "/sdcard/DCIM/Tasker/last-intruder.jpg"
  • + Script > Run SL4A Script > Name (Search icon) sendemailA.py > Pass variables " %EMAIL_USER,%EMAIL_PSWD,%EMAIL_TO,%EMAIL_ATTACH,%EMAIL_SUBJECT "
  • Apply

PicsArt_1347344955048.png

I have downloaded the script
Dont know which folder plz help.
 
Does the send email script run? In the status bar?

PicsArt_1347517469431.jpg



Does the sendemail python script show up in the sl4a app?

PicsArt_1347517615203.jpg

Trying to get this to work again. Had it working on my LG ESTEEM. Program will not send me an email? Just takes pic and sl4a runs then exists without sending me email. Screen shots provided. Any hep thanks.
 

Attachments

  • uploadfromtaptalk1372039360812.jpg
    uploadfromtaptalk1372039360812.jpg
    62.8 KB · Views: 168
I keep getting EMAIL_USER missing. It's not missing. I've tried it with and without @gmail.com and still no luck

Edit: fixed
 
I'm having a problem running the test on Tasker. I got the profile part down as listed but the first few things I might of messed up on. To be honest I am new to all of this. When I run the test in Tasker I keep getting a message saying "Unfortunately, SL4A has stopped" and I get it twice.
 
This is an awesome profile but I have a question on tweaking it a bit. I personally don't use the lock screen pattern/pin lock but rather use an app called smart app protector to add a pattern lock to selected apps. I was wondering if I could implement the task of this profile to work with entering the wrong pattern on the selected apps I have the pattern lock applied to?
 
Work great thanks.

2 questions
1-In my task for "+ Variable > Variable Set > name "%EMAIL_PSWD" to youremailpassword" my password is not "stared" or "X" out but actually shows my password. Is this normal?
2-I get email notification but no attached picture<<<[SOLVED, had a typo]
 
yea i know this was uploaded 2 years ago but i really want to get this working and every time i try it it just says "EMAIL_PSWD missing"

what should i do?
 
yea i know this was uploaded 2 years ago but i really want to get this working and every time i try it it just says "EMAIL_PSWD missing"

what should i do?

It sounds like it might be a simple spelling/syntax error. Double-check the variable names to make sure they match EXACTLY - capitalization does matter, btw. Be sure that they're all preceded by a percent sign (%) also.

It may be helpful to post screenshots of your setup so we can further help diagnose :)
 
Ive installed SL4A from the link you provided, i open the app on my phone. You say to click view then interpreters, etc. I just get something at the top that says scripts, and an all black page with no menu buttons. I dont understand. Ive looked at videos of installing python, and they have the same black screen but then all of a sudden a menu just pops up out of nowhere. I cant find a menu anywhere. Please help. Would love to have this working!!!
 
I'm at the end of my wits. I got the task to work (via the play button), however, the profile does not fire if I enter my pattern incorrectly. The profile is not that complex. Does anybody have an idea what the problem might be?
gy9a6a8e.jpg
guhe5e7y.jpg
tyguqubu.jpg


I can confirm that it is the profile, rather than the task. Even if I connect a task I used successfully before, the profile does not react.

This is on stock rom, N4, running xposed framework.
 
Everything works for me. However the script to email will not run until the lockscreen is passed. If I test it by entering incorrect pin numbers the photo is taken but the email is not sent until I login correctly. If it requires I enter the right pin number, how does it actually protect me. Can someone help me get this to run from lockscreen?
 
This script works wonders! So much so that I have been using it for many other things as well (even made a few adjustments to suit my personal needs on a couple Profiles).

With that said, I have now ventured out a little and am trying to get this to send the email to more than 1 email address. With the variable %EMAIL_TO, I have tried separating the email addresses with "," ";" "/" and "\" all to no avail. The email will send to the first address, but not the rest. And when they arrive in gmail, they look like the following if sending to (example) testing@gmail.com & testing2@gmail.com:

[HIGH]testing@gmail.com/testing2@gmail.com[/HIGH]

So, I decided to edit the script a little to try and make this work, but still cannot figure this out. Here is the edit I attempted:

[HIGH]try:
mailto = droid.getIntent().result[u'extras'][u'%EMAIL_TO']
mailto = mailto.split(',')
except:
droid.makeToast('EMAIL_TO missing')
sys.exit(1)[/HIGH]

where I added the [HIGH]mailto = mailto.split(',')[/HIGH]

With the above edit, no email will send at all. I receive no errors at all and the .log is empty. sl4a will show in the stats bar as running and then less than a second later, it will exit with no email sent.

When I tried using the ",", etc in the variable, it at least sent to the first address, but just not to any of the others.

Anyone have any idea how to send the email to more than just 1 recipient?

Kratos
 
This script works wonders! So much so that I have been using it for many other things as well (even made a few adjustments to suit my personal needs on a couple Profiles).

With that said, I have now ventured out a little and am trying to get this to send the email to more than 1 email address. With the variable %EMAIL_TO, I have tried separating the email addresses with "," ";" "/" and "\" all to no avail. The email will send to the first address, but not the rest. And when they arrive in gmail, they look like the following if sending to (example) testing@gmail.com & testing2@gmail.com:

[HIGH]testing@gmail.com/testing2@gmail.com[/HIGH]

So, I decided to edit the script a little to try and make this work, but still cannot figure this out. Here is the edit I attempted:

[HIGH]try:
mailto = droid.getIntent().result[u'extras'][u'%EMAIL_TO']
mailto = mailto.split(',')
except:
droid.makeToast('EMAIL_TO missing')
sys.exit(1)[/HIGH]

where I added the [HIGH]mailto = mailto.split(',')[/HIGH]

With the above edit, no email will send at all. I receive no errors at all and the .log is empty. sl4a will show in the stats bar as running and then less than a second later, it will exit with no email sent.

When I tried using the ",", etc in the variable, it at least sent to the first address, but just not to any of the others.

Anyone have any idea how to send the email to more than just 1 recipient?

Kratos


Any ideas?

I ended up setting up a forward to send the emails to other accounts, but would like to get it working with just the variables and scripts in this instead.

Kratos
 
Sorry for the huge bump, but my SL4a keeps crashing after this script.. Do you have any idea what causes this? (It's probably not script related)

I already installed 2.3, 2.6 and 2.r6x

nvm, forgot to install python lol, oops.
 
Last edited:
Ok i know bumping up an old thread but seriously need help on this. First I have read the entire thread line by line to see if I am not missing something before I post my problem. I initially download SL4A and Python3 for android, and what even I used to do SL4A was crashing, saying sl4a has stopped working. I thin uninstalled Python3 for Android and Downloaded just Python for Android (dont know which version is that), this stopped the crashing and script ran, but I get an error "email failed" ......

I am doing this by play button just to see first all steps are working ...... now the gmail account I am using does not have a 2 step auth, so I am running short of idea why I am getting email failed. Attaching screen shots to provide more information. I have removed the password, in paint but there is a password there in the field.... as you can see in the screen shot all steps are green and I have a message of script executing and exiting as well but then I get "email failed" response

Please request anyone to help me out here ...... Let me know if you need more screen shots

Regards
Sammy
 

Attachments

  • Screenshot_2015-10-11-13-15-42.png
    Screenshot_2015-10-11-13-15-42.png
    282 KB · Views: 99
Back
Top Bottom