1

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

  1. Switch My Slot hasn't been updated after 2021. When I run that it closes saying bootctl binary missing

  2. 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.

  3. I couldn't find any bootctl Magisk module in various repos

11
  • 1
    Put bootclt binary in /data/local/tmp/. Do cd /data/local/tmp/; chmod 0755 bootctl; ./bootctl get-current-slot. What error it throws? Commented Jul 22, 2023 at 7:49
  • @IrfanLatif thanks :/data/local/tmp # ./bootctl get-current-slot 1 // my current slot is B
    – beeshyams
    Commented Jul 22, 2023 at 8:33
  • App at serial 1 says bootctl utility missing and the Magisk module at serial 2 says higher API
    – beeshyams
    Commented Jul 22, 2023 at 8:40
  • Magisk error log - 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
    – beeshyams
    Commented Jul 22, 2023 at 8:43
  • bootctl get-current-slot prints 1. It means you are on slot B. Now do bootctl set-active-boot-slot 0 (with root) and restart the device. I'll boot in slot A. Commented Jul 22, 2023 at 9:24

1 Answer 1

1
  • With generous help from Irfan-Latif (see chat) bootctl binary was a candidate. Unfortunately, it doesn't change slots as expected but at the same time doesn't throw up any errors. The reason for this is probably it is not updated to SDK 33. That's also probably why the apps mentioned in the question haven't been updated.

  • Irfan found another app Boot Control,which doesn't use bootctl and communicates with HAL to switch slots. It works fine on Pixel 6a, Android 13. Screenshots from the app:

enter image description here

Reboot option also provides a few handy options

enter image description here

While you can switch from rooted to unrooted slot, you can't do the vice-versa because this app needs root permissions. So you would need to use a PC to switch to rooted slot,which is fine by me in tricky situatios like GPay or wallet or banking apps not working because of root detection and you need to use them.

Any reader who would like to explain bootctl/HAL is free to edit this answer. Thanks

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .