- Aug 08 Fri 2014 19:11
-
How to root msm896x(Android)
- Aug 01 Fri 2014 19:12
-
EWF via hta(Windows)
最近因為客戶需要使用EWF功能
因此我用VS2012包EWF指令製作出exe,再用hta來執行這些exe
hta如下
<html>
<head>
<title>EWF 控制台</title>
<hta:application
icon = "favicon.ico"
id="HelloWorld"
applicationName="HelloWorld"
border="5pt"
borderStyle="raised"
caption="yes"
maximizeButton="yes"
minimizeButton="yes"
showInTaskBar="yes"
singleInstance="yes"
sysMenu="yes"
windowState="maximize"
>
<SCRIPT Language="VBScript">
sub Window_onLoad
window.resizeTo 600,480
end sub
sub helloWorld
document.getElementById("hier").innerHTML="You click Button 1!"
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "EWF_show_status.exe", , , , NORMAL_WINDOW
'Set ws = CreateObject("WScript.Shell")
'ws.Run "EWF_show_status.exe"
'Set ws = CreateObject("WScript.Shell")
'set cmd = ws.Exec("cmd /k")
'cmd.stdin.writeline("dir")
'cmd.stdin.close 'close stdin [can't reopen!]
'ws.popup cmd.stdout.readall 'get+show output
end sub
sub button2
document.getElementById("hier").innerHTML="EWF開啟中, 稍後將會重開機!"
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "EWF_Enable.exe", , , , 0
'Set ws = CreateObject("WScript.Shell")
'ws.Run "EWF_Enable.exe"
end sub
sub button3
document.getElementById("hier").innerHTML="EWF關閉中, 稍後將會重開機!"
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "EWF_Disable.exe", , , , 0
'Set ws = CreateObject("WScript.Shell")
'ws.Run "EWF_Disable.exe"
end sub
</script>
</head>
<body>
<p>EWF 使用方式: </p>
<p>1. 您可以點擊 EWF狀態 來觀看目前EWF的狀態</p>
<p>2. 您透過點擊 EWF啟動 來鎖定C槽</p>
<p>3. 您透過點擊 EWF解除 來解除鎖定</p>
<form>
<input type="button" onClick="self.helloWorld()" value="EWF狀態" style="width:150px;height:60px;font-size:30px;">
<input type="button" onClick="self.button2" value="EWF啟動" style="width:150px;height:60px;font-size:30px;">
<input type="button" onClick="self.button3" value="EWF解除" style="width:150px;height:60px;font-size:30px;">
</form>
<div id="hier"> 狀態 </div>
</body>
</html>
因此我用VS2012包EWF指令製作出exe,再用hta來執行這些exe
hta如下
<html>
<head>
<title>EWF 控制台</title>
<hta:application
icon = "favicon.ico"
id="HelloWorld"
applicationName="HelloWorld"
border="5pt"
borderStyle="raised"
caption="yes"
maximizeButton="yes"
minimizeButton="yes"
showInTaskBar="yes"
singleInstance="yes"
sysMenu="yes"
windowState="maximize"
>
<SCRIPT Language="VBScript">
sub Window_onLoad
window.resizeTo 600,480
end sub
sub helloWorld
document.getElementById("hier").innerHTML="You click Button 1!"
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "EWF_show_status.exe", , , , NORMAL_WINDOW
'Set ws = CreateObject("WScript.Shell")
'ws.Run "EWF_show_status.exe"
'Set ws = CreateObject("WScript.Shell")
'set cmd = ws.Exec("cmd /k")
'cmd.stdin.writeline("dir")
'cmd.stdin.close 'close stdin [can't reopen!]
'ws.popup cmd.stdout.readall 'get+show output
end sub
sub button2
document.getElementById("hier").innerHTML="EWF開啟中, 稍後將會重開機!"
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "EWF_Enable.exe", , , , 0
'Set ws = CreateObject("WScript.Shell")
'ws.Run "EWF_Enable.exe"
end sub
sub button3
document.getElementById("hier").innerHTML="EWF關閉中, 稍後將會重開機!"
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "EWF_Disable.exe", , , , 0
'Set ws = CreateObject("WScript.Shell")
'ws.Run "EWF_Disable.exe"
end sub
</script>
</head>
<body>
<p>EWF 使用方式: </p>
<p>1. 您可以點擊 EWF狀態 來觀看目前EWF的狀態</p>
<p>2. 您透過點擊 EWF啟動 來鎖定C槽</p>
<p>3. 您透過點擊 EWF解除 來解除鎖定</p>
<form>
<input type="button" onClick="self.helloWorld()" value="EWF狀態" style="width:150px;height:60px;font-size:30px;">
<input type="button" onClick="self.button2" value="EWF啟動" style="width:150px;height:60px;font-size:30px;">
<input type="button" onClick="self.button3" value="EWF解除" style="width:150px;height:60px;font-size:30px;">
</form>
<div id="hier"> 狀態 </div>
</body>
</html>
- Aug 01 Fri 2014 19:05
-
create wim tool(Windows)
The recent I usually add wim file,but command is long
So create a bat file , this bat file can increase wim file create time
P.S need PE3(for win7)
So create a bat file , this bat file can increase wim file create time
P.S need PE3(for win7)
- Aug 01 Fri 2014 18:56
-
Diskpart(Windows)
The recent a customer asked me a question
A: if I format you system or install linux , can you recovery to original ?
B : YES
Because the relationship between these words, I creat a shell script , it ok(for win7)
A: if I format you system or install linux , can you recovery to original ?
B : YES
Because the relationship between these words, I creat a shell script , it ok(for win7)
- Jan 13 Mon 2014 19:42
-
Dialog隱藏(Windows)
- Jan 13 Mon 2014 19:23
-
MTK u-blox
- Dec 19 Thu 2013 19:29
-
open activity via am
1. install aapt tool (can cp to bin)
可參考https://blog.csdn.net/cheligeer1988/article/details/10932305
2. via aapt tool find activity or package
aapt d badging Browser.apk | egrep "activity|package"
package: name='com.android.browser' versionCode='16' versionName='4.1.1-eng.pandora.1387330
237'
original-package:'com.android.browser'
launchable-activity: name='com.android.browser.BrowserActivity' label='Browser' icon=''
3. via am open apk(on android devices)
am start -n com.android.browser/com.android.browser.BrowserActivity
- Dec 19 Thu 2013 19:12
-
show message via adb logcat
How to show message on jni code
1. on Android.mk add
./frameworks/base/services/jni/Android.mk(順序重要)
include $(CLEAR_VARS)
LOCAL_LDLIBS:=-llog
#LOCAL_LDLIBS:= -L$(SYSROOT)/usr/lib -llog
1. on Android.mk add
./frameworks/base/services/jni/Android.mk(順序重要)
include $(CLEAR_VARS)
LOCAL_LDLIBS:=-llog
#LOCAL_LDLIBS:= -L$(SYSROOT)/usr/lib -llog
- Aug 16 Fri 2013 19:58
-
check kernel config
adb pull /proc/config.gz .
- Aug 16 Fri 2013 19:51
-
Wifi and Bluetooth Open On Android setting UI
//Wifi
adb shell
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
select * from secure where name="wifi_on";
update secure set value=1 where name="wifi_on";
select * from secure where name="wifi_on";
reboot
adb shell
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
select * from secure where name="wifi_on";
update secure set value=1 where name="wifi_on";
select * from secure where name="wifi_on";
reboot
- Aug 16 Fri 2013 19:47
-
adb remount
- Aug 16 Fri 2013 19:35
-
Dialog自動關閉(Windows)
添加dialog並且於20秒內關閉
主要透過windows OnTimer機制來關閉
/////////////////////////////////////////////////////////////////////////////
//Po add 0809 dialog add
class Po_Dialog : public CDialogSK
{
public:
Po_Dialog();
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_DIALOG1 };
UINT m_Timer;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
主要透過windows OnTimer機制來關閉
/////////////////////////////////////////////////////////////////////////////
//Po add 0809 dialog add
class Po_Dialog : public CDialogSK
{
public:
Po_Dialog();
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_DIALOG1 };
UINT m_Timer;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()