-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 62de242
Showing
77 changed files
with
4,069 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/caches | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
 | ||
|
||
## Telegram Stickers Provider | ||
A Xposed/LSPosed plugin to dump stickers from Telegram to QQ. Almost all 3rd-party telegram clients are supported. | ||
|
||
 | ||
|
||
### Release | ||
You can download the latest release [here](https://t.me/microblock_pub/159). | ||
|
||
### Compatibility | ||
|
||
✅ NullGram | ||
✅ MDGram | ||
✅ Telegram (Official) | ||
✅ Telegram (Play) | ||
✅ AyuGram | ||
|
||
❎ Telegram X (and all its forks) | ||
|
||
### Limitations | ||
Only one Telegram client can be used to dump stickers at once. If the plugin is attached to multiple clients, only one of them could work, due to the limitation of Android. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
plugins { | ||
autowire(libs.plugins.android.application) | ||
autowire(libs.plugins.kotlin.android) | ||
autowire(libs.plugins.kotlin.ksp) | ||
} | ||
|
||
android { | ||
namespace = property.project.app.packageName | ||
compileSdk = property.project.android.compileSdk | ||
|
||
defaultConfig { | ||
applicationId = property.project.app.packageName | ||
minSdk = property.project.android.minSdk | ||
targetSdk = property.project.android.targetSdk | ||
versionName = property.project.app.versionName | ||
versionCode = property.project.app.versionCode | ||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
buildTypes { | ||
release { | ||
isMinifyEnabled = true | ||
isShrinkResources = true | ||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "17" | ||
freeCompilerArgs = listOf( | ||
"-Xno-param-assertions", | ||
"-Xno-call-assertions", | ||
"-Xno-receiver-assertions" | ||
) | ||
} | ||
buildFeatures { | ||
buildConfig = true | ||
viewBinding = true | ||
} | ||
lint { checkReleaseBuilds = false } | ||
// TODO Please visit https://highcapable.github.io/YukiHookAPI/en/api/special-features/host-inject | ||
// TODO 请参考 https://highcapable.github.io/YukiHookAPI/zh-cn/api/special-features/host-inject | ||
// androidResources.additionalParameters += listOf("--allow-reserved-package-id", "--package-id", "0x64") | ||
} | ||
|
||
dependencies { | ||
implementation("androidx.appcompat:appcompat:1.6.1") | ||
implementation("com.google.android.material:material:1.11.0") | ||
implementation("androidx.recyclerview:recyclerview") | ||
compileOnly(de.robv.android.xposed.api) | ||
implementation(com.highcapable.yukihookapi.api) | ||
ksp(com.highcapable.yukihookapi.ksp.xposed) | ||
implementation(com.github.duanhong169.drawabletoolbox) | ||
implementation(androidx.core.core.ktx) | ||
implementation(androidx.appcompat.appcompat) | ||
implementation(com.google.android.material.material) | ||
implementation(androidx.constraintlayout.constraintlayout) | ||
testImplementation(junit.junit) | ||
androidTestImplementation(androidx.test.ext.junit) | ||
androidTestImplementation(androidx.test.espresso.espresso.core) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle.kts. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile | ||
|
||
# FreeReflection | ||
-keep class me.weishu.reflection.** {*;} | ||
|
||
-assumenosideeffects class kotlin.jvm.internal.Intrinsics { | ||
public static *** throwUninitializedProperty(...); | ||
public static *** throwUninitializedPropertyAccessException(...); | ||
} | ||
|
||
-keepclassmembers class * implements androidx.viewbinding.ViewBinding { | ||
*** inflate(android.view.LayoutInflater); | ||
} | ||
|
||
-keep class * extends android.app.Activity | ||
-keep class * implements androidx.viewbinding.ViewBinding { | ||
<init>(); | ||
*** inflate(android.view.LayoutInflater); | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"version": 3, | ||
"artifactType": { | ||
"type": "APK", | ||
"kind": "Directory" | ||
}, | ||
"applicationId": "cc.microblock.TGStickerProvider", | ||
"variantName": "release", | ||
"elements": [ | ||
{ | ||
"type": "SINGLE", | ||
"filters": [], | ||
"attributes": [], | ||
"versionCode": 10, | ||
"versionName": "0.1.1", | ||
"outputFile": "app-release.apk" | ||
} | ||
], | ||
"elementType": "File" | ||
} |
24 changes: 24 additions & 0 deletions
24
app/src/androidTest/java/cc/microblock/TGStickerProvider/ExampleInstrumentedTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package cc.microblock.TGStickerProvider | ||
|
||
import androidx.test.platform.app.InstrumentationRegistry | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
|
||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
import org.junit.Assert.* | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* See [testing documentation](http://d.android.com/tools/testing). | ||
*/ | ||
@RunWith(AndroidJUnit4::class) | ||
class ExampleInstrumentedTest { | ||
@Test | ||
fun useAppContext() { | ||
// Context of the app under test. | ||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext | ||
assertEquals("cc.microblock.TGStickerProvider", appContext.packageName) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
|
||
<application | ||
android:name=".application.DefaultApplication" | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/Theme.AppDefault" | ||
tools:targetApi="31"> | ||
<activity | ||
android:name=".hook.SAFAgentActivity" | ||
android:exported="true" /> | ||
|
||
<meta-data | ||
android:name="xposedmodule" | ||
android:value="true" /> | ||
<meta-data | ||
android:name="xposedscope" | ||
android:resource="@array/module_scope" /> | ||
<meta-data | ||
android:name="xposeddescription" | ||
android:value="@string/xposed_desc" /> | ||
<meta-data | ||
android:name="xposedminversion" | ||
android:value="93" /> | ||
|
||
<activity | ||
android:name=".ui.activity.MainActivity" | ||
android:exported="true" | ||
android:screenOrientation="behind"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="de.robv.android.xposed.category.MODULE_SETTINGS" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
<activity-alias | ||
android:name=".Home" | ||
android:exported="true" | ||
android:label="@string/app_name" | ||
android:screenOrientation="behind" | ||
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> | ||
</application> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cc.microblock.TGStickerProvider.hook.TGStickerProvider |
17 changes: 17 additions & 0 deletions
17
app/src/main/java/cc/microblock/TGStickerProvider/application/DefaultApplication.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package cc.microblock.TGStickerProvider.application | ||
|
||
import androidx.appcompat.app.AppCompatDelegate | ||
import com.highcapable.yukihookapi.hook.xposed.application.ModuleApplication | ||
|
||
class DefaultApplication : ModuleApplication() { | ||
|
||
override fun onCreate() { | ||
super.onCreate() | ||
/** | ||
* 跟随系统夜间模式 | ||
* Follow system night mode | ||
*/ | ||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM) | ||
// Your code here. | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
app/src/main/java/cc/microblock/TGStickerProvider/constants.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package cc.microblock.TGStickerProvider | ||
|
||
var dPath: String? = "/storage/emulated/0/Documents/TGStickersExported/"; | ||
val realDataPath: String get () = "/storage/emulated/0/Android/media/com.tencent.mobileqq/TGStickersExported/v1/"; | ||
val destDataPath: String get () = "${dPath}cache/"; | ||
val tgseDataPath: String get () = "${dPath}mb_TGSPData/"; | ||
val stickerDataPath: String get () = "${tgseDataPath}sticker/"; | ||
val syncFlagsPath: String get () = "${tgseDataPath}stickerSyncFlags/"; | ||
val nomediaPath: String get () = "${dPath}.nomedia"; |
Oops, something went wrong.