xref: /aosp_15_r20/external/angle/build/android/pylib/restart_adbd.sh (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker#!/system/bin/sh
2*8975f5c5SAndroid Build Coastguard Worker
3*8975f5c5SAndroid Build Coastguard Worker# Copyright 2014 The Chromium Authors
4*8975f5c5SAndroid Build Coastguard Worker# Use of this source code is governed by a BSD-style license that can be
5*8975f5c5SAndroid Build Coastguard Worker# found in the LICENSE file.
6*8975f5c5SAndroid Build Coastguard Worker
7*8975f5c5SAndroid Build Coastguard Worker# Android shell script to restart adbd on the device. This has to be run
8*8975f5c5SAndroid Build Coastguard Worker# atomically as a shell script because stopping adbd prevents further commands
9*8975f5c5SAndroid Build Coastguard Worker# from running (even if called in the same adb shell).
10*8975f5c5SAndroid Build Coastguard Worker
11*8975f5c5SAndroid Build Coastguard Workertrap '' HUP
12*8975f5c5SAndroid Build Coastguard Workertrap '' TERM
13*8975f5c5SAndroid Build Coastguard Workertrap '' PIPE
14*8975f5c5SAndroid Build Coastguard Worker
15*8975f5c5SAndroid Build Coastguard Workerfunction restart() {
16*8975f5c5SAndroid Build Coastguard Worker  stop adbd
17*8975f5c5SAndroid Build Coastguard Worker  start adbd
18*8975f5c5SAndroid Build Coastguard Worker}
19*8975f5c5SAndroid Build Coastguard Worker
20*8975f5c5SAndroid Build Coastguard Workerrestart &
21