File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 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
118118 let commandsFileDevicePath = this . $mobileHelper . buildDevicePath ( deviceAppData . deviceProjectRootPath , AndroidUsbLiveSyncService . LIVESYNC_COMMANDS_FILE_NAME ) ;
119119 this . createCommandsFileOnDevice ( commandsFileDevicePath , commands ) . wait ( ) ;
120120
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+ }
122125 }
123126
124127 this . device . applicationManager . restartApplication ( deviceAppData . appIdentifier ) . wait ( ) ;
You can’t perform that action at this time.
0 commit comments