()
| 309 | } |
| 310 | |
| 311 | public static void initCore() throws DaemonException, SuException { |
| 312 | |
| 313 | if(mCoreInitialized) |
| 314 | return; |
| 315 | |
| 316 | String socket_path = getCorePath() + "/cSploitd.sock"; |
| 317 | |
| 318 | if(!Client.isConnected()) { |
| 319 | if(!Client.Connect(socket_path)) { |
| 320 | startCoreDaemon(); |
| 321 | if (!Client.Connect(socket_path)) |
| 322 | throw new DaemonException("cannot connect to core daemon"); |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | if (!Client.isAuthenticated() && !Client.Login("android", "DEADBEEF")) { |
| 327 | throw new DaemonException("cannot login to core daemon"); |
| 328 | } |
| 329 | |
| 330 | if (!Client.LoadHandlers()) { |
| 331 | throw new DaemonException("cannot load handlers"); |
| 332 | } |
| 333 | |
| 334 | ChildManager.storeHandlers(); |
| 335 | |
| 336 | reloadTools(); |
| 337 | |
| 338 | mCoreInitialized = true; |
| 339 | Services.getNetworkRadar().onAutoScanChanged(); |
| 340 | } |
| 341 | |
| 342 | public static void reloadNetworkMapping(){ |
| 343 | try{ |
no test coverage detected