OSDN Git Service

Added setup commands and option to specify device
[android-x86/system-extras.git] / app-launcher / app-launcher
1 #!/bin/sh
2
3 parseoptions() {
4     verbose=false
5     user_experience=false
6     little_cores_off=false
7     iterations=0
8     pagecached=false
9
10     adb="adb"
11     while [ $# -gt 1 ]
12     do
13         case $1 in
14             -a)
15                 ;;
16             -b)
17                 little_cores_off=true
18                 ;;
19             -c)
20                 pagecached=true
21                 ;;
22             -h)
23                 usage
24                 ;;
25             -s)
26                 if [ -z $2 ]; then
27                     usage
28                 fi
29                 adb="adb -s $2"
30                 shift
31                 ;;
32             -u)
33                 user_experience=true
34                 ;;
35             -v)
36                 verbose=true
37                 ;;
38             *)
39                 usage
40                 ;;
41             esac
42         shift
43     done
44
45     iterations=$1
46     if [ $iterations -lt 100 ]; then
47         usage
48     fi
49 }
50
51 getstats () {
52     infile=$1
53     app=$2
54     echo "Data for $app :"
55
56     # Activity Manager reports ThisTime and TotalTime. TotalTime seems to be
57     # a more measure of the launch from the users perspective. So using TotalTime
58     # as our metric for launch latency
59
60     # From Activity Manager
61     echo "Launch Time (TotalTime) :"
62     fgrep TotalTime $infile | awk '{print $2}' | computestats
63
64     # Data from simpleperf
65     echo "cpu-cycles :"
66     fgrep cpu-cycles $infile | awk '{print $1}' | sed s/,//g | computestats
67
68     # CPU util% Data from /proc/stat
69     echo "cpu-util% :"
70     fgrep 'Total CPU util' $infile | awk '{print $5}' | computestatsf
71     echo "user-cpu-util% :"
72     fgrep 'User CPU util' $infile | awk '{print $5}' | computestatsf
73     echo "sys-cpu-util% (incl hardirq/softirq) :"
74     fgrep 'Sys CPU util' $infile | awk '{print $5}' | computestatsf
75
76     if [ $verbose == true ]; then
77         echo "instructions : "
78         fgrep instructions $infile | awk '{print $1}' | sed s/,//g | computestats
79
80         echo "cycles per instruction : "
81         fgrep instructions $infile | awk '{print $4}' | sed s/,//g | computestatsf
82
83         echo "branch-misses : "
84         fgrep branch-misses $infile | awk '{print $1}' | sed s/,//g | computestats
85
86         echo "context-switches : "
87         fgrep context-switches $infile | awk '{print $1}' | sed s/,//g | computestats
88
89         echo "page-faults : "
90         fgrep page-faults $infile | awk '{print $1}' | sed s/,//g | computestats
91     fi
92
93     if [ $system_bdev_set == true ]; then
94         # (Storage) Data from /proc we've collected
95         echo "KB read for $system_block_device blkdev :"
96         fgrep KB $infile | grep system | awk '{print $5}' | computestats
97
98         echo "iowait% :"
99         fgrep IOwait $infile | awk '{print $3}' | computestatsf
100
101         echo "Device util% for $system_block_device blkdev :"
102         fgrep 'Device util' $infile | awk '{print $4}' | computestatsf
103     fi
104 }
105
106 cpufreq_volantis() {
107     echo "Setting Governor to performance"
108     if [ $little_cores_off == true ]; then
109         echo "Cannot turn off Little cores on $model"
110         exit 1
111     fi
112     i=0
113     num_cores=2
114     while [ $i -lt  $num_cores ]
115     do
116         $adb shell "echo performance  > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_g\
117 overnor"
118         $adb shell "echo 2499000 > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_max_fr\
119 eq"
120         i=`expr $i + 1`
121     done
122     # Lock the GPU frequencies
123     echo -n 852000000 > /d/clock/override.gbus/rate
124     echo -n 1 > /d/clock/override.gbus/state
125 }
126
127 cpufreq_fugu() {
128     echo "Setting Governor to performance"
129     if [ $little_cores_off == true ]; then
130         echo "Cannot turn off Little cores on $model"
131         exit 1
132     fi
133     i=0
134     num_cores=4
135     while [ $i -lt  $num_cores ]
136     do
137         $adb shell "echo performance  > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_governor"
138         $adb shell "echo 1833000 > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_max_freq"
139         i=`expr $i + 1`
140     done
141 }
142
143 cpufreq_taimen_walleye () {
144     echo "Setting Governor to performance"
145     # GPU Governor and Frequency
146     $adb shell 'echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor'
147     $adb shell 'echo 624000000 > /sys/class/kgsl/kgsl-3d0/devfreq/max_freq'
148     if [ $little_cores_off == true ]; then
149         # Disable Little Cores, force app to run on big cores
150         echo "Disabling Little Cores"
151         $adb shell 'echo 0 > /sys/devices/system/cpu/cpu0/online'
152         $adb shell 'echo 0 > /sys/devices/system/cpu/cpu1/online'
153         $adb shell 'echo 0 > /sys/devices/system/cpu/cpu2/online'
154         $adb shell 'echo 0 > /sys/devices/system/cpu/cpu3/online'
155     else
156         echo "Enabling All Cores"
157         $adb shell 'echo 1 > /sys/devices/system/cpu/cpu0/online'
158         $adb shell 'echo 1 > /sys/devices/system/cpu/cpu1/online'
159         $adb shell 'echo 1 > /sys/devices/system/cpu/cpu2/online'
160         $adb shell 'echo 1 > /sys/devices/system/cpu/cpu3/online'
161         $adb shell 'echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'
162         $adb shell 'echo 1900800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq'
163     fi
164     # Set Governor to performance, up scaling_max_frequency to highest
165     $adb shell 'echo performance  > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor'
166     # Only necessary to set max_freq on cpu4, cpu5-7 are in same cluster and will
167     # automatically get the same settings
168     $adb shell 'echo 2457600 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq'
169 }
170
171 cpufreq_marlin_sailfish () {
172     echo "Setting Governor to performance"
173     # GPU Governor and Frequency
174     $adb shell 'echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor'
175     $adb shell 'echo 624000000 > /sys/class/kgsl/kgsl-3d0/devfreq/max_freq'
176     if [ $little_cores_off == true ]; then
177         # Disable Little Cores, force app to run on big cores
178         echo "Disabling Little Cores"
179         $adb shell 'echo 0 > /sys/devices/system/cpu/cpu0/online'
180         $adb shell 'echo 0 > /sys/devices/system/cpu/cpu1/online'
181     else
182         echo "Enabling All Cores"
183         $adb shell 'echo 1 > /sys/devices/system/cpu/cpu0/online'
184         $adb shell 'echo 1 > /sys/devices/system/cpu/cpu1/online'
185         $adb shell 'echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'
186         $adb shell 'echo 1996800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq'
187         # cpu1 needed ?
188         $adb shell 'echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor'
189         $adb shell 'echo 1996800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq'
190     fi
191     # Set Governor to performance, up scaling_max_frequency to highest
192     $adb shell 'echo performance  > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor'
193     # Only necessary to set max_freq on cpu2, cpu3 is in same cluster and will
194     # automatically get the same settings
195     $adb shell 'echo 2150400 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq'
196 }
197
198 cpufreq_angler () {
199     echo "Setting Governor and Frequency"
200     # GPU Governor and Frequency
201     $adb shell "echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor"
202     $adb shell "echo 0 > /sys/class/kgsl/kgsl-3d0/bus_split"
203     $adb shell "echo 1 > /sys/class/kgsl/kgsl-3d0/force_clk_on"
204     $adb shell "echo 10000 > /sys/class/kgsl/kgsl-3d0/idle_timer"
205     if [ $little_cores_off == true ]; then
206         # Disable Little Cores, force app to run on big cores
207         echo "Disabling Little Cores"
208         i=0
209         num_cores=4
210         while [ $i -lt $num_cores ]
211         do
212             $adb shell "echo 0 > /sys/devices/system/cpu/cpu$i/online"
213             i=`expr $i + 1`
214         done
215     else
216         echo "Enabling All Cores"
217         # Enable Little cores here, set governor to performance
218         # Lock frequency of little cores
219         i=0
220         num_cores=4
221         while [ $i -lt $num_cores ]
222         do
223             $adb shell "echo 1 > /sys/devices/system/cpu/cpu$i/online"
224             $adb shell "echo performance > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_governor"
225             # Lock frequency of little cores
226             $adb shell "echo 1555200 > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_max_freq"
227             i=`expr $i + 1`
228         done
229     fi
230     i=4
231     num_cores=8
232     while [ $i -lt $num_cores ]
233     do
234         $adb shell "echo performance > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_governor"
235         # Lock frequency of big cores
236         $adb shell "echo 1958400 > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_max_freq"
237         i=`expr $i + 1`
238     done
239 }
240
241 get_taimen_walleye_devnames () {
242     # This bit of code required to get the block dev for /system and /vendor
243     # Suffix can be _a or _b, depending on what the active /system partition is
244 #    suffix=`$adb shell getprop ro.boot.slot_suffix`
245     # Get the blockdevice using the suffix we got above
246 #    system_block_device=`$adb shell ls -l /dev/block/platform/soc/*ufs*/by-name/system$suffix | awk '{ print $10 }' `
247     # Vendor is more straightforward, but we don't use it right now
248 #    vendor_block_device=`$adb shell df /vendor | grep -v Filesystem | awk '{print $1}' `
249     # finally extract the last component of the absolute device pathname we got above
250 #    system_block_device=`echo $system_block_device | awk 'BEGIN { FS ="/" } ; { print $4 }' `
251 #    vendor_block_device=`echo $vendor_block_device | awk 'BEGIN { FS ="/" } ; { print $4 }' `
252     system_bdev_set=true
253 #   For now, hardcode sda for Marlin/Sailfish block device
254 #   XXX - We'll get stats for entire device
255     system_block_device=sda
256     echo Block Device $system_block_device
257 }
258
259 #
260 # This strange bit of logic is needed to get the underlying block devices for /system
261 # for Marlin/Sailfish
262 #
263 get_marlin_sailfish_devnames () {
264     # This bit of code required to get the block dev for /system and /vendor
265     # Suffix can be _a or _b, depending on what the active /system partition is
266 #    suffix=`$adb shell getprop ro.boot.slot_suffix`
267     # Get the blockdevice using the suffix we got above
268 #    system_block_device=`$adb shell ls -l /dev/block/platform/soc/*ufs*/by-name/system$suffix | awk '{ print $10 }' `
269     # Vendor is more straightforward, but we don't use it right now
270 #    vendor_block_device=`$adb shell df /vendor | grep -v Filesystem | awk '{print $1}' `
271     # finally extract the last component of the absolute device pathname we got above
272 #    system_block_device=`echo $system_block_device | awk 'BEGIN { FS ="/" } ; { print $4 }' `
273 #    vendor_block_device=`echo $vendor_block_device | awk 'BEGIN { FS ="/" } ; { print $4 }' `
274     system_bdev_set=true
275 #   For now, hardcode sda for Marlin/Sailfish block device
276 #   XXX - We'll get stats for entire device
277     system_block_device=sda
278     echo Block Device $system_block_device
279 }
280
281 get_angler_devnames () {
282     # Get the underlying bdev from the "by-name" mapping
283     system_block_device=`$adb shell 'find /dev/block/platform -name by-name | xargs ls -l' | grep system | awk '{ print $10 }' `
284     # extract the last component of the absolute device pathname we got above
285     system_block_device=`echo $system_block_device | awk 'BEGIN { FS ="/" } ; { print $4 }' `
286     # vendor is unused right now, but get the bdev anyway in case we decide to use it
287     # Get the underlying bdev from the "by-name" mapping
288     vendor_block_device=`$adb shell 'find /dev/block/platform -name by-name | xargs ls -l' | grep vendor | awk '{ print $10 }' `
289     # extract the last component of the absolute device pathname we got above
290    vendor_block_device=`echo $vendor_block_device | awk 'BEGIN { FS ="/" } ; { print $4 }' `
291    system_bdev_set=true
292 }
293
294 get_fugu_devnames () {
295     system_block_device=`$adb shell ls -l /dev/block/by-name/system | awk '{ print $10 }' `
296     system_block_device=`echo $system_block_device | awk 'BEGIN { FS ="/" } ; { print $4 }' `
297     system_bdev_set=true
298 }
299
300 get_volantis_devnames () {
301     # Hardcoding all of the mmcblk0 device for now
302     system_block_device=mmcblk0
303     system_bdev_set=true
304 }
305
306 system_stats_before() {
307     if [ $system_bdev_set == true ]; then
308         # Get BEFORE read stats for /system
309         $adb shell 'cat /proc/diskstats' | grep -w $system_block_device > /tmp/$model-system
310         BEFORE_RD_IOS_SYSTEM=`awk '{ print $4 }' /tmp/$model-system`
311         BEFORE_RD_SECTORS_SYSTEM=`awk '{ print $6 }' /tmp/$model-system`
312         # iowait% computation
313         $adb shell 'cat /proc/stat' | grep -w cpu > /tmp/procstat
314         user_ticks_before=`awk '{ print ($2 + $3) }' /tmp/procstat`
315         sys_ticks_before=`awk '{ print ($4 + $7 + $8) }' /tmp/procstat`
316         cpubusy_ticks_before=`awk '{ print ($2 + $3 + $4 + $7 + $8) }' /tmp/procstat`
317         iowait_ticks_before=`awk '{ print $6 }' /tmp/procstat`
318         total_ticks_before=`awk '{ print ($2 + $3 + $4 + $5 + $7 + $8) }' /tmp/procstat`
319         # Device util% computation
320         # Note hz=100, so multiplying uptime (in seconds) by 100, gives us
321         # the uptime in hz.
322         $adb shell 'cat /proc/uptime' > /tmp/uptime
323         uptime_before_hz=`awk '{ print ($1 * 100) }' /tmp/uptime`
324         # Note that the device (busy) ticks is in ms. Since hz=100, dividing
325         # device (busy) ticks by 10, gives us this in the correct ticks units
326         device_util_before_hz=`awk '{ print ($13 / 10) }' /tmp/$model-system`
327     fi
328 }
329
330 system_stats_after() {
331     if [ $system_bdev_set == true ]; then
332         # Get AFTER read stats for /system
333         $adb shell 'cat /proc/diskstats' | grep -w $system_block_device > /tmp/$model-system
334         AFTER_RD_IOS_SYSTEM=`awk '{ print $4 }' /tmp/$model-system`
335         AFTER_RD_SECTORS_SYSTEM=`awk '{ print $6 }' /tmp/$model-system`
336         # iowait% computation
337         $adb shell 'cat /proc/stat' | grep -w cpu > /tmp/procstat
338         user_ticks_after=`awk '{ print ($2 + $3) }' /tmp/procstat`
339         sys_ticks_after=`awk '{ print ($4 + $7 + $8) }' /tmp/procstat`
340         cpubusy_ticks_after=`awk '{ print ($2 + $3 + $4 + $7 + $8) }' /tmp/procstat`
341         iowait_ticks_after=`awk '{ print $6 }' /tmp/procstat`
342         total_ticks_after=`awk '{ print ($2 + $3 + $4 + $5 + $7 + $8) }' /tmp/procstat`
343         # Device util% computation
344         # Note hz=100, so multiplying uptime (in seconds) by 100, gives us
345         # the uptime in hz.
346         $adb shell 'cat /proc/uptime' > /tmp/uptime
347         uptime_after_hz=`awk '{ print ($1 * 100) }' /tmp/uptime`
348         # Note that the device (busy) ticks is in ms. Since hz=100, dividing
349         # device (busy) ticks by 10, gives us this in the correct ticks units
350         device_util_after_hz=`awk '{ print ($13 / 10) }' /tmp/$model-system`
351     fi
352 }
353
354 system_stats_delta() {
355     if [ $system_bdev_set == true ]; then
356         # Sectors to KB
357         READ_KB_SYSTEM=`expr $AFTER_RD_SECTORS_SYSTEM - $BEFORE_RD_SECTORS_SYSTEM`
358         READ_KB_SYSTEM=`expr $READ_KB_SYSTEM / 2`
359         echo Read IOs /system = `expr $AFTER_RD_IOS_SYSTEM - $BEFORE_RD_IOS_SYSTEM`
360         echo Read KB /system = $READ_KB_SYSTEM
361         echo $iowait_ticks_before $iowait_ticks_after $total_ticks_before $total_ticks_after | awk '{ printf "IOwait = %.2f\n", (($2 - $1) * 100.0) / ($4 - $3) }'
362         echo $device_util_before_hz $device_util_after_hz $uptime_before_hz $uptime_after_hz | awk '{ printf "Device util% = %.2f\n", (($2 - $1) * 100.0) / ($4 - $3) }'
363         echo $user_ticks_after $user_ticks_before $total_ticks_after $total_ticks_before | awk '{ printf "User CPU util% = %.2f\n", (($1 - $2) * 100.0) / ($3 - $4) }'
364         echo $sys_ticks_after $sys_ticks_before $total_ticks_after $total_ticks_before | awk '{ printf "Sys CPU util% = %.2f\n", (($1 - $2) * 100.0) / ($3 - $4) }'
365         echo $cpubusy_ticks_after $cpubusy_ticks_before $total_ticks_after $total_ticks_before | awk '{ printf "Total CPU util% = %.2f\n", (($1 - $2) * 100.0) / ($3 - $4) }'
366     fi
367 }
368
369 launch_app() {
370     package=$1
371     activity=$2
372     $adb shell "am force-stop $package"
373     sleep 1
374
375     printf "Testing %s: \n" "$package" 1>&2
376     i=0
377     while [ $i -lt $iterations ]
378     do
379         if [ $pagecached == false ]; then
380             $adb shell 'echo 3 > /proc/sys/vm/drop_caches'
381         fi
382         printf '[ %d%% ]\r' "$(($i * 100 / $iterations))" 1>&2
383         # The -W argument to am start forces am start to wait till the launch completes.
384         # The -S argument forces it to kill any existing app that is running first
385         # eg. adb shell 'am start -W -S -n com.android.chrome/com.google.android.apps.chrome.Main'
386         system_stats_before
387         $adb shell "simpleperf stat -a am start -W -n $package/$activity"
388         system_stats_after
389         system_stats_delta
390         sleep 1
391         $adb shell "am force-stop $package"
392         sleep 1
393         i=`expr $i + 1`
394     done
395     printf "\n" 1>&2
396 }
397
398 launch_fugu_apps() {
399     launch_app com.google.android.youtube.tv com.google.android.apps.youtube.tv.activity.TvGuideActivity > youtube-$model
400     getstats youtube-$model YouTube
401     launch_app com.google.android.play.games com.google.android.gms.games.pano.activity.PanoGamesOnboardHostActivity > games-$model
402     getstats games-$model Games
403     launch_app com.google.android.music com.android.music.activitymanagement.TopLevelActivity > music-$model
404     getstats music-$model Music
405 }
406
407 launch_phone_apps() {
408     launch_app com.android.chrome com.google.android.apps.chrome.Main > chrome-$model
409     getstats chrome-$model Chrome
410     launch_app com.google.android.GoogleCamera com.android.camera.CameraActivity > camera-$model
411     getstats camera-$model Camera
412     launch_app com.google.android.apps.maps com.google.android.maps.MapsActivity > maps-$model
413     getstats maps-$model Maps
414     launch_app com.google.android.youtube com.google.android.apps.youtube.app.WatchWhileActivity > youtube-$model
415     getstats youtube-$model YouTube
416 }
417
418 usage() {
419     echo 'Usage: app-launcher [-c|-v|-s <serial num>] -a|-b|-u num-iterations'
420     echo 'where num-iterations >= 100'
421     echo '-v (optional) for verbose stats dump'
422     echo '-s <serial num> (optional) run test on specific device'
423     echo '-a|-b|-u required:'
424     echo '        -a:all cores'
425     echo '        -b:only big cores'
426     echo '        -c:pagecached. Do not drop pagecache before each launch (not default)'
427     echo '        -h:Dump this help menu'
428     echo '        -u:user experience, no change to cpu/gpu frequencies or governors'
429     echo '        -a/-b locks CPU/GPU freqs to max, performance governor, thermal/perfd off'
430     echo '        -u runs with default device configs, as users would see it'
431     exit 1
432 }
433
434 setup() {
435     # Disable automatic rotation, NFC and wifi
436     # This works on OC, but haven't tested on NYC or earlier
437     $adb shell 'content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0'
438     $adb shell 'svc nfc disable'
439     $adb shell 'svc wifi disable'
440
441     # Set developer options, will automatically 'Stay Awake'
442     $adb shell 'am start -n com.android.settings/.DevelopmentSettings'
443     # Set screen timeout to 30 minutes
444     $adb shell 'settings put system screen_off_timeout 1800000'
445     # Clear all notifications
446     $adb shell 'service call notification 1'
447     # Go to home screen
448     $adb shell 'input keyevent KEYCODE_WAKEUP' && sleep 0.5
449     $adb shell 'input keyevent KEYCODE_ENTER'  && sleep 0.5
450     $adb shell 'input keyevent KEYCODE_HOME'   && sleep 0.5
451     sleep 2
452     # TODO: kill all background apps
453     # TODO: clear popups
454 }
455
456 #
457 # The main() part of the script follows :
458 #
459
460 if [ $# -lt 2 ]; then
461     usage
462 fi
463
464 which computestats > /dev/null
465 if [ $? != 0 ]; then
466     echo "ERROR: Please add computestats utiliy to your PATH"
467     exit 1
468 fi
469
470 which computestatsf > /dev/null
471 if [ $? != 0 ]; then
472     echo "Error: Please add computestatsf utility to your PATH"
473     exit 1
474 fi
475
476 parseoptions $@
477
478 $adb root && $adb wait-for-device
479
480 if [ $user_experience == false ]; then
481     # Important to stop the thermal-engine to prevent throttling while test is running
482     # and stop perfd
483     $adb shell 'stop thermal-engine'
484     $adb shell 'stop perfd'
485 else
486     echo "User Experience: Default Configs. No changes to cpufreq settings"
487 fi
488
489 model=`$adb shell getprop ro.product.name`
490 # Releases are inconsistent with various trailing characters, remove them all
491 model=`echo $model | sed 's/[ \t\r\n]*$//' `
492
493 echo Found $model Device
494
495 system_bdev_set=false
496 case $model in
497     taimen | muskie | walleye)
498         if [ $user_experience == false ]; then
499             cpufreq_taimen_walleye
500         fi
501         get_taimen_walleye_devnames
502         ;;
503     marlin | sailfish)
504         if [ $user_experience == false ]; then
505             cpufreq_marlin_sailfish
506         fi
507         get_marlin_sailfish_devnames
508         ;;
509     angler)
510         if [ $user_experience == false ]; then
511             cpufreq_angler
512         fi
513         get_angler_devnames
514         ;;
515     fugu)
516         if [ $user_experience == false ]; then
517             cpufreq_fugu
518         fi
519         get_fugu_devnames
520         ;;
521     volantis | volantisg)
522         if [ $user_experience == false ]; then
523             cpufreq_volantis
524         fi
525         get_volantis_devnames
526         ;;
527     *)
528         echo Unknown Device $model
529         exit 1
530         ;;
531 esac
532
533 setup
534
535 #
536 # launch each app in turn
537 #
538 if [ $model == "fugu" ]; then
539     launch_fugu_apps
540 else # Phone Apps
541     launch_phone_apps
542 fi