Skip to content
This repository was archived by the owner on Jan 5, 2022. It is now read-only.

Commit 9cff92e

Browse files
committed
Fix: if MK_COMPONENTS=0, MK_PKG_DATA became meaningless (=0)
- packages.xml was pulled only with MK_COMPONENTS=1 - made pulling packages.xml a separate function considering both settings
1 parent b371fc5 commit 9cff92e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

adebar-cli

+8-5
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,16 @@ getSystemAppBackup() {
141141
chmod u+x "$backupscript" "$restorescript"
142142
}
143143

144+
# Retrieve packages.xml (required in different places)
145+
pullPackagesXML() {
146+
[ $((${MK_COMPONENTS} + ${MK_PKG_DATA})) -eq 0 ] && return
147+
adb pull /data/system/packages.xml $OUTDIR/packages.xml
148+
}
149+
144150
# Get disabled broadcast receivers
145151
# Requires xml2 package (apt-get install xml2)
146152
getFrozenComponents() {
147-
[ $MK_COMPONENTS -ne 1 ] && return
148-
149-
adb pull /data/system/packages.xml $OUTDIR/packages.xml
150-
[ ! -f "${OUTDIR}/packages.xml" ] && return
151-
153+
[ $MK_COMPONENTS -ne 1 -o ! -f "${OUTDIR}/packages.xml" ] && return
152154
[ -n "$(which xml2)" ] && xml2 < $OUTDIR/packages.xml |grep "disabled-components/item/@name" > $OUTDIR/deadreceivers
153155
}
154156

@@ -185,6 +187,7 @@ getTibu() {
185187

186188

187189
############################################[ Main ]###
190+
pullPackagesXML
188191
getDisabled
189192
getUserAppBackup
190193
getSystemAppBackup

0 commit comments

Comments
 (0)