extract_files: Adjust deodex path and tmpdir
* Make a tempdir using the mktemp command rather than just making a dir in /tmp to accomodate for systems that don't set proper perms or dont have /tmp * Fix the deodex procedure to pull files from the right path Change-Id: I181863599b6670e3a149069dbb7b13ebf73bae8e
This commit is contained in:
committed by
Rashed Abdel-Tawab
parent
03e81b4223
commit
c16a2ab1af
@@ -26,8 +26,7 @@ COMMON=-1
|
|||||||
ARCHES=
|
ARCHES=
|
||||||
FULLY_DEODEXED=-1
|
FULLY_DEODEXED=-1
|
||||||
|
|
||||||
TMPDIR="/tmp/extractfiles.$$"
|
TMPDIR=$(mktemp -d)
|
||||||
mkdir "$TMPDIR"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# cleanup
|
# cleanup
|
||||||
@@ -700,7 +699,12 @@ function oat2dex() {
|
|||||||
echo "Checking if system is odexed and locating boot.oats..."
|
echo "Checking if system is odexed and locating boot.oats..."
|
||||||
for ARCH in "arm64" "arm" "x86_64" "x86"; do
|
for ARCH in "arm64" "arm" "x86_64" "x86"; do
|
||||||
mkdir -p "$TMPDIR/system/framework/$ARCH"
|
mkdir -p "$TMPDIR/system/framework/$ARCH"
|
||||||
if get_file "system/framework/$ARCH/" "$TMPDIR/system/framework/" "$SRC"; then
|
if [ -d "$SRC/framework" ] && [ "$SRC" != "adb" ]; then
|
||||||
|
ARCHDIR="framework/$ARCH/"
|
||||||
|
else
|
||||||
|
ARCHDIR="system/framework/$ARCH/"
|
||||||
|
fi
|
||||||
|
if get_file "$ARCHDIR" "$TMPDIR/system/framework/" "$SRC"; then
|
||||||
ARCHES+="$ARCH "
|
ARCHES+="$ARCH "
|
||||||
else
|
else
|
||||||
rmdir "$TMPDIR/system/framework/$ARCH"
|
rmdir "$TMPDIR/system/framework/$ARCH"
|
||||||
|
|||||||
Reference in New Issue
Block a user