From 1048ea4fd2ce7e390ccc25d2fc1666a13701a654 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 17 Jul 2019 20:11:56 +0200 Subject: [PATCH] Trigger secondary adbd only if we managed to disable first one --- vndk-detect | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vndk-detect b/vndk-detect index ab2c9d8..1073a7c 100644 --- a/vndk-detect +++ b/vndk-detect @@ -10,9 +10,10 @@ while read version;do done if [ -d /sys/module/five ];then - mount -o bind /system/phh/empty /sbin/adbd - setprop sys.phh.five true -else + if mount -o bind /system/phh/empty /sbin/adbd;then + setprop sys.phh.five true + fi +else if [ -f /sbin/adbd ];then mount -o bind /system/bin/adbd /sbin/adbd fi if ( getprop ro.hardware | grep -qE '(kirin970|hi3660|hi6250|hi3670)' );then