1. remount
2. push file to device
3. run command
P.S can run file on init

ooieueioo 發表在 痞客邦 留言(0) 人氣()

最近因為客戶需要使用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>

ooieueioo 發表在 痞客邦 留言(0) 人氣()

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)
 

ooieueioo 發表在 痞客邦 留言(0) 人氣()

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)

ooieueioo 發表在 痞客邦 留言(0) 人氣()

The Story is fun
 
今天B遇到了個問題
A將Dialog隱藏在背景Runing(A沒跟B說這件事)

ooieueioo 發表在 痞客邦 留言(0) 人氣()

1. check kernel have ACM support
# USB Device Class drivers
CONFIG_USB_ACM=y

ooieueioo 發表在 痞客邦 留言(0) 人氣()


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

ooieueioo 發表在 痞客邦 留言(0) 人氣()

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

ooieueioo 發表在 痞客邦 留言(0) 人氣()

adb pull /proc/config.gz .

ooieueioo 發表在 痞客邦 留言(0) 人氣()

//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

ooieueioo 發表在 痞客邦 留言(0) 人氣()

 
簡單的做法是
adb remount
 

ooieueioo 發表在 痞客邦 留言(0) 人氣()

添加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()

ooieueioo 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。