Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
Upgrade to 3.0
Browse files Browse the repository at this point in the history
1. Compatible with Android 11.
2. Use cmake instead of ndk-build.
3. Support AddressSanitizer(ASan).
4. No longer supports API level 14 and 15.
5. No longer supports armeabi.
  • Loading branch information
caikelun committed Aug 11, 2020
1 parent 4748d18 commit 712667d
Show file tree
Hide file tree
Showing 239 changed files with 651 additions and 13,143 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
.DS_Store

libs/
obj/

build/
.cxx/
.gradle/
.idea/
*.iml
*.log
*.so
wrap.sh
local.properties
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ There are 2 main branches:
2. `dev` branch

* It's our stable developing branch.
* Once `dev` has passed iQIYI's internal tests, it will be merged to `master` branch for the next release.
* Once `dev` has passed our internal tests, it will be merged to `master` branch for the next release.
* **Please always submit PR on `dev` branch.**


Expand Down
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (c) 2019-present, iQIYI, Inc. All rights reserved.
Copyright (c) 2020-present, HexHacking Team. All rights reserved.
Copyright (c) 2019, iQIYI, Inc. All rights reserved.

Most source code in xCrash are MIT licensed. Some other source code
have been placed in the public domain, or have BSD-style licenses.
Expand Down
46 changes: 9 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,22 @@

![](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)
![](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)
![](https://img.shields.io/badge/release-2.4.9-red.svg?style=flat)
![](https://img.shields.io/badge/Android-4.0%20--%2010-blue.svg?style=flat)
![](https://img.shields.io/badge/arch-armeabi%20%7C%20armeabi--v7a%20%7C%20arm64--v8a%20%7C%20x86%20%7C%20x86__64-blue.svg?style=flat)
![](https://img.shields.io/badge/release-3.0.0-red.svg?style=flat)
![](https://img.shields.io/badge/Android-4.1%20--%2011-blue.svg?style=flat)
![](https://img.shields.io/badge/arch-armeabi--v7a%20%7C%20arm64--v8a%20%7C%20x86%20%7C%20x86__64-blue.svg?style=flat)

xCrash provides the Android app with the ability to capture java crash, native crash and ANR. No root permission or any system permissions are required.

<p align="left"><img src="doc/intro.png" alt="intro" width="320px"></p>

xCrash can generate a tombstone file (similar format as Android system's tombstone file) in the directory you specified when the app process crashes or ANRs.

xCrash has been used in many Android apps (including iQIYI video) on different platforms (mobile, tablet, TV) of [iQIYI](http://www.iqiyi.com/) for many years.

[README 中文版](README.zh-CN.md)


## Features

* Support Android 4.0 - 10 (API level 14 - 29).
* Support Android 4.1 - 11 (API level 16 - 30).
* Support armeabi, armeabi-v7a, arm64-v8a, x86 and x86_64.
* Capturing java crash, native crash and ANR.
* Dumping detailed statistics about process, threads, memory, FD and network.
Expand All @@ -32,12 +30,10 @@ xCrash has been used in many Android apps (including iQIYI video) on different p
## Tombstone File Previews

* [java crash](doc/tombstone_java.txt)
* [native crash (armeabi)](doc/tombstone_native_armeabi.txt)
* [native crash (armeabi-v7a)](doc/tombstone_native_armeabi-v7a.txt)
* [native crash (arm64-v8a)](doc/tombstone_native_arm64-v8a.txt)
* [native crash (x86)](doc/tombstone_native_x86.txt)
* [native crash (x86_64)](doc/tombstone_native_x86_64.txt)
* [ANR (armeabi)](doc/tombstone_anr_armeabi.txt)
* [ANR (armeabi-v7a)](doc/tombstone_anr_armeabi-v7a.txt)
* [ANR (arm64-v8a)](doc/tombstone_anr_arm64-v8a.txt)
* [ANR (x86)](doc/tombstone_anr_x86.txt)
Expand All @@ -64,7 +60,7 @@ xCrash has been used in many Android apps (including iQIYI video) on different p

```Gradle
dependencies {
implementation 'com.iqiyi.xcrash:xcrash-android-lib:2.4.9'
implementation 'io.hexhacking.xcrash:xcrash-android-lib:3.0.0'
}
```

Expand All @@ -74,7 +70,7 @@ dependencies {
android {
defaultConfig {
ndk {
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
}
Expand Down Expand Up @@ -114,41 +110,17 @@ Tombstone files will be written to `Context#getFilesDir() + "/tombstones"` direc
There is a more practical and complex sample app in the [src/java/xcrash/xcrash_sample](src/java/xcrash/xcrash_sample) folder.


## Build

If you want to build xCrash from source code. Follow this guide:

#### 1. Download [Android NDK r16b](https://developer.android.com/ndk/downloads/revision_history.html), set PATH environment.

#### 2. Build and copy the native libraries.

```
cd ./src/native/
./build.sh
./install.sh
```

#### 3. Build AAR library.

```
cd ./src/java/xcrash/
./gradlew :xcrash_lib:build
```


## Support

1. Check the [xcrash-sample](src/java/xcrash/xcrash_sample).
2. Communicate on [GitHub issues](https://github.com/iqiyi/xCrash/issues).
2. Communicate on [GitHub issues](https://github.com/hexhacking/xCrash/issues).
3. Email: <a href="mailto:[email protected]">[email protected]</a>
4. QQ group: 603635869. QR code:

<p align="left"><img src="doc/qq_group.jpg" alt="qq group" width="300px"></p>
4. QQ group: 603635869.


## Contributing

See [xCrash Contributing Guide](CONTRIBUTING.md).
[xCrash Contributing Guide](CONTRIBUTING.md).


## License
Expand Down
46 changes: 9 additions & 37 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,22 @@

![](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)
![](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)
![](https://img.shields.io/badge/release-2.4.9-red.svg?style=flat)
![](https://img.shields.io/badge/Android-4.0%20--%2010-blue.svg?style=flat)
![](https://img.shields.io/badge/arch-armeabi%20%7C%20armeabi--v7a%20%7C%20arm64--v8a%20%7C%20x86%20%7C%20x86__64-blue.svg?style=flat)
![](https://img.shields.io/badge/release-3.0.0-red.svg?style=flat)
![](https://img.shields.io/badge/Android-4.1%20--%2011-blue.svg?style=flat)
![](https://img.shields.io/badge/arch-armeabi--v7a%20%7C%20arm64--v8a%20%7C%20x86%20%7C%20x86__64-blue.svg?style=flat)

xCrash 能为安卓 app 提供捕获 java 崩溃,native 崩溃和 ANR 的能力。不需要 root 权限或任何系统权限。

<p align="left"><img src="doc/intro.png" alt="intro" width="320px"></p>

xCrash 能在 app 进程崩溃或 ANR 时,在你指定的目录中生成一个 tombstone 文件(格式与安卓系统的 tombstone 文件类似)。

xCrash 已经在 [爱奇艺](http://www.iqiyi.com/) 的不同平台(手机,平板,电视)的很多安卓 app(包括爱奇艺视频)中被使用了很多年。

[README English Version](README.md)


## 特征

* 支持 Android 4.0 - 10(API level 14 - 29)。
* 支持 Android 4.1 - 11(API level 16 - 30)。
* 支持 armeabi,armeabi-v7a,arm64-v8a,x86 和 x86_64。
* 捕获 java 崩溃,native 崩溃和 ANR。
* 获取详细的进程、线程、内存、FD、网络统计信息。
Expand All @@ -32,12 +30,10 @@ xCrash 已经在 [爱奇艺](http://www.iqiyi.com/) 的不同平台(手机,
## Tombstone 文件预览

* [java 崩溃](doc/tombstone_java.txt)
* [native 崩溃 (armeabi)](doc/tombstone_native_armeabi.txt)
* [native 崩溃 (armeabi-v7a)](doc/tombstone_native_armeabi-v7a.txt)
* [native 崩溃 (arm64-v8a)](doc/tombstone_native_arm64-v8a.txt)
* [native 崩溃 (x86)](doc/tombstone_native_x86.txt)
* [native 崩溃 (x86_64)](doc/tombstone_native_x86_64.txt)
* [ANR (armeabi)](doc/tombstone_anr_armeabi.txt)
* [ANR (armeabi-v7a)](doc/tombstone_anr_armeabi-v7a.txt)
* [ANR (arm64-v8a)](doc/tombstone_anr_arm64-v8a.txt)
* [ANR (x86)](doc/tombstone_anr_x86.txt)
Expand All @@ -64,7 +60,7 @@ xCrash 已经在 [爱奇艺](http://www.iqiyi.com/) 的不同平台(手机,

```Gradle
dependencies {
implementation 'com.iqiyi.xcrash:xcrash-android-lib:2.4.9'
implementation 'io.hexhacking.xcrash:xcrash-android-lib:3.0.0'
}
```

Expand All @@ -74,7 +70,7 @@ dependencies {
android {
defaultConfig {
ndk {
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
}
Expand Down Expand Up @@ -114,41 +110,17 @@ Tombstone 文件默认将被写入到 `Context#getFilesDir() + "/tombstones"`
[src/java/xcrash/xcrash_sample](src/java/xcrash/xcrash_sample) 文件夹中,有一个更实际和复杂的示例 app。


## 构建

如果你想编译 xCrash 的源码。请按以下步骤进行:

#### 1. 下载 [Android NDK r16b](https://developer.android.com/ndk/downloads/revision_history.html),设置 PATH 环境变量。

#### 2. 编译和复制 native 库。

```
cd ./src/native/
./build.sh
./install.sh
```

#### 3. 编译 AAR 库。

```
cd ./src/java/xcrash/
./gradlew :xcrash_lib:build
```


## 技术支持

1. 查看 [xcrash-sample](src/java/xcrash/xcrash_sample)
2.[GitHub issues](https://github.com/iqiyi/xCrash/issues) 交流。
2.[GitHub issues](https://github.com/hexhacking/xCrash/issues) 交流。
3. 邮件: <a href="mailto:[email protected]">[email protected]</a>
4. QQ 群: 603635869。二维码:

<p align="left"><img src="doc/qq_group.jpg" alt="qq group" width="300px"></p>
4. QQ 群: 603635869。


## 贡献

请阅读 [xCrash Contributing Guide](CONTRIBUTING.md)
[xCrash Contributing Guide](CONTRIBUTING.md)


## 许可证
Expand Down
29 changes: 17 additions & 12 deletions src/java/xcrash/build.gradle → build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'digital.wup:android-maven-publish:3.6.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
}
Expand All @@ -22,33 +22,38 @@ task clean(type: Delete) {
}

ext {
minSdkVersion = 14
compileSdkVersion = 29
targetSdkVersion = 29
buildToolsVersion = '29.0.2'
minSdkVersion = 16
compileSdkVersion = 30
targetSdkVersion = 30
buildToolsVersion = '30.0.1'
javaVersion = JavaVersion.VERSION_1_6
ndkVersion = "21.3.6528147"
cmakeVersion = "3.10.2"
abiFilters = "armeabi-v7a,arm64-v8a,x86,x86_64"
//abiFilters = "armeabi-v7a"
useASAN = false

POM_GROUP_ID = "com.iqiyi.xcrash"
POM_GROUP_ID = "io.hexhacking.xcrash"
POM_ARTIFACT_ID = "xcrash-android-lib"
POM_VERSION_NAME = "2.4.9"
POM_VERSION_NAME = "3.0.0"

POM_NAME = "xCrash Android Lib"
POM_DESCRIPTION = "xCrash provides the Android app with the ability to capture java crash, native crash and ANR."
POM_URL = "https://github.com/iqiyi/xCrash"
POM_URL = "https://github.com/hexhacking/xCrash"
POM_INCEPTION_YEAR = "2019"
POM_PACKAGING = "aar"

POM_SCM_CONNECTION = "https://github.com/iqiyi/xCrash.git"
POM_SCM_CONNECTION = "https://github.com/hexhacking/xCrash.git"

POM_ISSUE_SYSTEM = "github"
POM_ISSUE_URL = "https://github.com/iqiyi/xCrash/issues"
POM_ISSUE_URL = "https://github.com/hexhacking/xCrash/issues"

POM_LICENCE_NAME = "The MIT License"
POM_LICENCE_URL = "https://opensource.org/licenses/MIT"
POM_LICENCE_DIST = "repo"

POM_DEVELOPER_ID = "iQIYI"
POM_DEVELOPER_NAME = "iQIYI, Inc."
POM_DEVELOPER_ID = "HexHacking"
POM_DEVELOPER_NAME = "HexHacking Team"

BINTRAY_REPO = "maven"
BINTRAY_ORGANIZATION = "xcrash"
Expand Down
File renamed without changes.
Binary file removed doc/qq_group.jpg
Binary file not shown.
Loading

0 comments on commit 712667d

Please sign in to comment.