-
Notifications
You must be signed in to change notification settings - Fork 0
/
cleaner_config
106 lines (104 loc) · 5.66 KB
/
cleaner_config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# This is default cleaner config file, it contains explanation of all available
# commands, examples, and some default rules for removing helper's leftover files.
# This config file is used by helper's 'clean' command if no other config is
# supplied.
#
# To use custom config you can either edit and add custom operations to this file
# (it will then be used by default when using 'helper clean') or create a separate
# file and pass it as an argument to the clean command (see 'helper clean -h'
# for more info).
#
# One line can contain only one command, but a command can be continued over
# multiple lines with backslash (as in the example for the shell command below).
# Lines starting with '#' are ignored (the character has no effect if not at the
# start of a line and will not be treated specially otherwise).
# All paths concerning the device must be in unix format ('/' is the root,
# elements delimited by '/'), but those concerning host PC can be in either
# windows or unix format.
#
####COMMANDS:
# 'remove' or 'rm' - Remove file or empty directory. Accepts wildcards.
# Mimics behavior of the unix command 'rm'
# 'recursiverm' - Remove directory and all its contents. Accepts wildcards.
# Behaves like unix's 'rm -R'.
# 'findremove' - Perform a recursive, case-insensitive search for files
# matching specified name. This is like unix's
# 'find <arg1> -iname <arg2> -type f -delete'. First argument
# is the directory in which to search, second is name to
# search for, which can use star wildcards. Only removes files.
# 'dataclear' - Clear app's data. Argument can be a package id, "helper
# activity", "from <name>" (where <name> is the name of the
# installer), or "3rdparty"
# 'uninstall' - Remove installed app from device. Argument can be a
# package id (for example "com.android.browser") to remove a
# specific known app, "helper activity" to remove app
# installed by helper (Note that this will not work for apps
# installed with a non-default installer name),
# "from <name>" to remove apps installed by <name>, or
# "3rdparty" to remove ALL third party apps (use caution)
# 'move' or 'mv' - Move a file or directory. 1st argument is always the source
# (the item being moved) and the second is the destination.
# behaves like unix 'mv'. Operates only on
# 'copy' or 'cp' - Copy a file or directory. 1st argument is the source (the
# item being copied) and second is the destination. Behaves
# like the unix 'cp'.
# 'push' - Same functionality as adb's push - copy files from host PC
# onto connected device. 1st argument is a file or directory
# on host PC (in unix or window format), while the second is
# the destination path on device.
# 'pull' - Same functionality as adb's pull - copy files from device
# onto host PC. 1st argument is the source file on the device
# that is being copied into directory on host PC in second
# argument. Host PC path can be in either unix or windows
# format.
# 'shell' or 'sh' - Raw shell command/bash script.
#
####SPECIAL TOKENS:
# The following names have special meaning and can be inserted into paths:
#
# {internal_storage} - Path to the internal storage (also called internal SD).
# {external_storage} - Path to external storage (usually a removable SD Card).
#
####EXAMPLES:
#
# remove /mnt/sdcard/Screenshots/* #Remove all files from the screenshots folder
# recursiverm /mnt/sdcard/DCIM #Remove DCIM directory and all its contents
#
# Remove all mp4 files from DCIM folder and all folders below it:
# findremove {internal_storage}/DCIM *.mp4
#
# dataclear com.android.browser #Clear data of the default android browser
# dataclear helper activity #Clear data of all helper-installed apps
# dataclear from com.android.vending #Clear data of Play Store apps
# dataclear 3rdparty #Clear data of all non-system apps
#
# uninstall com.android.browser #Uninstall default android browser
# uninstall helper activity #Uninstall all helper-installed apps
# uninstall from com.android.vending #Uninstall apps installed by Play Store
# uninstall 3rdparty #Uninstalls all third party apps
#
# Move screenshots folder from internal storage to root of external storage:
# move {internal_storage}/Pictures/Screenshots {external_storage}/
#
# Copy apk to a file named "browser_backup.apk" on external storage:
# copy /data/app/com.android.browser.apk {external_storage}/browser_backup.apk
#
# Save m's music folder as 'm_music' on device's external storage:
# push /home/m/Music {external_storage}/m_music
#
# Copy the screenshots folder and all its content onto m's desktop:
# pull {internal_storage}/Pictures/Screenshots C:\Users\m\Desktop\
#
# Execute a long shell one-liner which removes all packages installed by GPStore
# shell pm list packages -i | grep installer=com.android.vending | \
# while read pline; do pline=${pline#package:}; pline=${pline% *}; \
# echo "removing app $pline"; pm uninstall $pline; done
#
# (above bash one-liner is equivalent to 'uninstall from com.android.vending')
#
####DEFAULT CLEANER COMMANDS:
# remove files left by helper
remove {internal_storage}/helper_*
recursiverm /data/local/tmp/helper
# make sure install location is set to 'auto'
shell pm set-install-location 0