Protect package installer with lock action

455 views
Skip to first unread message

TS

unread,
Feb 21, 2012, 5:54:42 PM2/21/12
to tas...@googlegroups.com
Hi

I've set up a lock action as a simple password protection for some critical apps.

However, I cannot seem to chose the package installer as an app context in order to prevent uninstalls.

Apps like Smartprotector show the package installer as app, and I was also able to locate the package installer in the system/apps folder.

Why is it not available in Tasker? Is there any other way to show the lock screen as soon as the package installer becomes active?

Pent

unread,
Feb 22, 2012, 3:56:30 AM2/22/12
to Tasker

> Why is it not available in Tasker? Is there any other way to show the lock
> screen as soon as the package installer becomes active?

Did you click the All button in the app context screen ?

Pent

TS

unread,
Feb 22, 2012, 4:59:46 AM2/22/12
to tas...@googlegroups.com
Hi Pent
 
Thanks for the answer.
 
I did indeed click the All button.
 
Everything else seems to be present (I can select various settings screens etc), just not the package installer...

TS

unread,
Feb 23, 2012, 3:11:58 PM2/23/12
to tas...@googlegroups.com
No ideas?

:-)

UncleMike

unread,
Feb 24, 2012, 12:16:45 AM2/24/12
to tas...@googlegroups.com
If you can get the package name of the package installer (e.g. com.dinglisch.net.tasker), you could create an Application profile for any single application, export it, substitute the package installer name for the name of the originally selected app in the exported XML file, then import the modified profile.  I did something like this once, and it worked, but I can't remember the circumstances.

Clemens Fischer

unread,
Feb 25, 2012, 10:42:06 AM2/25/12
to tas...@googlegroups.com
UncleMike <mqui...@metroconnectonline.com> wrote:

You mean just getting the package name?

There's an app called "Addons Detector" that outputs sth. like this (in JSON format):

...
{
"appVersionName": "2.0",
"appLabel": "Addons Detector",
"installDate": 1329948410000,
"appPackageName": "com.denper.addonsdetector",
"isSystemApp": false,
"appVersionCode": 16,
"addons": [
{
"addon_type": "DeveloperTools",
"name": "RobotMedia Android Billing"
}
]
},


+clemens

UncleMike

unread,
Feb 25, 2012, 11:27:19 AM2/25/12
to tas...@googlegroups.com
I'm not 100% sure, but I created the following profile:

Profile: Test
Context: Application: Google Books
Enter Task:
Stop

and exported it to xml:

<class cl="TaskerData" sr="">
<tv>1.2u2</tv>
<class cl="Profile" sr="prof130">
<cdate>1330186699057</cdate>
<id>130</id>
<mid0>132</mid0>
<nme>Test</nme>
<class cl="AppContext" sr="con0" ve="2">
<cls0>com.google.android.apps.books.app.HomeActivity</cls0>
<label0>Books</label0>
<pkg0>com.google.android.apps.books</pkg0>
</class>
</class>
<class cl="Task" sr="task132">
<id>132</id>
<class cl="Action" sr="act0" ve="3">
<code>137</code>
<class cl="IntArg" sr="arg0">
<val>0</val>
</class>
</class>
</class>
</class>


If you can edit the above xml, substituting the corresponding information for Package Installer in place of the red-colored parts, and import the edited xml as a new profile, it should work.

TS

unread,
Feb 25, 2012, 12:11:05 PM2/25/12
to tas...@googlegroups.com
You are a bunch of genies ;-)

Working with:

com.android.packageinstaller

And

com.android.packageinstaller.PackageInstallerActivity

Thanks for the input!

UncleMike

unread,
Feb 25, 2012, 10:22:14 PM2/25/12
to tas...@googlegroups.com
I'm glad it's working for you.

Adamx

unread,
Aug 15, 2012, 1:12:15 AM8/15/12
to tas...@googlegroups.com
If you can edit the above xml, substituting the corresponding information for Package Installer in place of the red-colored parts, and import the edited xml as a new profile, it should work.

Can this trick be used to create an application profile so we can run tasks when the Tasker UI is running (like switch the keyboard input method), or is Pent too smart to let us do that? :) 

Adamx

unread,
Aug 15, 2012, 11:31:55 AM8/15/12
to tas...@googlegroups.com
It appears Pent too smart. Drat!

Running alogcat, it looks like Tasker blanks out the "occurred package" when doing app context checks and Tasker app is running.

I guess I could use a combination of a Task shortcut to set the input method to one keyboard and launch Tasker, and monitor %WIN for "Launcher" to set the input method to another keyboard, but that means I need to train myself to use that instead of the notification pulldown. Oh well...
Reply all
Reply to author
Forward
0 new messages