Merge changes I82b7d77b,I6b77690c
* changes:
first_stage_mount: Create snapshot devices before launching first_stage_console
first_stage_mount: Move CreateLogicalPartitions to DoFirstStageMount
diff --git a/debuggerd/crash_dump.cpp b/debuggerd/crash_dump.cpp
index 4f60005..007a20f 100644
--- a/debuggerd/crash_dump.cpp
+++ b/debuggerd/crash_dump.cpp
@@ -40,6 +40,7 @@
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
#include <android-base/unique_fd.h>
+#include <bionic/macros.h>
#include <bionic/reserved_signals.h>
#include <cutils/sockets.h>
#include <log/log.h>
@@ -299,7 +300,9 @@
*siginfo = crash_info->data.s.siginfo;
if (signal_has_si_addr(siginfo)) {
process_info->has_fault_address = true;
- process_info->fault_address = reinterpret_cast<uintptr_t>(siginfo->si_addr);
+ process_info->maybe_tagged_fault_address = reinterpret_cast<uintptr_t>(siginfo->si_addr);
+ process_info->untagged_fault_address =
+ untag_address(reinterpret_cast<uintptr_t>(siginfo->si_addr));
}
regs->reset(unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentArch(),
&crash_info->data.s.ucontext));
diff --git a/debuggerd/libdebuggerd/gwp_asan.cpp b/debuggerd/libdebuggerd/gwp_asan.cpp
index f271365..9750fc4 100644
--- a/debuggerd/libdebuggerd/gwp_asan.cpp
+++ b/debuggerd/libdebuggerd/gwp_asan.cpp
@@ -72,8 +72,8 @@
// Get the external crash address from the thread info.
crash_address_ = 0u;
- if (signal_has_si_addr(thread_info.siginfo)) {
- crash_address_ = reinterpret_cast<uintptr_t>(thread_info.siginfo->si_addr);
+ if (process_info.has_fault_address) {
+ crash_address_ = process_info.untagged_fault_address;
}
// Ensure the error belongs to GWP-ASan.
diff --git a/debuggerd/libdebuggerd/include/libdebuggerd/types.h b/debuggerd/libdebuggerd/include/libdebuggerd/types.h
index 30e75e1..86522ee 100644
--- a/debuggerd/libdebuggerd/include/libdebuggerd/types.h
+++ b/debuggerd/libdebuggerd/include/libdebuggerd/types.h
@@ -46,5 +46,6 @@
uintptr_t scudo_region_info = 0;
bool has_fault_address = false;
- uintptr_t fault_address = 0;
+ uintptr_t untagged_fault_address = 0;
+ uintptr_t maybe_tagged_fault_address = 0;
};
diff --git a/debuggerd/libdebuggerd/scudo.cpp b/debuggerd/libdebuggerd/scudo.cpp
index f8bfe07..141c3bd 100644
--- a/debuggerd/libdebuggerd/scudo.cpp
+++ b/debuggerd/libdebuggerd/scudo.cpp
@@ -44,7 +44,7 @@
auto region_info = AllocAndReadFully(process_memory, process_info.scudo_region_info,
__scudo_get_region_info_size());
- untagged_fault_addr_ = untag_address(process_info.fault_address);
+ untagged_fault_addr_ = process_info.untagged_fault_address;
uintptr_t fault_page = untagged_fault_addr_ & ~(PAGE_SIZE - 1);
uintptr_t memory_begin = fault_page - PAGE_SIZE * 16;
@@ -67,7 +67,7 @@
memory_tags[(i - memory_begin) / kTagGranuleSize] = process_memory->ReadTag(i);
}
- __scudo_get_error_info(&error_info_, process_info.fault_address, stack_depot.get(),
+ __scudo_get_error_info(&error_info_, process_info.maybe_tagged_fault_address, stack_depot.get(),
region_info.get(), memory.get(), memory_tags.get(), memory_begin,
memory_end - memory_begin);
}
diff --git a/debuggerd/libdebuggerd/tombstone.cpp b/debuggerd/libdebuggerd/tombstone.cpp
index d88c5a9..4bd7192 100644
--- a/debuggerd/libdebuggerd/tombstone.cpp
+++ b/debuggerd/libdebuggerd/tombstone.cpp
@@ -151,7 +151,9 @@
const ProcessInfo& process_info, unwindstack::Memory* process_memory) {
char addr_desc[64]; // ", fault addr 0x1234"
if (process_info.has_fault_address) {
- size_t addr = process_info.fault_address;
+ // SIGILL faults will never have tagged addresses, so okay to
+ // indiscriminately use the tagged address here.
+ size_t addr = process_info.maybe_tagged_fault_address;
if (thread_info.siginfo->si_signo == SIGILL) {
uint32_t instruction = {};
process_memory->Read(addr, &instruction, sizeof(instruction));
@@ -433,9 +435,8 @@
thread_info.registers.get());
if (maps != nullptr) {
uint64_t addr = 0;
- siginfo_t* si = thread_info.siginfo;
- if (signal_has_si_addr(si)) {
- addr = reinterpret_cast<uint64_t>(si->si_addr);
+ if (process_info.has_fault_address) {
+ addr = process_info.untagged_fault_address;
}
dump_all_maps(log, unwinder, addr);
}
diff --git a/fs_mgr/Android.bp b/fs_mgr/Android.bp
index ac784b2..96cc5c8 100644
--- a/fs_mgr/Android.bp
+++ b/fs_mgr/Android.bp
@@ -170,6 +170,7 @@
defaults: ["fs_mgr_defaults"],
static_libs: [
"libavb_user",
+ "libgsid",
"libutils",
"libvold_binder",
],
diff --git a/fs_mgr/fs_mgr_remount.cpp b/fs_mgr/fs_mgr_remount.cpp
index b8b074e..745dab2 100644
--- a/fs_mgr/fs_mgr_remount.cpp
+++ b/fs_mgr/fs_mgr_remount.cpp
@@ -16,7 +16,6 @@
#include <errno.h>
#include <getopt.h>
-#include <libavb_user/libavb_user.h>
#include <stdio.h>
#include <sys/mount.h>
#include <sys/types.h>
@@ -40,6 +39,8 @@
#include <fs_mgr_overlayfs.h>
#include <fs_mgr_priv.h>
#include <fstab/fstab.h>
+#include <libavb_user/libavb_user.h>
+#include <libgsi/libgsid.h>
namespace {
@@ -52,7 +53,9 @@
"\tpartition\tspecific partition(s) (empty does all)\n"
"\n"
"Remount specified partition(s) read-write, by name or mount point.\n"
- "-R notwithstanding, verity must be disabled on partition(s).";
+ "-R notwithstanding, verity must be disabled on partition(s).\n"
+ "-R within a DSU guest system reboots into the DSU instead of the host system,\n"
+ "this command would enable DSU (one-shot) if not already enabled.";
::exit(exit_status);
}
@@ -137,7 +140,8 @@
REMOUNT_FAILED,
MUST_REBOOT,
BINDER_ERROR,
- CHECKPOINTING
+ CHECKPOINTING,
+ GSID_ERROR,
};
static int do_remount(int argc, char* argv[]) {
@@ -340,6 +344,41 @@
++it;
}
+ // If (1) remount requires a reboot to take effect, (2) system is currently
+ // running a DSU guest and (3) DSU is disabled, then enable DSU so that the
+ // next reboot would not take us back to the host system but stay within
+ // the guest system.
+ if (reboot_later) {
+ if (auto gsid = android::gsi::GetGsiService()) {
+ auto dsu_running = false;
+ if (auto status = gsid->isGsiRunning(&dsu_running); !status.isOk()) {
+ LOG(ERROR) << "Failed to get DSU running state: " << status;
+ return BINDER_ERROR;
+ }
+ auto dsu_enabled = false;
+ if (auto status = gsid->isGsiEnabled(&dsu_enabled); !status.isOk()) {
+ LOG(ERROR) << "Failed to get DSU enabled state: " << status;
+ return BINDER_ERROR;
+ }
+ if (dsu_running && !dsu_enabled) {
+ std::string dsu_slot;
+ if (auto status = gsid->getActiveDsuSlot(&dsu_slot); !status.isOk()) {
+ LOG(ERROR) << "Failed to get active DSU slot: " << status;
+ return BINDER_ERROR;
+ }
+ LOG(INFO) << "DSU is running but disabled, enable DSU so that we stay within the "
+ "DSU guest system after reboot";
+ int error = 0;
+ if (auto status = gsid->enableGsi(/* oneShot = */ true, dsu_slot, &error);
+ !status.isOk() || error != android::gsi::IGsiService::INSTALL_OK) {
+ LOG(ERROR) << "Failed to enable DSU: " << status << ", error code: " << error;
+ return !status.isOk() ? BINDER_ERROR : GSID_ERROR;
+ }
+ LOG(INFO) << "Successfully enabled DSU (one-shot mode)";
+ }
+ }
+ }
+
if (partitions.empty() || just_disabled_verity) {
if (reboot_later) reboot(setup_overlayfs);
if (user_please_reboot_later) {
diff --git a/fs_mgr/libfs_avb/tests/avb_util_test.cpp b/fs_mgr/libfs_avb/tests/avb_util_test.cpp
index 784eb9c..1827566 100644
--- a/fs_mgr/libfs_avb/tests/avb_util_test.cpp
+++ b/fs_mgr/libfs_avb/tests/avb_util_test.cpp
@@ -216,9 +216,11 @@
"Header Block: 256 bytes\n"
"Authentication Block: 1088 bytes\n"
"Auxiliary Block: 2304 bytes\n"
+ "Public key (sha1): 5227b569de003adc7f8ec3fc03e05dfbd969abad\n"
"Algorithm: SHA512_RSA8192\n"
"Rollback Index: 20\n"
"Flags: 0\n"
+ "Rollback Index Location: 0\n"
"Release String: 'unit test'\n"
"Descriptors:\n"
" Hashtree descriptor:\n"
@@ -346,9 +348,11 @@
"Header Block: 256 bytes\n"
"Authentication Block: 576 bytes\n"
"Auxiliary Block: 1216 bytes\n"
+ "Public key (sha1): 2597c218aae470a130f61162feaae70afd97f011\n"
"Algorithm: SHA256_RSA4096\n"
"Rollback Index: 10\n"
"Flags: 0\n"
+ "Rollback Index Location: 0\n"
"Release String: 'unit test'\n"
"Descriptors:\n"
" Hash descriptor:\n"
@@ -639,9 +643,11 @@
"Header Block: 256 bytes\n"
"Authentication Block: 1088 bytes\n"
"Auxiliary Block: 3840 bytes\n"
+ "Public key (sha1): 5227b569de003adc7f8ec3fc03e05dfbd969abad\n"
"Algorithm: SHA256_RSA8192\n"
"Rollback Index: 0\n"
"Flags: 0\n"
+ "Rollback Index Location: 0\n"
"Release String: 'unit test'\n"
"Descriptors:\n"
" Chain Partition descriptor:\n"
@@ -854,9 +860,11 @@
"Header Block: 256 bytes\n"
"Authentication Block: 1088 bytes\n"
"Auxiliary Block: 3840 bytes\n"
+ "Public key (sha1): 5227b569de003adc7f8ec3fc03e05dfbd969abad\n"
"Algorithm: SHA256_RSA8192\n"
"Rollback Index: 0\n"
"Flags: 0\n"
+ "Rollback Index Location: 0\n"
"Release String: 'unit test'\n"
"Descriptors:\n"
" Chain Partition descriptor:\n"
@@ -886,9 +894,11 @@
"Header Block: 256 bytes\n"
"Authentication Block: 576 bytes\n"
"Auxiliary Block: 2176 bytes\n"
+ "Public key (sha1): 2597c218aae470a130f61162feaae70afd97f011\n"
"Algorithm: SHA256_RSA4096\n"
"Rollback Index: 0\n"
"Flags: 0\n"
+ "Rollback Index Location: 0\n"
"Release String: 'unit test'\n"
"Descriptors:\n"
" Chain Partition descriptor:\n"
@@ -936,9 +946,11 @@
"Header Block: 256 bytes\n"
"Authentication Block: 320 bytes\n"
"Auxiliary Block: 960 bytes\n"
+ "Public key (sha1): cdbb77177f731920bbe0a0f94f84d9038ae0617d\n"
"Algorithm: SHA256_RSA2048\n"
"Rollback Index: 0\n"
"Flags: 0\n"
+ "Rollback Index Location: 0\n"
"Release String: 'unit test'\n"
"Descriptors:\n"
" Hash descriptor:\n"
diff --git a/fs_mgr/libfs_avb/tests/basic_test.cpp b/fs_mgr/libfs_avb/tests/basic_test.cpp
index 5a1cd0d..1c47c07 100644
--- a/fs_mgr/libfs_avb/tests/basic_test.cpp
+++ b/fs_mgr/libfs_avb/tests/basic_test.cpp
@@ -59,9 +59,11 @@
"Header Block: 256 bytes\n"
"Authentication Block: 320 bytes\n"
"Auxiliary Block: 576 bytes\n"
+ "Public key (sha1): cdbb77177f731920bbe0a0f94f84d9038ae0617d\n"
"Algorithm: SHA256_RSA2048\n"
"Rollback Index: 0\n"
"Flags: 0\n"
+ "Rollback Index Location: 0\n"
"Release String: 'unit test'\n"
"Descriptors:\n"
" (none)\n",
@@ -89,9 +91,11 @@
"Header Block: 256 bytes\n"
"Authentication Block: 576 bytes\n"
"Auxiliary Block: 1216 bytes\n"
+ "Public key (sha1): 2597c218aae470a130f61162feaae70afd97f011\n"
"Algorithm: SHA256_RSA4096\n"
"Rollback Index: 10\n"
"Flags: 0\n"
+ "Rollback Index Location: 0\n"
"Release String: 'unit test'\n"
"Descriptors:\n"
" Hash descriptor:\n"
@@ -126,9 +130,11 @@
"Header Block: 256 bytes\n"
"Authentication Block: 1088 bytes\n"
"Auxiliary Block: 2304 bytes\n"
+ "Public key (sha1): 5227b569de003adc7f8ec3fc03e05dfbd969abad\n"
"Algorithm: SHA512_RSA8192\n"
"Rollback Index: 20\n"
"Flags: 0\n"
+ "Rollback Index Location: 0\n"
"Release String: 'unit test'\n"
"Descriptors:\n"
" Hashtree descriptor:\n"
@@ -180,9 +186,11 @@
"Header Block: 256 bytes\n"
"Authentication Block: 320 bytes\n"
"Auxiliary Block: 960 bytes\n"
+ "Public key (sha1): cdbb77177f731920bbe0a0f94f84d9038ae0617d\n"
"Algorithm: SHA256_RSA2048\n"
"Rollback Index: 0\n"
"Flags: 0\n"
+ "Rollback Index Location: 0\n"
"Release String: 'unit test'\n"
"Descriptors:\n"
" Hash descriptor:\n"
@@ -249,9 +257,11 @@
"Header Block: 256 bytes\n"
"Authentication Block: 1088 bytes\n"
"Auxiliary Block: 3840 bytes\n"
+ "Public key (sha1): 5227b569de003adc7f8ec3fc03e05dfbd969abad\n"
"Algorithm: SHA256_RSA8192\n"
"Rollback Index: 0\n"
"Flags: 0\n"
+ "Rollback Index Location: 0\n"
"Release String: 'unit test'\n"
"Descriptors:\n"
" Chain Partition descriptor:\n"
diff --git a/fs_mgr/libfs_avb/tests/fs_avb_util_test.cpp b/fs_mgr/libfs_avb/tests/fs_avb_util_test.cpp
index 7c34009..5ec1e90 100644
--- a/fs_mgr/libfs_avb/tests/fs_avb_util_test.cpp
+++ b/fs_mgr/libfs_avb/tests/fs_avb_util_test.cpp
@@ -57,9 +57,11 @@
"Header Block: 256 bytes\n"
"Authentication Block: 576 bytes\n"
"Auxiliary Block: 1280 bytes\n"
+ "Public key (sha1): 2597c218aae470a130f61162feaae70afd97f011\n"
"Algorithm: SHA512_RSA4096\n"
"Rollback Index: 20\n"
"Flags: 0\n"
+ "Rollback Index Location: 0\n"
"Release String: 'unit test'\n"
"Descriptors:\n"
" Hashtree descriptor:\n"
diff --git a/fs_mgr/libsnapshot/include/libsnapshot/snapshot.h b/fs_mgr/libsnapshot/include/libsnapshot/snapshot.h
index 0a8567f..d2ffaa7 100644
--- a/fs_mgr/libsnapshot/include/libsnapshot/snapshot.h
+++ b/fs_mgr/libsnapshot/include/libsnapshot/snapshot.h
@@ -441,7 +441,7 @@
//
// All sizes are specified in bytes, and the device, snapshot, COW partition and COW file sizes
// must be a multiple of the sector size (512 bytes).
- bool CreateSnapshot(LockedFile* lock, SnapshotStatus* status);
+ bool CreateSnapshot(LockedFile* lock, PartitionCowCreator* cow_creator, SnapshotStatus* status);
// |name| should be the base partition name (e.g. "system_a"). Create the
// backing COW image using the size previously passed to CreateSnapshot().
diff --git a/fs_mgr/libsnapshot/snapshot.cpp b/fs_mgr/libsnapshot/snapshot.cpp
index ebda430..b55d9a0 100644
--- a/fs_mgr/libsnapshot/snapshot.cpp
+++ b/fs_mgr/libsnapshot/snapshot.cpp
@@ -312,7 +312,8 @@
return WriteUpdateState(lock.get(), UpdateState::Unverified);
}
-bool SnapshotManager::CreateSnapshot(LockedFile* lock, SnapshotStatus* status) {
+bool SnapshotManager::CreateSnapshot(LockedFile* lock, PartitionCowCreator* cow_creator,
+ SnapshotStatus* status) {
CHECK(lock);
CHECK(lock->lock_mode() == LOCK_EX);
CHECK(status);
@@ -353,7 +354,7 @@
status->set_state(SnapshotState::CREATED);
status->set_sectors_allocated(0);
status->set_metadata_sectors(0);
- status->set_compression_enabled(IsCompressionEnabled());
+ status->set_compression_enabled(cow_creator->compression_enabled);
if (!WriteSnapshotStatus(lock, *status)) {
PLOG(ERROR) << "Could not write snapshot status: " << status->name();
@@ -2584,6 +2585,9 @@
// these devices.
AutoDeviceList created_devices;
+ bool use_compression =
+ IsCompressionEnabled() && manifest.dynamic_partition_metadata().vabc_enabled();
+
PartitionCowCreator cow_creator{
.target_metadata = target_metadata.get(),
.target_suffix = target_suffix,
@@ -2592,7 +2596,7 @@
.current_suffix = current_suffix,
.update = nullptr,
.extra_extents = {},
- .compression_enabled = IsCompressionEnabled(),
+ .compression_enabled = use_compression,
};
auto ret = CreateUpdateSnapshotsInternal(lock.get(), manifest, &cow_creator, &created_devices,
@@ -2744,7 +2748,7 @@
}
// Store these device sizes to snapshot status file.
- if (!CreateSnapshot(lock, &cow_creator_ret->snapshot_status)) {
+ if (!CreateSnapshot(lock, cow_creator, &cow_creator_ret->snapshot_status)) {
return Return::Error();
}
created_devices->EmplaceBack<AutoDeleteSnapshot>(this, lock, target_partition->name());
@@ -2857,11 +2861,6 @@
bool SnapshotManager::MapUpdateSnapshot(const CreateLogicalPartitionParams& params,
std::string* snapshot_path) {
- if (IsCompressionEnabled()) {
- LOG(ERROR) << "MapUpdateSnapshot cannot be used in compression mode.";
- return false;
- }
-
auto lock = LockShared();
if (!lock) return false;
if (!UnmapPartitionWithSnapshot(lock.get(), params.GetPartitionName())) {
@@ -2870,6 +2869,15 @@
return false;
}
+ SnapshotStatus status;
+ if (!ReadSnapshotStatus(lock.get(), params.GetPartitionName(), &status)) {
+ return false;
+ }
+ if (status.compression_enabled()) {
+ LOG(ERROR) << "Cannot use MapUpdateSnapshot with compressed snapshots";
+ return false;
+ }
+
SnapshotPaths paths;
if (!MapPartitionWithSnapshot(lock.get(), params, SnapshotContext::Update, &paths)) {
return false;
diff --git a/fs_mgr/libsnapshot/snapshot_test.cpp b/fs_mgr/libsnapshot/snapshot_test.cpp
index 4c209ec..0b8a03a 100644
--- a/fs_mgr/libsnapshot/snapshot_test.cpp
+++ b/fs_mgr/libsnapshot/snapshot_test.cpp
@@ -41,6 +41,7 @@
#include <android/snapshot/snapshot.pb.h>
#include <libsnapshot/test_helpers.h>
+#include "partition_cow_creator.h"
#include "utility.h"
// Mock classes are not used. Header included to ensure mocked class definition aligns with the
@@ -323,7 +324,10 @@
DeltaArchiveManifest manifest;
- auto group = manifest.mutable_dynamic_partition_metadata()->add_groups();
+ auto dynamic_partition_metadata = manifest.mutable_dynamic_partition_metadata();
+ dynamic_partition_metadata->set_vabc_enabled(IsCompressionEnabled());
+
+ auto group = dynamic_partition_metadata->add_groups();
group->set_name("group");
group->set_size(device_size * 2);
group->add_partition_names("test_partition");
@@ -416,13 +420,16 @@
TEST_F(SnapshotTest, CreateSnapshot) {
ASSERT_TRUE(AcquireLock());
+ PartitionCowCreator cow_creator;
+ cow_creator.compression_enabled = IsCompressionEnabled();
+
static const uint64_t kDeviceSize = 1024 * 1024;
SnapshotStatus status;
status.set_name("test-snapshot");
status.set_device_size(kDeviceSize);
status.set_snapshot_size(kDeviceSize);
status.set_cow_file_size(kDeviceSize);
- ASSERT_TRUE(sm->CreateSnapshot(lock_.get(), &status));
+ ASSERT_TRUE(sm->CreateSnapshot(lock_.get(), &cow_creator, &status));
ASSERT_TRUE(CreateCowImage("test-snapshot"));
std::vector<std::string> snapshots;
@@ -437,6 +444,7 @@
ASSERT_EQ(status.state(), SnapshotState::CREATED);
ASSERT_EQ(status.device_size(), kDeviceSize);
ASSERT_EQ(status.snapshot_size(), kDeviceSize);
+ ASSERT_EQ(status.compression_enabled(), cow_creator.compression_enabled);
}
ASSERT_TRUE(sm->UnmapSnapshot(lock_.get(), "test-snapshot"));
@@ -447,13 +455,16 @@
TEST_F(SnapshotTest, MapSnapshot) {
ASSERT_TRUE(AcquireLock());
+ PartitionCowCreator cow_creator;
+ cow_creator.compression_enabled = IsCompressionEnabled();
+
static const uint64_t kDeviceSize = 1024 * 1024;
SnapshotStatus status;
status.set_name("test-snapshot");
status.set_device_size(kDeviceSize);
status.set_snapshot_size(kDeviceSize);
status.set_cow_file_size(kDeviceSize);
- ASSERT_TRUE(sm->CreateSnapshot(lock_.get(), &status));
+ ASSERT_TRUE(sm->CreateSnapshot(lock_.get(), &cow_creator, &status));
ASSERT_TRUE(CreateCowImage("test-snapshot"));
std::string base_device;
diff --git a/fs_mgr/libsnapshot/update_engine/update_metadata.proto b/fs_mgr/libsnapshot/update_engine/update_metadata.proto
index dda214e..4a97f81 100644
--- a/fs_mgr/libsnapshot/update_engine/update_metadata.proto
+++ b/fs_mgr/libsnapshot/update_engine/update_metadata.proto
@@ -73,6 +73,7 @@
message DynamicPartitionMetadata {
repeated DynamicPartitionGroup groups = 1;
+ optional bool vabc_enabled = 3;
}
message DeltaArchiveManifest {
diff --git a/fs_mgr/libvbmeta/Android.bp b/fs_mgr/libvbmeta/Android.bp
index c882e51..a299b6e 100644
--- a/fs_mgr/libvbmeta/Android.bp
+++ b/fs_mgr/libvbmeta/Android.bp
@@ -53,4 +53,8 @@
data: [
"data/*",
],
-}
\ No newline at end of file
+ // Not unit tests due to several binary and lib dependencies currently hard to replicate in continuous execution
+ test_options: {
+ unit_test: false,
+ },
+}
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 19c00f9..21a78c1 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -749,6 +749,11 @@
mkdir /data/app 0771 system system encryption=Require
mkdir /data/property 0700 root root encryption=Require
+ # create directory for updated font files.
+ mkdir /data/fonts/ 0771 root root encryption=Require
+ mkdir /data/fonts/files 0771 system system
+ mkdir /data/fonts/config 0770 system system
+
# Create directories to push tests to for each linker namespace.
# Create the subdirectories in case the first test is run as root
# so it doesn't end up owned by root.
diff --git a/rootdir/ueventd.rc b/rootdir/ueventd.rc
index 64a64d2..aebcd5f 100644
--- a/rootdir/ueventd.rc
+++ b/rootdir/ueventd.rc
@@ -77,3 +77,5 @@
/sys/devices/virtual/usb_composite/* enable 0664 root system
/sys/devices/system/cpu/cpu* cpufreq/scaling_max_freq 0664 system system
/sys/devices/system/cpu/cpu* cpufreq/scaling_min_freq 0664 system system
+/sys/devices/virtual/misc/uhid/*/leds/* brightness 0664 system system
+/sys/devices/virtual/misc/uhid/*/leds/* multi_intensity 0664 system system