log 提示:setWifiEnabled not allowed for uid ....
修改方法如下:
修改源码之后,全编译即可。
java
packages/modules/Wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
@@ -743,7 +743,8 @@ public class WifiServiceImpl extends BaseWifiService {
|| checkNetworkSetupWizardPermission(pid, uid)
|| checkNetworkStackPermission(pid, uid)
|| checkNetworkManagedProvisioningPermission(pid, uid)
- || isSignedWithPlatformKey(uid);
+ || isSignedWithPlatformKey(uid)
+ || true;
三方APP 需要申请下面的权限
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />