Skip to content

Commit

Permalink
Merge branch 'zjyzip:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
wfvw126 authored Feb 9, 2024
2 parents 5bd7822 + e51c3c6 commit 6b05a93
Show file tree
Hide file tree
Showing 68 changed files with 2,750 additions and 16,474 deletions.
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AdClose

**AdClose** 是一个基于Xposed框架的Android广告屏蔽工具,致力于提供一个无广告的应用浏览体验,旨在优化用户体验并减少干扰。建议在LSPosed框架环境中使用
**AdClose** 是一个基于Xposed框架的Android广告屏蔽工具,致力于提供一个无广告的应用浏览体验,旨在优化用户体验并减少干扰。请在LSPosed框架环境中使用

AdClose的核心功能是阻止应用内的广告SDK初始化加载,并拦截应用广告请求以屏蔽广告。

Expand All @@ -10,7 +10,7 @@ AdClose的核心功能是阻止应用内的广告SDK初始化加载,并拦截
功能支持(顺序):

- **精准处理**:阻止应用内广告SDK初始化。
- **广告请求拦截**屏蔽应用内的广告请求
- **广告请求拦截**拦截屏蔽应用的网络广告请求
- **截图录屏限制移除**:允许在应用中自由截图和录屏。
- **VPN与代理检测移除**:去除应用内的VPN和系统代理检测。
- **传感器监听移除**:用于禁用摇一摇等基于传感器的广告跳转。
Expand Down
34 changes: 24 additions & 10 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("dev.rikka.tools.materialthemebuilder")
id("com.google.devtools.ksp")
}

materialThemeBuilder {
Expand Down Expand Up @@ -75,7 +76,10 @@ android {
buildTypes {
getByName("release") {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
getByName("debug") {
isDebuggable = true
Expand Down Expand Up @@ -105,27 +109,37 @@ dependencies {

implementation("org.luckypray:dexkit:2.0.0")

implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("com.google.android.material:material:1.10.0")

implementation("com.drakeet.about:about:2.5.2")

implementation("me.zhanghai.android.fastscroll:library:1.3.0")

implementation("androidx.preference:preference-ktx:1.2.1")

implementation("dev.rikka.rikkax.material:material:2.7.0")
implementation("dev.rikka.rikkax.material:material-preference:2.0.0")

implementation("androidx.lifecycle:lifecycle-reactivestreams:2.7.0")

implementation("io.reactivex.rxjava3:rxjava:3.1.8")
implementation("io.reactivex.rxjava3:rxandroid:3.0.2")

implementation("androidx.lifecycle:lifecycle-reactivestreams:2.6.2")
implementation("com.squareup.okhttp3:okhttp:4.12.0")

implementation("com.google.guava:guava:33.0.0-jre")

implementation("com.github.bumptech.glide:glide:4.16.0")
annotationProcessor("com.github.bumptech.glide:compiler:4.16.0")

implementation("me.zhanghai.android.fastscroll:library:1.3.0")

implementation("com.drakeet.about:about:2.5.2")
implementation("com.microsoft.appcenter:appcenter-analytics:5.0.4")
implementation("com.microsoft.appcenter:appcenter-crashes:5.0.4")

implementation("androidx.preference:preference-ktx:1.2.1")
implementation("com.google.code.gson:gson:2.10.1")

implementation("dev.rikka.rikkax.material:material:2.7.0")
implementation("dev.rikka.rikkax.material:material-preference:2.0.0")
implementation("androidx.room:room-runtime:2.6.1")
ksp("androidx.room:room-compiler:2.6.1")

implementation("com.microsoft.appcenter:appcenter-analytics:5.0.4")
implementation("com.microsoft.appcenter:appcenter-crashes:5.0.4")
}
35 changes: 25 additions & 10 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,47 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<uses-permission
android:name="android.permission.QUERY_ALL_PACKAGES"
tools:ignore="QueryAllPackagesPermission" />

<permission
android:name="com.close.hook.ads.provider.READ_WRITE"
android:protectionLevel="normal" />
<permission
android:name="com.close.hook.ads.provider.WRITE_DATABASE"
android:protectionLevel="normal" />

<application
android:name=".CloseApplication"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".ui.activity.BlockListActivity"
android:exported="false" />

<provider
android:name=".provider.UrlContentProvider"
android:authorities="com.close.hook.ads.provider"
android:enabled="true"
android:exported="true" />

<activity
android:name=".ui.activity.AboutActivity"
android:exported="false"
android:theme="@style/AppTheme.About" />

<activity
android:name="com.close.hook.ads.ui.activity.MainActivity"
android:name=".ui.activity.MainActivity"
android:exported="true"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="de.robv.android.xposed.category.MODULE_SETTINGS" />
</intent-filter>
</activity>
Expand All @@ -33,9 +51,10 @@
android:name=".MainActivityLauncher"
android:exported="true"
android:label="@string/app_name"
android:targetActivity="com.close.hook.ads.ui.activity.MainActivity">
android:targetActivity=".ui.activity.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
Expand All @@ -53,22 +72,18 @@
<meta-data
android:name="xposedmodule"
android:value="true" />

<meta-data
android:name="xposeddescription"
android:value="本模块用于阻止常见广告与部分sdk的初始化加载和请求,仅供学习交流,请勿用于违法违规用途,且模块完全免费使用。\n By TG-@AdClose"/>

android:value="本模块用于阻止常见SDK广告初始化加载和拦截屏蔽网络广告请求,仅供学习交流,请勿用于违法违规用途,且模块完全免费使用。\n By TG-@AdClose" />
<meta-data
android:name="xposedminversion"
android:value="93" />

<meta-data
android:name="xposedsharedprefs"
android:value="true" />

<meta-data
android:name="xposedscope"
android:resource="@array/scope" />

</application>
</manifest>

</manifest>
Loading

0 comments on commit 6b05a93

Please sign in to comment.