Guide - Installing Shizuku

Since we cant actually get root permissions in appsupport, the next best thing would be Shizuku. I thought some of the users here would be interested, especially after the update. Since I mainly use Shizuku for aurora store to automatically install apps without the need to confirm install/update for each and every app over and over (not to be confused with automatic updates). I also use it (with FreezeYou! from F-droid) to freeze some apps that stay active in the background and never respect the setting to be disabled in the background.
I have found this list of apps utilizing Shizuku if anyone’s interested. Many of them are cosmetic and related to Android UI, but, few others we can use in Appsupport.
Normally, (if an android device is not rooted) Shizuku needs to be started after every reboot with adb. Luckily for us we have a system.img that could be easily unpacked.

1-Install Shizuku (available in Aurora store)
From my experience, one should open the app once for the rest to work.

A script then could be found: /home/defaultuser/android_storage/Android/data/moe.shizuku.privileged.api/

This script activates shiziku - If you’re satisfied with manually activating it after every appsupport reboot/start :
appsupport-attach /system/bin/sh /storage/emulated/0/Android/data/moe.shizuku.privileged.api/
(most probably chmod +x is needed, can’t remember ).

2- To make it permanent, I have created a service(shizuku.rc) that activates the Shiziku script whenever appsupport is started:

service runapp /system/bin/ class main 
         seclabel u:r:su:s0 user root group root 
 on property:dev.bootcomplete=1
         start runapp

3- Unpacked system.img:

  • placed shizuku.rc in /system/etc/init

  • placed in /system/bin . Not sure if granting it executable permissions is necessary, but thats what I did anyway.

Since this process has to be repeated each time Appsupport gets updated, I’ve made a simple script. It unpacks system.img and repacks it keeping the original one as backup. I put the 2 files needed ( & shizuku.rc) in my working directory and execute as root. Note that squashfs-tools together with lzip should be aleady installed.


Posting @babo’s script here, because files at Mega are much less persistent than Jolla’s forum (in my experience):


set -e


echo "Stoping appsupport..."
systemctl stop aliendalvik
sleep 4

echo "Checking if system.img exists..."
if [ ! -f "$WORK_DIR/origsystem.img" ]; then
   echo "copying system.img..."
   cp /opt/appsupport/system.img "$WORK_DIR/origsystem.img"
   echo "system.img copied"
   echo "system.img already exists, skipping copy"

echo "extracting system.img..."
  unsquashfs "$WORK_DIR/origsystem.img"

  cp "$WORK_DIR/" squashfs-root/system/bin/
echo " copied"

  chmod +x "$WORK_DIR/squashfs-root/system/bin/"
echo "executable permissions set"

  cp "$WORK_DIR/shizuku.rc" squashfs-root/system/etc/init
echo "shizuku.rc copied"

echo "building new system.img..."
  mksquashfs "$WORK_DIR/squashfs-root" "$WORK_DIR/system.img" -comp lz4 -Xhc -noappend -no-exports -no-duplicates -no-fragments

echo "Cleaning up..."
  rm -r -f "$WORK_DIR/squashfs-root"
echo "new system.img built"

while true; do
   read -p "Do you wish to replace the old system.img in /opt/appsupport with the new one? (yes/no): " yn
   case $yn in
   [Yy]* )
     echo "Replacing old system.img in /opt/appsupport..."
     mv "$WORK_DIR/system.img" /opt/appsupport
   [Nn]* )
     echo "Operation cancelled. The new system.img will not be moved."
   * )
     echo "Please answer yes or no.";;

Thanks. Yes that makes sense

Just tried to get it to work using your script, but it unfortunately results in an error:

Stoping appsupport...
Checking if system.img exists...
system.img already exists, skipping copy
extracting system.img...
Filesystem uses lz4 compression, this is unsupported by this version
Decompressors available:
1 Like