How can I fix a SecurityException error when an app activity isn't exported?

4,904 views
Skip to first unread message

mattga...@gmail.com

unread,
Dec 29, 2016, 1:01:16 AM12/29/16
to Automate
I have a block that intends to start the Facebook and Messenger apps. When I test my flow, I get the following error:

java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10040000 cmp=com.facebook.katana/.dbl.activity.FacebookLoginActivity } from ProcessRecord{f50015b 10996:com.llamalab.automate:background/u0a265} (pid=10996, uid=10265) not exported from uid 10122

Is there a solution?

Henrik "The Developer" Lindqvist

unread,
Dec 29, 2016, 4:02:09 PM12/29/16
to Automate, mattga...@gmail.com
The activity you're trying to start is private (not exported) so other apps can't start it.

On a rooted device, it may be possible to start it using the Shell command superuser block to execute:
am start -n com.facebook.katana/.dbl.activity.FacebookLoginActivity

mattga...@gmail.com

unread,
Dec 29, 2016, 5:18:14 PM12/29/16
to Automate
Any solutions for an unrooted phone, or am I simply unable to start the Facebook apps at all?

Henrik "The Developer" Lindqvist

unread,
Dec 29, 2016, 5:48:11 PM12/29/16
to Automate, mattga...@gmail.com
Not for the specific activity. To start the Facebook app, just set the package and leave the other fields empty.

mattga...@gmail.com

unread,
Dec 29, 2016, 6:04:49 PM12/29/16
to Automate
Wow, total noob right here - I thought that in order to start an app, I had to choose both the package and activity.

Anyway, that worked! Thanks for the help :)

Henrik "The Developer" Lindqvist

unread,
Dec 29, 2016, 6:46:13 PM12/29/16
to Automate, mattga...@gmail.com
To implicitly start the “main” activity, like the launcher does, specify only the package.

http://llamalab.com/automate/doc/block/activity_start.html
Reply all
Reply to author
Forward
0 new messages