On this page
1. Turn on Developer options
Open Settings.
Go to Settings, then About phone and tap Build number 7 times. It is at the bottom of About phone.
Enter your PIN if asked. You see You are now a developer!
Developer options is in Settings, then System, then Developer options.
Turn on USB debugging.
Sources: Sony help guide
2. Extra switches this brand needs
Ignore the USB pop up. When you plug in a USB cable, don't tap the box that appears. It changes the USB mode, and that stops Shizuku.
Sources: Shizuku setup guide, Issue 16
3. Pair and start
Follow the Wireless debugging steps. On a computer instead? The computer steps.
Sources: Shizuku setup guide
4. Keep Shizuku from stopping
Don't use the Prefer battery time level of STAMINA mode.
Open Settings, then Apps, then Special app access, then Power saving feature, pick Shizuku and set it to Excepted.
Set Shizuku's battery optimization to Not optimized.
Also do the four steps every phone needs: unrestricted battery, Disable adb authorization timeout, No data transfer as the USB default, and leaving debugging on. They are on the Wireless page.
Sources: Don't kill my app: Sony
5. Known problems on Sony Xperia
Stops when you plug in USB
The USB pop up changed the mode. Leave it alone, and set the default in Developer options instead.
Sources: Shizuku setup guide, Issue 16
6. Turn it all back off
First, in each app that used Shizuku, undo what it changed, while Shizuku still runs. Some changes an app makes through Shizuku stay after Shizuku stops. Firewall and Fileglow have their own steps.
In Shizuku, switch off every app in the list of authorized apps.
Stop Shizuku with its stop option, or restart the phone.
Open Developer options, then Wireless debugging, then Paired devices, tap the shizuku entry, then Forget.
In Developer options, tap Revoke USB debugging authorizations. This removes every paired computer and device.
Set Shizuku back from Excepted in the power saving feature list if you like.
Turn off Disable adb authorization timeout if you turned it on, and set Default USB configuration back to File transfer if you want.
Turn off Wireless debugging, then USB debugging.
Turn off the switch at the top of Developer options: Settings, then System, then Developer options.
Set Shizuku's battery setting back to the default (Optimized) if you like.
Uninstall Shizuku the normal way if you don't need it any more.
Sources: Shizuku setup guide, Android adb docs, Android developer options docs, Issue 467, Issue 451, Discussion 1000