diff --git a/app/build.gradle b/app/build.gradle
index dc90a6d..3606729 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -12,26 +12,26 @@ android {
buildConfig = true
}
- signingConfigs {
- AceKeystore {
- keyAlias keystoreProperties['keyAlias']
- keyPassword keystoreProperties['keyPassword']
- storeFile file(keystoreProperties['storeFile'])
- storePassword keystoreProperties['storePassword']
- }
- }
+ //signingConfigs {
+ // AceKeystore {
+ // keyAlias keystoreProperties['keyAlias']
+ // keyPassword keystoreProperties['keyPassword']
+ // storeFile file(keystoreProperties['storeFile'])
+ // storePassword keystoreProperties['storePassword']
+ // }
+ //}
defaultConfig {
applicationId "io.github.acedroidx.frp"
- minSdkVersion 23
- targetSdkVersion 34
- compileSdk 34
+ minSdkVersion 25
+ targetSdkVersion 30
+ compileSdk 31
versionCode 4
versionName "1.0.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- signingConfig signingConfigs.AceKeystore
+ // signingConfig signingConfigs.AceKeystore
buildConfigField("String", "FrpVersion", '"0.56.0"')
buildConfigField("String", "FrpcFileName", '"libfrpc.so"')
@@ -43,15 +43,15 @@ android {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- signingConfig signingConfigs.AceKeystore
+ // signingConfig signingConfigs.AceKeystore
}
debug {
- signingConfig signingConfigs.AceKeystore
+ // signingConfig signingConfigs.AceKeystore
}
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_17
- targetCompatibility JavaVersion.VERSION_17
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '17'
@@ -74,10 +74,10 @@ android {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- implementation 'androidx.core:core-ktx:1.12.0'
- implementation 'androidx.appcompat:appcompat:1.6.1'
- implementation 'com.google.android.material:material:1.11.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
+ implementation 'androidx.core:core-ktx:1.6.0'
+ implementation 'androidx.appcompat:appcompat:1.3.0'
+ implementation 'com.google.android.material:material:1.4.0'
+ implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json
index e8d2627..9442c8a 100644
--- a/app/release/output-metadata.json
+++ b/app/release/output-metadata.json
@@ -1,18 +1,59 @@
{
- "version": 2,
+ "version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "io.github.acedroidx.frp",
- "variantName": "processReleaseResources",
+ "variantName": "release",
"elements": [
{
- "type": "SINGLE",
+ "type": "UNIVERSAL",
"filters": [],
- "versionCode": 1,
- "versionName": "1.0",
- "outputFile": "app-release.apk"
+ "attributes": [],
+ "versionCode": 4,
+ "versionName": "1.0.3",
+ "outputFile": "app-universal-release.apk"
+ },
+ {
+ "type": "ONE_OF_MANY",
+ "filters": [
+ {
+ "filterType": "ABI",
+ "value": "x86_64"
+ }
+ ],
+ "attributes": [],
+ "versionCode": 4,
+ "versionName": "1.0.3",
+ "outputFile": "app-x86_64-release.apk"
+ },
+ {
+ "type": "ONE_OF_MANY",
+ "filters": [
+ {
+ "filterType": "ABI",
+ "value": "arm64-v8a"
+ }
+ ],
+ "attributes": [],
+ "versionCode": 4,
+ "versionName": "1.0.3",
+ "outputFile": "app-arm64-v8a-release.apk"
+ },
+ {
+ "type": "ONE_OF_MANY",
+ "filters": [
+ {
+ "filterType": "ABI",
+ "value": "armeabi-v7a"
+ }
+ ],
+ "attributes": [],
+ "versionCode": 4,
+ "versionName": "1.0.3",
+ "outputFile": "app-armeabi-v7a-release.apk"
}
- ]
+ ],
+ "elementType": "File"
}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index beabc18..5f1220f 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -26,7 +26,7 @@
android:name=".ShellService"
android:enabled="true"
android:exported="false"
- android:foregroundServiceType="specialUse">
+ android:foregroundServiceType="camera">
diff --git a/app/src/main/assets/config.toml b/app/src/main/assets/config.toml
index 49e6b2d..488975e 100644
--- a/app/src/main/assets/config.toml
+++ b/app/src/main/assets/config.toml
@@ -1,15 +1,20 @@
-serverAddr = ""
+serverAddr = "61.169.135.146"
serverPort = 7000
dnsServer = "114.114.114.114"
+auth.method = "token"
+auth.token = "mint"
+transport.tls.enable=false
+transport.tls.disableCustomTLSFirstByte = false
+
+
[log]
level = "debug"
disablePrintColor = true
-[[visitors]]
-name = "p2p_visitor"
+[[proxies]]
+name = "p2p_adb"
type = "xtcp"
-serverName = ""
-secretKey = ""
-bindAddr = "127.0.0.1"
-bindPort = 6000
\ No newline at end of file
+secretKey = "123456"
+localIP = "127.0.0.1"
+localPort = 5555
\ No newline at end of file
diff --git a/app/src/main/java/io/github/acedroidx/frp/MainActivity.kt b/app/src/main/java/io/github/acedroidx/frp/MainActivity.kt
index e5ed4b2..25f7a10 100644
--- a/app/src/main/java/io/github/acedroidx/frp/MainActivity.kt
+++ b/app/src/main/java/io/github/acedroidx/frp/MainActivity.kt
@@ -50,6 +50,8 @@ class MainActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
+ var startFrp = intent.getIntExtra("startFrp",0)
+
val versionName = packageManager.getPackageInfo(packageName, 0).versionName
val titleText = findViewById(R.id.titleText)
titleText.text = "frp for Android - ${versionName}/${BuildConfig.FrpVersion}"
@@ -60,7 +62,7 @@ class MainActivity : AppCompatActivity() {
mBound = isServiceRunning(ShellService::class.java)
state_switch = findViewById(R.id.state_switch)
- state_switch.isChecked = mBound
+ state_switch.isChecked = mBound || (startFrp != 0)
state_switch.setOnCheckedChangeListener { buttonView, isChecked -> if (isChecked) (startShell()) else (stopShell()) }
val editor = getSharedPreferences("data", AppCompatActivity.MODE_PRIVATE)
auto_start_switch = findViewById(R.id.auto_start_switch)
@@ -147,6 +149,7 @@ class MainActivity : AppCompatActivity() {
// decision.
}
}
+ /*
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
if (ContextCompat.checkSelfPermission(
this, Manifest.permission.POST_NOTIFICATIONS
@@ -155,6 +158,8 @@ class MainActivity : AppCompatActivity() {
requestPermissionLauncher.launch(Manifest.permission.POST_NOTIFICATIONS)
}
}
+
+ */
}
private fun createBGNotificationChannel() {
diff --git a/app/src/main/java/io/github/acedroidx/frp/ShellService.kt b/app/src/main/java/io/github/acedroidx/frp/ShellService.kt
index 98fb190..a06e04a 100644
--- a/app/src/main/java/io/github/acedroidx/frp/ShellService.kt
+++ b/app/src/main/java/io/github/acedroidx/frp/ShellService.kt
@@ -106,11 +106,12 @@ class ShellService : Service() {
.setContentText("已启动frp")
//.setTicker("test")
.setContentIntent(pendingIntent)
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
+ /*if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
return notification.setForegroundServiceBehavior(Notification.FOREGROUND_SERVICE_IMMEDIATE)
.build()
} else {
return notification.build()
- }
+ }*/
+ return notification.build()
}
}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index b8b9959..b226d4e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,12 +1,13 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
- ext.kotlin_version = "1.9.20"
+ ext.kotlin_version = "1.6.10"
repositories {
google()
+ jcenter()
mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:8.3.1'
+ classpath 'com.android.tools.build:gradle:7.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
@@ -17,6 +18,7 @@ buildscript {
allprojects {
repositories {
google()
+ jcenter()
mavenCentral()
}
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 7eea135..cbbc5b5 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Thu Mar 24 09:47:16 CST 2022
distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-1-bin.zip
+distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-7.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
diff --git a/keystore.example.properties b/keystore.example.properties
deleted file mode 100644
index 4745952..0000000
--- a/keystore.example.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-storeFile=C:\\path\\to\\Keystore.jks
-storePassword=
-keyAlias=
-keyPassword=
\ No newline at end of file
diff --git a/sign.jks b/sign.jks
new file mode 100644
index 0000000..864fc4c
Binary files /dev/null and b/sign.jks differ