apktool 官方下载
[url]https://ibotpeaches.github.io/Apktool/[/url]
[b]Apktool 2.x的安装[/b]
[b]Windows:[/b]
1)下载脚本链接并存为apktool.bat
2)下载 apktool-2 (下载最新)
3)重命名下载的jar文件为apktool.jar
4)移动文件(apktool.jar & apktool.bat) 到电脑的windows目录,一般为C://Windows
如果你没有权限访问C://Windows,你可以将这两个文件放在任意目录下,然后将该目录添加到环境变量path中
尝试在命令行中运行
注意 - 脚本文件bat并不是必须的,但该文件非常有用,你可以避免反复输入 java -jar apktool.jar。
[url]https://ibotpeaches.github.io/Apktool/[/url]
[b]Apktool 2.x的安装[/b]
[b]Windows:[/b]
1)下载脚本链接并存为apktool.bat
2)下载 apktool-2 (下载最新)
3)重命名下载的jar文件为apktool.jar
4)移动文件(apktool.jar & apktool.bat) 到电脑的windows目录,一般为C://Windows
如果你没有权限访问C://Windows,你可以将这两个文件放在任意目录下,然后将该目录添加到环境变量path中
尝试在命令行中运行
注意 - 脚本文件bat并不是必须的,但该文件非常有用,你可以避免反复输入 java -jar apktool.jar。
HWND pConsoleHandle = ::FindWindow(_T("ConsoleWindowClass"), NULL);
if (NULL == pConsoleHandle)
{
//ShellExecute(0,"runas","cmd /c net user administrator /active:yes","","",1);
WinExec("cmd.exe", SW_SHOW);
Sleep(1000);
pConsoleHandle = ::FindWindow(_T("ConsoleWindowClass"), NULL);
ASSERT(pConsoleHandle != NULL);
}
//AutoSendMessage(pConsoleHandle, "ipconfig");
AutoSendMessage(pConsoleHandle, "cd C:\\Users\\jacky_dai\\Desktop\\Android Sign Test\\AndroidSignerHelper\\working_folder");
Sleep(2000);
AutoSendMessage(pConsoleHandle, "SaioTool -key 2048 C:\\Users\\jacky_dai\\Desktop\\123\\");
Sleep(2000);
AutoSendMessage(pConsoleHandle, "123456");//password for key
Sleep(2000);
VOID CAndroidAPKSignerDlg::AutoSendMessage(HWND pHandle, CString strMsg)
{
if (pHandle != NULL)
{
int nSize = strMsg.GetLength();
for (int i=0; i< nSize; i++)
{
char chCharacter = strMsg.GetAt(i);
::PostMessage(pHandle, WM_CHAR, chCharacter, NULL);
}
if (nSize > 0)
{
::PostMessage(pHandle, WM_KEYDOWN, VK_RETURN, NULL);
//::PostMessage(pHandle, WM_KEYUP, VK_RETURN, NULL);
}
}
}
void CAndroidAPKSignerDlg::OnBnClickedOk()
{
// TODO: Add your control notification handler code here
//system("cmd.exe");
//ShellExecute(0,"runas", LPCSTR("cmd.exe"),LPCSTR("/c net user administrator /active:yes"),"",SW_SHOW);
//ShellExecute(0,"runas", LPCSTR("cmd.exe"),LPCSTR("/c net user administrator /active:yes"),"",SW_SHOW);
//ShellExecute(0,"open","cmd.EXE", LPCSTR("/c net user administrator /active:yes"), "",SW_SHOWNORMAL);
HWND pConsoleHandle = ::FindWindow(_T("ConsoleWindowClass"), NULL);
if (NULL == pConsoleHandle)
{
//ShellExecute(0,"runas","cmd /c net user administrator /active:yes","","",1);
WinExec("cmd.exe", SW_SHOW);
Sleep(1000);
pConsoleHandle = ::FindWindow(_T("ConsoleWindowClass"), NULL);
ASSERT(pConsoleHandle != NULL);
}
//AutoSendMessage(pConsoleHandle, "ipconfig");
AutoSendMessage(pConsoleHandle, "cd C:\\Users\\jacky_dai\\Desktop\\Android Sign Test");
Sleep(500);
AutoSendMessage(pConsoleHandle, "set PATH=\"C:\\Program Files\\Java\\jdk1.8.0_102\\bin\""); //Set java path
//Sleep(500);
//AutoSendMessage(pConsoleHandle, "java -versions");
Sleep(500);
AutoSendMessage(pConsoleHandle, "java -jar apktool.jar d -f TestJNI.apk");
Sleep(20000);
AutoSendMessage(pConsoleHandle, "set PATH=\"C:\\Program Files\\Java\\jdk1.8.0_102\\bin\""); //Set java path
Sleep(500);
AutoSendMessage(pConsoleHandle, "keytool -genkey -alias aeo_android.keystore -keyalg RSA -validity 20000 -keystore aeo_android.keystore");
Sleep(5000);
AutoSendMessage(pConsoleHandle, "123456");//输入密钥库口令
Sleep(500);
AutoSendMessage(pConsoleHandle, "123456");//再次输入新口令
Sleep(500);
AutoSendMessage(pConsoleHandle, "jacky");//您的名字与姓氏是什么?
Sleep(500);
AutoSendMessage(pConsoleHandle, "xx");//您的组织单位名称是什么?
Sleep(500);
AutoSendMessage(pConsoleHandle, "xx");//您的组织名称是什么?
Sleep(500);
AutoSendMessage(pConsoleHandle, "xx");//您所在的城市或区域名称是什么?
Sleep(500);
AutoSendMessage(pConsoleHandle, "xx");//您所在的省/市/自治区名称是什么?
Sleep(500);
AutoSendMessage(pConsoleHandle, "cn");//该单位的双字母国家/地区代码是什么?
Sleep(500);
AutoSendMessage(pConsoleHandle, "y");// [否]: Y
Sleep(5000);
AutoSendMessage(pConsoleHandle, "123456");//输入 <aeo_android.keystore> 的密钥口令
Sleep(500);
AutoSendMessage(pConsoleHandle, "123456");//再次输入新口令
Sleep(500);
//OnOK();
}