From d800cecc669d16ed856af05732d70e2a66b744ee Mon Sep 17 00:00:00 2001 From: Nestor Kwak Date: Sat, 16 Nov 2019 04:49:03 +0000 Subject: [PATCH] adb based scripts to update and launch the wizard. Useful to quickly test modifications on a system where the wizard already run. --- replace-priv-apk.sh | 15 +++++++++++++++ start-wizard.sh | 9 +++++++++ 2 files changed, 24 insertions(+) create mode 100755 replace-priv-apk.sh create mode 100755 start-wizard.sh diff --git a/replace-priv-apk.sh b/replace-priv-apk.sh new file mode 100755 index 0000000..151f96b --- /dev/null +++ b/replace-priv-apk.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +adb root +wait ${!} +adb remount +wait ${!} +adb shell mount -o rw,remount /system +wait ${!} +adb push $1 /system/priv-app/CyanogenSetupWizard/CyanogenSetupWizard.apk +wait ${!} +adb shell chmod 644 /system/priv-app/CyanogenSetupWizard/CyanogenSetupWizard.apk +wait ${!} +adb shell chown root:root /system/priv-app/CyanogenSetupWizard/CyanogenSetupWizard.apk +wait ${!} +adb reboot diff --git a/start-wizard.sh b/start-wizard.sh new file mode 100755 index 0000000..73df397 --- /dev/null +++ b/start-wizard.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +adb root +wait ${!} +adb shell pm disable com.android.provision || true +wait ${!} +adb shell pm enable com.cyanogenmod.setupwizard/com.cyanogenmod.setupwizard.ui.SetupWizardActivity || true +wait ${!} +adb shell am start com.cyanogenmod.setupwizard/com.cyanogenmod.setupwizard.ui.SetupWizardActivity