Hacker News new | ask | show | jobs
by the_third_wave 361 days ago
You don't need GrapheneOS or any other specific AOSP derivative for that, any of them will do. Just don't install any Google-specific bits on the device - use microG if you need to have something resembling Google services - and you're there. Even on stock devices with Google services you can get partly there by disabling anything you don't need, only enabling it when you happen upon some app which absolutely won't run without them but first check if you can replace that app with another or - better still - a web app which can replace it. How to disable Google services you asked? Why, using a script of course, launched from a Termux widget. Here's one way to do this, using a disable/enable script (one script, two hardlinked names) on a rooted device running some stock distribution. If you try this and your phone breaks you get to keep both pieces without extra cost - in other words this works for me but might not work for you:

   ~ $ cat .shortcuts/Google_Services\:enable
   #!/data/data/com.termux/files/usr/bin/bash

   PACKAGE="com.google.android.gms com.google.android.gms.policy_sidecar_aps com.google.android.gsf com.android.vending"
   PATH="/data/data/com.termux/files/usr/bin:$PATH"

   command=$(echo "$0"|cut -d: -f2)

   pman () {
           action=$1
           shift
           for package in $@; do
                   sudo pm $action $package
           done
   }

   case $command in
   disable|enable)
           pman $command $PACKAGE
           ;;
   *)
           echo "command '$command' not supported"
           ;;
   esac
   exit 0