lemonsqueeze / FakeWifiConnection

Make android apps believe Wifi is connected
Other
66 stars 19 forks source link

NPE when faking wifi #2

Closed realdadfish closed 9 years ago

realdadfish commented 10 years ago

My setup is a little awkward, but the following:

What I want to achieve here is a environment to limit the available upload / download bandwidth for testing purposes.

Unfortunately this module seems to crash from time to time, this is the stack trace:

I/Xposed  (  682): java.lang.NullPointerException
I/Xposed  (  682):  at com.lemonsqueeze.fakewificonnection.Main.createWifiInfo(Main.java:144)
I/Xposed  (  682):  at com.lemonsqueeze.fakewificonnection.Main$7.afterHookedMethod(Main.java:343)
I/Xposed  (  682):  at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:645)
I/Xposed  (  682):  at android.net.wifi.WifiManager.getConnectionInfo(Native Method)
I/Xposed  (  682):  at android.net.wifi.WifiWatchdogStateMachine$WatchdogEnabledState.processMessage(WifiWatchdogStateMachine.java:583)
I/Xposed  (  682):  at com.android.internal.util.StateMachine$SmHandler.processMsg(StateMachine.java:966)
I/Xposed  (  682):  at com.android.internal.util.StateMachine$SmHandler.handleMessage(StateMachine.java:789)
I/Xposed  (  682):  at android.os.Handler.dispatchMessage(Handler.java:102)
I/Xposed  (  682):  at android.os.Looper.loop(Looper.java:136)
I/Xposed  (  682):  at android.os.HandlerThread.run(HandlerThread.java:61)

Is this a feasable setup or should I rather look into USB tethering (which is, erm, hacky to do on OS X)?

lemonsqueeze commented 9 years ago

Sorry for the late reply, not getting github notifications for some reason. Nothing wrong with this setup afaik, should be fine. Try v1.7, it should fix this exception.