Skip to content

Commit cb23d5f

Browse files
petekanevrosen-vladimirov
authored andcommitted
change livesync dir permissions on device even if app is not restarted (#2708)
update submodule
1 parent c203cc9 commit cb23d5f

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

lib/services/livesync/android-device-livesync-service.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ class AndroidLiveSyncService implements INativeScriptDeviceLiveSyncService {
2121
}
2222

2323
public async refreshApplication(deviceAppData: Mobile.IDeviceAppData, localToDevicePaths: Mobile.ILocalToDevicePathData[], forceExecuteFullSync: boolean, projectData: IProjectData): Promise<void> {
24+
await this.device.adb.executeShellCommand(
25+
["chmod",
26+
"777",
27+
await deviceAppData.getDeviceProjectRootPath(),
28+
`/data/local/tmp/${deviceAppData.appIdentifier}`,
29+
`/data/local/tmp/${deviceAppData.appIdentifier}/sync`]
30+
);
31+
2432
let canExecuteFastSync = !forceExecuteFullSync && !_.some(localToDevicePaths, (localToDevicePath: any) => !this.$liveSyncProvider.canExecuteFastSync(localToDevicePath.getLocalPath(), projectData, deviceAppData.platform));
2533

2634
if (canExecuteFastSync) {
@@ -31,8 +39,6 @@ class AndroidLiveSyncService implements INativeScriptDeviceLiveSyncService {
3139
}
3240

3341
private async restartApplication(deviceAppData: Mobile.IDeviceAppData): Promise<void> {
34-
await this.device.adb.executeShellCommand(["chmod", "777", await deviceAppData.getDeviceProjectRootPath(), `/data/local/tmp/${deviceAppData.appIdentifier}`]);
35-
3642
let devicePathRoot = `/data/data/${deviceAppData.appIdentifier}/files`;
3743
let devicePath = this.$mobileHelper.buildDevicePath(devicePathRoot, "code_cache", "secondary_dexes", "proxyThumb");
3844
await this.device.adb.executeShellCommand(["rm", "-rf", devicePath]);

0 commit comments

Comments
 (0)