From d881d4f205247bb929c233745fbc7c5b2e30bc5a Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Wed, 22 Aug 2018 17:40:26 -0700 Subject: uncrypt: Depend on commonly used shared libs. We already have these shared libraries on device. And `uncrypt` doesn't need to be statically linked (it wasn't, even prior to this change). With this change, the size of uncrypt goes down from 139KiB to 33KiB (aosp_marlin-userdebug). Test: Build and flash on marlin. Trigger a factory reset (which calls `uncrypt` to set up the BCB). Change-Id: I77e3c82e8ce3734019da75c48928d881cb7ef0f0 --- uncrypt/Android.bp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/uncrypt/Android.bp b/uncrypt/Android.bp index aa56d2f74..107a7f0fc 100644 --- a/uncrypt/Android.bp +++ b/uncrypt/Android.bp @@ -24,13 +24,15 @@ cc_binary { "-Werror", ], - static_libs: [ - "libbootloader_message", - "libotautil", - "libfs_mgr", + shared_libs: [ "libbase", + "libbootloader_message", "libcutils", - "liblog", + "libfs_mgr", + ], + + static_libs: [ + "libotautil", ], init_rc: [ -- cgit v1.2.3 From a4495b5ee23a6388d5e711f86cec5be7eb766c92 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 23 Aug 2018 08:31:59 -0700 Subject: Add /dev/stdin, /dev/stdout, and /dev/stderr in recovery too. Now these are in the main image, there's some chance of code assuming they're present in recovery too (or command-line users using them out of habit). Bug: http://b/31824379 Test: builds Change-Id: Ia19272cd1959685765099f3e15d1d1e63babd279 --- etc/init.rc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/init.rc b/etc/init.rc index 9add2494a..2adecb764 100644 --- a/etc/init.rc +++ b/etc/init.rc @@ -13,6 +13,10 @@ on init export ANDROID_DATA /data export EXTERNAL_STORAGE /sdcard + symlink /proc/self/fd/0 /dev/stdin + symlink /proc/self/fd/1 /dev/stdout + symlink /proc/self/fd/2 /dev/stderr + symlink /system/bin /bin symlink /system/etc /etc -- cgit v1.2.3