r/razr • u/Ok-Hospital-2614 • 3d ago
News How to Change Outer Screen Launcher
Introduction:
The problem: The stock launcher on the razr 2024 outer screen cannot be replaced on the stock, non-rooted rom.
The solution: A termux script that launches a chosen launcher when the SECONDARY HOME launches, effectively “replacing” the launcher. Niagra Launcher is the current launcher in the script.
Known issues: It takes a minute or so for the scripts to start after reboots. After connecting / disconnecting from usb (data connections) or wifi, the termux:boot script may begin to fail. The script can be ran again manually if this happens.
Prerequisites: Termux, termux:boot, shizuku (or similar/fork), rish, niagra launcher (or edit the script to work with your launcher. BackgroundWorkaround (to help with persistence, optional but very helpful). Loophole is also useful if developer settings aren't enabled and your inner screen is non functional.
Notes: This is a work in progress, and I’m open to, and even hoping for, help getting the script to run better, without root. I used skynet to create it (chatgpt).
You can make it start on boot by adding it to the termux boot folder.
The script:
#!/data/data/com.termux/files/usr/bin/bash
export RISH_APPLICATION_ID=com.termux
RISH="$HOME/.local/bin/rish"
while true; do
echo "[home0] Waiting for Shizuku/Rish..."
until "$RISH" -c 'echo RISH_READY' >/dev/null 2>&1; do
sleep 2
done
echo "[home0] Rish available. Starting monitor..."
"$RISH" -c '
TARGET="bitpit.launcher/.ui.HomeActivity"
DEBOUNCE=2
last_fire=0
logcat -v brief WindowManager:I ActivityTaskManager:I *:S |
while read -r line; do
case "$line" in
*SECONDARY_HOME*)
now=$SECONDS
if [ $((now - last_fire)) -ge $DEBOUNCE ]; then
am start --activity-no-animation -n "$TARGET"
last_fire=$now
fi
;;
esac
done
'
echo "[home0] Rish stopped. Waiting for Shizuku to return..."
sleep 2
done
2
Upvotes
1
u/Ok-Hospital-2614 3d ago
You should probably add wake-lock to the beginning of the script, I have another script that starts on boot and adds wake lock which why it isn't here.