Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/services/livesync/android-device-livesync-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ class AndroidLiveSyncService implements INativeScriptDeviceLiveSyncService {
}

public async refreshApplication(deviceAppData: Mobile.IDeviceAppData, localToDevicePaths: Mobile.ILocalToDevicePathData[], forceExecuteFullSync: boolean, projectData: IProjectData): Promise<void> {
await this.device.adb.executeShellCommand(
["chmod",
"777",
await deviceAppData.getDeviceProjectRootPath(),
`/data/local/tmp/${deviceAppData.appIdentifier}`,
`/data/local/tmp/${deviceAppData.appIdentifier}/sync`]
);

let canExecuteFastSync = !forceExecuteFullSync && !_.some(localToDevicePaths, (localToDevicePath: any) => !this.$liveSyncProvider.canExecuteFastSync(localToDevicePath.getLocalPath(), projectData, deviceAppData.platform));

if (canExecuteFastSync) {
Expand All @@ -31,8 +39,6 @@ class AndroidLiveSyncService implements INativeScriptDeviceLiveSyncService {
}

private async restartApplication(deviceAppData: Mobile.IDeviceAppData): Promise<void> {
await this.device.adb.executeShellCommand(["chmod", "777", await deviceAppData.getDeviceProjectRootPath(), `/data/local/tmp/${deviceAppData.appIdentifier}`]);

let devicePathRoot = `/data/data/${deviceAppData.appIdentifier}/files`;
let devicePath = this.$mobileHelper.buildDevicePath(devicePathRoot, "code_cache", "secondary_dexes", "proxyThumb");
await this.device.adb.executeShellCommand(["rm", "-rf", devicePath]);
Expand Down