Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6660060
  • 博文数量: 1159
  • 博客积分: 12444
  • 博客等级: 上将
  • 技术积分: 12570
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-13 21:34
文章分类

全部博文(1159)

文章存档

2016年(126)

2015年(350)

2014年(56)

2013年(91)

2012年(182)

2011年(193)

2010年(138)

2009年(23)

分类: C/C++

2015-09-23 10:11:33


[root@localhost lib]# pwd
/opt/cBPM-android/criteria-lin/lib
[root@localhost lib]# adb push executer /data/data
3352 KB/s (22209660 bytes in 6.469s)
[root@localhost lib]# adb root
[root@localhost lib]# adb shell
root@mb526:/ # cd data/data/
root@mb526:/data/data # ./executer
/system/bin/sh: ./executer: No such file or directory

root@mb526:/data/data # mount -o remount,rw /
root@mb526:/data/data # mkdir -p /usr/lib
root@mb526:/data/data # cp /system/lib/libc.so /system/lib/libdl.so /usr/lib/
root@mb526:/data/data # ./executer
/system/bin/sh: ./executer: No such file or directory
1|root@mb526:/data/data # ln -s /usr/lib/libc.so /usr/lib/libc.so.1
1|root@mb526:/data/data # ln -s /usr/lib/libdl.so /usr/lib/libdl.so.1
root@mb526:/data/data # ./executer
/system/bin/sh: ./executer: Permission denied
root@mb526:/data/data # ll /usr/lib/lib*
-rw-r--r-- root     root       306604 2015-09-22 08:16 libc.so
lrwxrwxrwx root     root              2015-09-22 08:17 libc.so.1 -> /usr/lib/libc.so
-rw-r--r-- root     root         9348 2015-09-22 08:16 libdl.so
lrwxrwxrwx root     root              2015-09-22 08:17 libdl.so.1 -> /usr/lib/libdl.so
root@mb526:/data/data # chmod 777 /usr/lib/lib*so


root@mb526:/data/data # ./executer TestNotePad
root@mb526:/data/data # ./executer StartEnd


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1|root@mb526:/data/data # ./executer TestNotePad                                                                                      
The program will perform the following steps:

1: Criteria session initialization (only one time)
    ----- for each process (begin) -----
2: Create process instance from template
3: Execute process instance just created
    ----- for each process (end) -----
4: Querying for activity pending
5: close criteria session

Press a Key for beginning................................................
 
Criteria session Initialization.....(look at Executor trace file)
Criteria session Initialization [KO].Error[Impossible to retrieve ${CRITERIA_HOME}]. Exit.

//手机
root@mb526:/data/data # mkdir -p criteria/database/processTemplate/                     

//宿主机
[root@localhost criteria-lin]# adb push bin/Criteria/Debug/Tools.Executor/database/processTemplate/ /data/data/database/processTemplate/
[root@localhost criteria-lin]# adb push bin/Criteria/Debug/Tools.Executor/database/Criteria.xml /data/data/criteria/database

//手机
root@mb526:/ # cd data/data/criteria
root@mb526:/data/data # ./executer TestNotePad
root@mb526:/data/data # ./executer StartEnd




++++++++++++++++++++++++++++++++++++++++下面内容说明,只需要设置  环境变量
[root@localhost criteria-lin]# grep criteria-lin -R |grep -v ".d:"|grep cpp|grep -v log.txt|grep -v .cbp|grep -v .trace
src/Criteria/Criteria.WorkflowEngine/DataBase/FileSystemDataBase.cpp:        //sFile = "/opt/cBPM/criteria-lin/bin/Criteria/Debug/Tools.Executor/database/Criteria.xml";
src/Criteria/Criteria.WorkflowEngine/WAPI/WAPI.cpp:        //String sWfHome = "/opt/cBPM/criteria-lin/bin/Criteria/Debug/Tools.Executor";
src/Criteria/Criteria.WorkflowEngine/WAPI/WAPI.cpp~:        //String sWfHome = "/opt/cBPM/criteria-lin/bin/Criteria/Debug/Tools.Executor";
include/bOS/bOSWin32.h://ztg add   /opt/cBPM/criteria-lin/reference/cpp/include
include/cpp/windows.h:// come from /opt/cBPM/criteria-lin/src/Criteria/Criteria.Libraries.bOS/bOSWin32.h
include/cpp/windows.h://ztg add   /opt/cBPM/criteria-lin/reference/cpp/include
[root@localhost criteria-lin]#
++++++++++++++++++++++++++++++++++++++++ android 设置 环境变量
export WF_HOME=/data/data/criteria
export CRITERIA_HOME=/data/data/criteria
export CM_TRACEPATH=/data/data/criteria
export CM_ALLPATH=/data/data/criteria
 
//手机
root@mb526:/ # export WF_HOME=/data/data/criteria; export CRITERIA_HOME=/data/data/criteria
root@mb526:/ # cd data/data/criteria
root@mb526:/data/data/criteria # ./executer TestNotePad
root@mb526:/data/data/criteria # ./executer StartEnd

放在一行:
root@mb526:/ # export WF_HOME=/data/data/criteria; export CRITERIA_HOME=/data/data/criteria; cd data/data/criteria; ./executer TestNotePad
 
CM_TRACEPATH  、CM_ALLPATH 调试 需要
linux环境变量立即生效        # .   /root/.bashrc
 
++++++++++++++++++++++++++++++++++++++++ android 通过gdbserver 调试c++
//宿主机
[root@localhost android-ndk-r8e]# pwd
/opt/android-on-linux/android-ndk-r8e

[root@localhost android-ndk-r8e]# find . -name gdbserver
./prebuilt/android-arm/gdbserver/gdbserver

[root@localhost android-ndk-r8e]# adb push ./prebuilt/android-arm/gdbserver/gdbserver /data/data/criteria
2896 KB/s (268812 bytes in 0.090s)
[root@localhost android-ndk-r8e]#


//手机
root@mb526:/data/data/criteria # ./gdbserver :1234 executer
Process executer created; pid = 7345
Listening on port 1234

//宿主机
export WF_HOME=/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor
export CRITERIA_HOME=/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor

[root@localhost Tools.Executor]# pwd
/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor
[root@localhost Tools.Executor]# ls executer
executer
[root@localhost Tools.Executor]# cp database/processTemplate/TestNotePad.xml .

[root@localhost Tools.Executor]# /opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb

GNU gdb (GDB) 7.3.1-gg2
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later < /> This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-linux-android".
For bug reporting instructions, please see:
< /> (gdb) shell adb forward tcp:1234 tcp:1234
(gdb) target remote localhost:1234
(gdb) file executer TestNotePad

Load new symbol table from "/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/executer"? (y or n) y
Reading symbols from /opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/executer...done.
`/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/TestNotePad.xml': can't read symbols: File format not recognized.

(gdb)




阅读(1227) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~