Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
On XA 4.7.x I tried deploying XA apps on Samsung Galaxy Note which runs ICS (4.0.4) so far and it fails to deploy via fastdev. Any app I tried (right now I tried GooglePlayServicesTest in monodroid-samples).
non-fastdev deployment works.
I assume recent seppuku/broadcast change does not work for it.
Does this work?
adb shell am force-stop your.app.package.name
Can you provide the deployment logs & logcat output?
force-stop works for "embedded" apps (fastdev apps cannot be installed so it never starts, hence no way to force stop them).
I'm not sure what you meant "delopyment logs". The "Deploy to Device" pane output is simple:
Detecting installed packages
Removing old runtimes
Installing platform framework
Removing previous version of application
Installing application on device
Deployment failed because the FastDev assembly directory could not be created.
Deployment failed. FastDev directory creation failed.
It's almost impossible to provide logcat output as it is in use in real life and there are too many interrupting log lines even within one single minute. I can search for specific text in the log though.
Device Deployment logs:
What's in the Xamarin Studio Deploy pane is useless; we need Xamarin Studio's log files.
Or skip Xamarin Studio entirely and stick with xbuild/MSBuild:
$ xbuild /t:Install /v:diag *.csproj > log.txt
> fastdev apps cannot be installed
Wat? How can they not be installed at all? That's truly mind boggling...
The messages you provided certainly imply that the app was installed...
> Installing application on device
> It's almost impossible to provide logcat output
I'm a master of grep. ;-)
Just log everything to a file, then attach the file:
$ adb logcat > log.txt
# install the app onto the device...
Please attach the log file, even if it is constantly interrupted. Or you can filter to just the interesting messages:
> The messages you provided certainly imply that the app was installed...
>> Installing application on device
This is *installing*, not *installed*.
I'm going to attach the build log and the adb log next.
Created attachment 4192 [details]
xbuild /t:Install /v:diag *.csproj > log.txt
@Eno: As per Comment #6, command-line based installation is successful:
> TASK: GetRemoteFileInfo /data/data/mono.actionbarsherlocktest/files/.__override__ completed?:Completed
> DEBUG: Stat:FileInfo for /data/data/mono.actionbarsherlocktest/files/.__override__: drwxrwxrwx
> 0 Error(s)
So this appears to be an issue with the Xamarin Studio-side of things. Which brings us to Comment #7, which is `adb logcat`. It shows that the process was started, and thus the .__override__ directory _should_ exist (assuming this log file is from a Xamarin Studio install, and not during Comment #6):
> Pub mono.actionbarsherlocktest.mono.MonoRuntimeProvider.__mono_init__: mono.MonoRuntimeProvider
> No assemblies found in '/data/data/mono.actionbarsherlocktest/files/.__override__' or '/mnt/sdcard/Android/data/mono.actionbarsherlocktest/files/.__override__'. Assuming this is part of Fast Deployment. Exiting...
> Process app.processName (pid 11158) has died.
The question is why Xamarin Studio isn't installing things. We need the Xamarin Studio install logs:
Atsushi, do you still have fast deployment issues when installing on your Galaxy Note? We're looking to finalize 4.8 and would love to know if the current 4.7.11 alpha fixes the issue for you.
Yes, ongoing issue.
This isn't a Xamarin.Android bug, per se, as using xbuild to install works, as per Comment #6. This appears to be a Xamarin Studio issue.
Eno: which version of Xamarin Studio are you using? Could you please try the latest version if you haven't already done so?
It was already on our latest master.
Eno: Is this a Debug or a Release build? Does this happen for all projects or just some?
Please provide both the `adb logcat` and the Xamarin Studio log files for the same installation attempt. I need to be able to see "both sides" of what's happening, and I suspect/fear that Comment #7 and Comment #16 are not from the same package installs (especially since they're 3 days apart).
This bug was targeted for a past milestone, moving to the next active non-hotfix milestone.
I cannot test it anymore, as my Galaxy Note has broken USB connector :(
Not sure what to do with this bug. Maybe we keep it for a while until we clean up NEEDINFOs and/or wait for someone who experience this.
This is still happening to me on 4.10.1 stable with a Samsung Galaxy S4.
I tried a Sony phone and it worked fine. Is a fix coming for this?
Can it just automatically revert to turn off FastDev if it fails? I would prefer to see a warning in the build/deploy or something if that fails and not a scary Android man on a popup.
> Is a fix coming for this?
The problem, as best as we've been able to determine, is Samsun KNOX, which blocks access to the .__override__ directory, preventing `adb push` from copying files into the .__override__ directory, and screws things up.
It is not currently _easily_ possible for us to detect this situation either; IIRC a message from KNOX is written to logcat, but we don't parse logcat, so that's not entirely helpful at this time... (Yet another reason to write some `logcat` parsing code...)
That said, we have someone looking into this, but he's also working on many other things, so I wouldn't hold your breath on this being fixed any time soon (unless Samsung deigns to let us know how KNOX works so that we could disable KNOX's blocking of directory writes to the .__override__ directory, assuming that's even possible... There's not a whole lot of public information about KNOX, afaik.).
Right, so can this not be a blocking failure.
I think it would be better to have FastDev fall back to normal if it fails and not stop the developer dead in his tracks. (Maybe just display a warning somewhere)
It's to the point where I tell people to turn off FastDev not matter what, because there is always a Jr dev somewhere with a Samsung phone that can't figure out what is wrong.
I have a problem with Samsung Note 3 (Model: SM-N9005) Android Version: 4.4.2
During our first development, we can't debug the application. The App will be deployed to the device, it starts but it will automatically be closed.
I disabled the fastdev option. Now I can deploy without error, but the debug doesn't work.
I uninstalled already "KNOX", but it was not a solution.
With another Samsung Galaxy 2, the same project works and we can also debug.
It seems, that the failure is specific to the device Samsung Note 3 !
Have somebody any idea ?
I'm having a similar issue with the Samsung Galaxy Note 3 (Android 4.4.2), using VS2013 with Xamarin.Android 4.12.3:
Xamarin.AndroidTools.AndroidDeploymentException: FailedToSynchronizeFastDevAssemblies ---> Mono.AndroidTools.AdbException: Permission denied
at Mono.AndroidTools.Util.AggregateAsyncResult.CheckError(CancellationToken token)
at Mono.AndroidTools.Adb.AdbSyncClient.EndPushSyncItems(IAsyncResult result)
at Mono.AndroidTools.Internal.AdbClientTaskExtensions.InnerInvoke(TaskCompletionSource`1 tcs, Func`2 endMethod, IAsyncResult l)
--- End of inner exception stack trace ---
at Xamarin.AndroidTools.AndroidDeploySession.InstallAssemblies(String destinationPath, CancellationToken token)
at Xamarin.AndroidTools.AndroidDeploySession.Run(CancellationToken token)
at Xamarin.AndroidTools.AndroidDeploySession.RunLogged(CancellationToken token)
at Xamarin.AndroidTools.AndroidDeploySession.Start(CancellationToken token)
Here same issue since month, S4, Note 3, TabPro 8.4, NotePro10.1, NotePro12... Currently I cannot develop with all my samsung devices, I think THIS bug is really a killer!
A very simple workaround for not being able to deploy to Samsung devices in debug mode is to disable "Fast assembly deployment" for your project. This option can be found in 'Project Options' -> 'Android Build' -> uncheck 'Fast assembly deployment'.
This will allow Debug deployment and proper debugging, but deployment times will be slightly slower.
I know about this workaround, nevertheless thanks for mentioning but this is not a option for me so I'm using different devices. Deploying with visualstudii is *slow and more slower is really bad it steals time on trying something you know how many times a developer is deploying on a day...
The status and milestone of this bug are out of date, the problem is confirmed and we're past 4.10.
Updating bug status and milestone.
*** Bug 20936 has been marked as a duplicate of this bug. ***
With a Nexus 5 with Android 4.4.4 and the latest Xamarin Android installed there are no problems.
But with the same Nexus 5 and the Android L preview (http://developer.android.com/preview/index.html) I've got the fastdev error.
This issue will be fixed in the next 4.14.x release.