I've seen this question asked two years ago How to switch slots without a computer or using TWRP? which asks for the same on Android 9,but with so many tools being developed (and abandoned) and changes in Android versions , is it possible now?
I use Pixel 4a/6a, rooted, Magisk 25.2 on Android 13. There aren't any TWRP recoveries for them. With the perpetual cat and mouse game between root detection by banking and such like apps, I feel the cat (Google) will have an upper hand soon.
So my thought is to have one slot rooted and the other slot unrooted and on the fly switch slots using an Android based way. I know it can be done using a PC but that's not what I want.
Does anyone know of any way? Maybe Termux based or some kind of scripting? Or Magisk/Edxposed modules?
I don't want multi-ROM or dual booting solutions (doubt if they exist for current Android versions)
Edit
Switch My Slot hasn't been updated after 2021. When I run that it closes saying
bootctl binary missing
Magisk Bootctl Binary works only upto Android 12. I tried it but there appear to be some Magisk limitations too apart from failing since it is not designed for current API level.
I couldn't find any bootctl Magisk module in various repos
bootclt
binary in/data/local/tmp/
. Docd /data/local/tmp/; chmod 0755 bootctl; ./bootctl get-current-slot
. What error it throws?:/data/local/tmp # ./bootctl get-current-slot 1
// my current slot is Bbootctl utility missing
and the Magisk module at serial 2 says higher API- Copying zip to temp directory - Installing bootctl-binary-v2.1.zip - Current boot slot: _b - Device is system-as-root Archive: /data/user/0/m.tizkt/cache/flash/install.zip inflating: module.prop ******************* Bootctl Binary by Roee Hershberg ******************* ******************* Powered by Magisk ******************* Archive: /data/user/0/m.tizkt/cache/flash/install.zip inflating: customize.sh * * MMT Extended by Zackptg5 @ XDA * ! Your system API of 33 is greater than the maximum api of 31! Aborting! ! Installation failed
bootctl get-current-slot
prints1
. It means you are on slot B. Now dobootctl set-active-boot-slot 0
(with root) and restart the device. I'll boot in slot A.