Skip to content

Commit

Permalink
lspinit: Set up base system
Browse files Browse the repository at this point in the history
  • Loading branch information
s1204IT committed Nov 9, 2024
1 parent 580be6b commit da7fd3b
Show file tree
Hide file tree
Showing 14 changed files with 94 additions and 30 deletions.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ contact_links:
- name: Discussions
url: https://github.com/Chipppppppppp/LIME/discussions/new?category=q-a
about: 質問等はこちらへ
- name: How to fix build error
url: https://github.com/orgs/LSPosed/discussions/2444#discussioncomment-7092338
about: ビルドに失敗した場合
39 changes: 29 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ name: Build

on:
push:
paths:
- '.github/workflows/build.yml'
- 'app/**'
- 'gradle/**'
- '*.gradle'
- '*.properties'
paths-ignore:
- '*.md'
- '*.txt'
pull_request:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -55,7 +52,7 @@ jobs:
uses: gradle/actions/setup-gradle@v4

- name: Get previous version name
uses: oprypin/find-latest-tag@v1.1.2
uses: oprypin/find-latest-tag@v1
if: github.event.inputs.release == 'true'
id: previous
with:
Expand All @@ -81,7 +78,29 @@ jobs:
exit 1
fi
- name: Build with Gradle
- name: Cache maven
id: maven
uses: actions/cache@v4
with:
path: ~/.m2/repository/
key: mvn-${{ hashFiles('.github/workflows/build.yml') }}
restore-keys: mvn-

- name: Checkout libxposed/api
if: steps.maven.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: libxposed/api
ref: 64e29bd657ef4d2540b34402f5a988778f29e676
path: libxposed/api
fetch-depth: 0

- name: Build dependency
if: steps.maven.outputs.cache-hit != 'true'
working-directory: libxposed/api
run: ./gradlew :api:publishApiPublicationToMavenLocal

- name: Build module
run: |
if [ "${{ inputs.release }}" == "true" ]; then
echo "${{ secrets.STORE_FILE }}" | base64 -d > app/release.jks
Expand All @@ -108,15 +127,15 @@ jobs:
echo "Patching LIME..."
java -jar lspatch.jar "line-${{ env.line_ver }}.apk" -m "app/build/outputs/apk/debug/app-debug.apk" -l 2 -v
- name: Upload Module APK
- name: Upload module
uses: actions/upload-artifact@v4
if: github.event.inputs.release != 'true'
with:
name: ${{ env.repo }}-${{ env.version }}@${{ env.commit }}
path: app/build/outputs/apk/debug/app-debug.apk
if-no-files-found: error

- name: Upload Patched LINE APK
- name: Upload patched APK
uses: actions/upload-artifact@v4
if: github.event.inputs.lspatch == 'true'
with:
Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
# IntelliJ
/.idea/
# Gradle Build
/app/build/
build/
# Android Studio Signing APK
/app/debug/
/app/release/
/app/release/
# VS Code
/.vscode/
4 changes: 3 additions & 1 deletion HOOK_SAMPLE.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
https://telegra.ph/%E9%80%9A%E4%BF%A1%E3%81%AE%E6%94%B9%E5%A4%89%E3%81%AE%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB-06-09
v1.9.2 のみ対応

<https://telegra.ph/%E9%80%9A%E4%BF%A1%E3%81%AE%E6%94%B9%E5%A4%89%E3%81%AE%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB-06-09>
1 change: 1 addition & 0 deletions SOURCE_URL
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/Chipppppppppp/LIME
1 change: 1 addition & 0 deletions SUMMARY
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adkiller for LINE
8 changes: 7 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,18 @@ android {
aaptOptions {
additionalParameters '--allow-reserved-package-id', '--package-id', '0x64'
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
}

dependencies {
compileOnly 'de.robv.android.xposed:api:82'
compileOnly 'io.github.libxposed:api:100'
//noinspection GradleCompatible
implementation 'com.android.support:customtabs:23.0.0'
compileOnly 'de.robv.android.xposed:api:82'
implementation 'org.mozilla:rhino:1.7.15'
}

Expand Down
29 changes: 28 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
-keep class io.github.chipppppppppp.lime.Main
-ignorewarnings

# Xposed
-adaptresourcefilecontents META-INF/xposed/java_init.list
-keepattributes RuntimeVisibleAnnotations

-keep,allowobfuscation,allowoptimization public class * extends io.github.libxposed.api.XposedModule {
public <init>(...);
public void onPackageLoaded(...);
public void onSystemServerLoaded(...);
}
-keep,allowoptimization,allowobfuscation @io.github.libxposed.api.annotations.* class * {
@io.github.libxposed.api.annotations.BeforeInvocation <methods>;
@io.github.libxposed.api.annotations.AfterInvocation <methods>;
}
-keep,allowshrinking,allowoptimization,allowobfuscation class ** implements io.github.libxposed.api.XposedInterface$Hooker
-keepclassmembers,allowoptimization class ** implements io.github.libxposed.api.XposedInterface$Hooker {
public *** before(***);
public *** after(***);
public static *** before();
public static *** before(io.github.libxposed.api.XposedInterface$BeforeHookCallback);
public static void after();
public static void after(io.github.libxposed.api.XposedInterface$AfterHookCallback);
public static void after(io.github.libxposed.api.XposedInterface$AfterHookCallback, ***);
}

# Obfuscation
-repackageclasses
-allowaccessmodification
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name">
android:label="@string/app_name"
android:description="@string/xposed_desc">

<activity
android:name=".MainActivity"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/resources/META-INF/xposed/java_init.list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
io.github.chipppppppppp.lime.Main
3 changes: 3 additions & 0 deletions app/src/main/resources/META-INF/xposed/module.prop
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
minApiVersion=100
targetApiVersion=100
staticScope=true
1 change: 1 addition & 0 deletions app/src/main/resources/META-INF/xposed/scope.list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jp.naver.line.android
18 changes: 5 additions & 13 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonTransitiveRClass=true
android.nonFinalResIds=false
android.enableR8.fullMode=true
android.experimental.enableNewResourceShrinker=true
android.experimental.enableNewResourceShrinker.preciseShrinking=true
7 changes: 6 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ pluginManagement {
mavenCentral()
}
plugins {
id 'com.android.application' version '8.6.1' apply false
id 'com.android.application' version '8.7.2' apply false
}
}
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url = "https://api.xposed.info" }
mavenLocal {
content {
includeGroup("io.github.libxposed")
}
}
}
}

Expand Down

0 comments on commit da7fd3b

Please sign in to comment.