|Summary:||Cannot debug with LG G4|
|Product:||Android||Reporter:||Mark Fredrickson <mark.fredrickson>|
|Severity:||normal||CC:||abhishekk, alexei.karamyshev, arthur, ashley.gazich, brendan.zagaeski, chrisntr, dominic, jon.douglas, jonp, kerry.graham, mark_downes, mono-bugs+monodroid, paul, peter.collins, terje, tom.bull, tristan.drummond, wayne.creasey|
|Target Milestone:||6.1 (C7)|
|Tags:||BZCU||Is this bug a regression?:||---|
|Last known good build:|
Description Mark Fredrickson 2015-07-11 21:36:11 UTC
I just updated my LG G3 to a G4 and can no longer debug my Xamarin Android app with VS 2010, VS 2013, or Xamarin Studio. When I start the debugger the app starts then after about 4 seconds just quits. Without debugging the app runs fine. Eclipse has no problem debugging. The main difference in the two phones is that the G4 has a 64 bit processor and is running Android 5.1. I have checked the threads relating to this, have the latest drivers installed, and tried the suggestions but nothing works. I even reset my G4 to factory settings but that didn't help either.
Comment 1 Tristan 2015-07-22 00:46:23 UTC
I too cannot debug using Visual Studio 2013 and an LG G4. My app launches and then crashes a few seconds later. I have had success launching the app using Xamarin Studio, however I cannot hit breakpoints. Xamarin Studio Version 5.9.4 (build 5) Installation UUID: d6a6ac2d-6f41-4d5e-89c7-609a98b08d65 Runtime: Microsoft .NET 4.0.30319.18449 GTK+ 2.24.22 (MS-Windows theme) GTK# 2.12.26 Xamarin.Android Version: 5.1.4 (Business Edition) Android SDK: Supported Android versions: 2.3 (API level 10) 4.0.3 (API level 15) 4.4 (API level 19) 5.0 (API level 21) Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39 java version "1.6.0_39" Java(TM) SE Runtime Environment (build 1.6.0_39-b04) Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode, sharing) Xamarin Android Player Not Installed Build Information Release ID: 509040005 Git revision: 8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b Build date: 2015-06-08 17:16:25-04 Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8 Operating System Windows 6.2.9200.0 (64-bit)
Comment 2 tom.bull 2015-07-31 07:59:15 UTC
I have the exact same experience as Tristan. Xamarin Studio Version 5.9.4 (build 5) Installation UUID: 923fa3f0-6f3f-443d-af1a-6f49f6d7c512 Runtime: Microsoft .NET 4.0.30319.34209 GTK+ 2.24.22 (MS-Windows theme) GTK# 2.12.26 Xamarin.Android Version: 5.1.4 (Business Edition) Android SDK: C:\Users\Thomas\AppData\Local\Android\android-sdk Supported Android versions: 2.3 (API level 10) 4.0.3 (API level 15) 4.3 (API level 18) 4.4 (API level 19) 5.0 (API level 21) Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39 java version "1.6.0_39" Java(TM) SE Runtime Environment (build 1.6.0_39-b04) Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode, sharing) Xamarin Android Player Version: 0.4.4 Location: C:\Program Files\Xamarin Android Player\DeviceManager.exe Build Information Release ID: 509040005 Git revision: 8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b Build date: 2015-06-08 17:16:25-04 Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8 Operating System Windows 6.2.9200.0 (64-bit)
Comment 3 David Karlaš 2015-09-08 04:14:49 UTC
*** Bug 33485 has been marked as a duplicate of this bug. ***
Comment 4 Mark Downes 2015-09-22 11:27:31 UTC
I am experiencing the same issue when I try to debug my Xamarin Forms app on my G4 running Android 5.1.
Comment 5 Ashley Gazich [MSFT] 2015-10-22 16:09:19 UTC
Comment 6 Mark Fredrickson 2015-10-22 18:44:06 UTC
Ref: ## Xamarin support note Possibly related with similar behavior: Bug 33832 - Cannot debug on LG G3 - 5.0 Lollipop with VS 2013 I have a G3 with Android 5.01 and it debugs just fine but my G4 with Android 5.1 does not.
Comment 8 Jonathan Pryor 2015-11-03 15:36:29 UTC
*** Bug 33832 has been marked as a duplicate of this bug. ***
Comment 9 Jonathan Pryor 2015-11-03 15:38:55 UTC
Given adb: https://developer.xamarin.com/guides/android/troubleshooting/troubleshooting/#Android_Debug_Log_Output Is the `setprop` command *persistent*? Meaning, after using setprop, is the value readable from getprop? $ adb shell setprop debug.foo.bar 1 $ adb shell getprop debug.foo.bar 1
Comment 10 Jonathan Pryor 2015-11-03 15:41:25 UTC
What we suspect (fear) is happening is that these particular LG devices are "special", in that setprop is *not* persistent, resulting in output such as: $ adb shell setprop debug.foo.bar 1 $ adb shell getprop debug.foo.bar # nothing This is currently problematic, because both Visual Studio and Xamarin Studio use Android System Properties in order to provide information to the debugger, such as the debugger timeout, the port to connect to, and other extremely important information. If `setprop` isn't persistent, then the app cannot read this information, and the debugger will never attach. So we have a *theory* that would explain the observation. We would appreciation confirmation that this is what you observe. (We see this non-persistent behavior on an internal LG G4.)
Comment 11 Peter Collins 2015-11-03 15:47:17 UTC
*** Bug 35374 has been marked as a duplicate of this bug. ***
Comment 12 Mark Fredrickson 2015-11-03 16:03:43 UTC
I'd be happy to help.Just let me know what I have to do. I'm only available Thursday this week and back on Monday.
Comment 13 Peter Collins 2015-11-04 16:59:15 UTC
@Mark please let us know if you're able to set system properties on the affected device: To set you'd enter: > adb shell setprop debug.foo.bar 1 Then, to see if the setting was successful, you can run the following: > adb shell getprop debug.foo.bar If the getprop call returns a value, setting succeeded. If that command doesn't return anything, setting failed.
Comment 14 Tristan 2015-11-04 17:10:32 UTC
LG G4 >adb shell setprop debug.foo.bar 1 >adb shell getprop debug.foo.bar Samsung Galaxy Tab4 >adb shell setprop debug.foo.bar 1 >adb shell getprop debug.foo.bar 1
Comment 15 Peter Collins 2015-11-04 20:17:49 UTC
@Tristan you're not experiencing the same behavior on the Galaxy Tab 4 right? I'm assuming that result was just for comparison.
Comment 16 Tristan 2015-11-04 21:10:53 UTC
Yes you're right it was just for comparison. Galaxy Tab 4 works fine.
Comment 17 Mark Downes 2015-11-05 08:44:15 UTC
@Jonathan, I also ran those two commands against my LG G4 with the same result, i.e. no result on the "get" command.
Comment 18 Alexey Karamyshev 2015-11-05 09:06:38 UTC
I have the same problem with LG Leon H324. I've tried setprop/getprop - and getprop gave me nothing. I've tried it with another devices - all works good.
Comment 19 Jonathan Pryor 2015-11-05 12:14:44 UTC
Comment #14 through Comment #18 largely confirms my theory from Comment #10: we're screwed on these devices. :-) We have an idea for how to fix things, but we have no confident timeline for doing so. Does anybody know how to file a bug with LG, perhaps ask them to re-enable `adb shell setprop` on their devices? I tried to find somewhere to do so, but came up empty.
Comment 20 Mark Fredrickson 2015-11-06 14:24:17 UTC
Well, I get a 1 value on my Sprint G3 and nothing on my Sprint G4. Bummer. Would this be something that might be fixed in the next Android update? I'm currently on 5.1. What if we rooted out phone and installed CyanogenMod Marshmallow for the G4? Reckon that would fix the problem? Here is a link for installing Android 6.0 on the G4 - http://www.ibtimes.co.in/lg-g4-android-marshmallow-release-update-how-install-stock-rom-smartphone-tutorial-653021. I used to do this on my very early phones but haven't rooted a phone for quite a while. Anybody up for the challenge?
Comment 21 Jonathan Pryor 2015-11-11 15:21:03 UTC
> Would this be something that might be fixed in the next Android update. No. We might get this done for Cycle 7, aka Xamarin.Android 6.1 (and note that cycle6/6.0 isn't even stable yet!), but it may get bumped for higher priority work. It will get fixed as we are able to fix it. > What if we rooted out phone and installed CyanogenMod Marshmallow for the G4? > Reckon that would fix the problem? Probably.
Comment 22 Mark Fredrickson 2015-11-11 17:59:50 UTC
I'm currently using Cycle 6 so if you want me to test anything let me know. It looks like if you root your phone and install this ROM it works. But if you guys are going to fix it in VS then I think I'll wait. See the last post on this page: http://forum.xda-developers.com/sprint-g4/development/zv6-ultrapop-rom-v1-2-ls991-g4-t3211725/page22
Comment 23 Arthur 2015-11-18 13:15:07 UTC
Same problem here (LG G4 Android 5.1) Side note: Recently switched from Nokia Lumia 920 to LG G4. Although I've been programming Android phones for quite a while, using it on a daily base is a different experience. And now I fully understand why people praise the ease of use of iOS and WinPhones...
Comment 24 Mark Fredrickson 2016-01-01 02:51:27 UTC
@Jonathan Pryor - can you give a very rough ETA for Cycle 7?
Comment 25 dean.ellis 2016-01-11 11:40:28 UTC
This has been fixed in androidtools/master/e5c1e1df The new code will set the debug properties via a property file in addition to a property, this should allow devices like the LG 4G to debug . Android Tools was bumped in monodroid/master/a634ab85 Still needs to be done for Xamarin Studio. In which case this will be in cycle 7
Comment 26 Mark Fredrickson 2016-01-12 17:45:31 UTC
My Sprint LG G4 was just updated to Android 6.0 and debugging now works except for Step Into which causes a crash. Most of the time the debugger crashes immediately upon a Step Into however sometimes the Step Into works but then when your Run, it crashes. I can get by with this for now. Are you interested in any debug logs or just wait for Cycle 7?
Comment 27 Mark Fredrickson 2016-01-13 17:19:32 UTC
Well, don't know what happened but I can no longer debug on my LG G4. It worked like I said above right after the update but then I used the phone during the day to listen to some podcasts, then did some Android app debugging with Eclipse and then went back to VS and the debugger hangs starting the app. I have to force close the app and End Task VS. Tried lots of things to get it to work again but no luck. I'm back waiting for Cycle 7. Any time frame on it's release?
Comment 28 Mark Downes 2016-01-13 18:05:30 UTC
I often have problems with VS hanging when initiating debug - not even using a G4. Try closing VS, deleting all bin/obj files (I use a .bat file for this - sad that I have one for this, I know) and then reopen VS and the solution and try debugging again. Keep hoping that Xamarin will address this one day.
Comment 29 Mark Fredrickson 2016-01-13 18:32:44 UTC
@Mark Downes - Thanks a lot. This worked. I'll post this solution over on the LG G4 thread and credit you.
Comment 30 Mark Fredrickson 2016-01-13 22:31:44 UTC
I just tested setprop and getprop and the data is persisted with Android 6.0. But debugging is still real shaky. Even with @Mark Downes workaround it still hangs a lot of the time. Are there other issues here or will @Dean Ellis fix and Cycle 7 work? Has anyone from Xamarin tested Cycle 7 VS debugging with a LG G4 running Android 6.0? Maybe this is not a LG G4 issue but an Android 6.0 issue?
Comment 31 Jonathan Pryor 2016-01-14 20:08:56 UTC
@Fredrickson: RESVOLED FIXED only means that the bug has been fixed internally. It does *not* mean that the fix has been released and is generally available. The release notes specify which bugs are fixed in a given release. This particular bug -- Bug #31855 -- is only regarding certain LG devices which do not store system properties via `adb shell setprop`. If your debugging experience is unreliable and/or doesn't work and your device *does* support `adb shell setprop`, please file a separate bug so that it may be tracked appropriately.
Comment 32 Mark Fredrickson 2016-01-15 17:59:10 UTC
@Jonathan Pryor - Got it. Bug #35739 is the one that is occurring now with my LG G4 running Android 6.0. Sure would like to see that one get resolved soon.
Comment 33 Abhishek 2016-03-11 18:49:47 UTC
I have checked this issue with the latest master build: Xamarin.VisualStudio_126.96.36.1998_1c2c2a19f00fce64b319730d7dd90d78a3709a7b. Now this issue is working fine. I am successfully able to hit the breakpoint and debugger does not disconnect.Here is the screencast: http://www.screencast.com/t/9y4gkVyntSj. Also with master build both on Mac and Windows XS: Windows Build: XamarinStudio-188.8.131.5201_12851943f4d67460778012cd300e15e79134769d Mac Build: XamarinStudio-184.108.40.20627_5f81318aabc3aa90caea1c2e0eb99b444725f902 MonoFramework-MDK-220.127.116.119.macos10.xamarin.universal_a6289bcc41fe9b8b25b1fd6b127e09db3f48ef41 mono-android-6.0.99-523_5c51b998cad060ed52967d4379d55bbb0ba829da Now I am successfully able to hit the breakpoint with the device LG G3 Beat (version 5.0.2) both on Mac and Windows XS. Screencast for Windows XS: http://www.screencast.com/t/BsKAuPlX6d Application Output: https://gist.github.com/Abhishekk360/08b4ea6bbf64421fd5da Android Tool Log: https://gist.github.com/Abhishekk360/e8c9330ef28b85f333f6 Screencast for Mac XS: http://www.screencast.com/t/G2tHCVVW Application Output: https://gist.github.com/Abhishekk360/c10194699b77f8d3d2c5 Android Tool Log: https://gist.github.com/Abhishekk360/6f405a2d779b122d8daa Hence closing this issue. Thanks
Comment 34 Abhishek 2016-05-03 18:19:52 UTC
I have checked this issue with the latest C7 build both on Mac and Windows Environment. *********************** Windows Environment: *********************** Xamarin.VisualStudio_18.104.22.1682_fb9e9f3c82ef86b653a43f13acc51902d66570d7 XamarinStudio-22.214.171.12406_f5dc54326cf880c90d092bea7f7388c05ee698bc Now this issue is working fine. Application deploy successfully and hit the breakpoint. Screencast for VS: http://www.screencast.com/t/I7ZC7O85r Application Output: https://gist.github.com/Abhishekk360/2ff579c6e96e368ce6238d06a6c9c99a Android Tool Log: https://gist.github.com/Abhishekk360/970e65bc7ad49fb091d364a659171df1 Screencast for Windows XS: http://www.screencast.com/t/H0PJurFAlzKB Application Output: https://gist.github.com/Abhishekk360/841f5dcf072b73fafef457126a5183dc Android Tool Log: https://gist.github.com/Abhishekk360/3af10195db1a64ebb9e92d32c42a5458 ********************* Mac Environment: ********************* XamarinStudio-126.96.36.19911_9472333c01c545805d1fbe422d53925584a16aba MonoFramework-MDK-188.8.131.52.macos10.xamarin.universal_54fa9c64b384cd91018a2dc285a454facfc9638a xamarin.android-6.1.0-49_e2b60dbdeaa9e74f61a253650fe16c6afb1a27bc Screencast: http://www.screencast.com/t/qZZymQTIpFoG Application Output: https://gist.github.com/Abhishekk360/9ead480e79284809f57577f38883be65 Android Tool Log: https://gist.github.com/Abhishekk360/36abada2454531c45ff8a1ecf6f965db Thanks!