Bug 15553 - Mono shared runtime installed twice on each deployment to a real device
Summary: Mono shared runtime installed twice on each deployment to a real device
Status: NEEDINFO
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 4.8.x
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
: 15555 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-10-21 13:51 UTC by Andrew
Modified: 2017-05-25 14:03 UTC (History)
10 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Andrew 2013-10-21 13:51:37 UTC
Here's log of deployment to a real device, note two "Installing the Mono shared runtime" lines (each installation takes several seconds on my hardware, so it's not a dupe logging):

Waiting for device..
Detecting installed packages
Detecting installed packages...
Removing old runtime
Removing old runtime: Mono.Android.DebugRuntime...

Installing shared runtime
Target device is armeabi-v7a.
Installing the Mono shared runtime (armeabi-v7a - 1381251540)...


Removing old runtimes
Removing old runtime: Mono.Android.DebugRuntime [2147483647]..
Removing old runtime: Mono.Android.Platform.ApiLevel_14 [2147483647]..

Installing shared runtime
Target device is armeabi-v7a.
Installing the Mono shared runtime (armeabi-v7a - 1381251540)...

Installing platform framework
Installing the API 14 platform framework..

Removing previous version of application
Removing previous version of application...

Installing application on device
Copying application to device...


=========================


Here's deployment of the same solution to emulator log:

Waiting for device..
Detecting installed packages
Detecting installed packages...

Installing shared runtime
Target device is x86.
Installing the Mono shared runtime (x86 - 1381251540)...

Installing platform framework
Installing the API 14 platform framework..

Installing application on device
Copying application to device...
Comment 1 Andrew 2013-10-21 13:53:31 UTC
p.s. Xamarin.Android   4.8.03015 (a25a31d0), I also observed the same problem with previous stable Xamarin.Android version.
Comment 2 Saurabh 2013-11-21 10:15:43 UTC
I have checked this issue with latest Stable builds on fresh physical device:

Mono 3.2.4 ((no/294f999)
XS 4.2.1 (build 1)
X.Android 4.10.01073 


******Deploy to device output*******

Detecting installed packages

Removing old runtime

Installing shared runtime

Installing platform framework

Installing application on device

Deployment completed

*************************

So I am unable to reproduce this issue. Please check this issue with latest Stable builds.
Comment 3 Andrew 2013-11-21 10:36:27 UTC
What version of Android is on your device?

The problem still exists for mee, see below:

Using Xamarin.Android   4.10.01073 (d23a19bf)
Device -- Samsung Galaxy Ace 3 (GT-S7272), Android 4.2.2

Project settings:

All targets are API Level 14. 
All checkboxes are checked of "Supported architectures".
Linking is off.
Use "Shared Runtime" checked
"Fast Deployment" is unchecked


Here's the deployment log:

-----------------------------------------
Waiting for device..
Detecting installed packages
Detecting installed packages...
Removing old runtime
Removing old runtime: Mono.Android.DebugRuntime...

Installing shared runtime
Target device is armeabi-v7a.
Installing the Mono shared runtime (armeabi-v7a - 1384382343)...


Removing old runtimes
Removing old runtime: Mono.Android.DebugRuntime [2147483647]..
Removing old runtime: Mono.Android.Platform.ApiLevel_14 [2147483647]..

Installing shared runtime
Target device is armeabi-v7a.
Installing the Mono shared runtime (armeabi-v7a - 1384382343)...

Installing platform framework
Installing the API 14 platform framework..

Removing previous version of application
Removing previous version of application...

Installing application on device
Copying application to device...
-----------------------------------------
Comment 4 Andrew 2013-11-21 11:03:45 UTC
In my solution I have two projects, one is android application, another is android class library. The application references the library. As the library project can have different android API build settings (in my case it's equal for both projects), can't it be a reason of the second runtime deployment? 
Can you test this scenario too?
Comment 5 Saurabh 2013-11-21 12:06:22 UTC
I have tried it as per comment 4, but I am still unable to reproduce this issue.

I have used Samsung Galaxy S4(Android 4.3)

Screencast:http://screencast.com/t/eanossy9MON

XS 4.2.1 (build 1)
X.Android 4.10.01073
Comment 6 Andrew 2013-11-21 12:10:50 UTC
Sorry, I forgot to report that I build and deploy using Visual Studio 2010!
Comment 7 Jonathan Pryor 2013-11-21 13:00:39 UTC
@Andrew: Can you please try two things?

1. Please try installing from the command-line using msbuild, and attach the log:

    msbuild /t:Install AppProject.csproj /v:diag > install.txt

2. Please enable the Visual Studio Extension logging, and attach the monodroid.log file:

http://docs.xamarin.com/guides/android/deployment,_testing,_and_metrics/diagnostics/#Device_Deployment_Logs

Thanks,
 - Jon
Comment 10 Andrew 2013-11-22 05:13:20 UTC
Despite attached monodroid.log contains no useful information, one of previous reproduce attempts made Monodroid log the related error to monodroid.log, and I reported it separately (thought it's a different issue). 

Mono.AndroidTools.AndroidLogger Verbose: 0 : -- Start GetPackages - 10/21/2013 21:03:47 (11.0006ms) --
Mono.AndroidTools.AndroidLogger Verbose: 0 : [INPUT] cat /data/system/packages.xml
Mono.AndroidTools.AndroidLogger Verbose: 0 : [OUTPUT]
/system/bin/sh: cat: /data/system/packages.xml: Permission denied

The file is: https://bugzilla.xamarin.com/attachment.cgi?id=5193
The duplicate report: https://bugzilla.xamarin.com/show_bug.cgi?id=15555
Comment 11 PJ 2013-11-25 07:46:46 UTC
*** Bug 15555 has been marked as a duplicate of this bug. ***
Comment 12 arne.evertsson@datema.se 2014-08-13 04:16:28 UTC
I have the same problem. It takes quite some time to deploy. Let me know if you need the msbuild log, and I will email it.
Comment 13 Marco 2015-11-06 05:56:55 UTC
The error is still present and it's really annoying
Comment 14 John Wilkins 2015-12-15 23:07:44 UTC
Confirm that I'm also seeing exactly the same issue.

I have an app and a portable class library both targeting the same SDK.

Every time I run the solution I get a build (even if I have not changed anything at all) and then I see the old runtimes removed and then installed twice.

It is incredibly slow and a huge waste of time.
Comment 15 George Cook 2015-12-21 01:49:13 UTC
Same thing here. Driving me crazy.
Comment 16 Yanzhi Li 2017-04-13 16:22:38 UTC
Same issues existing in Visual Studio 2017, Xamarin 4.4.0.34, Xamarin.Android SDK 7.2.0.7

If deploy to emulator, it is quick and will not remove mono shared runtime, but if target to a real device, it will install Mono Shared Runtime twice and then re-install application, very slow and annoying.
Comment 17 philip 2017-05-01 20:20:04 UTC
Same here:



1>Detecting installed packages...
1>Removing old runtime: Mono.Android.DebugRuntime...
1>Target device is arm64-v8a.
1>Installing the Mono shared runtime (debug - 1492830111)...
1>10% ... 3456kb of 34333kb copied
1>20% ... 6912kb of 34333kb copied
1>30% ... 10304kb of 34333kb copied
1>40% ... 13760kb of 34333kb copied
1>50% ... 17216kb of 34333kb copied
1>60% ... 20608kb of 34333kb copied
1>70% ... 24064kb of 34333kb copied
1>80% ... 27520kb of 34333kb copied
1>90% ... 30912kb of 34333kb copied
1>100% ... 34333kb of 34333kb copied
1>Removing old runtime: Mono.Android.DebugRuntime [2147483647]..
1>Removing old runtime: Mono.Android.Platform.ApiLevel_25 [2147483647]..
1>Target device is arm64-v8a.
1>Installing the Mono shared runtime (debug - 1492830111)...
1>0% ... 64kb of 34333kb copied
1>10% ... 3456kb of 34333kb copied
1>20% ... 6912kb of 34333kb copied
1>30% ... 10304kb of 34333kb copied
1>40% ... 13760kb of 34333kb copied
1>50% ... 17216kb of 34333kb copied
1>60% ... 20608kb of 34333kb copied
1>70% ... 24064kb of 34333kb copied
1>80% ... 27520kb of 34333kb copied
1>90% ... 30912kb of 34333kb copied
1>100% ... 34333kb of 34333kb copied
1>Installing the API 25 platform framework..
1>0% ... 64kb of 24294kb copied
1>10% ... 2432kb of 24294kb copied
1>20% ... 4864kb of 24294kb copied
1>30% ... 7296kb of 24294kb copied
1>40% ... 9728kb of 24294kb copied
1>50% ... 12160kb of 24294kb copied
1>60% ... 14592kb of 24294kb copied
1>70% ... 17024kb of 24294kb copied
1>80% ... 19456kb of 24294kb copied
1>90% ... 21888kb of 24294kb copied
1>100% ... 24294kb of 24294kb copied
Comment 18 Joshua Poling 2017-05-25 14:03:44 UTC
Deployed Android application runtime takes extremely long. Pushing and popping pages takes 5+ seconds. I also experience the same issues using Visual studio 2017 15.2. Is there already a bug for this? 

Xamarin Version: Microsoft Visual Studio Enterprise 2017 Preview (Preview)
Version 15.3 (26510.0-Preview) Preview
VisualStudio.15.Preview/15.3.0-Preview+26510.0
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Visual Basic 2017   00369-60000-00001-AA981
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA981
Microsoft Visual C# 2017

Visual F# 4.1   00369-60000-00001-AA981
Microsoft Visual F# 4.1

ASP.NET Template Engine 2017   15.0.30504.0
ASP.NET Template Engine 2017

Common Azure Tools   1.9
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Mono Debugging for Visual Studio   Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   4.3.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

VisualStudio.IoT   1.0
Package with IoT components for Visual Studio

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

Xamarin   4.6.0.560 (33bfa20)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK   7.3.0.13 (448f54f)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   10.11.0.126 (7571635)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Note You need to log in before you can comment on or make changes to this bug.