淺淡ADB的公私鑰認證機制

2021-08-28 22:58:20 字數 1297 閱讀 8951

它會清空/data/misc/adb/adb_keys,而不是刪除單條主機公鑰。

[description]

如何開啟與關閉adb 的認證機制(google adb secure)

[keyword]

adb secure , ro.adb.secure , adb rsa 指紋認證

[solution]

mtk 版本預設關閉adb 的位址認證機制,如果貴司需要開啟,可以修改alps/build/core/main.mk

ifeq (true,$(strip $(enable_target_debugging)))

# target is more debuggable and adbd is on by default

additional_default_properties += ro.debuggable=1

additional_default_properties += ro.adb.secure=1 ==> 如果想在eng load新增此功能,加這行

# include the debugging/testing ota keys in this build.

include_test_ota_keys := true

else # !enable_target_debugging

# target is less debuggable and adbd is off by default

additional_default_properties += ro.debuggable=0

additional_default_properties += ro.adb.secure=1 ==> 如果想在user load新增此功能,加這行

endif # !enable_target_debugging

l 以後版本可以修改 /device/mediatek/mt***x/device.mk :

而ro.adb.secure 這個system property 對於adbd 的控制點在alps/system/core/adb/adb.c 中的

property_get("ro.adb.secure", value, "0");

auth_enabled = !strcmp(value, "1");

if (auth_enabled)

adb_auth_init();//需要彈出對話方塊進行認證

需要注意的是,google 現在強制要求在user 版本中開啟adb rsa 指紋認證,如果您關閉,將無法通過google cts 測試.

openssl生成證書,公私鑰的方法

終端 1 建立私鑰 openssl genrsa out private.pem 1024 金鑰長度,1024覺得不夠安全的話可以用2048,但是代價也相應增大 2 建立公鑰 為方便測試,還是需要公鑰的。正常情況下,拿到證書就可以了 openssl rsa in private.pem pubout...

openssl操作公私鑰和加解密的一些常用命令

生成公私鑰實踐 生成私鑰,這裡以橢圓曲線secp256k1為例 openssl ecparam name secp256k1 genkey out secp256k1 priv.pem 帶ec曲線引數 openssl ecparam name secp256k1 genkey noout out s...

PHP的HTTP認證機制

php的http認證機制因此該功能不適用於 cgi 版本。在 apache 模組的 php 指令碼中,可以用 header 函式來向客戶端瀏覽器傳送authentication required資訊,使其彈出乙個使用者名稱 密碼輸入視窗。當使用者輸入使用者名稱和密碼後,包含有 url 的 php 指...