Commit Graph

7159 Commits

Author SHA1 Message Date
Doug Zongker b2364342a0 Merge "fail edify script if set_perm() or symlink() fails" 2012-03-22 14:48:59 -07:00
Doug Zongker acd73ed156 fail edify script if set_perm() or symlink() fails
It's surprising if these fail, so abort the whole edify script to
catch any problems early.

Bug: 2284848
Change-Id: Ia2a0b60e7f086fc590b242616028905a229c9e05
2012-03-22 14:33:53 -07:00
Mike Lockwood 19021a77ec Merge remote-tracking branch 'goog/ics-aah-exp' 2012-03-21 15:11:56 -07:00
The Android Automerger cc8d28efa4 merge in jb-release history after reset to master 2012-03-21 06:59:51 -07:00
The Android Automerger ba5e5474f3 merge in jb-release history after reset to master 2012-03-20 14:12:24 -07:00
Doug Zongker 48704798ea run minadbd as shell user, remove unused code
Make minadbd drop its root privileges after initializing.  We need to
make the /tmp directory writable by the shell group so that it can
drop the sideloaded file there.
2012-03-20 10:50:23 -07:00
Doug Zongker 098d1f63c6 remove unused code from minadbd
Change-Id: I2f192c67ef425a53a1dba65d3e0544c1d5a567bd
2012-03-20 09:58:12 -07:00
Doug Zongker 703ed15214 run minadbd as shell user
Make minadbd drop its root privileges after initializing.  We need to
make the /tmp directory writable by the shell group so that it can
drop the sideloaded file there.

Change-Id: I67b292cf769383f0f67fb934e5a80d408a4c131d
2012-03-19 16:24:28 -07:00
Doug Zongker 35a35a6766 remove retouching code from updater
Removes the retouch_binaries and undo_retouch_binaries from updater;
newly generated OTA packages should not call them any more.

Note that applypatch retains the ability to unretouch a file as it
reads it.  This will be needed as long as we want to support OTAs from
devices that were installed with retouching.

Change-Id: Ib3f6baeae90c84ba85983f626d821ab7e436ceb2
2012-02-28 12:30:13 -08:00
Doug Zongker b07b293944 fix build
Change-Id: I44a75f5451af053778be299b23274ecce9b2db76
2012-02-28 12:07:30 -08:00
Doug Zongker 1c43c9741b fix failure to free memory
The applypatch function is somewhat sloppy about freeing memory (since
it was originally a standalone binary).  Fix some of that.

Change-Id: Ifd44d71ea189c0b5115493119fd57bc37533fd59
2012-02-28 11:07:09 -08:00
The Android Open Source Project 53013c4645 am 62947db5: am 37d0f260: Reconcile with ics-mr1-release
* commit '62947db579fa7acc9ee01d71f3aeb30add3df260':
2012-02-01 10:03:13 -08:00
The Android Open Source Project 62947db579 am 37d0f260: Reconcile with ics-mr1-release
* commit '37d0f260a55cfbe2b275131b12b2b5b824955e51':
2012-02-01 10:00:24 -08:00
The Android Open Source Project 37d0f260a5 Reconcile with ics-mr1-release
Change-Id: Id3629feac35e35922942a6d04e741e72b95fded4
2012-02-01 08:49:25 -08:00
Elliott Hughes 74a6279eb4 libz is a superset of libunz, so we don't need both.
Change-Id: I082995c338feaf5d11288300768624cd51b027a4
2012-01-30 17:05:07 -08:00
Stephen Smalley 1a11449495 Add libselinux to LOCAL_STATIC_LIBRARIES wherever libext4_utils is used.
libext4_utils now calls libselinux in order to determine the
file security context to set on files when creating ext4 images.

Change-Id: I09fb9d563d22ee106bf100eacd4cd9c6300b1152
2012-01-24 15:16:31 -05:00
Doug Zongker 48b5b0737c allow recovery UI to ignore certain keypresses
Change-Id: Id182bb95ffcc475c5acabb29b413e422302ae7f2
2012-01-18 15:15:39 -08:00
Doug Zongker 45fdb3899d Merge "allow recovery UI to ignore certain keypresses" into ics-aah 2012-01-18 14:02:41 -08:00
Doug Zongker 336a9949c4 allow recovery UI to ignore certain keypresses
Change-Id: Id182bb95ffcc475c5acabb29b413e422302ae7f2
2012-01-18 13:46:26 -08:00
Doug Zongker e83b7cf8f1 support "sideload over ADB" mode
Rather than depending on the existence of some place to store a file
that is accessible to users on an an unbootable device (eg, a physical
sdcard, external USB drive, etc.), add support for sideloading
packages sent to the device with adb.

This change adds a "minimal adbd" which supports nothing but receiving
a package over adb (with the "adb sideload" command) and storing it to
a fixed filename in the /tmp ramdisk, from where it can be verified
and sideloaded in the usual way.  This should be leave available even
on locked user-build devices.

The user can select "apply package from ADB" from the recovery menu,
which starts minimal-adb mode (shutting down any real adbd that may be
running).  Once minimal-adb has received a package it exits
(restarting real adbd if appropriate) and then verification and
installation of the received package proceeds.

always initialize usb product, vendor, etc. for adb in recovery

Set these values even on non-debuggable builds, so that the mini-adb
now in recovery can work.
2012-01-18 10:35:28 -08:00
Doug Zongker 6639248d02 always initialize usb product, vendor, etc. for adb in recovery
Set these values even on non-debuggable builds, so that the mini-adb
now in recovery can work.

Change-Id: If4c915403e6f43bfe922aa347e350a8982443106
2012-01-10 12:16:04 -08:00
Doug Zongker 3e8ba43685 Merge "support "sideload over ADB" mode" 2012-01-10 10:19:00 -08:00
Doug Zongker 9270a20a80 support "sideload over ADB" mode
Rather than depending on the existence of some place to store a file
that is accessible to users on an an unbootable device (eg, a physical
sdcard, external USB drive, etc.), add support for sideloading
packages sent to the device with adb.

This change adds a "minimal adbd" which supports nothing but receiving
a package over adb (with the "adb sideload" command) and storing it to
a fixed filename in the /tmp ramdisk, from where it can be verified
and sideloaded in the usual way.  This should be leave available even
on locked user-build devices.

The user can select "apply package from ADB" from the recovery menu,
which starts minimal-adb mode (shutting down any real adbd that may be
running).  Once minimal-adb has received a package it exits
(restarting real adbd if appropriate) and then verification and
installation of the received package proceeds.

Change-Id: I6fe13161ca064a98d06fa32104e1f432826582f5
2012-01-10 10:18:17 -08:00
Dima Zavin 0a7b45acd1 recovery: convert all usages of $prop to ${prop}
Change-Id: I9451b8350d33806097598fb9e575b28fd8b292ad
Signed-off-by: Dima Zavin <dima@android.com>
2012-01-10 09:44:29 -08:00
Steve Block e6ef63f9e4 Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: I9ef9f808a852c36903c8afc40136c89c9ec07630
2012-01-08 12:24:35 +00:00
Steve Block 210f887382 Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: If6c6ea354caf02fb3bf155931b23e4a6d2f751e9
2012-01-06 09:53:00 +00:00
Steve Block adb5c2fbc9 Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: I3b4ea2184555bc0b570ec858601d4c43ecffb6f8
2012-01-04 21:07:44 +00:00
Doug Zongker d9428e3d3e mount cache before sideloading from external storage
Some packages expect to find cache mounted, since it always is for
"real" OTAs.

Bug: 5739915
Change-Id: I7a7cdd88a60c61e4bc7dc3e1f99956f6487c42e1
2011-12-13 16:03:28 -08:00
The Android Open Source Project 4029fb37ad am 9fc3e3c8: Reconcile with ics-mr1-release
* commit '9fc3e3c8a6a5f2f82d5712805e90a9c89f914efa':
2011-12-09 14:57:25 -08:00
The Android Open Source Project 9fc3e3c8a6 Reconcile with ics-mr1-release
Change-Id: I74a51ed7639683e0ab67c922b954eb1391dd2a49
2011-12-08 10:21:25 -08:00
Doug Zongker 32a0a47a59 move key processing to RecoveryUI
Move the key for handling keys from ScreenRecoveryUI to RecoveryUI, so
it can be used by devices without screens.  Remove the UIParameters
struct and replace it with some new member variables in
ScreenRecoveryUI.

Change-Id: I70094ecbc4acbf76ce44d5b5ec2036c36bdc3414
2011-11-04 14:09:48 -07:00
Doug Zongker d538eb77ca fix verifier test
Needs to link with libminui and ui.cpp now.

Change-Id: I5005e12cf8adb13d320921e3f9174e8c7304d7bf
2011-11-01 12:42:30 -07:00
Doug Zongker a4e88e45de move key processing to RecoveryUI
Move the key for handling keys from ScreenRecoveryUI to RecoveryUI, so
it can be used by devices without screens.  Remove the UIParameters
struct and replace it with some new member variables in
ScreenRecoveryUI.

Change-Id: I4c0e659edcbedc0b9e86ed261ae4dbb3c6097414
2011-11-01 11:04:27 -07:00
Doug Zongker daefc1d442 C++ class for device-specific code
Replace the device-specific functions with a class.  Move some of the
key handling (for log visibility toggling and rebooting) into the UI
class.  Fix up the key handling so there is less crosstalk between the
immediate keys and the queued keys (an increasing annoyance on
button-limited devices).

Change-Id: I698f6fd21c67a1e55429312a0484b6c393cad46f
2011-10-31 15:51:07 -07:00
Doug Zongker 5e12cc31f0 Merge "verifier_test needs to provide a UI object" into ics-aah 2011-10-31 14:51:52 -07:00
Doug Zongker bd8e7fbb1a verifier_test needs to provide a UI object
Change-Id: Iddbb6f0aefdcbd131457690fddeddb0a873ea856
2011-10-31 14:51:18 -07:00
Doug Zongker b88aea8a89 temporarily remove verifier_test binary
Change-Id: I61f249861b27180225fb786901275d2da611531b
2011-10-31 14:43:43 -07:00
Doug Zongker 211aebc4e0 refactor ui functions into a class
Move all the functions in ui.c to be members of a ScreenRecoveryUI
class, which is a subclass of an abstract RecoveryUI class.  Recovery
then creates a global singleton instance of this class and then invoke
the methods to drive the UI.  We use this to allow substitution of a
different RecoveryUI implementation for devices with radically
different form factors (eg, that don't have a screen).

Change-Id: I76bdd34eca506149f4cc07685df6a4890473f3d9
2011-10-31 14:15:02 -07:00
Doug Zongker 7d0542f280 C++ class for device-specific code
Replace the device-specific functions with a class.  Move some of the
key handling (for log visibility toggling and rebooting) into the UI
class.  Fix up the key handling so there is less crosstalk between the
immediate keys and the queued keys (an increasing annoyance on
button-limited devices).

Change-Id: I8bdea6505da7974631bf3d9ac3ee308f8c0f76e1
2011-10-31 13:50:32 -07:00
The Android Open Source Project 0890a0ce8e Reconcile with ics-mr1-release
Change-Id: I29287109bc555579a9c66b586a3636ba41be5c57
2011-10-31 13:19:06 -07:00
Doug Zongker 28ce47cfa6 turn recovery into a C++ binary
Change-Id: I423a23581048d451d53eef46e5f5eac485b77555
2011-10-31 10:24:09 -07:00
Doug Zongker 7440630caa refactor ui functions into a class
Move all the functions in ui.c to be members of a ScreenRecoveryUI
class, which is a subclass of an abstract RecoveryUI class.  Recovery
then creates a global singleton instance of this class and then invoke
the methods to drive the UI.  We use this to allow substitution of a
different RecoveryUI implementation for devices with radically
different form factors (eg, that don't have a screen).

Change-Id: I7fd8b2949d0db5a3f47c52978bca183966c86f33
2011-10-28 15:13:10 -07:00
Doug Zongker 10e418d3c8 turn recovery into a C++ binary
Change-Id: I68a67a4c8edec9a74463b3d4766005ce27b51316
2011-10-28 10:33:05 -07:00
The Android Automerger fadc5ac81d merge in ics-release history after reset to master 2011-10-23 06:59:17 -07:00
Doug Zongker d0181b8fcd allow recovery packages to wipe cache
updater now has a function "wipe_cache();" which causes recovery to
wipe the cache partition after the successful installation of the
package.  Move log copying around a bit so logs and the last_install
flag file are copied to cache after it's wiped.

Bug: 5314244
Change-Id: Id35a9eb6dcd626c8f3a3a0076074f462ed3d44bd
2011-10-19 11:26:18 -07:00
The Android Automerger cf9488aabf merge in ics-release history after reset to master 2011-10-16 06:59:10 -07:00
Dima Zavin 441031dadc minui: add ability to synchronize current key state
If a key is down prior to the time of initialization, we would not get the
down event for the key, and thus think that the key is not pressed.

Add an interface that allows one to provide a callback to execute
on all keys that are currently down.

Change-Id: I2a4096c0cb4c7c7a9a80d207835f168a0b418413
Signed-off-by: Dima Zavin <dima@android.com>
2011-10-12 15:53:32 -07:00
The Android Automerger 296955c405 merge in ics-release history after reset to master 2011-09-28 07:08:10 -07:00
Doug Zongker f6abd409bb fix problem where the screen is sometimes all black in recovery
Change-Id: Ifa0b59e43eaf0bea9435aa4d96c5b0fc4f10fbfe
2011-09-27 13:09:48 -07:00
The Android Automerger 14683023a7 merge in ics-release history after reset to master 2011-09-21 06:59:11 -07:00