Killacal2084 / gtalksms

Automatically exported from code.google.com/p/gtalksms
1 stars 0 forks source link

Tasker can no longer start or stop gtalksms with intent target "service" #261

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
While trying to send an intent from Tasker as indicated on gtalksms wiki page, 
after an update of CyanogenMod9 (nightly release) on a Samsung Galaxy S, I get:

W/ActivityManager(  198): Permission denied: checkComponentPermission() 
owningUid=10125
W/ActivityManager(  198): Permission Denial: Accessing service 
ComponentInfo{com.googlecode.gtalksms/com.googlecode.gtalksms.MainService} from 
pid=1116, uid=10076 that is not exported from uid 10125

The intent started (for a service) is com.googlecode.gtalksms.action.CONNECT 
(no category, no data, no extra).

Original issue reported on code.google.com by samuel.t...@gmail.com on 2 Apr 2012 at 9:26

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Ok, I should have read the code and looked at the prefs :) I'll allow public 
intents. Sorry for the inconvenience.

Original comment by samuel.t...@gmail.com on 2 Apr 2012 at 9:48

GoogleCodeExporter commented 9 years ago
Note: even after enabling public intents, and with/without a token, I get the 
same permission problem.

Original comment by samuel.t...@gmail.com on 2 Apr 2012 at 10:23

GoogleCodeExporter commented 9 years ago
I could swear that I had tested this myself and it worked. We'll have a close 
look and see whats the cause. If you have more log to share, go ahead.

Original comment by fschm...@gmail.com on 3 Apr 2012 at 12:45

GoogleCodeExporter commented 9 years ago
Could you try running this in your ADB shell (with public intents enabled and a 
foobar token)?

am startservice -a com.googlecode.gtalksms.action.CONNECT -e token foobar

I get the same permission denied as in the logs (but nothing else):

W/ActivityManager(  198): Permission denied: checkComponentPermission() 
owningUid=10125
D/AndroidRuntime(13595): Shutting down VM
W/ActivityManager(  198): Permission Denial: Accessing service 
ComponentInfo{com.googlecode.gtalksms/com.googlecode.gtalksms.MainService} from 
pid=13595, uid=2000 that is not exported from uid 10125

Original comment by samuel.t...@gmail.com on 3 Apr 2012 at 8:49

GoogleCodeExporter commented 9 years ago
Make sure that you set within tasker's "Action Intent" option the target to 
"Broadcast Receiver" and *not* to service. The service can only be started and 
reached by intents by the App itself, the broadcast receiver is responsible for 
receiving the public intents.

This happens when target is set to "service":
W/ActivityManager(  128): Permission denied: checkComponentPermission() 
reqUid=10081
W/ActivityManager(  128): Permission Denial: Accessing service 
ComponentInfo{com.googlecode.gtalksms/com.googlecode.gtalksms.MainService} from 
pid=128, uid=1000 requires null

This happends when target is set to "broadcast receiver"
D/gtalksms( 5574): PublicIntentReceiver got intent: 
com.googlecode.gtalksms.action.CONNECT
I/gtalksms( 5574): onCreate(): service thread created - IsRunning is set to true
I/gtalksms( 5574): onStartCommand(): Intent 
com.googlecode.gtalksms.action.CONNECT

Still todo until the issue can be marked fixed:
- update the documentation (wiki)
- find out why the intent get's still routed to the service entity

Original comment by fschm...@gmail.com on 5 Apr 2012 at 2:42

GoogleCodeExporter commented 9 years ago

Original comment by fschm...@gmail.com on 5 Apr 2012 at 2:42

GoogleCodeExporter commented 9 years ago
Just to add, since the intents are for the broadcast receiver. You can issue 
them with e.g.:
am broadcast -a com.googlecode.gtalksms.action.TOGGLE -e token secret

Original comment by fschm...@gmail.com on 5 Apr 2012 at 2:46

GoogleCodeExporter commented 9 years ago
Indeed it works, thanks.

Original comment by samuel.t...@gmail.com on 5 Apr 2012 at 3:27

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by fschm...@gmail.com on 9 Apr 2012 at 5:41

GoogleCodeExporter commented 9 years ago
Updated wiki page

Original comment by fschm...@gmail.com on 11 Apr 2012 at 10:12