-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[utilities] Add operation to reset aliendalvik. JB#53837
Stop alien, remove the /home/.android directory (saving any packaged apks to be reinstalled afterwards), then restart it. Re-install any packaged apks. Also removed obsolete tracker reset service that hasn't been used for a long time.
- Loading branch information
Showing
9 changed files
with
85 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import QtQuick 2.0 | ||
import Sailfish.Silica 1.0 | ||
import Sailfish.Utilities 1.0 | ||
|
||
ActionItem { | ||
visible: UtilTools.dirExists("/home/.android") | ||
//% "Android™ App Support" | ||
title: qsTrId("sailfish-tools-he-android_app_support") | ||
//% "Reset" | ||
actionName: qsTrId("sailfish-tools-bt-reset") | ||
//% "Completely reset Android App support, removing " | ||
//% "all settings, apps and app data. Android data in " | ||
//% "your home directory will not be removed." | ||
description: qsTrId("sailfish-utilities-me-clean_aas_desc") | ||
//% "Resetting Android™ App Support" | ||
remorseText: qsTrId("sailfish-utilities-me-clean_aas_remorse") | ||
deviceLockRequired: false | ||
|
||
function action(on_reply, on_error) { | ||
UtilTools.resetAliendalvik(on_reply, on_error) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/sh | ||
|
||
# Stop aliendalvik | ||
systemctl stop aliendalvik | ||
systemctl stop apkd | ||
|
||
# Remove all launchers | ||
rm -f /usr/share/applications/apkd_launcher_*.desktop | ||
update-desktop-database | ||
|
||
# Wipe /data, but keep any packaged apps | ||
if [ -d /home/.android/data/aas-staging/app/packaged ]; then | ||
# alien8 | ||
mv /home/.android/data/aas-staging/app/packaged /home/.android | ||
rm -rf /home/.android/data | ||
mkdir -p /home/.android/data/aas-staging/app/ | ||
mv /home/.android/packaged /home/.android/data/aas-staging/app/ | ||
elif [ -d /home/.android/data/app/packaged ]; then | ||
# alien4 | ||
systemctl stop alien-settings | ||
mv /home/.android/data/app/packaged /home/.android | ||
rm -rf /home/.android/data | ||
mkdir -p /home/.android/data/app/ | ||
mv /home/.android/packaged /home/.android/data/app/ | ||
/usr/bin/add-oneshot --now alien-create-build-prop | ||
systemctl-user start alien-pre-start.service | ||
fi | ||
|
||
# Start aliendalvik | ||
systemctl start apkd | ||
systemctl start aliendalvik | ||
|
||
sleep 5 | ||
for apk in /home/.android/data/app/packaged/*.apk; do | ||
/usr/bin/apkd-harbour-rpm-post $apk | ||
done | ||
for apk in /home/.android/data/aas-staging/app/packaged/*.apk; do | ||
/usr/bin/apkd-harbour-rpm-post $apk | ||
done | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.