View Single Post
Old 09-16-2021, 02:39 AM   #116
mergen3107
Wizard
mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.
 
mergen3107's Avatar
 
Posts: 1,515
Karma: 5000046
Join Date: Feb 2012
Location: Cape Canaveral
Device: Kindle Scribe
Answering my own question, here is how I managed to shuffle screensavers on each boot.
(As a reminder, since I disabled com.onyx, my screensavers are in /data/local/assets/images/ . This is a barebones screensaver engine, so I couldn't find any controls to it.)

1) Installed ccbins (Cross-Complized Binaries) module in Magisk. It installs busybox with a handful of utilities. My main goal was to get "shuf", to shuffle things in the array.

2) Wrote a script "shuffle_run.sh" and placed it in /data/adb/service.d which refers to another script "shuffle.sh" in /data/local/assets/ (giving chmod 755 to both of them as well). This file takes the names via ls (maybe not the best option, but it works), renames to a temp filenames and then renames again to the same names but taking a shuffled array of temporary names as input.

Files attached, if you wanna try.

Tested, works fine. I am happy

P.S. ccbins has a really good amount of utils. If ran from ssh (just "ccbins"), you can download more things like bash, zsh, tcpdump, htop, nano, and many others.
Attached Files
File Type: zip shuffle_screensavers_script.zip (1.5 KB, 435 views)
mergen3107 is offline   Reply With Quote