blob: 9c03eb0b14460a4291c6f45ff61c276aa3c99d0d [file] [log] [blame]
cretin45d4cea552016-04-25 11:00:04 -07001#!/bin/bash
2
Michael Bestasec050052024-02-14 20:35:43 +02003# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
4# SPDX-License-Identifier: Apache-2.0
5
cretin45d4cea552016-04-25 11:00:04 -07006adb root
7wait ${!}
Michael W563a38c2022-03-20 13:42:50 +01008has_google_suw=$(adb shell pm list packages com.google.android.setupwizard)
Oliver Scott1db317b2024-01-10 16:30:37 -05009adb shell pm enable org.lineageos.setupwizard/.FinishActivity || true
Michael W563a38c2022-03-20 13:42:50 +010010if [[ ! -z "$has_google_suw" ]]
11then
12 wait ${!}
Oliver Scott1db317b2024-01-10 16:30:37 -050013 adb shell pm enable com.google.android.setupwizard/.SetupWizardExitActivity || true
Michael W563a38c2022-03-20 13:42:50 +010014 wait ${!}
15fi
cretin45d4cea552016-04-25 11:00:04 -070016sleep 1
Oliver Scott1db317b2024-01-10 16:30:37 -050017adb shell am start org.lineageos.setupwizard/.FinishActivity || true
Michael W563a38c2022-03-20 13:42:50 +010018if [[ ! -z "$has_google_suw" ]]
19then
20 wait ${!}
21 sleep 1
Oliver Scott1db317b2024-01-10 16:30:37 -050022 adb shell am start com.google.android.setupwizard/.SetupWizardExitActivity
Michael W563a38c2022-03-20 13:42:50 +010023fi