e01fafd5a9
- Add dev.rikka.shizuku:provider:13.1.5 dependency. - Replace custom ShizukuInitProvider with rikka.shizuku.ShizukuProvider from the upstream library; configured per Shizuku v12+ docs with android:permission='android.permission.INTERACT_ACROSS_USERS_FULL' to protect the provider from ordinary apps. - Move ShizukuBootstrap.attach() from GlassesVmApp.onCreate to MainActivity.onCreate (requestPermission needs an Activity context). - MainActivity now overrides onRequestPermissionsResult and forwards the grant to ShizukuBootstrap. - Rewrite ShizukuBootstrap strictly per the Shizuku-API guide: addBinderReceivedListenerSticky + addRequestPermissionResultListener in attach(); pingBinder / checkSelfPermission / requestPermission in refresh(). - Drop ShizukuInitProvider.kt — its job is now done by rikka.shizuku.ShizukuProvider.onCreate (verified in logcat: 'ShizukuProvider: binder received'). Verified on device ARGF20 (A06B4AB933C4103, API 32): Shizuku dialog 'Allow rayneo-vm to use Shizuku?' opens correctly; binder received via ShizukuProvider; launcher icon now visible (meta-data fix).
83 lines
2.3 KiB
Kotlin
83 lines
2.3 KiB
Kotlin
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.compose)
|
|
}
|
|
|
|
android {
|
|
namespace = "pw.binom.rayneovm.glasses"
|
|
compileSdk = 37
|
|
|
|
defaultConfig {
|
|
applicationId = "pw.binom.rayneovm.glasses"
|
|
minSdk = 32 // RayNeo X3 Pro — API 32
|
|
targetSdk = 37
|
|
versionCode = 1
|
|
versionName = "0.1.0"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
|
|
packaging {
|
|
resources {
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
}
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":shared"))
|
|
|
|
// RayNeo Mercury Android SDK (UI-кит: MirroringView, RecyclerView helpers, MercurySDK.init)
|
|
implementation(files("libs/MercuryAndroidSDK.aar"))
|
|
|
|
implementation(libs.kotlinx.coroutines.android)
|
|
implementation(libs.kotlinx.serialization.json)
|
|
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.androidx.lifecycle.runtime.compose)
|
|
implementation(libs.androidx.lifecycle.service)
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
implementation(libs.androidx.compose.ui)
|
|
implementation(libs.androidx.compose.foundation)
|
|
implementation(libs.androidx.compose.material3)
|
|
implementation(libs.androidx.compose.material.icons)
|
|
implementation(libs.androidx.navigation.compose)
|
|
|
|
implementation(libs.shizuku.api)
|
|
implementation(libs.shizuku.provider)
|
|
implementation(libs.mercury.library)
|
|
implementation(libs.mercury.transport)
|
|
implementation(libs.mercury.binocular)
|
|
implementation(libs.mercury.shizuku)
|
|
}
|
|
|
|
tasks.register<Exec>("installGlasses") {
|
|
group = "deploy"
|
|
description = "Install GlassesApp APK на RayNeo X3 Pro (serial: A06B4AB933C4103)"
|
|
dependsOn("assembleDebug")
|
|
val serial = "A06B4AB933C4103"
|
|
val apk = layout.buildDirectory.file("outputs/apk/debug/app-glasses-vm-debug.apk")
|
|
commandLine("adb", "-s", serial, "install", "-r", apk.get().asFile.absolutePath)
|
|
}
|
|
|