Browse Source

gapps: Move tangorpro check to after we've cd'ed into system

Otherwise, we're removing stuff from the wrong path
Paul Keith 1 year ago
parent
commit
36e2940999
1 changed files with 10 additions and 10 deletions
  1. 10 10
      build/meta/com/google/android/update-binary

+ 10 - 10
build/meta/com/google/android/update-binary

@@ -125,16 +125,6 @@ cd "$TMP"
 unzip -o "$ZIP"
 rm -rf META-INF
 
-# Detect tangorpro
-DEVICE=$(getprop ro.build.product)
-if [ "$DEVICE" == "tangorpro" ]; then
-  ui_print "Detected tangorpro device. Deleting normal Velvet app"
-  rm -rf $TMP/product/priv-app/Velvet
-else
-  rm -rf $TMP/product/priv-app/VelvetTitan
-fi
-
-
 # Check for arch. We need to do this before extracting our toybox, since that might be
 # compiled for a different architecture. Just hope that all environments have at least
 # a proper `grep` and `uname`.
@@ -252,6 +242,16 @@ fi
 STORAGE_BUFFER=10240
 
 cd system
+
+# Detect tangorpro
+DEVICE=$(getprop ro.build.product)
+if [ "$DEVICE" == "tangorpro" ]; then
+  ui_print "Detected tangorpro device. Deleting normal Velvet app"
+  rm -rf product/priv-app/Velvet
+else
+  rm -rf product/priv-app/VelvetTitan
+fi
+
 compute_apps_size
 
 if [ "$SYSTEM_STORAGE" -lt "$NEEDED_STORAGE_SYSTEM" ]; then