diff --git a/.gitignore b/.gitignore
index 45747bd..9d1a9d3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,4 +10,6 @@
/CT?/build/
# Android Studio Signing APK
/app/release/
-/CT?/release/
\ No newline at end of file
+/CT?/release/
+# Bundled APK
+/app/src/main/assets/*.apk
\ No newline at end of file
diff --git a/CT3/build.gradle b/CT3/build.gradle
index a07d09f..ce6ba2f 100644
--- a/CT3/build.gradle
+++ b/CT3/build.gradle
@@ -30,6 +30,7 @@ android {
minifyEnabled false
}
release {
+ signingConfig signingConfigs.android
minifyEnabled true
shrinkResources true
}
diff --git a/CTX/build.gradle b/CTX/build.gradle
index 27918b3..5dac608 100644
--- a/CTX/build.gradle
+++ b/CTX/build.gradle
@@ -30,6 +30,7 @@ android {
minifyEnabled false
}
release {
+ signingConfig signingConfigs.android
minifyEnabled true
shrinkResources true
}
diff --git a/app/build.gradle b/app/build.gradle
index 623fd73..5f3ac4d 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -30,6 +30,7 @@ android {
minifyEnabled false
}
release {
+ signingConfig signingConfigs.android
minifyEnabled true
shrinkResources true
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index cf8adad..11e3124 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -4,10 +4,8 @@
tools:ignore="ProtectedPermissions">
-
-
-
+
= 0) {
@@ -43,9 +42,10 @@ private String copyAssetsFile(String model) throws IOException{
}
fileOutputStream.close();
inputStream.close();
- return APK_PATH;
+ return getFilesDir() + ASSET_APK;
}
+ @Deprecated
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -54,21 +54,16 @@ protected void onCreate(Bundle savedInstanceState) {
final String BC_PASSWORD_HIT_FLAG = "bc_password_hit";
final int PASSWORD_FLAG = 1;
final int UNDIGICHALIZE = 0;
- final int DIGICHALIZING_DL_COMPLETE = 2;
- final int DIGICHALIZED = 3;
final int INSTALL_FLAG = 2;
- final int UNINSTALL_FLAG = 1;
final int REBOOT_DEVICE = 0;
- final String DSW_PACKAGE = "jp.co.benesse.dcha.setupwizard";
final String DSS_PACKAGE = "jp.co.benesse.dcha.systemsettings";
final String DSS_ACTIVITY = DSS_PACKAGE + ".TabletInfoSettingActivity";
+ final String LAUNCHER2 = "com.android.launcher2";
final String LAUNCHER3 = "com.android.launcher3";
- final String CUSTOMIZE_TOOL = "com.saradabar.cpadcustomizetool";
final String KOBOLD_STORE = "com.saradabar.vending";
// DchaSystemSettings を呼び出し
startActivity(new Intent().setClassName(DSS_PACKAGE, DSS_ACTIVITY));
- // (ループ)プログレスバー実装 //
// 再起動時にADBの状態を保持する
Settings.System.putInt(getContentResolver(), BC_PASSWORD_HIT_FLAG, PASSWORD_FLAG);
@@ -84,24 +79,23 @@ public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
mDchaService.hideNavigationBar(false);
// インストール部分 //
- // CT2はバイパス必須
//mDchaService.installApp(copyAssetsFile("ALL"), INSTALL_FLAG);
+ mDchaService.installApp("/sdcard/ALL.apk", INSTALL_FLAG);
if (CT_MODEL.equals(CT3) && !Build.ID.startsWith("01")) {
mDchaService.installApp(copyAssetsFile("CT3"), INSTALL_FLAG);
} else if (CT_MODEL.equals(CTX) || CT_MODEL.equals(CTZ)) {
mDchaService.installApp(copyAssetsFile("CTX"), INSTALL_FLAG);
}
- // Launcher3 の関連付けを解除
+ // 規定ランチャーの関連付けを解除
+ mDchaService.clearDefaultPreferredApp(LAUNCHER2);
mDchaService.clearDefaultPreferredApp(LAUNCHER3);
// 既定のランチャーを変更 (CTX/Z のみ機能)
mDchaService.setDefaultPreferredHomeApp(KOBOLD_STORE);
- // DchaSetupWizard をタスクキル
- mDchaService.removeTask(DSW_PACKAGE);
// 再起動
mDchaService.rebootPad(REBOOT_DEVICE, null);
- // このアプリを削除
- mDchaService.uninstallApp(getPackageName(), UNINSTALL_FLAG);
+ // 自己アンインストール
+ mDchaService.uninstallApp(getPackageName(), INSTALL_FLAG+1);
} catch (RemoteException | IOException ignored) {
}
unbindService(this);
diff --git a/docs/README.md b/docs/README.md
index 1f5e287..b988ac0 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -5,15 +5,9 @@
> [!NOTE]
> 現在、移行作業中!
-TODO:
-
-- [ ] CT2のAPKすり替えの実装
-- [ ] ループプログレスバーを実装
-- [ ] ストアアプリを実装
-
---
-SDカードから [**CPad Customize Tool**](https://github.com/Kobold831/CPadCustomizeTool) や [**Nova Launcher**](https://novalauncher.com)等のアプリをインストールするためのアプリです。
+[**CPad Customize Tool**](https://github.com/Kobold831/CPadCustomizeTool) や [**Nova Launcher**](https://novalauncher.com)等のアプリをインストールするためのアプリです。
[![Build](https://github.com/s1204IT/NovaDirectInstaller/actions/workflows/build.yml/badge.svg?branch=main&event=push)](https://github.com/s1204IT/NovaDirectInstaller/actions/workflows/build.yml)