Skip to content

Fix livesync on Android devices and Genymotion emulator #1443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 3, 2016

Conversation

rosen-vladimirov
Copy link
Contributor

The following fix has been applied in common lib:

On some Android devices the android-runtime cannot delete the files in /data/local/tmp/<app id>/fullsync directory.
The next time when the application is started, runtime reads the fullsync directory and replaces the real application with content of fullsync dir.
So the app does not start as it is not full app.
Fix two issues - first one is missing chmod command in the file that we are generating.
As we cannot spawn chmod of all files directly, due to some command line limitations, we are writing the command in a file, transfer the file on the device and execute it.
BUT, we've lost the command in this commit telerik/mobile-cli-lib@6d52c6a
In fact our file contains only list of files and when trying to execute it on the device, we receive error, but we have added parameter to spawnFromEvent not to throw. So the error is hidden.
Add the missing chmod, so the command can be executed successfully.

However this fixes the issues for some files, but when we have directories, we do not write them in the file, so android runtime does not have permissions to delete them and they remain in fullsync directory.
Fix this by including directories in the list of application files (not sure if this will not break something else).

Fixes #1332

@rosen-vladimirov rosen-vladimirov self-assigned this Feb 2, 2016
@rosen-vladimirov rosen-vladimirov added this to the 1.6.0 milestone Feb 2, 2016
@teobugslayer
Copy link
Contributor

👍

The following fix has been applied in common lib:

On some Android devices the `android-runtime` cannot delete the files in `/data/local/tmp/<app id>/fullsync` directory.
The next time when the application is started, runtime reads the fullsync directory and replaces the real application with content of fullsync dir.
So the app does not start as it is not full app.
Fix two issues - first one is missing `chmod` command in the file that we are generating.
As we cannot spawn chmod of all files directly, due to some command line limitations, we are writing the command in a file, transfer the file on the device and execute it.
BUT, we've lost the command in this commit telerik/mobile-cli-lib@6d52c6a
In fact our file contains only list of files and when trying to execute it on the device, we receive error, but we have added parameter to `spawnFromEvent` not to throw. So the error is hidden.
Add the missing chmod, so the command can be executed successfully.

However this fixes the issues for some files, but when we have directories, we do not write them in the file, so android runtime does not have permissions to delete them and they remain in fullsync directory.
Fix this by including directories in the list of application files (not sure if this will not break something else).
rosen-vladimirov added a commit that referenced this pull request Feb 3, 2016
Fix livesync on Android devices and Genymotion emulator
@rosen-vladimirov rosen-vladimirov merged commit 31d9c0d into master Feb 3, 2016
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-chmod branch February 3, 2016 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Application entry point file not found... when using livesync (android)
2 participants