+ find -L $1 -not \( -name .svn -prune -o -name .git -prune \
+ -o -name .hg -prune -o -name .editor-backups -prune \
+ -o -name .undo-tree-history -prune \) -type f 2>/dev/null
+}
+
+# one that comes with distros is too old for newer devices
+fastboot() {
+ /a/opt/android-platform-tools/fastboot "$@";
+}
+
+kdecd() { /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd; }
+
+# List of apps to install/update
+# Create from existing manually installed apps by doing
+# fdroidcl update
+# fdroidcl search -i, then manually removing
+# automatically installed/preinstalled apps
+
+#
+# # my attempt at recovering from boot loop:
+# # in that case, boot to recovery (volume up, home button, power, let go of power after samsun logo)
+# # then
+# mount /dev/block/mmcblk0p12 /data
+# cd /data
+# find -iname '*appname*'
+# rm -rf FOUND_DIRS
+# usually good enough to just rm -rf /data/app/APPNAME
+#
+# currently broken:
+# # causes replicant to crash
+# org.quantumbadger.redreader
+# org.kde.kdeconnect_tp
+
+# not broke, but wont work without gps
+#com.zoffcc.applications.zanavi
+# not broke, but not using atm
+#com.nutomic.syncthingandroid
+# # doesn\'t work on replicant
+#net.sourceforge.opencamera
+#
+fdroid_pkgs=(
+ de.marmaro.krt.ffupdater
+ me.ccrama.redditslide
+ org.fedorahosted.freeotp
+ at.bitfire.davdroid
+ com.alaskalinuxuser.justnotes
+ com.artifex.mupdf.viewer.app
+ com.danielkim.soundrecorder
+ com.fsck.k9
+ com.ghostsq.commander
+ com.ichi2.anki
+ com.jmstudios.redmoon
+ com.jmstudios.chibe
+ org.kde.kdeconnect_tp
+ com.notecryptpro
+ com.termux
+ cz.martykan.forecastie
+ de.danoeh.antennapod
+ de.blinkt.openvpn
+ de.marmaro.krt.ffupdater
+ eu.siacs.conversations
+ free.rm.skytube.oss
+ im.vector.alpha # riot
+ info.papdt.blackblub
+ me.tripsit.tripmobile
+ net.gaast.giggity
+ net.minetest.minetest
+ net.osmand.plus
+ org.isoron.uhabits
+ org.linphone
+ org.gnu.icecat
+ org.smssecure.smssecure
+ org.yaaic
+ sh.ftp.rocketninelabs.meditationassistant.opensource
+)
+# https://forum.xda-developers.com/android/software-hacking/wip-selinux-capable-superuser-t3216394
+# for maru,
+#me.phh.superuser
+
+fdup() {
+ local -A installed updated
+ local p
+ fdroidcl update
+ if fdroidcl search -u | grep ^org.fdroid.fdroid; then
+ fdroidcl install org.fdroid.fdroid
+ sleep 5
+ fdroidcl update
+ fi
+ for p in $(fdroidcl search -i| grep -o "^\S\+"); do
+ installed[$p]=true
+ done
+ for p in $(fdroidcl search -u| grep -o "^\S\+"); do
+ updated[$p]=false
+ done
+ for p in ${fdroid_pkgs[@]}; do
+ if ! ${installed[$p]:-false}; then
+ fdroidcl install $p
+ # sleeps are just me being paranoid since replicant has a history of crashing when certain apps are installed
+ sleep 5
+ fi
+ done
+ for p in ${!installed[@]}; do
+ if ! ${updated[$p]:-true}; then
+ fdroidcl install $p
+ sleep 5
+ fi
+ done
+}
+
+firefox-default-profile() {
+ key=Default value=1 section=$1
+ file=/p/c/subdir_files/.mozilla/firefox/profiles.ini
+ sed -ri "/^ *$key/d" "$file"
+ sed -ri "/ *\[$section\]/,/^ *\[[^]]+\]/{/^\s*$key[[:space:]=]/d};/ *\[$section\]/a $key=$value" "$file"
+}
+fdhome() { #firefox default home profile
+ firefox-default-profile Profile0