wip
This commit is contained in:
@@ -14,7 +14,8 @@ Package: hanson.xyz.vpnhotspotmod
|
||||
|
||||
Intents BLUETOOTH_TETHER_START and BLUETOOTH_TETHER_STOP are also available.
|
||||
|
||||
This has been tested and developed on Android 13, on a Pixel 7, in June 2023.
|
||||
This has been tested and developed on
|
||||
Android 13, on a Pixel 7, in June 2023.
|
||||
|
||||
Original README.md follows:
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#Sun Mar 03 23:02:15 CST 2024
|
||||
#Mon Mar 04 00:23:14 CST 2024
|
||||
base.0=/home/brian/Desktop/vpnhotspotmod/mobile/build/intermediates/dex/freedomDebug/mergeExtDexFreedomDebug/classes.dex
|
||||
base.1=/home/brian/Desktop/vpnhotspotmod/mobile/build/intermediates/dex/freedomDebug/mergeProjectDexFreedomDebug/0/classes.dex
|
||||
base.10=/home/brian/Desktop/vpnhotspotmod/mobile/build/intermediates/desugar_lib_dex/freedomDebug/classes1000.dex
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
repositories {
|
||||
system: GIT
|
||||
local_root_path: "$PROJECT_DIR"
|
||||
revision: "74ff304e4057f88c7ef901a79a3298e9d315b494"
|
||||
revision: "bbfe32da0544fa56a3b1d1cf5773162a9dfc49e9"
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,2 +1,2 @@
|
||||
92
|
||||
93
|
||||
0
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
ä<EFBFBD><EFBFBD><EFBFBD>c<EFBFBD>h<EFBFBD><EFBFBD>Ҕ<EFBFBD>y<EFBFBD>n
|
||||
ä<EFBFBD><EFBFBD><EFBFBD>c<EFBFBD>h<EFBFBD><EFBFBD>Ҕ<EFBFBD>y<EFBFBD>n<EFBFBD><EFBFBD>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,2 +1,2 @@
|
||||
92
|
||||
98
|
||||
0
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
ɠ<EFBFBD>cϫ<EFBFBD>S<EFBFBD>l
|
||||
ɠ<EFBFBD>cϫ<EFBFBD>S<EFBFBD>lЉ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,6 +9,9 @@ public final class MyBroadcastReceiver extends android.content.BroadcastReceiver
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when tethering has been successfully started.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public void onReceive(@org.jetbrains.annotations.NotNull
|
||||
android.content.Context context, @org.jetbrains.annotations.NotNull
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -28,6 +28,7 @@ import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.net.ConnectivityManager
|
||||
|
||||
// added by hansonxyz
|
||||
|
||||
@@ -35,6 +36,32 @@ class MyBroadcastReceiver : BroadcastReceiver(), TetheringManager.StartTethering
|
||||
|
||||
private val handler = Handler(Looper.getMainLooper())
|
||||
|
||||
/**
|
||||
* Called when tethering has been successfully started.
|
||||
*/
|
||||
// override fun onTetheringStarted() {
|
||||
// // Retrieve the list of currently active tethering interfaces
|
||||
// val tetheredInterfaces = TetheringManager.tetheredIfaces
|
||||
//
|
||||
// // Iterate over the interfaces and start the monitoring service for each
|
||||
// tetheredInterfaces.forEach { iface ->
|
||||
// Intent(App.app, TetheringService::class.java).apply {
|
||||
// action = TetheringService.ACTION_START_MONITORING
|
||||
// putExtra(TetheringService.EXTRA_INTERFACE, iface)
|
||||
// App.app.startForegroundService(this)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//
|
||||
// /**
|
||||
// * Called when starting tethering failed.
|
||||
// *
|
||||
// * @param error The error that caused the failure.
|
||||
// */
|
||||
// override fun onTetheringFailed(error: Int? = null) { }
|
||||
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
if (intent.action.toString().contains("BT_TETHER_START")) {
|
||||
TetheringManager.startTethering(TetheringManager.TETHERING_BLUETOOTH, false, this)
|
||||
@@ -48,10 +75,21 @@ class MyBroadcastReceiver : BroadcastReceiver(), TetheringManager.StartTethering
|
||||
for (startable in config.startables.values) startable.start(App.app)
|
||||
}
|
||||
TetheringManager.startTethering(TetheringManager.TETHERING_WIFI, false, this)
|
||||
|
||||
}
|
||||
if (intent.action.toString().contains("WIFI_TETHER_STOP")) {
|
||||
TetheringManager.stopTethering(TetheringManager.TETHERING_WIFI)
|
||||
}
|
||||
if (intent.action.toString().contains("android.net.conn.TETHER_STATE_CHANGED")) {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val tetheredInterfaces = intent.getStringArrayListExtra("tetherArray")
|
||||
tetheredInterfaces?.forEach { iface ->
|
||||
Intent(context, TetheringService::class.java).apply {
|
||||
putExtra(TetheringService.EXTRA_ADD_INTERFACES, arrayOf(iface))
|
||||
context.startForegroundService(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user