Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
ReyunSecureSdk
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
daiwenjie
ReyunSecureSdk
Commits
c73a9339
Commit
c73a9339
authored
Apr 12, 2021
by
leiguo1029
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
\
parent
9e932f82
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
9 deletions
+16
-9
build.gradle
app/build.gradle
+10
-5
reyun.keystore
reyun.keystore
+0
-0
collect.c
wandun/src/main/cpp/collect.c
+6
-4
No files found.
app/build.gradle
View file @
c73a9339
...
@@ -3,12 +3,20 @@ plugins {
...
@@ -3,12 +3,20 @@ plugins {
}
}
android
{
android
{
signingConfigs
{
release
{
storeFile
file
(
'/Users/reyun/Program/Android/reyunsdk/reyun.keystore'
)
storePassword
'reyun12345'
keyAlias
'reyun.keystore'
keyPassword
'reyun12345'
}
}
compileSdkVersion
30
compileSdkVersion
30
buildToolsVersion
"30.0.3"
buildToolsVersion
"30.0.3"
defaultConfig
{
defaultConfig
{
applicationId
"com.reyun.sdktestdemo"
applicationId
"com.reyun.sdktestdemo"
minSdkVersion
21
minSdkVersion
19
targetSdkVersion
30
targetSdkVersion
30
versionCode
1
versionCode
1
versionName
"1.0"
versionName
"1.0"
...
@@ -24,13 +32,10 @@ android {
...
@@ -24,13 +32,10 @@ android {
release
{
release
{
minifyEnabled
false
minifyEnabled
false
proguardFiles
getDefaultProguardFile
(
'proguard-android-optimize.txt'
),
'proguard-rules.pro'
proguardFiles
getDefaultProguardFile
(
'proguard-android-optimize.txt'
),
'proguard-rules.pro'
signingConfig
signingConfigs
.
release
}
}
}
}
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
targetCompatibility
JavaVersion
.
VERSION_1_8
}
externalNativeBuild
{
externalNativeBuild
{
cmake
{
cmake
{
...
...
reyun.keystore
0 → 100644
View file @
c73a9339
File added
wandun/src/main/cpp/collect.c
View file @
c73a9339
...
@@ -35,9 +35,11 @@ void do_collect(JNIEnv* env) {
...
@@ -35,9 +35,11 @@ void do_collect(JNIEnv* env) {
cJSON
*
json
=
collect_init
();
cJSON
*
json
=
collect_init
();
struct
timespec
ts
=
{
0
};
struct
timespec
ts
=
{
0
};
double
start_time
=
0
,
end_time
=
0
;
double
start_time
=
0
,
end_time
=
0
;
if
(
WDSYSCALL
(
SYS_clock_gettime
,
CLOCK_
MONOTONIC
,
&
ts
)
==
0
)
{
if
(
WDSYSCALL
(
SYS_clock_gettime
,
CLOCK_
REALTIME
,
&
ts
)
==
0
)
{
start_time
=
ts
.
tv_nsec
/
1000000
+
ts
.
tv_sec
*
1000ULL
;
start_time
=
ts
.
tv_nsec
/
1000000
+
ts
.
tv_sec
*
1000ULL
;
}
}
//添加sdk版本号
cJSON_AddStringToObject
(
json
,
"sdk_ver"
,
"1.0.0"
);
collect_app_info
(
env
,
json
);
collect_app_info
(
env
,
json
);
int
permissions
=
collect_permissions
(
env
,
json
);
int
permissions
=
collect_permissions
(
env
,
json
);
collect_imei
(
env
,
json
);
collect_imei
(
env
,
json
);
...
@@ -67,7 +69,7 @@ void do_collect(JNIEnv* env) {
...
@@ -67,7 +69,7 @@ void do_collect(JNIEnv* env) {
collect_time_info
(
env
,
json
);
collect_time_info
(
env
,
json
);
if
(
WDSYSCALL
(
SYS_clock_gettime
,
CLOCK_
MONOTONIC
,
&
ts
)
==
0
)
{
if
(
WDSYSCALL
(
SYS_clock_gettime
,
CLOCK_
REALTIME
,
&
ts
)
==
0
)
{
end_time
=
(
double
)
ts
.
tv_nsec
/
1000000
+
(
double
)
ts
.
tv_sec
*
1000ULL
;
end_time
=
(
double
)
ts
.
tv_nsec
/
1000000
+
(
double
)
ts
.
tv_sec
*
1000ULL
;
}
}
...
@@ -111,7 +113,7 @@ void collect_app_info(JNIEnv* env, cJSON *json) {
...
@@ -111,7 +113,7 @@ void collect_app_info(JNIEnv* env, cJSON *json) {
//version name
//version name
jobject
versionName
=
wdGetObjectField
(
env
,
pkgInfo
,
"versionName"
,
"Ljava/lang/String;"
);
jobject
versionName
=
wdGetObjectField
(
env
,
pkgInfo
,
"versionName"
,
"Ljava/lang/String;"
);
addJniStringToJson
(
env
,
json
,
"version
N
ame"
,
versionName
);
addJniStringToJson
(
env
,
json
,
"version
_n
ame"
,
versionName
);
//signature's sha256
//signature's sha256
jobject
signatures
=
wdGetObjectField
(
env
,
pkgInfo
,
"signatures"
,
"[Landroid/content/pm/Signature;"
);
jobject
signatures
=
wdGetObjectField
(
env
,
pkgInfo
,
"signatures"
,
"[Landroid/content/pm/Signature;"
);
...
@@ -375,7 +377,7 @@ void collect_libs_info(JNIEnv *env, cJSON *json) {
...
@@ -375,7 +377,7 @@ void collect_libs_info(JNIEnv *env, cJSON *json) {
int
mmap_call_num
=
222
;
int
mmap_call_num
=
222
;
uint8_t
*
base
=
(
uint8_t
*
)
WDSYSCALL
(
WD_SYS_mmap
,
0
,
size
,
PROT_READ
,
MAP_SHARED
,
fd
,
0
);
uint8_t
*
base
=
(
uint8_t
*
)
WDSYSCALL
(
WD_SYS_mmap
,
0
,
size
,
PROT_READ
,
MAP_SHARED
,
fd
,
0
);
uint8_t
out
[
16
]
=
{
0
};
uint8_t
out
[
16
]
=
{
0
};
char
md5_str
[
3
3
]
=
{
0
};
char
md5_str
[
3
2
+
1
]
=
{
0
};
MD5
(
base
,
size
,
out
);
MD5
(
base
,
size
,
out
);
bytes2Hex
(
out
,
md5_str
,
16
,
0
);
bytes2Hex
(
out
,
md5_str
,
16
,
0
);
cJSON_AddStringToObject
(
item
,
lib_names
[
j
],
md5_str
);
cJSON_AddStringToObject
(
item
,
lib_names
[
j
],
md5_str
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment