Android - Disable wifi P2P

597 views
Skip to first unread message

Vignesh Murugappan

unread,
Jun 10, 2020, 11:48:17 AM6/10/20
to android-platform
To disable P2p feature/actions from framework, I just removed the below line from vendor/device.mk and built it.

frameworks/native/data/etc/android.hardware.wifi.direct.xml:vendor/etc/permissions/android.hardware.wifi.direct.xml

So after flashing the image, yes, I didn't see the feature wifi direct in "pm list features". But my system hangs when I try to enable wifi.
It seems, it recursively search for wifi p2p service, so that system with below trace continuously,
06-10 15:13:40.623 E/AndroidRuntime( 2811): *** FATAL EXCEPTION IN SYSTEM PROCESS: android.display
06-10 15:13:40.623 E/AndroidRuntime( 2811): java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.wifi.p2p.WifiP2pManager$Channel android.net.wifi.p2p.WifiP2pManager.initialize(android.content.Context, android.os.Looper, android.net.wifi.p2p.WifiP2pManager$ChannelListener)' on a null object reference
06-10 15:13:40.623 E/AndroidRuntime( 2811): 	at com.android.server.display.WifiDisplayController.<init>(WifiDisplayController.java:168)
06-10 15:13:40.623 E/AndroidRuntime( 2811): 	at com.android.server.display.WifiDisplayAdapter$1.run(WifiDisplayAdapter.java:140)

It would be grateful to me if I get the solution for this.

er...@bentleyemail.net

unread,
Jun 10, 2020, 2:09:42 PM6/10/20
to android-...@googlegroups.com
I saw a similar symptom with one of our wifi drivers but my issue was the supplicant was stuck in a loop or starting/stopping.  To resolve, I added p2p_disabled=1 to the wpa_supplicnat.conf file in wpa_supplicant_overlay.conf.  I could also from p2p capability in the radio driver but since I use the same driver in straight linux, thought this solution better.  I don’t think its the best solution but it works for me.

Here is what I was seeing:

01-01 00:00:47.843   403   462 I SupplicantP2pIfaceHal: IServiceNotification.onRegistration for: android.hardware.wifi.supplicant@1.0::ISupplicant, default preexisting=true
01-01 00:00:47.843   403   462 I zygote  : Looking for service android.hardware.wifi.supplicant@1.0::ISupplicant/default
01-01 00:00:47.859   403   462 I zygote  : Starting thread pool.
01-01 00:00:47.901   403   462 D SupplicantP2pIfaceHal: entering getInterface()
01-01 00:00:47.901   403   462 E SupplicantP2pIfaceHal: initSupplicantP2pIface got null iface
01-01 00:00:47.901   403   462 E SupplicantP2pIfaceHal: initalizing ISupplicantIfaces failed.
-Eric


--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platfo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/2ff6456c-b9c5-45ba-ab3e-00cabbe0cc6bo%40googlegroups.com.

Vignesh Murugappan

unread,
Jun 11, 2020, 10:52:16 AM6/11/20
to android-platform
Hi Eric,

Thanks for your time. In my case, p2p_disabled=1 in wpa_supplicant_overlay.conf is already present. I'm seeing this issue if I start wifi from framework (HMI).

-Vignesh.


On Wednesday, 10 June 2020 23:39:42 UTC+5:30, er...@bentleyemail.net wrote:
I saw a similar symptom with one of our wifi drivers but my issue was the supplicant was stuck in a loop or starting/stopping.  To resolve, I added p2p_disabled=1 to the wpa_supplicnat.conf file in wpa_supplicant_overlay.conf.  I could also from p2p capability in the radio driver but since I use the same driver in straight linux, thought this solution better.  I don’t think its the best solution but it works for me.

Here is what I was seeing:

01-01 00:00:47.843   403   462 I SupplicantP2pIfaceHal: IServiceNotification.onRegistration for: android.hardware.wifi.supplicant@1.0::ISupplicant, default preexisting=true
01-01 00:00:47.843   403   462 I zygote  : Looking for service android.hardware.wifi.supplicant@1.0::ISupplicant/default
01-01 00:00:47.859   403   462 I zygote  : Starting thread pool.
01-01 00:00:47.901   403   462 D SupplicantP2pIfaceHal: entering getInterface()
01-01 00:00:47.901   403   462 E SupplicantP2pIfaceHal: initSupplicantP2pIface got null iface
01-01 00:00:47.901   403   462 E SupplicantP2pIfaceHal: initalizing ISupplicantIfaces failed.
-Eric

On Jun 10, 2020, at 9:53 AM, Vignesh Murugappan <vignes...@gmail.com> wrote:

To disable P2p feature/actions from framework, I just removed the below line from vendor/device.mk and built it.

frameworks/native/data/etc/android.hardware.wifi.direct.xml:vendor/etc/permissions/android.hardware.wifi.direct.xml

So after flashing the image, yes, I didn't see the feature wifi direct in "pm list features". But my system hangs when I try to enable wifi.
It seems, it recursively search for wifi p2p service, so that system with below trace continuously,
06-10 15:13:40.623 E/AndroidRuntime( 2811): *** FATAL EXCEPTION IN SYSTEM PROCESS: android.display
06-10 15:13:40.623 E/AndroidRuntime( 2811): java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.wifi.p2p.WifiP2pManager$Channel android.net.wifi.p2p.WifiP2pManager.initialize(android.content.Context, android.os.Looper, android.net.wifi.p2p.WifiP2pManager$ChannelListener)' on a null object reference
06-10 15:13:40.623 E/AndroidRuntime( 2811): 	at com.android.server.display.WifiDisplayController.<init>(WifiDisplayController.java:168)
06-10 15:13:40.623 E/AndroidRuntime( 2811): 	at com.android.server.display.WifiDisplayAdapter$1.run(WifiDisplayAdapter.java:140)

It would be grateful to me if I get the solution for this.


--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages