[Android Software/Hacking General [Developers Only]] nickman529:
Can I just add this to my update binary? Prior to my commands and do an if then else to case $slot for the active?

---------- Post added at 09:51 AM ---------- Previous post was at 09:36 AM ----------

if(getprop("ro.boot.slot_suffix") == "_a"; then
show_progress 1.34 0
ui_print ""
ui_print "Evolution X guacamoles"
ui_print " ROM by chandra | port by nickman529 "
ui_print "INSTALLING SLOT B"
set_progress 0.2

ui_print "Flashing boot"
package_extract_file imgs/boot.img /dev/block/bootdevice/by-name/boot_b
package_extract_file imgs/boot.img /dev/block/bootdevice/by-name/boot_b
set_progress 0.4
ui_print "Flashing dtbo"
package_extract_file imgs/dtbo.img /dev/block/bootdevice/by-name/dtbo_b
package_extract_file imgs/dtbo.img /dev/block/bootdevice/by-name/dtbo_b
set_progress 0.6
ui_print "Flashing odm"
package_extract_file imgs/odm.img /dev/block/bootdevice/by-name/odm_b
package_extract_file imgs/odm.img /dev/block/bootdevice/by-name/odm_b
set_progress 0.7
ui_print "Flashing system"
package_extract_file imgs/system.img /dev/block/bootdevice/by-name/system_b
package_extract_file imgs/system.img /dev/block/bootdevice/by-name/system_b
ui_print "Flashing vbmeta"
package_extract_file imgs/vbmeta.img /dev/block/bootdevice/by-name/vbmeta_b
package_extract_file imgs/vbmeta.img /dev/block/bootdevice/by-name/vbmeta_b
set_progress 0.9
ui_print "Flashing vendor"
package_extract_file imgs/vendor.img /dev/block/bootdevice/by-name/vendor_b
package_extract_file imgs/vendor.img /dev/block/bootdevice/by-name/vendor_b
ui_print " ++++++++++++++++++++++++++++++++++++++++++++++"
ui_print "+ Do Not Forgot to Flash TWRP & Magisk +"
ui_print "+ IF YOU NEED HELP, PLEASE REACH OUT ON +"
ui_print "+ [HIDE]https://t.me/joinchat/OxYDPhPQ__Ed7Qd_tTFSXg[/HIDE] +"
ui_print " ++++++++++++++++++++++++++++++++++++++++++++++ "

set_progress 1.34

set_progress 1.34
else
show_progress 1.34 0
ui_print "Evolution X guacamoles"
ui_print " ROM by chandra | port by nickman529 "
ui_print "INSTALLING SLOT A"
ui_print "Flashing boot"
package_extract_file imgs/boot.img /dev/block/bootdevice/by-name/boot_a
package_extract_file imgs/boot.img /dev/block/bootdevice/by-name/boot_a
set_progress 0.4
ui_print "Flashing dtbo"
package_extract_file imgs/dtbo.img /dev/block/bootdevice/by-name/dtbo_a
package_extract_file imgs/dtbo.img /dev/block/bootdevice/by-name/dtbo_a
set_progress 0.6
ui_print "Flashing odm"
package_extract_file imgs/odm.img /dev/block/bootdevice/by-name/odm_a
package_extract_file imgs/odm.img /dev/block/bootdevice/by-name/odm_a
set_progress 0.7
ui_print "Flashing system"
package_extract_file imgs/system.img /dev/block/bootdevice/by-name/system_a
package_extract_file imgs/system.img /dev/block/bootdevice/by-name/system_a
ui_print "Flashing vbmeta"
package_extract_file imgs/vbmeta.img /dev/block/bootdevice/by-name/vbmeta_a
package_extract_file imgs/vbmeta.img /dev/block/bootdevice/by-name/vbmeta_a
set_progress 0.9
ui_print "Flashing vendor"
package_extract_file imgs/vendor.img /dev/block/bootdevice/by-name/vendor_a
package_extract_file imgs/vendor.img /dev/block/bootdevice/by-name/vendor_a

ui_print " ++++++++++++++++++++++++++++++++++++++++++++++"
ui_print "+ Do Not Forgot to Flash TWRP & Magisk +"
ui_print "+ IF YOU NEED HELP, PLEASE REACH OUT ON +"
ui_print "+ [HIDE]https://t.me/joinchat/OxYDPhPQ__Ed7Qd_tTFSXg[/HIDE] +"
ui_print " ++++++++++++++++++++++++++++++++++++++++++++++ "
fi

this is what i have right now and it always goes to slot a