Commit Graph

83 Commits

Author SHA1 Message Date
Ricardo Cerqueira
d2248b27a8 otasigcheck: Use an explicit exit code for failures
Change-Id: I2b5860ea427a4db7e29b55cc632b92c6e2910494
2014-12-01 15:15:47 +00:00
Ricardo Cerqueira
49a30e7d17 Updates for CM12 2014-11-06 14:54:32 +00:00
Brint E. Kriebel
84ec9f54bd otasigcheck: Don't fail a signature check if data will be wiped
If the --wipe_data command is being passed to recovery, skip the
signature check since the data will be wiped after the update is
installed

Change-Id: I6641f25abd044110faaf170ab2f7982460e77bcb
2014-09-24 12:53:22 -07:00
Brint E. Kriebel
8cc3992a9f otasigcheck: Fix the sed statement for multi-digit indices
It appears that some versions of sed do not work with the + symbol.
Instead of checking for one or more digits, check for a digit,
followed by zero or more digits.

Change-Id: I064df6a2bac4a634a3684ac1a5289dca1f4ba29c
2014-07-11 18:44:15 -07:00
Brint E. Kriebel
63c0f71ea4 otasigcheck: include multi-digit cert indices
If the cert index is greater than 9, we still want to include it.

Change-Id: I82787e59557ae0bb7f15da16630d2b0afb7cff06
2014-07-10 18:23:28 -07:00
Brint E. Kriebel
7a65923a92 otasigcheck: set verification package to com.android.htmlviewer
We need to use something that will always be there and not replaced
by other packages.

Change-Id: Ide942865f284239ae2ae2503005ccc7e8272995c
2014-07-10 18:00:44 -07:00
Ricardo Cerqueira
aff5e54c4e ota: Validate any installed data's signature against our own
Try to prevent incompatible-signature system quirkiness

Change-Id: I73402d963a1b57ad0ee3c68ced4f2d7f074f927f
2014-07-10 17:03:51 +00:00
Steve Kondik
42fb9d8fc5 cm: Remove legacy compcache stuff
* Remove all this stuff.  If a device wants ZRAM, it should be
   enabled by the maintainer and properly configured and tuned.
 * This stuff currently causes a conflict with the ZRAM support
   added in Kitkat. Kill it.

Change-Id: Ib2488ea4463e32ec44b65fe786f732145b5b6e23
2014-01-04 16:59:40 -08:00
David Gasaway
fc613a8cd4 50-cm.sh: update comment to CM11
Change-Id: I678b9b2815dfda52189e69aa95b9cc0fb12f2d5a
2013-12-25 05:25:17 +00:00
Ricardo Cerqueira
50dda4c2a9 Updates for CM11
Change-Id: Icb527c5aefa0dd86cc91f42f4f691b5fdf7ead48
2013-11-05 15:26:20 +00:00
Pawit Pornkitprasan
04ffabe3dd Use Package Manager to disable stock OTA
This reverts commit ea14a88a2a.

Using the Package Manager prevents any danling wakelock from
killed service/receiver.

Change-Id: Ie3162ca4b18a7bc9c55613af39e88ea980407e5f
2013-09-01 16:29:16 +07:00
Pawit Pornkitprasan
41b862ca20 otablock: also disable BroadcastReceiver
otherwise it'll prevent the device from going to sleep

Change-Id: I56e20c4b3e33c78f30e095f38240d6663c9d74f5
2013-08-29 22:03:29 +07:00
Ricardo Cerqueira
ea14a88a2a Prevent stock OTA activities from running in CM
Change-Id: I3f586cd246fc351afb82c94f41329bf930f6f41a
2013-08-27 22:15:26 +01:00
Ricardo Cerqueira
4f4c30b7a4 backuptool: Add support for cross-version whitelists
Change-Id: I415eb4d64d693a7e150656802be7f7c4a0e5ab8b
2013-08-26 04:39:47 +01:00
blunden
02d26cb1ae Update version in backuptool.functions too
Change-Id: Idbdf7ffbec037a78c2d3df4ca2a83c1058c19279
2013-08-25 05:37:19 +00:00
Ricardo Cerqueira
a690013c54 Underp the backuptool
Change-Id: I2510525701070d8c7e59c26693fb0fdb37453fb3
2013-07-27 01:54:17 +01:00
jt1134
e59a416504 cm: cleanup
- remove SpareParts: it's disabled and broken, the options it provides
  are either useless/broken or available in development settings

- remove modelid_cfg.sh: no devices are using this any more

- remove opticharger: it's not used any more

Change-Id: I68c86b2407486c4b40998288cf1f70b7cb8170f4
2013-01-20 20:43:04 -08:00
Ricardo Cerqueira
129989b172 backuptool: Disregard known bad backup scripts
Keep a blacklist of md5 sums for scripts known to cause issues, and
ignore them when installing new builds

Change-Id: I19a88b58194a32da5eb5fe278f2c5b9a145b57be
2012-12-19 01:16:17 +00:00
Chirayu Desai
700fc8f6c4 backuptool: only restore from same major.minor version
Change-Id: I63113fa9b3cbc6b0e1b3df75ef7dfb3160ee5062
2012-12-13 19:36:37 +05:30
Joseph Stahl
320b73eb6c fix for a typo in the comments of 50-cm.sh
Updated the file to reflect its use in CM10.

Change-Id: I7d4759798c75d2e2163e34c0d3b6fde8266e4756
2012-09-15 12:57:03 -05:00
Austen Dicken
0897504c1a remove mount/unmount capabilities from backuptool
backuptool should not be messing with whether /system is mounted
or not as it screws up the expectations of other scripts run
in the install process. instead the mounting/unmounting
functionality has been moved to ota_from_target_files

Change-Id: I0711afd517638e7d0a0c39369d3a776748245dd2
2012-07-17 14:50:27 -05:00
Ricardo Cerqueira
6edfe231cb backuptool: Update CM version
Change-Id: I646a6706faa35908bbca767a03f97172265390ce
2012-07-15 16:49:52 +01:00
eyeballer
018b5b62c4 backuptool.sh: Improve check for whether /system is mounted.
Fixes unable to flash an update.zip over a formatted /system

Change-Id: Ia163262585cb2ef414c6996837834c512d774243
2012-04-11 19:15:32 -04:00
Warren Togami
b1637c8e2b Modular backuptool.sh. Executes backup and restore methods defined in arbitrary /system/addon.d/*.sh scripts.
Tips & Tricks
=============
* 50-cm.sh contains only a reference implementation.  You may customize the methods however you wish.
  For example, 20-foobar.sh pre-backup can use a loop with conditionals to generate a dynamic backup list in
  /tmp/foobar_file_list which is later printed by list_files() so the backup method will act on those files.
* Optional methods pre-backup, post-backup, pre-restore, or post-restore may be defined for special purposes.
* Inject new files into /tmp/addon.d/ prior to backuptool.sh backup if you want to act during the current CM upgrade.
* Delete files from /tmp/addon.d/ during post-restore if you want to permanently remove files from /system/addon.d/
  Addons may use this approach to run a script only once.
* Scripts run in sort -n order.  Prefix with numbers 00 through 99 if want to run in a particular order.
* You can have two separate scripts, implementing only backup in one, and only restore in the other with a different
  number prefix of each.  This allows even greater control the backup/restore order even further.
* You could use pre-backup to generate a one-time use backup script in /tmp/addon.d/ that deletes itself in
  post-restore.

Patch Series
============
http://review.cyanogenmod.com/#change,13265
CyanogenMod/android_build
  * edify generator
http://review.cyanogenmod.com/#change,13266
CyanogenMod/android_system_core
  * permissions on /system/addon.d
http://review.cyanogenmod.com/#change,13267
CyanogenMod/android_vendor_cm
  * 50-cm.sh reference backup script
  * modular backuptool.sh
  * support backuptool.functions used by /system/addon.d/*.sh scripts

Change-Id: Ifd5eaf9dcfd68d92e5043c21d1bae1dc0ad54860
2012-03-08 20:40:36 -10:00
Steve Kondik
2824bf86ba Fix overridden packages in backuptool
- Fix Gallery typo
 - Add QuickSearchBox override

Change-Id: I7ac14e62eebf4289a55d2d1f065d34866cb67abd
2012-02-29 15:42:19 -08:00
Steve Kondik
b3b545c4ff Merge "Ensure backup of voice search" into ics 2012-02-29 10:53:26 +03:00
Shawn Alty
5dda0a9e97 Ensure backup of voice search
Currently the tool only backs up the lib, but not the apk.
Seeing as how the market version of voice search is still not
up to date with the current release, it should still be backed
up with this script.

Change-Id: Ia130bb3e289fc3c2206a60ed0fcfd7dab816425d
2012-02-25 11:06:23 -06:00
Andrew Sutherland
258d2a7b58 handle_compcache: update props to match MemoryManagement in settings
Change-Id: I74ebcb03d5e096b8e9c71672a23b1c5a70eaef37
2012-02-22 14:55:53 -06:00
Ricardo Cerqueira
2dc7045f2b backuptool: Deal with multiple files with the same name
Since the destination for all backed up files during an installation was
/tmp, all files sharing a name (like the full_model.bin files from
the various face detectors) ended up being restored as copies of
the last such file, effectively breaking the backup.
As a fix, when backing up files, use the entire original path to make
sure they're kept separate and restorable.

Change-Id: I399f7a9433a225871d97e0ecaeb051a90e68696b
2012-02-18 12:28:37 -08:00
Steve Kondik
f342837e69 Revert "Remove gallery from backuptool"
This reverts commit 538b4e9eb4.
2012-02-15 16:33:52 -08:00
Steve Kondik
538b4e9eb4 Remove gallery from backuptool
Change-Id: Ide65c6810955b2be9bc582559c7ba23a0f47cd26
2012-02-10 10:18:52 -08:00
Steve Kondik
f67c4aedf9 cm: Update backuptool for calendar
Change-Id: I882a9e108304649c491b539a7453e29098208b11
2011-12-30 11:31:01 -08:00
Steve Kondik
25d7ca1628 cm: Rename modversion to cm.version
Change-Id: I73da7816fec34e892ee54e1782a18ec1c42863b4
2011-12-29 15:29:34 -08:00
DvTonder
c61cb9242e Backuptool: Add missing google apps files
This commit adds additional gapps files missing from the backuptool

Change-Id: I2848d06c23083def8e92dbf3cf1c024883fb874d
2011-12-26 20:43:28 -05:00
DvTonder
147fb1b1cb backuptool: add missing CalendarProvider.apk
This fixes the broken Calendar Sync after restore

Change-Id: I2ea6c328f64d8fa3022238072cde36f6cb92105d
2011-12-26 11:36:16 -05:00
Steve Kondik
e0711e11f8 cm: Remove junk from backuptool
Change-Id: I1d290c0d685b032fd064cd1fc6b1474359c82c36
2011-12-20 12:51:49 -08:00
Tanguy Pruvot
763624824f Missing Maps.apk in backuptool.sh 2011-12-18 21:32:41 +01:00
Ricardo Cerqueira
e1f3738e7c CM9: initial CM vendor setup for Android 4 2011-11-27 20:15:37 +00:00
James Zdziebkowski
ec3c9da7e3 Update modelid_cfg.sh to copy correct firmware for ace nam
Change-Id: I030ffe733add1ba1112998d9d04dc4df210eced5
2011-10-07 08:57:46 -04:00
James Zdziebkowski
76b051306e AicBootFix not needed with source audio
Update DSP files for Inspire 4G

Change-Id: Iff324e5318a97097734e3c392ab229258713ad4a
2011-09-21 14:34:17 +02:00
Tanguy Pruvot
1ef50758c3 Recovery BackupTool: add system mount check to prevent (u)mount if already mounted 2011-06-15 10:42:18 +02:00
PaulW
cfe876cefb Update backuptool.sh to correctly process force_backuptool flag/file.
This is regarding the following patch:
5cdb4ec653

The patch which was to allow custom_backup_list.txt to be maintained while flashing via ROMManager
WHILE the flag/file force_backuptool is set/present still has issues.  There are 2 reasons for this.

1) The flag is only checked during the first pass (backuptool.sh backup), as once /etc/force_backuptool
   is known to exist, all files are moved to /tmp/backupdir as designated, but when the script is
   ran again once /system has been wiped and updated, the file /etc/force_backuptool no longer exists
   as it was moved to /tmp/backupdir/force_backuptool, so the script fails as it is not checking that
   location.

2) When the backuptool.sh script is called, the above function (checking for force_backuptool) is called
   *before* the /system partition is mounted.  This therefor ignores the file regardless of whether it
   exists or not.  This is caused by check_installscript being called at the wrong point of the script.

There are therefor 2(two) main changes to this script to allow the force_backuptool override to work.
The first being within the main function of check_installscript, and the second being the location of
where check_installscript is called (ie, I moved it to below check_prereq call in the case statement,
as mounting is called before the check_prereq function checks if the ROM version is the same).

This affects *all* devices.

Change-Id: Ia7438f396eaa91b0723e56bb32ce98725e2b2025
2011-05-17 17:49:39 +01:00
Steve Kondik
6e212cf45f cm: Update APK name of new Kineto app
Change-Id: I46c18bde4654f11969137be3be954206f9620d81
2011-05-16 22:38:17 -04:00
blunden
05bd2e3cf0 Update backuptool.sh for new Gtalk app and lib
The new Gtalk app with video and voice chat from the Nexus S
OTA update is currently not backed up by the script because
Google renamed it Talk2.apk and added a new lib for it.

Change-Id: I2b0245d561584fa4d84e7d424653543d723a1ac6
2011-05-04 12:56:18 +02:00
William Graham
3f47346c30 Fix compcache
Change-Id: Ib36051d48c232dc7b0bd6fdbb782847ca5ae6398
2011-04-10 16:27:32 -05:00
Emilio López
230b671528 Support built-in ramzswap
This change adds a check for the ramzswap device. This is useful
if the kernel includes ramzswap built-in and not as a module.

Change-Id: I39105064c8fdd678ca3d7e332703b6040806f601
2011-04-07 22:31:10 +00:00
wjb
1818fc345a compcache: support ramzswap.ko in alternate module paths
Support module placement other than the "modules_install" location.
(i.e. /system/lib/modules/ or /system/lib/modules/`uname -r`/)

Change-Id: I04c5175b13655c09e1eb9b47fa0745d1cfcb376d
2011-04-05 12:29:30 -04:00
Abaakouk Mehdi
f92561b3de Add support for old and new compcache module
Change-Id: Iff0109f863114307fc34203819ef241a5efe1656
2011-04-04 15:36:58 +02:00
attn1
e39accc8e4 Add Telus NAM config; use egrep where more appropriate than grep
Change-Id: If60b85fbb5e92a9bb61a5ec1f9129d2d4da0c40f
2011-03-04 08:11:43 -05:00
Steve Kondik
e3a79924ce Merge "Merge kineto chk and add NAM DHD config into modelid_cfg" into gingerbread 2011-03-03 01:19:07 +00:00