Skip to content

Commit

Permalink
更新V11.1
Browse files Browse the repository at this point in the history
修复安卓7闪退的bug
  • Loading branch information
mingzhixian committed Jun 24, 2023
1 parent bef9581 commit 4328700
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.

This file was deleted.

This file was deleted.

9 changes: 6 additions & 3 deletions scrcpy_android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@ android {
applicationId "top.saymzx.scrcpy.android"
minSdk 24
targetSdk 33
versionCode 110
versionName "11.0"
versionCode 111
versionName "11.1"
resConfigs "zh"
resConfigs "xhdpi"
ndk {
abiFilter "arm64-v8a"
abiFilters "arm64-v8a" , "x86"
}
}
buildTypes {
release {
ndk {
abiFilter "arm64-v8a"
}
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

package dev.mobile.dadb

import android.util.Base64
import java.io.File
import java.math.BigInteger
import java.nio.ByteBuffer
import java.nio.ByteOrder
import java.security.KeyPairGenerator
import java.security.PrivateKey
import java.security.interfaces.RSAPublicKey
import java.util.*
import javax.crypto.Cipher


Expand Down Expand Up @@ -104,16 +104,14 @@ class AdbKeyPair(
publicKeyFile.absoluteFile.parentFile?.mkdirs()

privateKeyFile.writer().use { out ->
val base64 = Base64.getMimeEncoder(64, "\n".toByteArray())
out.write("-----BEGIN PRIVATE KEY-----\n")
out.write(base64.encodeToString(keyPair.private.encoded))
out.write(Base64.encodeToString(keyPair.private.encoded, 0))
out.write("\n-----END PRIVATE KEY-----")
}

publicKeyFile.writer().use { out ->
val base64 = Base64.getEncoder()
val bytes = convertRsaPublicKeyToAdbFormat(keyPair.public as RSAPublicKey)
out.write(base64.encodeToString(bytes))
out.write(Base64.encodeToString(bytes, 0))
out.write(" unknown@unknown")
}
}
Expand Down

0 comments on commit 4328700

Please sign in to comment.