New Tasker Companion App

928 views
Skip to first unread message

David White

unread,
Mar 29, 2014, 8:38:46 PM3/29/14
to tas...@googlegroups.com
In case anyone is interested, I have just published a new companion app that permits Tasker to:

(a) Access the current value of any Android setting in the System, Secure, or Global (on 4.2 and above) namespaces in the form of a global variable set in response to a Send Intent command.

(b) Be notified, in the form of a global variable set, when the value of a monitored Android setting changes. Monitoring and notification can be set up via the app's user interface or via Send Intent commands from Tasker. In either case, monitoring and notification restarts automatically after device reboot.

To assist in locating the names of desired Android settings, the app provides rooted users the ability to list all known Android settings and their current values. This permits viewing of non-standard (ie, not documented) setting names.

For more details, please see the System Settings For Tasker page on the Play Store.

Pent

unread,
Mar 30, 2014, 3:23:04 AM3/30/14
to tas...@googlegroups.com
I wouldn't have gone for the global variables when local are entirely sufficient, but apart from that well done :-)

I'm kindof against external apps setting global variables and will probably block it at some point.

Pent

hippoma...@gmail.com

unread,
Mar 30, 2014, 7:32:26 AM3/30/14
to tas...@googlegroups.com
Thank you for this app!

However ... I installed it on my rooted 4.4.2 ROM for my Nexus 7, but the Explore Settings function returns nothing. I just get back a blank screen.

Tasker is installed, and root has definitely been assigned to System Settings for Tasker.
.

David White

unread,
Mar 30, 2014, 9:46:49 AM3/30/14
to tas...@googlegroups.com
Hi Pent. I appreciate your comment and would like to comply. However, as I posted in the developer forum, my results trying to use locals failed. If someone can help me figure that out, I would be happy to give the user that flexibility. Thanks

David White

unread,
Mar 30, 2014, 10:03:25 AM3/30/14
to tas...@googlegroups.com
Thanks for this feedback. I hope you can help be debug this issue.

1. Actually, the Explore Settings function does not need Tasker installed/enabled. So that should not impact this.

2. Since you are rooted, can you please check and see if you find the following file on your Nexus and if it is marked as executable? It should be put there the first time the Explore Settings function is attempted.

/data/data/com.whitedavidp.systemsettingsfortasker/files/sqlite

3. If you have the ability, can you send a logcat (or just the subset of entries that contain a tag starting with "SystemSettingsForTasker"?

4. Are you able to see the app asking for root access in the log of your super user app (if it supplies such a log)?

Thanks,

David

hippoma...@gmail.com

unread,
Mar 30, 2014, 12:16:53 PM3/30/14
to tas...@googlegroups.com
On Sunday, March 30, 2014 10:03:25 AM UTC-4, David White wrote:
Thanks for this feedback. I hope you can help be debug this issue.

Thank you for your reply. I'm glad to do what I can to help.
 

2. Since you are rooted, can you please check and see if you find the following file on your Nexus and if it is marked as executable? It should be put there the first time the Explore Settings function is attempted.

/data/data/com.whitedavidp.systemsettingsfortasker/files/sqlite

Yes, that file exists, and it has "rwx------" permissions.
 
3. If you have the ability, can you send a logcat (or just the subset of entries that contain a tag starting with "SystemSettingsForTasker"?

I will send the logcat later today.  I'm sorry, but I'm in the middle of something else right now.


4. Are you able to see the app asking for root access in the log of your super user app (if it supplies such a log)?

Yes. I was indeed asked for root access, and I granted it permanently.
.

David White

unread,
Mar 30, 2014, 12:20:43 PM3/30/14
to tas...@googlegroups.com


On Sunday, March 30, 2014 9:16:53 AM UTC-7, hippoma...@gmail.com wrote:
Yes, that file exists, and it has "rwx------" permissions.

Ok, so much for one "easy" answer :-)
 
I will send the logcat later today.  I'm sorry, but I'm in the middle of something else right now.

That's great. I am working on the app now - adding search function to the Explore Settings (that you don't get to see - yet).

Yes. I was indeed asked for root access, and I granted it permanently.

Ok, so much for the other "easy" answer :-)

I appreciate your time and help with this.
.

hippoma...@gmail.com

unread,
Mar 30, 2014, 12:42:24 PM3/30/14
to tas...@googlegroups.com
Here's the logcat output, filtered by "SystemSettingsForTasker". Only one line ...

03-30 12:26:40.681 W/PackageSettings(637): Skipping PackageSetting{41cd4850 com.whitedavidp.systemsettingsfortasker/10060} due to missing metadata
.

David White

unread,
Mar 30, 2014, 1:09:33 PM3/30/14
to tas...@googlegroups.com

 Wow! I am at a loss for knowing what that might be at all! If you search the logcat, do you see any exceptions being thrown from my app?

Do any other aspects of the app work on your device? I wonder if this is something kit-kat related? I have no devices with Android beyond 4.2.2.

Sorry for the bother. Any other observations on how the app works or does not work may prove helpful.

Thanks

David White

unread,
Mar 30, 2014, 1:18:09 PM3/30/14
to tas...@googlegroups.com


On Sunday, March 30, 2014 9:42:24 AM UTC-7, hippoma...@gmail.com wrote:
I wonder if you can execute the sqlite file in a terminal window?

Bob Hansen

unread,
Mar 30, 2014, 1:28:24 PM3/30/14
to tas...@googlegroups.com
Some android devices do not have sqlite installed by the manufacturer. From a quick search the Nexus 7 is one of them as was my Droid RAZR HD.

David White

unread,
Mar 30, 2014, 1:35:37 PM3/30/14
to tas...@googlegroups.com


On Sunday, March 30, 2014 10:28:24 AM UTC-7, Bob Hansen wrote:
Some android devices do not have sqlite installed by the manufacturer. From a quick search the Nexus 7 is one of them as was my Droid RAZR HD.

You are exactly correct about that, Bob. I found that my Minix Neo X5 lacked it. So my app actually packages the 2 ARM versions of the program (one for earlier and one for later Android versions). That is the file I was mentioning. But your response made me double-check and I may have not deployed the right version on that device. Yikes!

David White

unread,
Mar 30, 2014, 1:43:09 PM3/30/14
to tas...@googlegroups.com

Don't think it is that. I have a version for >= JB and one for ICS and lower. Unless there is some change in KK that may impact this, I am not sure. What I have for >= JB is version Sqlite3-4.1.

Bob Hansen

unread,
Mar 30, 2014, 1:58:33 PM3/30/14
to tas...@googlegroups.com
The release of KitKat made some significant changes in file access. Perhaps this is related? http://beranger.org/2014/01/30/how-kitkat-4-4-killed-android-and-google-keeps-screwing-things/

David White

unread,
Mar 30, 2014, 2:05:32 PM3/30/14
to tas...@googlegroups.com
That is interesting and I did not know about it. But that is not the issue here. First, my app is creating the file in a package-specific directory. Also, the affected user has already told us that he can see the sqlite executable in the expected location. Thanks

David White

unread,
Mar 30, 2014, 3:09:28 PM3/30/14
to tas...@googlegroups.com


On Sunday, March 30, 2014 9:42:24 AM UTC-7, hippoma...@gmail.com wrote:
Been doing some google action and it would seem that at least this:

PackageSetting{41cd4850 com.whitedavidp.systemsettingsfortasker/10060}

Is coming from Android's PackageSetting class' toString() method.

And in post #3975 in this thread related to SuperSU, I see some similar stuff and complaints about KK:

11-14 02:07:40.005: E/PackageManager(463): Adding duplicate user id: 10165 name=eu.chainfire.supersu
11-14 02:07:40.010: E/PackageManager(463): Failure adding uid 10165 while parsing settings at START_TAG <package name='eu.chainfire.supersu' codePath='/system/app/Superuser.apk' nativeLibraryPath='/data/app-lib/Superuser' flags='540293' ft='142540f5400' it='142540f5400' ut='142540f5400' version='169' userId='10165'>@2590:218 in java.io.InputStreamReader@41937298
11-14 02:07:41.445: E/PackageManager(463): Adding duplicate user id: 10165 name=eu.chainfire.supersu
11-14 02:07:42.065: I/PackageManager(463): Expecting better updatd system app for eu.chainfire.supersu; removing system app
11-14 02:07:58.565: W/PackageManager(463): Not granting permission android.permission.ACCESS_SUPERUSER to package eu.chainfire.stickmount because it was previously installed without
11-14 02:07:59.470: W/PackageSettings(463): Skipping PackageSetting{41abcbd8 eu.chainfire.supersu.pro/10336} due to missing metadata

Can you again check your logcat and see if the above line is part of a larger context, like the above? Thanks


hippoma...@gmail.com

unread,
Mar 30, 2014, 4:37:36 PM3/30/14
to tas...@googlegroups.com
I'm sorry, but I don't see anything like this. I'm not even running SuperSU.

Unfortunately, I can't do any more debugging at the moment. But I'm happy to get back to this later, when I have more time.
.

David Barton

unread,
Mar 30, 2014, 4:41:41 PM3/30/14
to tas...@googlegroups.com
Is there anyway that I can capture when a SMS was sent using this? 

hippoma...@gmail.com

unread,
Mar 30, 2014, 4:59:59 PM3/30/14
to tas...@googlegroups.com
On Sunday, March 30, 2014 4:41:41 PM UTC-4, David Barton wrote:
Is there anyway that I can capture when a SMS was sent using this? 
 
Not sure about this new app, but check this out in order to capture outgoing SMS:

https://groups.google.com/forum/#!topic/tasker/sMgMgYWrD9k

David White

unread,
Mar 30, 2014, 6:46:22 PM3/30/14
to tas...@googlegroups.com
I am not sure but I rather doubt it. Using the Explore Settings feature I have searched the list of setting on my device (Samsung Note I) for names containing "sms". I see 3-4 but they seem to relate to time intervals and if sms is enabled.

David White

unread,
Mar 30, 2014, 7:35:17 PM3/30/14
to tas...@googlegroups.com
No problem. I appreciate the help when you have time. I  didn't mean to imply that SuperSu was involved. Only that, as one can see in the log excerpt, when Android puts out something like


03-30 12:26:40.681 W/PackageSettings(637): Skipping PackageSetting{41cd4850 com.whitedavidp.systemsettingsfortasker/10060} due to missing metadata

it may be at the end of a chain of log messages and that those messages might help shed some light on the issue.

Thanks again.

David Barton

unread,
Mar 30, 2014, 9:04:44 PM3/30/14
to tas...@googlegroups.com

Did it Look as though I have it setup Correctly ? what text app are you using ?

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/sRJKsaulGVg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Pent

unread,
Mar 31, 2014, 3:09:30 AM3/31/14
to tas...@googlegroups.com

Hi Pent. I appreciate your comment and would like to comply. However, as I posted in the developer forum, my results trying to use locals failed. If someone can help me figure that out, I would be happy to give the user that flexibility. Thanks

I responded on the dev forum.

You might not like it :-)

Pent

hippoma...@gmail.com

unread,
Mar 31, 2014, 2:05:49 PM3/31/14
to tas...@googlegroups.com
Hi. I've pasted a section of my logcat from the time during which I started System Settings for Tasker and I issued the Explore Settings (root) command from the menu. Nothing showed up on the screen as a result of that command.

This might be related to the ROM. This problem is occurring on my Nexus 7 (flo) running the "DarkKat" 4.4.2 AOSP-based ROM (see http://forum.xda-developers.com/showthread.php?t=2528819).

I tried this on my ASUS Transformer Pad (TF701T) running a CM-11 4.4.2 ROM (see http://forum.xda-developers.com/showthread.php?t=2621028), and it works fine.

This logcat excerpt is from the Nexus 7 on which the command fails. No more messages for Secure Settings for Tasker appeared after this:

03-30 20:29:00.102 D/dalvikvm(759): GC_CONCURRENT freed 8205K, 36% free 38689K/60060K, paused 4ms+11ms, total 69ms
03-30 20:29:12.524 I/ActivityManager(637): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.teslacoilsw.launcher/com.android.launcher2.Launcher} from pid 637
03-30 20:29:14.156 I/HK/LatinKeyboardBaseView(881): closing org.pocketworkstation.pckeyboard.LatinKeyboardView{41d4d9e0 V.ED.... ......ID 0,0-1920,450 #7f07000a app:id/LatinkeyboardBaseView}
03-30 20:29:16.878 I/HK/LatinKeyboardBaseView(881): closing org.pocketworkstation.pckeyboard.LatinKeyboardView{41d4d9e0 V.ED.... ......ID 0,0-1920,450 #7f07000a app:id/LatinkeyboardBaseView}

03-30 20:29:19.561 I/ActivityManager(637): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.whitedavidp.systemsettingsfortasker/.MainActivity bnds=[960,564][960,564]} from pid 3891
03-30 20:29:19.581 V/SystemSettingsForTasker_Main(13648): In onCreate
03-30 20:29:19.601 V/SystemSettingsForTasker_LicenseChecker(13648): Device id: 60db1e329f72a364

03-30 20:29:19.631 I/LicenseChecker(13648): Using cached license response
03-30 20:29:19.631 V/SystemSettingsForTasker_LicenseChecker(13648): license allowed. reason: 256
03-30 20:29:19.631 V/SystemSettingsForTasker_Main(13648): In onStart
03-30 20:29:19.661 V/SystemSettingsForTasker(13648): Service already running
03-30 20:29:19.661 V/SystemSettingsForTasker_Main(13648): populating list

03-30 20:29:19.731 I/ActivityManager(637): Displayed com.whitedavidp.systemsettingsfortasker/.MainActivity: +153ms
03-30 20:29:22.834 D/dalvikvm(13648): GC_CONCURRENT freed 401K, 30% free 6201K/8852K, paused 1ms+4ms, total 24ms
03-30 20:29:25.196 I/ActivityManager(637): START u0 {cmp=com.whitedavidp.systemsettingsfortasker/.SettingsListActivity} from pid 13648
03-30 20:29:25.256 V/SystemSettingsForTasker_SettingsList(13648): Running root command: echo "select 'SYSTEM', name, value from system order by name;select 'SECURE', name, value from secure order by name;select 'GLOBAL', name, value from global order by name;" | /data/data/com.whitedavidp.systemsettingsfortasker/files/sqlite /data/data/com.android.providers.settings/databases/settings.db
03-30 20:29:25.276 V/SystemSettingsForTasker_SettingsList(13648): Got root, now proceeding
03-30 20:29:25.276 V/SystemSettingsForTasker_SettingsList(13648): Trying to read
03-30 20:29:25.276 V/SystemSettingsForTasker_SettingsList(13648): starting to read command results
03-30 20:29:25.297 W/linker  (18462): /data/data/com.whitedavidp.systemsettingsfortasker/files/sqlite has text relocations. This is wasting memory and is a security risk. Please fix.

03-30 20:29:25.307 D/SettingsProvider(637): User 0 external modification to /data/data/com.android.providers.settings/databases/settings.db; event=8
03-30 20:29:25.307 D/SettingsProvider(637): User 0 updating our caches for /data/data/com.android.providers.settings/databases/settings.db

03-30 20:29:25.307 V/SystemSettingsForTasker_SettingsList(13648): Root command completed successfully
03-30 20:29:25.307 V/SystemSettingsForTasker_SettingsList(13648): root command result: true
03-30 20:29:25.307 V/SystemSettingsForTasker_SettingsList(13648): done populating list

03-30 20:29:25.377 I/HK/LatinKeyboardBaseView(881): closing org.pocketworkstation.pckeyboard.LatinKeyboardView{41d4d9e0 V.ED.... ......ID 0,0-1920,450 #7f07000a app:id/LatinkeyboardBaseView}
03-30 20:29:25.387 I/ActivityManager(637): Displayed com.whitedavidp.systemsettingsfortasker/.SettingsListActivity: +166ms
03-30 20:29:25.717 W/SurfaceFlinger(191): couldn't log to binary event log: overflow.
03-30 20:29:27.379 D/GCM     (1159): Message class inh
03-30 20:29:27.879 D/ConnectivityService(637): handleInetConditionHoldEnd: net=1, condition=100, published condition=100
03-30 20:29:30.131 V/DeadZone(759): consuming errant click: (982.2857,14.857178)
03-30 20:29:31.312 V/DeadZone(759): consuming errant click: (948.0,12.178589)
03-30 20:29:34.125 D/dalvikvm(759): GC_FOR_ALLOC freed 7364K, 35% free 39270K/60060K, paused 36ms, total 36ms
03-30 20:29:35.787 V/PhoneStatusBar(759): setLightsOn(true)
03-30 20:29:35.807 D/dalvikvm(637): GC_CONCURRENT freed 4438K, 32% free 22235K/32536K, paused 4ms+11ms, total 121ms
03-30 20:29:57.258 D/dalvikvm(18346): GC_FOR_ALLOC freed 488K, 46% free 6258K/11484K, paused 26ms, total 30ms
03-30 20:29:57.258 I/dalvikvm-heap(18346): Grow heap (frag case) to 9.216MB for 983056-byte allocation




hippoma...@gmail.com

unread,
Mar 31, 2014, 2:27:01 PM3/31/14
to tas...@googlegroups.com
I copied /data/data/com.android.providers.settings/databases/settings.db from my Nexus 7 to my linux box, and I ran the following command. The output is a long list of something like 190 settings fields, which means that my ROM's settings.db is formatted consistently with what you expect.

echo "select 'SYSTEM', name, value from system order by name;select 'SECURE', name, value from secure order by name;select 'GLOBAL', name, value from global order by name;" | /usr/bin/sqlite3 ./settings.db

Given the following error message from the logcat excerpt that I posted above, I'm wondering if your sqlite executable has issues under my ROM:


03-30 20:29:25.297 W/linker  (18462): /data/data/com.whitedavidp.systemsettingsfortasker/files/sqlite has text relocations. This is wasting memory and is a security risk. Please fix.
 

A little later today, I'll run the following command from within a rooted terminal emulator on my Nexus 7, and I'll report back.


echo "select 'SYSTEM', name, value from system order by name;select 'SECURE', name, value from secure order by name;select 'GLOBAL', name, value from global order by name;" | /data/data/com.whitedavidp.systemsettingsfortasker/files/sqlite /data/data/com.android.providers.settings/databases/settings.db
.

hippoma...@gmail.com

unread,
Mar 31, 2014, 2:36:39 PM3/31/14
to tas...@googlegroups.com
Well, I have a little extra time, so I ran the command now within a rooted terminal emulator on my Nexus 7.

It successfully printed out the same 190-or-so settings, but the first line of output is this:

WARNING: linker: /data/data/com.whitedavidp.
systemsettingsfortasker/files/sqlite has text relocations. This is wasting memory and is a security risk. Please fix.

I'm wondering if your app is perhaps choking on this "WARNING" line when it tries to capture the sqlite command's output. The "WARNING" line is going to stderr, while the rest of the output goes to stdout.
.

David White

unread,
Mar 31, 2014, 2:48:31 PM3/31/14
to tas...@googlegroups.com
Thank you, thank you for this information. It does appear that the sqlite binary is creating an issue with the later Android. You are correct that my app's logic will choke on this warning. But if you are correct that it is sent to stderr and not stdout, I am surprised it is getting through since I am reading via Process.getOutputStream() and never touch Process.getErrorStream().

Perhaps the best way to deal with this is for me to get a more recent sqlite executable and install that on newer Android. I suppose I could also check to see if the device has sqlite available and use that in place of the ones I package. But I think I read that Nexus 7 lacks this.

hippoma...@gmail.com

unread,
Mar 31, 2014, 2:58:22 PM3/31/14
to tas...@googlegroups.com
Yes, you're correct that there is no sqlite on my OS.

Well, maybe there is some other issue that's unrelated to the warning or the sqlite output.

Also, when running that command on my Nexus 7, the return code is 0, so your app shouldn't think that the command errored out.

Is it possible to use an instance of SQLiteOpenHelper directly from java instead of running the shell command? Or does that class not permit you to attach to system databases?
.

hippoma...@gmail.com

unread,
Mar 31, 2014, 3:10:32 PM3/31/14
to tas...@googlegroups.com


On Monday, March 31, 2014 2:48:31 PM UTC-4, David White wrote:
Thank you, thank you for this information. It does appear that the sqlite binary is creating an issue with the later Android. You are correct that my app's logic will choke on this warning. But if you are correct that it is sent to stderr and not stdout, I am surprised it is getting through since I am reading via Process.getOutputStream() and never touch Process.getErrorStream().

Hmm ... I ran the command via /system/bin/sh. Maybe a different shell was used to run it from your app, and perhaps the stdout and stderr were merged (just a wild guess).

Also, given that this warning showed up in the logcat listing, could it be that it triggered some sort of exception in your app? Or was the warning printed explicitly by the code you wrote?

Can you run it like this (using /system/bin/sh)? ... or at least some way similar? I don't have time to test it on my device now.

echo "select 'SYSTEM', name, value from system order by name;select 'SECURE', name, value from secure order by name;select 'GLOBAL', name, value from global order by name;" | /system/bin/sh -c "/data/data/com.whitedavidp.systemsettingsfortasker/files/sqlite /data/data/com.android.providers.settings/databases/settings.db"

Also, how about if you just change your code to ignore "WARNING:" in the output, just in case it was creeping in, somehow?
.

David White

unread,
Mar 31, 2014, 3:12:07 PM3/31/14
to tas...@googlegroups.com
Thanks again. In fact, I read the code from the SQLiteOpenHelper and developed my own, simple direct access from Java so I could avoid this command line tedium. But you are correct that Android prohibits it. So running in via a root shell seemed the only way. I also (perhaps at my own peril) am ignoring the result code.

May I send you another build of this later today or tomorrow that will log everything that is being returned? I want to see if somehow that warning going to stderr is somehow getting into the stdout. If so, that would explain things. I could also just try to ignore that line and see what happens.

hippoma...@gmail.com

unread,
Mar 31, 2014, 3:14:46 PM3/31/14
to tas...@googlegroups.com
One more thought before I go:

Can you write a version of your app that logs each and every line to logcat which comes back from your settings query that you try to process?

I could run this on my device, and it will show whether those lines are even making it into your settings-processing logic.
.

David White

unread,
Mar 31, 2014, 3:19:21 PM3/31/14
to tas...@googlegroups.com
The logcat warning is not coming from my app at all. Looks like it is coming from the system linker to me. Anything from my app would have a tag with the app's name. But if you see the warning line in your terminal window, then that may well be getting into the stdout somehow and causing my app to choke. I think I will go with that theory, add some code to specifically look for this in the first line of output and ignore it if found. I can then post it on Play and maybe we can see if that helps. Thanks again.

hippoma...@gmail.com

unread,
Mar 31, 2014, 3:43:54 PM3/31/14
to tas...@googlegroups.com
On Monday, March 31, 2014 3:19:21 PM UTC-4, David White wrote:
The logcat warning is not coming from my app at all. Looks like it is coming from the system linker to me. Anything from my app would have a tag with the app's name. But if you see the warning line in your terminal window, then that may well be getting into the stdout somehow and causing my app to choke. I think I will go with that theory, add some code to specifically look for this in the first line of output and ignore it if found. I can then post it on Play and maybe we can see if that helps. Thanks again.

Or maybe the error from the system linker is causing a RuntimeException in your app ... ???

If you haven't done so already, could you put a try/catch block around the invocation of the sqlite, and catch Throwable and log the exception?
.

David White

unread,
Mar 31, 2014, 3:52:18 PM3/31/14
to tas...@googlegroups.com
I think not. But a good idea. My entire routine for running a root shell is wrapped in a try/catch and any exception caught would put this on the logcat: SystemSettingsForTasker: Unable to run root command: and this would be followed by the command and the exception's message. Doesn't seem that is happening. I appreciate all your time and effort on this.

hippoma...@gmail.com

unread,
Mar 31, 2014, 3:54:47 PM3/31/14
to tas...@googlegroups.com
But are you catching Throwable? It's the parent class of all exceptions and runtime exceptions.
.

David White

unread,
Mar 31, 2014, 4:04:28 PM3/31/14
to tas...@googlegroups.com
No, I am only catching Exception. This is because I have read in many places (like here) that catching Throwable is a potential problem. So I have just avoided the idiom completely. If, however, an uncaught throw was making it out of the root shell and up the call tree, it seems likely that we would get an uncaught exception and this would at least put a message in the logcat (at least I see them there from my own mistakes all the time) and would likely bring down the app since this is running on the activity's thread and something like a null pointer exception (lord knows I get those) causes the app to crash. In your case it seems that neither of these is happening. You seem to be left looking at an empty activity window and that is what I would expect if my simple parsing went south on the very first line. All good input though. Thanks

hippoma...@gmail.com

unread,
Mar 31, 2014, 4:40:44 PM3/31/14
to tas...@googlegroups.com
Well, catching Throwable might still be good, just for a debug test ... not for your final app.

But I agree that it's not likely that this is due to an uncaught Throwable.
.

hippoma...@gmail.com

unread,
Mar 31, 2014, 4:52:17 PM3/31/14
to tas...@googlegroups.com
Out of curiosity, why aren't you simply getting the all the settings from Settings.Global, Settings.System, and Settings.Secure?
.

David White

unread,
Mar 31, 2014, 7:35:33 PM3/31/14
to tas...@googlegroups.com
Good question. What I want to do is list out ALL of the settings that are on the system. I went looking for a method on these classes to permit an iteration over the entire set of keys as one might do with an app's shared preferences. To my surprise, I could not find any in Settings, the classes you mention, or the base classes. Can you? Without that, I was hard-pressed. As I have previously learned with my app SpenPowerSavingWidget, there may well be many more settings in the system than are documented on the pages for the classes below. So somehow, I wanted to get a comprehensive list so I could allow users to see/search them all. The only way I could do that was to query the underlying SQLite database which, by the way, proves to NOT always have the most up-to-date values for the settings. So I use the database to get the names and then query them all individually using the classes you mention to make sure I am showing users up-to-date information. Even at that I may be missing something since I am not quite sure when the "cache" of these is flushed to the database. It certainly does not seem to happen with every value change.

hippoma...@gmail.com

unread,
Mar 31, 2014, 10:06:15 PM3/31/14
to tas...@googlegroups.com


On Monday, March 31, 2014 7:35:33 PM UTC-4, David White wrote:
Good question. What I want to do is list out ALL of the settings that are on the system. I went looking for a method on these classes to permit an iteration over the entire set of keys as one might do with an app's shared preferences. To my surprise, I could not find any in Settings, the classes you mention, or the base classes. Can you? Without that, I was hard-pressed. As I have previously learned with my app SpenPowerSavingWidget, there may well be many more settings in the system than are documented on the pages for the classes below. So somehow, I wanted to get a comprehensive list so I could allow users to see/search them all. The only way I could do that was to query the underlying SQLite database which, by the way, proves to NOT always have the most up-to-date values for the settings. So I use the database to get the names and then query them all individually using the classes you mention to make sure I am showing users up-to-date information. Even at that I may be missing something since I am not quite sure when the "cache" of these is flushed to the database. It certainly does not seem to happen with every value change.

Yes, there is no method to directly get all the settings, but there might be a way to do so indirectly.

These Settings.* classes are subclasses of NameValueTable, and there might be ways to connect that to a ContentResolver and loop through it via a cursor.

Tomorrow or the next day, I'll have time to play with this.
.

David White

unread,
Apr 2, 2014, 3:45:07 PM4/2/14
to tas...@googlegroups.com
Just FYI - I did release an update that tries to "fix" the problem you are seeing by including the sqlite executable pulled from a version 4.4 emulator and deploying that one on KitKat devices. I also added a check for the executable on file in its "normal" location /system/xbin and I just use that if found. Perhaps you'll get further with this one using the Explore Settings feature. Thanks

hippoma...@gmail.com

unread,
Apr 2, 2014, 7:27:29 PM4/2/14
to tas...@googlegroups.com
On Wednesday, April 2, 2014 3:45:07 PM UTC-4, David White wrote:
Just FYI - I did release an update that tries to "fix" the problem you are seeing by including the sqlite executable pulled from a version 4.4 emulator and deploying that one on KitKat devices. I also added a check for the executable on file in its "normal" location /system/xbin and I just use that if found. Perhaps you'll get further with this one using the Explore Settings feature. Thanks

It's fixed!

Good job! (applause)

I didn't realize that I already had /system/xbin/sqlite3 installed on my system. I previously was only looking for "sqlite" (without the "3"). The fact that the executable is called "sqlite3" on my linux box should have tipped me off. Anyway, I'm guessing that you are using that executable on my device, because my /data/data/whitedavidp.systemsettingsfortasker/files directory is now empty.

Anyway, thank you for all your work on this!
.

 

David White

unread,
Apr 2, 2014, 7:34:08 PM4/2/14
to tas...@googlegroups.com
Wow that is good news. Some devices definitely do not have /system/xbin/sqlite3 installed. My Samsung Note lacks it but my Minix Neo X5 TV box has it. Go figure. Anyhow, you are correct that my app tries to clean up the stuff that didn't work. Do you think you could possibly send a copy of your /system/xbin/sqlite3 to me via the email link on my app's page in the Play Store? I would like to check and see if it is the same as the one I pulled from the KitKat emulator. I appreciate your bringing the issue to my attention and the help in getting this running on your device.

hippoma...@gmail.com

unread,
Apr 4, 2014, 5:56:43 PM4/4/14
to tas...@googlegroups.com
.On Wednesday, April 2, 2014 7:34:08 PM UTC-4, David White wrote:
... Do you think you could possibly send a copy of your /system/xbin/sqlite3 to me via the email link on my app's page in the Play Store? ...


Sure! I'm happy to send it this weekend, probably Sunday. I'm up to my ears right now, for the next day or so. Watch for it Sunday afternoon.
.

Dion GeBorde

unread,
Jun 5, 2014, 10:48:07 PM6/5/14
to tas...@googlegroups.com
David,

This looks to be a SUPER addition to the Tasker collection!

My situation is that I just took the OTA update on my Verizon Galaxy Note 3 to kitkat, so I have no way to root my device at this time. Do you have any suggestion as to how I might get the settings & values listings for my phone?



On Saturday, March 29, 2014 5:38:46 PM UTC-7, David White wrote:
In case anyone is interested, I have just published a new companion app that permits Tasker to:

(a) Access the current value of any Android setting in the System, Secure, or Global (on 4.2 and above) namespaces in the form of a global variable set in response to a Send Intent command.

(b) Be notified, in the form of a global variable set, when the value of a monitored Android setting changes. Monitoring and notification can be set up via the app's user interface or via Send Intent commands from Tasker. In either case, monitoring and notification restarts automatically after device reboot.

To assist in locating the names of desired Android settings, the app provides rooted users the ability to list all known Android settings and their current values. This permits viewing of non-standard (ie, not documented) setting names.

For more details, please see the System Settings For Tasker page on the Play Store.

David White

unread,
Jun 7, 2014, 9:18:03 PM6/7/14
to tas...@googlegroups.com

Michael Teegarden

unread,
Aug 1, 2014, 4:16:34 PM8/1/14
to tas...@googlegroups.com
@DavidWhite,

I was reading a response to a question on Stack Overflow about sqlite3 and someone posted a link to this discussion. It was said that you compiled a binary for kitkat. The only version I can seem to get is from busybox installer and it's outdated. Could you post a link to it for me please. I would like to have a copy that I can install to xbin myself...what exactly would the permissions be btw?

David White

unread,
Aug 1, 2014, 5:12:40 PM8/1/14
to tas...@googlegroups.com
Hi Michael,

You sound like you may be a developer on Android. So you might want to
try getting it the way I did. I pulled the sqlite binary from a KitKat
system image downloaded from Google. I used the adb pull command. I got
the idea from this post
<http://stackoverflow.com/questions/3645319/why-do-i-get-a-sqlite3-not-found-error-on-a-rooted-nexus-one-when-i-try-to-op>.
I think you will need root to put the file into /system/xbin. In my app
mentioned here, I have to execute the command I want as root. Your
mileage may vary.

Cheers

Michael Teegarden

unread,
Aug 2, 2014, 5:00:03 PM8/2/14
to tas...@googlegroups.com

Not quite a Dev yet, so much as an advanced user/Root and Android enthusiast. I need a sqlite3 installed to allow Titanium Backup to restore Device ID after a fresh flash and market re-linking. And I would like to be able to just push it to system manually. I don't have a PC right now either

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/sRJKsaulGVg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Matt R

unread,
Aug 2, 2014, 5:17:17 PM8/2/14
to tas...@googlegroups.com
Titanium backup has an sqlite3 binary in its data folder.

Matt

Reply all
Reply to author
Forward
0 new messages