Commit Graph

5 Commits

Author SHA1 Message Date
Michael Bestas
79e91fe4ca addonsu: Don't mount SAR system to /system
Change-Id: Ic2f0a994477a5bc04b32e24b0bd4baaa2773ff55
2019-02-12 10:06:12 -06:00
LuK1337
fd798c5177 addonsu: Fix installation on TWRP A/B
* These checks need to be added back otherwise it fails to
  extract files due to 'Too many symbolic links encountered' errors.
* Log:
Installing su addon...
Installing su addon...about to run program [/tmp/mount-system.sh] with 1 args
Extracted file "/system/xbin/su"
Extracted file "/system/addon.d/51-addonsu.sh"
failed to create dir for /system/etc/init/superuser.rc
script aborted: set_metadata: Error on lstat of "/system/etc/init/superuser.rc": Too many symbolic links encountered
set_metadata: Error on lstat of "/system/etc/init/superuser.rc": Too many symbolic links encounterederror: 25
cause: 111
Updater process ended with ERROR: 7

Change-Id: Ibf5082756063f7e703cbc47cf9642677983874ac
2018-07-16 04:59:26 +02:00
Christopher N. Hesse
1f94c931e0 addonsu: Fix package for modern devices
Recent devices (e.g. Pixel 2XL aka taimen) do not define any "system"
partition in their fstab, so a plain "mount /system" fails.

Furthermore, trying to get the entry from /etc/recovery.fstab also fails
because the partitions have slot suffixes (e.g. system_a).
So for these devices, we need to figure out the active slot, mount the
system partition (which really contains the whole root) and lastly mount
the actual system partition from the rootfs.

Change-Id: Ibb73a82896c1f6ce6af9c334b8d0908a183913b9
2018-06-22 16:34:05 +02:00
Dan Pasanen
524fe03bfb backuptool: introduce addon.d script versioning
* Since A/B addon.d scripts are going to need to do things in a
  specific way or things could go horribly wrong for a user, let's
  introduce versioning so that scripts can claim to be compatible.

* A script can denote it is compatible with addon.d version 2 by
  adding: "# ADDOND_VERSION=2" somewhere in its script.

* Only A/B will require version 2 scripts for now, and version 2
  scripts will still run on non-A/B. Additionally if a script does
  not explicitly denote its version, assume its version 1.

* Version 1: The same old scripts we've always used. We cannot assume
             these will all work with A/B backuptools.

* Version 2: Scripts that denote they are compatible with version 2
             must be aware of the fact that A/B devices will run this
             script for a rom, during a seamless update, mounted at
             /postinstall. The best way to ensure compatibility would
             be to use the pre-designated functions found in the
             backuptool[,_ab].functions scripts.

Change-Id: I5573018dabd21bb64c7c964e2081806072a75243
2018-06-22 16:24:09 +02:00
Gabriele M
5b33c6c1d5 Add target to make a flashable su addon
Run 'make addonsu' to make a flashable zip to install the addon and
'make addonsu-remove' for a flashable zip that removes it.

Change-Id: I5b2fe67f98f2474b923c074dc6025b47c6db2ae0
2017-04-20 04:06:38 +00:00