2014-02-11 82 views
2

嗨,我寫了一個程序,它使用事件injection.so爲了獲得系統特權,我必須簽署apk與系統的證書。我想在這個環節 http://paulononaka.wordpress.com/2011/10/19/apk-with-system-privileges/ https://github.com/getfatday/keytool-importkeypairsign apk與系統證書

提到的,但是當我嘗試,我得到以下錯誤

C:\Program Files\Java\jdk1.7.0\bin>keytool -importkeypair -k ~/C:\Users\name\.androiddebug.keystore -p android -pk8 platform.pk8 -cert platform.x509. 
pem -alias platform 
Illegal option: -importkeypair 
Key and Certificate Management Tool 

Commands: 

-certreq   Generates a certificate request 
-changealias  Changes an entry's alias 
-delete    Deletes an entry 
-exportcert   Exports certificate 
-genkeypair   Generates a key pair 
-genseckey   Generates a secret key 
-gencert   Generates certificate from a certificate request 
-importcert   Imports a certificate or a certificate chain 
-importkeystore  Imports one or all entries from another keystore 
-keypasswd   Changes the key password of an entry 
-list    Lists entries in a keystore 
-printcert   Prints the content of a certificate 
-printcertreq  Prints the content of a certificate request 
-printcrl   Prints the content of a CRL file 
-storepasswd  Changes the store password of a keystore 

Use "keytool -command_name -help" for usage of command_name 
+0

你好,請分享/密鑰工具-importkeypair「命令的其餘部分」,如果你發現你的SOLN。 – Basher51

回答

0

轉到C:\Program Files\Java\jdk1.7.0\bin>然後

試試這個

keytool -list -v -alias androiddebugkey -keystore C:\Users\[your_user_name]\.android\debug.keystore -storepass android -keypass android 
0

命令是keytool-importkeypair,而不是keytool You w生病需要添加keytool-importkeypair到你的路徑不知何故

0

keytool-importkeypair是一個沒有空間的單一命令。爲了使這項工作:

1)從以下網站下載密鑰工具,importkeypair並將其保存到平臺的證書存在於同一個文件夾

https://github.com/getfatday/keytool-importkeypair

2)一旦文件是存在的,你可以只需鍵入

$使用它。