[Nexus 5 Android Development] indigobv:
Thanks for responding so quickly!

About your ideas, here's what I've checked/done so far:

the scripts are executable as root (I guess that's ok?). Their permissions were set to 744 and I tried changing them to 755 to allow everyone to execute, and the results were the same.

hotword detection and "touch sounds" were disabled in my previous tests, and I kept them that way.

about logcat, I'm not really sure how to issue commands to it. I'm on Windows right now, so I tried my best to export the logcat in a couple formats, including a complete one.

Every logcat and the tasker log have been recorded using the following pattern: I boot up the phone, wait for everything to initialize, start the camera and wait for Tasker to request permissions, start recording, stop recording and close the camera.

Logcat resulted from "adb shell" followed by "logcat | ps | grep GoogleCamera > /sdcard/log.txt"

3439 10047 0:06 {id.GoogleCamera} com.google.android.GoogleCamera
4431 2000 0:00 grep GoogleCamera

Logcat resulted from "adb shell" followed by "logcat | grep GoogleCamera > /sdcard/log.txt"

(In this one I opened/closed the camera a couple of times since the outputed log was empty, but aparently it was cached or something. I tried to do it in one take, but every time it would come empty until one time where I would get the same thing as below)

10-18 21:56:05.600 835 835 W PackageManager: Package com.google.android.GoogleCamera desires unavailable shared library com.google.android.gestureservice; ignoring!
10-18 21:56:05.629 835 835 W PackageManager: Not granting permission android.permission.BIND_WALLPAPER to package com.google.android.GoogleCamera (protectionLevel=18 flags=0x38583c45)
10-18 21:56:06.436 835 926 W PackageManager: Not granting permission android.permission.BIND_WALLPAPER to package com.google.android.GoogleCamera (protectionLevel=18 flags=0x38583c45)
10-18 21:57:04.922 835 1317 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=com.google.android.GoogleCamera cmp=com.google.android.GoogleCamera/com.android.camera.CameraLauncher bnds=[849,1532][1050,1784] (has extras)} from uid 10027 on display 0
10-18 21:57:04.989 835 1434 I ActivityManager: Start proc 3439:com.google.android.GoogleCamera/u0a47 for activity com.google.android.GoogleCamera/com.android.camera.CameraLauncher
10-18 21:57:05.142 3439 3439 W System : ClassLoader referenced unknown path: /system/app/GoogleCamera/lib/arm
10-18 21:57:06.029 835 867 I ActivityManager: Displayed com.google.android.GoogleCamera/com.android.camera.CameraLauncher: +1s55ms
10-18 21:57:06.134 835 867 I WindowManager: Screen frozen for +1s91ms due to Window{7acf8c0 u0 com.google.android.GoogleCamera/com.android.camera.CameraLauncher}
10-18 21:57:27.846 835 852 W ActivityManager: Activity pause timeout for ActivityRecord{5f6472e u0 com.google.android.GoogleCamera/com.android.camera.CameraLauncher t97 f}
10-18 21:58:14.699 835 1434 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=com.google.android.GoogleCamera cmp=com.google.android.GoogleCamera/com.android.camera.CameraLauncher bnds=[849,1532][1050,1784] (has extras)} from uid 10027 on display 0
10-18 21:58:15.072 835 867 I ActivityManager: Displayed com.google.android.GoogleCamera/com.android.camera.CameraLauncher: +321ms
10-18 21:58:30.884 835 852 W ActivityManager: Activity pause timeout for ActivityRecord{1e191fd u0 com.google.android.GoogleCamera/com.android.camera.CameraLauncher t98 f}
10-18 21:58:31.430 206 1742 I Camera2ClientBase: Closed Camera 0. Client was: com.google.android.GoogleCamera (PID 3439, UID 10047)
10-18 21:58:52.165 835 1432 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=com.google.android.GoogleCamera cmp=com.google.android.GoogleCamera/com.android.camera.CameraLauncher bnds=[849,1532][1050,1784] (has extras)} from uid 10027 on display 0
10-18 21:58:52.485 206 863 I CameraService: CameraService::connect call (PID 3439 "com.google.android.GoogleCamera", camera ID 0) for HAL version default and Camera API version 1
10-18 21:58:52.526 206 863 I Camera2ClientBase: Camera 0: Opened. Client: com.google.android.GoogleCamera (PID 3439, UID 10047)
10-18 21:58:52.642 835 867 I ActivityManager: Displayed com.google.android.GoogleCamera/com.android.camera.CameraLauncher: +439ms
10-18 21:59:12.386 835 852 W ActivityManager: Activity pause timeout for ActivityRecord{3df1b6b u0 com.google.android.GoogleCamera/com.android.camera.CameraLauncher t99 f}
10-18 21:59:12.948 206 863 I Camera2ClientBase: Closed Camera 0. Client was: com.google.android.GoogleCamera (PID 3439, UID 10047)
10-18 21:59:30.495 835 5638 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=com.google.android.GoogleCamera cmp=com.google.android.GoogleCamera/com.android.camera.CameraLauncher bnds=[849,1532][1050,1784] (has extras)} from uid 10027 on display 0
10-18 21:59:30.797 206 1213 I CameraService: CameraService::connect call (PID 3439 "com.google.android.GoogleCamera", camera ID 0) for HAL version default and Camera API version 1
10-18 21:59:30.836 206 1213 I Camera2ClientBase: Camera 0: Opened. Client: com.google.android.GoogleCamera (PID 3439, UID 10047)

I attached the complete logcat since the number of lines excedes the maximum accepted on a post and it is archived because it excedes the limit of 512kb, it is ~525kb unarchived.

Here is the log from Tasker:

20151018 22.04.23 P Active ID38 Camera
20151018 22.04.23 E Start ID0:0.0 TaskService
20151018 22.04.23 T Running ID23 Camcorder Tasks
20151018 22.04.23 A Disabled ID23.1 Camcorder Tasks.Var Set, %LEDpath=leds-qpnp-ee169000
20151018 22.04.23 A OK ID23.2 Camcorder Tasks.find crucial part of the path re LED control (kernel dependent)
20151018 22.04.24 A OK ID23.3 Camcorder Tasks.start
20151018 22.04.24 A OK ID23.4 Camcorder Tasks.Var Set, %srate=0
20151018 22.04.24 A Disabled ID23.5 Camcorder Tasks.Var Set, %CurrentGainSaved=%CurrentGainSaved
20151018 22.04.24 A OK ID23.6 Camcorder Tasks.Var Set, %CurrentGainTmp=0
20151018 22.04.24 A OK ID23.7 Camcorder Tasks.Var Set, %oom=0
20151018 22.04.24 A OK ID23.8 Camcorder Tasks.Var Set, %camera_oom_adj=0
20151018 22.04.24 A OK ID23.9 Camcorder Tasks.Var Set, %Var1=0
20151018 22.04.24 A OK ID23.10 Camcorder Tasks.Var Set, %scene_shown=0
20151018 22.04.24 A Disabled ID23.11 Camcorder Tasks.Run Shell
20151018 22.04.24 A OK ID23.12 Camcorder Tasks.Var Set, %cpu_set=1
20151018 22.04.24 A OK ID23.13 Camcorder Tasks.Create Scene
20151018 22.04.24 A OK ID23.14 Camcorder Tasks.Var Set, %scene_created=1
20151018 22.04.25 A OK ID23.15 Camcorder Tasks.wait
20151018 22.04.25 A OK ID23.16 Camcorder Tasks.check for soundcard status
20151018 22.04.25 A OK ID23.17 Camcorder Tasks.Var Search Replace, %Var1=1
20151018 22.04.25 A OK ID23.18 Camcorder Tasks.If
20151018 22.04.25 A OK ID23.21 Camcorder Tasks.check whether Google Camera is in foreground
20151018 22.04.26 A OK ID23.22 Camcorder Tasks.Var Set, %camera_oom_adj=%oom
20151018 22.04.26 A Disabled ID23.23 Camcorder Tasks.check whether Google Now is running (sampling rate would be 16 kHz, otherwise 48 kHz for camcorder); currently disabled as for a yet unknown reason Google Now (on any screen) disables level reporting by libaudioflinger
20151018 22.04.26 A Disabled ID23.24 Camcorder Tasks.If
20151018 22.04.26 A Disabled ID23.25 Camcorder Tasks.Goto
20151018 22.04.26 A Disabled ID23.26 Camcorder Tasks.End If
20151018 22.04.26 A OK ID23.27 Camcorder Tasks.soundcard closed
20151018 22.04.26 A OK ID23.28 Camcorder Tasks.Destroy Scene
20151018 22.04.26 A OK ID23.29 Camcorder Tasks.Run Shell
20151018 22.04.26 A OK ID23.30 Camcorder Tasks.Run Shell
20151018 22.04.26 A OK ID23.31 Camcorder Tasks.Var Set, %scene_shown=0
20151018 22.04.26 A OK ID23.32 Camcorder Tasks.Goto
20151018 22.04.26 A OK ID23.33 Camcorder Tasks.soundcard open
20151018 22.04.26 A OK ID23.38 Camcorder Tasks.if camera in foreground: continue
20151018 22.04.26 A OK ID23.42 Camcorder Tasks.if camera not in foreground: cleanup and exit
20151018 22.04.26 A OK ID23.43 Camcorder Tasks.Run Shell, %CPUgovernor=%CPUgovernor
20151018 22.04.26 A OK ID23.44 Camcorder Tasks.TODO: do this only if the first core is locked
20151018 22.04.26 A OK ID23.45 Camcorder Tasks.Var Set, %cpu_set=0
20151018 22.04.26 A OK ID23.46 Camcorder Tasks.Destroy Scene
20151018 22.04.26 A OK ID23.47 Camcorder Tasks.Run Shell
20151018 22.04.26 A OK ID23.48 Camcorder Tasks.Run Shell
20151018 22.04.26 A OK ID23.49 Camcorder Tasks.End If
20151018 22.04.26 T ExitOK ID23 Camcorder Tasks
20151018 22.04.26 E Stop ID0:0.0 TaskService
20151018 22.04.35 P Inactive ID38 Camera
20151018 22.04.35 E Start ID0:0.0 TaskService
20151018 22.04.35 T Running ID22 Undo Camcorder Tasks
20151018 22.04.35 A Disabled ID22.1 Undo Camcorder Tasks.Var Set, %LEDpath=leds-qpnp-ee169000
20151018 22.04.35 A OK ID22.2 Undo Camcorder Tasks.find crucial part of the path re LED control
20151018 22.04.36 A OK ID22.3 Undo Camcorder Tasks.Run Shell
20151018 22.04.36 A OK ID22.4 Undo Camcorder Tasks.Run Shell
20151018 22.04.36 A OK ID22.5 Undo Camcorder Tasks.Destroy Scene
20151018 22.04.36 A OK ID22.6 Undo Camcorder Tasks.Var Set, %CurrentGain=0
20151018 22.04.36 A OK ID22.7 Undo Camcorder Tasks.Var Set, %CurrentGainTmp=0
20151018 22.04.36 A OK ID22.8 Undo Camcorder Tasks.Run Shell, %CPUgovernor=%CPUgovernor
20151018 22.04.37 A Disabled ID22.9 Undo Camcorder Tasks.TODO: do this only if the first core is locked
20151018 22.04.37 T ExitOK ID22 Undo Camcorder Tasks
20151018 22.04.37 E Stop ID0:0.0 TaskService

The conclusion: I have no clue what doesn't work.