File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,10 @@ export class AndroidUsbLiveSyncService extends androidLiveSyncServiceLib.Android
118
118
let commandsFileDevicePath = this . $mobileHelper . buildDevicePath ( deviceAppData . deviceProjectRootPath , AndroidUsbLiveSyncService . LIVESYNC_COMMANDS_FILE_NAME ) ;
119
119
this . createCommandsFileOnDevice ( commandsFileDevicePath , commands ) . wait ( ) ;
120
120
121
- this . device . adb . executeShellCommand ( `"cat ${ commandsFileDevicePath } | run-as ${ deviceAppData . appIdentifier } "` ) . wait ( ) ;
121
+ let result = this . device . adb . executeShellCommand ( `"cat ${ commandsFileDevicePath } | run-as ${ deviceAppData . appIdentifier } "` ) . wait ( ) ;
122
+ if ( result . indexOf ( "Permission denied" ) !== - 1 ) {
123
+ this . device . adb . executeShellCommand ( `${ commandsFileDevicePath } ` ) . wait ( ) ;
124
+ }
122
125
}
123
126
124
127
this . device . applicationManager . restartApplication ( deviceAppData . appIdentifier ) . wait ( ) ;
You can’t perform that action at this time.
0 commit comments