Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
s1204IT committed Jun 29, 2023
0 parents commit a1d9a48
Show file tree
Hide file tree
Showing 18 changed files with 1,313 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto
*.bat text eol=crlf
*.jar -text
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build

on:
push:
paths:
- '.github/workflows/build.yml'
- 'app/**'
- 'gradle/**'
- '*.gradle'
- 'gradle.properties'
workflow_dispatch:

jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:

- name: Checkout
uses: actions/checkout@v3

- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'

- name: Cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches/
~/.gradle/wrapper/
key: ${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: Build with Gradle
run: |
./gradlew aR
echo "version=$(grep versionName app/build.gradle | awk '{print $2}' | tr -d \")" >> $GITHUB_ENV
echo "commit=$(echo ${{ github.sha }} | cut -c -7)" >> $GITHUB_ENV
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: CT3_Digichalizer(v${{ env.version }}@${{ env.commit }})
path: app/build/outputs/apk/release/app-release*.apk
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Gradle
/.gradle/
# Android SDK
/local.properties
# IntelliJ
/.idea/
# Gradle Build
/app/build/
# Android Studio Signing APK
/app/release/
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# CT3用 Digichalizer

チャレンジタッチ契約者用改造補助アプリ
35 changes: 35 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
plugins {
id 'com.android.application'
}

android {
compileSdk 28
buildToolsVersion "30.0.3"

defaultConfig {
applicationId 'me.s1204.benesse.dcha.e'
minSdk 24
targetSdk 22
versionCode 1
versionName "1.0"
}

buildTypes {
debug {
debuggable false
//signingConfig signingConfigs.release
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
release {
//signingConfig signingConfigs.release
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation files('libs/DchaService.jar')
}
Binary file added app/libs/DchaService.jar
Binary file not shown.
1 change: 1 addition & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#-printconfiguration build/outputs/mapping/release/configuration.txt
46 changes: 46 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.s1204.benesse.dcha.e">

<uses-sdk android:maxSdkVersion="28" />
<uses-permission android:name="jp.co.benesse.dcha.permission.ACCESS_SYSTEM" />

<application
android:icon="@android:mipmap/sym_def_app_icon"
android:label="CT3用 Digichalizer">

<activity
android:name=".InitDcha"
android:exported="true"
android:label="Digichalizing">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name=".BackNova"
android:exported="true"
android:label="Nova Launcher">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.APPLICATION_PREFERENCES" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<activity
android:name=".Reboot"
android:exported="true"
android:label="Reboot">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

</application>

</manifest>
57 changes: 57 additions & 0 deletions app/src/main/java/me/s1204/benesse/dcha/e/BackNova.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package me.s1204.benesse.dcha.e;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;

import jp.co.benesse.dcha.dchaservice.IDchaService;
import jp.co.benesse.dcha.dchautilservice.IDchaUtilService;

public class BackNova extends Activity {
IDchaService mDchaService;
IDchaUtilService mUtilService;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
bindService(new Intent("jp.co.benesse.dcha.dchautilservice.DchaUtilService").setPackage("jp.co.benesse.dcha.dchautilservice"), new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
mUtilService = IDchaUtilService.Stub.asInterface(iBinder);
try {
mUtilService.setForcedDisplaySize(1280, 800);
} catch (RemoteException ignored) {
}
unbindService(this);
}
@Override
public void onServiceDisconnected(ComponentName componentName) {
unbindService(this);
}
}, 1);
bindService(new Intent("jp.co.benesse.dcha.dchaservice.DchaService").setPackage("jp.co.benesse.dcha.dchaservice"), new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
mDchaService = IDchaService.Stub.asInterface(iBinder);
try {
mDchaService.setSetupStatus(0);
mDchaService.hideNavigationBar(false);
mDchaService.clearDefaultPreferredApp("jp.co.benesse.touch.allgrade.b003.touchhomelauncher");
mDchaService.setDefaultPreferredHomeApp("com.teslacoilsw.launcher");
mDchaService.removeTask(null);
} catch (RemoteException ignored) {
}
unbindService(this);
}
@Override
public void onServiceDisconnected(ComponentName componentName) {
unbindService(this);
}
}, 1);
finishAndRemoveTask();
startActivity(new Intent("android.intent.action.MAIN").setClassName("com.teslacoilsw.launcher", "com.teslacoilsw.launcher.NovaLauncher"));
}
}
57 changes: 57 additions & 0 deletions app/src/main/java/me/s1204/benesse/dcha/e/InitDcha.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package me.s1204.benesse.dcha.e;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;

import jp.co.benesse.dcha.dchaservice.IDchaService;
import jp.co.benesse.dcha.dchautilservice.IDchaUtilService;

public class InitDcha extends Activity {
IDchaService mDchaService;
IDchaUtilService mUtilService;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
bindService(new Intent("jp.co.benesse.dcha.dchautilservice.DchaUtilService").setPackage("jp.co.benesse.dcha.dchautilservice"), new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
mUtilService = IDchaUtilService.Stub.asInterface(iBinder);
try {
mUtilService.setForcedDisplaySize(1280, 800);
} catch (RemoteException ignored) {
}
unbindService(this);
}
@Override
public void onServiceDisconnected(ComponentName componentName) {
unbindService(this);
}
}, 1);
bindService(new Intent("jp.co.benesse.dcha.dchaservice.DchaService").setPackage("jp.co.benesse.dcha.dchaservice"), new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
mDchaService = IDchaService.Stub.asInterface(iBinder);
try {
mDchaService.setSetupStatus(3);
mDchaService.hideNavigationBar(true);
mDchaService.clearDefaultPreferredApp("com.teslacoilsw.launcher");
mDchaService.setDefaultPreferredHomeApp("jp.co.benesse.touch.allgrade.b003.touchhomelauncher");
mDchaService.removeTask(null);
} catch (RemoteException ignored) {
}
unbindService(this);
}
@Override
public void onServiceDisconnected(ComponentName componentName) {
unbindService(this);
}
}, 1);
finishAndRemoveTask();
startActivity(new Intent("android.intent.action.MAIN").setClassName("jp.co.benesse.touch.allgrade.b003.touchhomelauncher", "jp.co.benesse.touch.allgrade.b003.touchhomelauncher.HomeLauncherActivity"));
}
}
35 changes: 35 additions & 0 deletions app/src/main/java/me/s1204/benesse/dcha/e/Reboot.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package me.s1204.benesse.dcha.e;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;

import jp.co.benesse.dcha.dchaservice.IDchaService;

public class Reboot extends Activity {
IDchaService mDchaService;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
bindService(new Intent("jp.co.benesse.dcha.dchaservice.DchaService").setPackage("jp.co.benesse.dcha.dchaservice"), new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
mDchaService = IDchaService.Stub.asInterface(iBinder);
try {
mDchaService.rebootPad(0, null);
} catch (RemoteException ignored) {
}
unbindService(this);
}
@Override
public void onServiceDisconnected(ComponentName componentName) {
unbindService(this);
}
}, 1);
finishAndRemoveTask();
}
}
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
buildscript {
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
}
}

allprojects {
repositories {
mavenCentral()
google()
}
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit a1d9a48

Please sign in to comment.