OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 ############################################################################### | 2 ############################################################################### |
3 # Copyright 2015 Google Inc. | 3 # Copyright 2015 Google Inc. |
4 # | 4 # |
5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
7 ############################################################################### | 7 ############################################################################### |
8 # | 8 # |
9 # ios_setup.sh: Sets environment variables used by other iOS scripts. | 9 # ios_setup.sh: Sets environment variables used by other iOS scripts. |
10 | 10 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 | 96 |
97 # ios_umount: unmounts the ios device. | 97 # ios_umount: unmounts the ios device. |
98 ios_umount() { | 98 ios_umount() { |
99 umount $IOS_MOUNT_POINT | 99 umount $IOS_MOUNT_POINT |
100 sleep 1 | 100 sleep 1 |
101 } | 101 } |
102 | 102 |
103 # ios_restart: restarts the iOS device. | 103 # ios_restart: restarts the iOS device. |
104 ios_restart() { | 104 ios_restart() { |
| 105 ios_umount || true |
105 idevicediagnostics restart | 106 idevicediagnostics restart |
106 } | 107 } |
107 | 108 |
108 # ios_pull(ios_src, host_dst): Copies the content of ios_src to host_dst. | 109 # ios_pull(ios_src, host_dst): Copies the content of ios_src to host_dst. |
109 # The path is relative to the 'Documents' folder on the device. | 110 # The path is relative to the 'Documents' folder on the device. |
110 ios_pull() { | 111 ios_pull() { |
111 # read input params | 112 # read input params |
112 local IOS_SRC="$IOS_MOUNT_POINT/$IOS_DOCS_DIR/$1" | 113 local IOS_SRC="$IOS_MOUNT_POINT/$IOS_DOCS_DIR/$1" |
113 local HOST_DST="$2" | 114 local HOST_DST="$2" |
114 | 115 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 # adb_push_if_needed $HOST_SRC $ANDROID_DST | 179 # adb_push_if_needed $HOST_SRC $ANDROID_DST |
179 # else | 180 # else |
180 # echo -n "$ANDROID_DST " | 181 # echo -n "$ANDROID_DST " |
181 # $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" | 182 # $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" |
182 # $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 183 # $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
183 # fi | 184 # fi |
184 # fi | 185 # fi |
185 # } | 186 # } |
186 | 187 |
187 # setup_device "${DEVICE_ID}" | 188 # setup_device "${DEVICE_ID}" |
OLD | NEW |