Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教大神so如何在android8下编译? #2

Open
xuduo opened this issue Dec 17, 2014 · 4 comments
Open

请教大神so如何在android8下编译? #2

xuduo opened this issue Dec 17, 2014 · 4 comments

Comments

@xuduo
Copy link

xuduo commented Dec 17, 2014

之前也拷了xposed hook部分源码,做了个类似的工具,用作服务器动态下发代码.
不过只能在anrdoid15下编译.android8下有各种编译问题,一直没有搞定

@cmzy
Copy link
Owner

cmzy commented Dec 17, 2014

都是些什么问题呢?

发自我的 iPhone

在 2014年12月17日,15:50,Charlie [email protected] 写道:

之前也拷了xposed hook部分源码,做了个类似的工具,用作服务器动态下发代码.
不过只能在anrdoid15下编译.android8下有各种编译问题,一直没有搞定


Reply to this email directly or view it on GitHub.

@xuduo
Copy link
Author

xuduo commented Dec 17, 2014

#include "Dalvik.h"
单这句就编译不过,c语言我基本不懂
报错:
In file included from dalvik/vm/Atomic.h:24,
from dalvik/vm/oo/Object.h:24,
from dalvik/vm/Dalvik.h:36,
from frameworks/base/xposed/xposedlib.cpp:1:
system/core/include/cutils/atomic-inline.h:39:3: error: #error "Must define ANDROID_SMP before including atomic-inline.h"
In file included from dalvik/vm/Dalvik.h:46,
from frameworks/base/xposed/xposedlib.cpp:1:
dalvik/vm/IndirectRefTable.h: In function 'IndirectRefKind dvmGetIndirectRefType(void_)':
dalvik/vm/IndirectRefTable.h:239: error: invalid conversion from 'u4' to 'IndirectRefKind'
In file included from dalvik/vm/Dalvik.h:72,
from frameworks/base/xposed/xposedlib.cpp:1:
dalvik/vm/analysis/RegisterMap.h: In function 'RegisterMapFormat dvmRegisterMapGetFormat(const RegisterMap_)':
dalvik/vm/analysis/RegisterMap.h:70: error: invalid conversion from 'int' to 'RegisterMapFormat'
In file included from dalvik/vm/Dalvik.h:75,
from frameworks/base/xposed/xposedlib.cpp:1:
dalvik/libdex/InstrUtils.h: At global scope:
dalvik/libdex/InstrUtils.h:39: error: using typedef-name 'InstructionFormat' after 'enum'
dalvik/libdex/InstrUtils.h:38: error: 'InstructionFormat' has a previous declaration here
dalvik/libdex/InstrUtils.h:97: error: using typedef-name 'InstructionFlags' after 'enum'
dalvik/libdex/InstrUtils.h:96: error: 'InstructionFlags' has a previous declaration here
In file included from dalvik/vm/Dalvik.h:87,
from frameworks/base/xposed/xposedlib.cpp:1:
dalvik/vm/oo/ObjectInlines.h: In function 'Object* dvmGetFieldObject(const Object_, int)':
dalvik/vm/oo/ObjectInlines.h:79: error: invalid conversion from 'void_' to 'Object_'
dalvik/vm/oo/ObjectInlines.h: In function 's8 dvmGetFieldLongVolatile(const Object_, int)':
dalvik/vm/oo/ObjectInlines.h:108: error: invalid conversion from 'void_' to 'const s8_'
dalvik/vm/oo/ObjectInlines.h: In function 'double dvmGetFieldDoubleVolatile(const Object_, int)':
dalvik/vm/oo/ObjectInlines.h:115: error: invalid conversion from 'void_' to 'const s8_'
dalvik/vm/oo/ObjectInlines.h: In function 'void dvmSetFieldObject(Object_, int, Object_)':
dalvik/vm/oo/ObjectInlines.h:150: error: invalid conversion from 'void_' to 'JValue_'
dalvik/vm/oo/ObjectInlines.h: In function 'void dvmSetFieldLongVolatile(Object_, int, s8)':
dalvik/vm/oo/ObjectInlines.h:178: error: invalid conversion from 'void_' to 's8_'
dalvik/vm/oo/ObjectInlines.h: In function 'Object* dvmGetStaticFieldObject(const StaticField_)':
dalvik/vm/oo/ObjectInlines.h:227: error: invalid conversion from 'void_' to 'Object*'

@xuduo
Copy link
Author

xuduo commented Dec 17, 2014

我整个android8是可以编译的.感觉可能是有些CFLAG没设置对,试了很久也没解决

@it114
Copy link

it114 commented Jan 19, 2015

你好,我看原代码中没有关于so对应的那部分的源代码,这部分可以开源吗?或者告知下如何从xpose中获取so相关的源代码?~ 谢谢,不然光看java层面的sample也没什么意义,不利于so中遇到问题的修改。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants