Skip to content

Instantly share code, notes, and snippets.

Created November 26, 2018 08:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
(Re-)Install anbox and adb on Ubuntu Touch (incl. freeing space on system image)
#!/bin/bash -x
if (( $EUID != 0 )); then
$SUDO mount -o rw,remount /
$SUDO rm -r /var/cache/apt
$SUDO tune2fs -m 0 /dev/loop0
$SUDO apt update
$SUDO apt -y install anbox-ubuntu-touch android-tools-adb
$SUDO mount -o ro,remount /
Copy link

myii commented Jan 15, 2019

@Ingo-FP-Angel Following on from my comment in the main Telegram group, how about the following improvement?

RORW_SETTING=$(mount | grep " on / " | cut -d\( -f2 | cut -d, -f1)

if [[ $RORW_SETTING == "ro" ]] ; then
    $SUDO mount -o rw,remount /


if [[ $RORW_SETTING == "ro" ]] ; then
    $SUDO mount -o ro,remount /

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment