Repository navigation
Deploying to emulator (or to device via USB) doesn't honor "Required permissions" list in AndroidManifest.xml #1441
Description
Activity
IIRC runtime permissions are triggered only through Java API. So this behavior at least matches general expectation from Android native developer's point of view.
IIRC runtime permissions are triggered only through Java API. So this behavior at least matches general expectation from Android native developer's point of view.
Then it feels we could become better than Android Studio here? :)
Or at least present a dialog the first time the dev debugs the app, asking him to grant all permissions for the development session, or mimic the ones that will be present at APK-runtime time.
Ideas are easy, but designing and implementing them is not. There is no suggestion on the actual behaviors here. Implementing something overcomplicated on top of NDK, outside Android framework, by ourselves, does not sound great. Developers will hate immature hacks offered by Xamarin.Android.
It is NOT about the IDEs. Android Studio nor Visual Studio is relevant.
Developers want to reproduce what the app actually causes. Permission states and their successes/failures are one of the big things they want to replicate. "Grant all permissions by default" does not seem to be a great idea to me.
Developers want to reproduce what the app actually causes. Permission states and their successes/failures are one of the big things they want to replicate. "Grant all permissions by default" does not seem to be a great idea to me.
Atsushi, I completely agree with what you said here, which is exactly the reason I reported this bug. I think you have misinterpreted it in the opposite meaning. It's granting all permissions by default at the moment.
(Note that the exception posted is in the "Expected behaviour", not in the "Current behaviour".)
Whoa. Yeah I'm sorry, I misread. I believe that's wrong behavior. I am surprised to know that we accept anything by default. AFAIK we do need INTERNET permission for debugger connections but not any further (there might be additional permissions requirement after I got to know about them).
- addedArea: App+Library BuildIssues when building Library projects or Application projects.Issues when building Library projects or Application projects.
on Oct 18, 2022 - addedpossibly-staleIssues that are potentially no longer relevant.Issues that are potentially no longer relevant.
on Dec 13, 2022 It would be no longer relevant if it had been fixed?
- ghost removedpossibly-staleIssues that are potentially no longer relevant.Issues that are potentially no longer relevant.
on Dec 14, 2022 - ghost addedneed-attentionA xamarin-android contributor needs to reviewA xamarin-android contributor needs to review
on Dec 14, 2022 - removedneed-attentionA xamarin-android contributor needs to reviewA xamarin-android contributor needs to review
on May 2, 2024 - addedpossibly-staleIssues that are potentially no longer relevant.Issues that are potentially no longer relevant.
on May 8, 2026 dotnet-policy-service commented
on May 8, 2026 More actionsWe suspect this issue is stale and no longer relevant. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.
Reacted by Andres G. Aragonesesdotnet-policy-service commented
on May 22, 2026 More actionsThis issue will now be closed since it had been marked "possibly-stale" but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.
- locked and limited conversation to collaborators
on Jun 22, 2026
Steps to Reproduce
System.Net.Sockets.TcpClientobject.Current Behavior
App works fine when deployed this way (emulator or USB). Therefore the problem cannot be debugged/investigated by the developer.
Expected Behavior
It should fail to access to the internet because developer hasn't enabled INTERNET permission on the AndroidManifest.xml. An example of an exception that may happen is:
Version Information
Log File
N/A