platform/core/system/system-recovery.git
3 years agoUse /dev/console instead of ttyS1 51/244851/2 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.113546 accepted/tizen/6.0/unified/hotfix/20201103.001520 accepted/tizen/unified/20200928.072841 submit/tizen/20200925.063159 submit/tizen/20200925.073321 submit/tizen_6.0/20201029.205105 submit/tizen_6.0_hotfix/20201102.192505 submit/tizen_6.0_hotfix/20201103.114805 tizen_6.0.m2_release
Kichan Kwon [Fri, 25 Sep 2020 05:20:10 +0000 (14:20 +0900)]
Use /dev/console instead of ttyS1

- Console-connected serial port number depends on device
- With using /dev/console, we don't have to care
  which port is connected
- Reference
  - https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/serial-console.rst

Change-Id: Ic4313d33e49d106da82bf2d03fec865487e8ffee
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoUpdate img-verifier usage 82/244782/3
Kichan Kwon [Thu, 24 Sep 2020 07:02:42 +0000 (16:02 +0900)]
Update img-verifier usage

Change-Id: Ib3abfa3e3ddf08b203a458e7a7e7cc9d8731b4b8
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoNo longer mount platform partitions 73/244773/3
Kichan Kwon [Thu, 24 Sep 2020 04:45:02 +0000 (13:45 +0900)]
No longer mount platform partitions

- Kernel writes Journal log when system-data is mounted
- Modifying data with flashing can break partition
- Although fsck recovers partition, we have to prevent
  this situation

- In addition, USB mountpoint is changed
  - mkdir in /opt is failed because of SMACK
  - So, move to /tmp which has '*' SMACK label

Change-Id: I683cbc932106c766a38856690f26c9e1472d7edd
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoRevert "Provide debug mode before recovery" 72/244772/2
Kichan Kwon [Thu, 24 Sep 2020 04:38:02 +0000 (13:38 +0900)]
Revert "Provide debug mode before recovery"

- system-data is no longer mounted

- This reverts commit 0ac7ac2e0e55af61e13452c625fca4725e0ade22.

Change-Id: I58057fcc6e95cf555c87ab667e2e1e0c1e993cb1
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoUse return value to check error 01/244701/2
Kichan Kwon [Wed, 23 Sep 2020 08:39:22 +0000 (17:39 +0900)]
Use return value to check error

- In general, return value is used to detect error
- Reference : http://c-faq.com/misc/errno.html

Change-Id: Ib58419ed2012e050d79fe1437b726885fafe046a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoFix error checking 75/244675/1 accepted/tizen/unified/20200924.072504 submit/tizen/20200923.074041
Kichan Kwon [Wed, 23 Sep 2020 06:42:55 +0000 (15:42 +0900)]
Fix error checking

Change-Id: I0802ef4abdcb5630bfa364f4bdd0805594d831ae
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoRename pre script to setup script 33/244333/1 accepted/tizen/unified/20200921.044222 submit/tizen/20200921.015202
Kichan Kwon [Thu, 17 Sep 2020 09:49:42 +0000 (18:49 +0900)]
Rename pre script to setup script

Change-Id: I269ffb72cd7aec4677ebd40393e73bab05f16a8b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoLaunch pre script if exists 58/244258/1
Kichan Kwon [Wed, 16 Sep 2020 09:53:36 +0000 (18:53 +0900)]
Launch pre script if exists

Change-Id: Ic90e2ac12e79d36ce6d1c47ca322b1ff6d73bb9a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoSeparate program launching function 57/244257/1
Kichan Kwon [Wed, 16 Sep 2020 09:51:27 +0000 (18:51 +0900)]
Separate program launching function

Change-Id: Ic2eedca98f67c208ee9ff64428f0f1bdf5f29274
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoAdd a sign to data size variable 12/242712/1 accepted/tizen/unified/20200902.042719 submit/tizen/20200831.080339
Kichan Kwon [Mon, 31 Aug 2020 03:48:33 +0000 (12:48 +0900)]
Add a sign to data size variable

Change-Id: Ie91516f8d0b48d73103eaa9167120ce0ce7a4abe
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoProvide debug mode before recovery 59/242259/2 accepted/tizen/unified/20200828.121425 submit/tizen/20200828.071117
Jeon Sang-Heon [Tue, 25 Aug 2020 16:55:41 +0000 (16:55 +0000)]
Provide debug mode before recovery

- Debug mode file : /opt/usr/.recovery_debug

Change-Id: I575848838d27bc18ee212c028168b1c677220f13
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
3 years agoFix: fix coverity issue 64/242564/1
Jeon Sang-Heon [Fri, 28 Aug 2020 09:42:00 +0000 (09:42 +0000)]
Fix: fix coverity issue

- CID(1146551) : fix fd_dst assert condition
- CID(1146911, 1146942) : set file descriptor to -1 after close to prevent double close
- CID(1146433) : count num_recovery before check condition

Change-Id: I0bdd7fe7d3b4a2adafb79185c64b99d3f94fe3af
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
3 years agoVerify image before recovery 19/242119/4 submit/tizen/20200826.021413
Kichan Kwon [Mon, 24 Aug 2020 07:47:19 +0000 (16:47 +0900)]
Verify image before recovery

- Regarding img-verifier, you can refer tota-ua repository

Change-Id: Ie5b01aa092c063dae8a3a732b2c2024a13f22a64
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoMerge "Mount USB with its type" into tizen accepted/tizen/unified/20200813.122555 submit/tizen/20200813.140007
Kwon [Thu, 13 Aug 2020 04:57:55 +0000 (04:57 +0000)]
Merge "Mount USB with its type" into tizen

3 years agoLimit scanf to actual field length 90/240890/1 accepted/tizen/unified/20200813.015355 submit/tizen/20200812.130123
Karol Lewandowski [Wed, 12 Aug 2020 10:56:54 +0000 (12:56 +0200)]
Limit scanf to actual field length

Change-Id: I45a029e070d392b349e477895d479d3bc27c522b

3 years agoFix file descriptors leak in error path (svace-reported) 79/240879/1
Karol Lewandowski [Wed, 12 Aug 2020 09:40:39 +0000 (11:40 +0200)]
Fix file descriptors leak in error path (svace-reported)

Change-Id: I605a7aba4ec7a8d3dece5131d0588e119cb5690b

3 years agoMount USB with its type 56/240856/2
Kichan Kwon [Wed, 12 Aug 2020 06:26:19 +0000 (15:26 +0900)]
Mount USB with its type

Change-Id: I5f33c5f311cfbbd46535d2a408368c65ba059bbf

3 years agoConsider USB storage without partition table 26/240826/1 submit/tizen/20200812.005037
Kichan Kwon [Wed, 12 Aug 2020 00:46:38 +0000 (09:46 +0900)]
Consider USB storage without partition table

- Somebody can format USB storage without partition table
- In this case, recovery image is stored in /dev/sdX

Change-Id: Ifb3d1f5924d22936433239144d5fd05ae32b3b9d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoversion up : 0.5.1 20/240620/1 accepted/tizen/unified/20200810.220306 submit/tizen/20200810.070728
Kichan Kwon [Mon, 10 Aug 2020 07:06:00 +0000 (16:06 +0900)]
version up : 0.5.1

Change-Id: Iefa9dd5c435437f9d5c1ab4294cfd909fddbd5e4
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoAdd execute permission 19/240619/1
Kichan Kwon [Mon, 10 Aug 2020 06:42:58 +0000 (15:42 +0900)]
Add execute permission

Change-Id: I1427ffe1565b2aef61f620edd6ab5c70134e244d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoAdd initrd-recovery list file 08/240608/1
Kichan Kwon [Mon, 10 Aug 2020 04:53:55 +0000 (13:53 +0900)]
Add initrd-recovery list file

Change-Id: I6a01f763b30917455d651bb1d0acb621cb59ca36
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoversion up : 0.5.0 25/239825/1 accepted/tizen/unified/20200731.145821 submit/tizen/20200730.053716
Kichan Kwon [Thu, 30 Jul 2020 05:26:44 +0000 (14:26 +0900)]
version up : 0.5.0

Change-Id: I29989a4f69a8a7ec97f509340f0eeac83c87fb21
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agorecovery-init: Set PATH as required by checker scripts 34/239534/1 accepted/tizen/unified/20200728.045257 submit/tizen/20200727.124805
Karol Lewandowski [Mon, 27 Jul 2020 11:08:30 +0000 (13:08 +0200)]
recovery-init: Set PATH as required by checker scripts

Change-Id: Iaf60a3c67a9fdfa79a01ccbde7713a4a7e180527

3 years agoLaunch recovery GUI if exists 65/239465/2 accepted/tizen/unified/20200727.075546 submit/tizen/20200727.032939
Kichan Kwon [Mon, 27 Jul 2020 03:15:26 +0000 (12:15 +0900)]
Launch recovery GUI if exists

Change-Id: If832e122a1cd5324c60423b35c151eaab9450b6a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoPrint off_t after type conversion for compatibility 72/239172/1 submit/tizen/20200722.083807
Kichan Kwon [Wed, 22 Jul 2020 08:35:29 +0000 (17:35 +0900)]
Print off_t after type conversion for compatibility

- arm : %lu
- aarch64 : %llu
- Fix printing type to prevent build error

Change-Id: I5cd0e72541464b26ca8b70e06f0d4079e9a23b3f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoFix format string 67/239167/1 submit/tizen/20200722.081959
Kichan Kwon [Wed, 22 Jul 2020 08:17:11 +0000 (17:17 +0900)]
Fix format string

Change-Id: I93c2ef92b2ce9295a73a1cbf13d65d9d65ef529d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoTry to detect USB drive a few times 21/239121/2 submit/tizen/20200722.064325
Kichan Kwon [Wed, 22 Jul 2020 02:59:51 +0000 (11:59 +0900)]
Try to detect USB drive a few times

Change-Id: I71c3b5b5498bf7c8eb0e1eca138937180fffef34
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoWrite current progress to file 75/238575/3
Kichan Kwon [Wed, 15 Jul 2020 07:55:16 +0000 (16:55 +0900)]
Write current progress to file

- File path : /tmp/recovery_progress
- Write percentage : 1 ~ 100(%)

Change-Id: Ifdb715e714688673f3b171e73dfb6662beb91457
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoAdd system-recovery binary for USB recovery 71/238571/4
Kichan Kwon [Tue, 14 Jul 2020 07:30:07 +0000 (16:30 +0900)]
Add system-recovery binary for USB recovery

- Find recovery image on USB storage
- Fuse images to the appropriate device
  refering to config file
  - Config file is included in recovery image
  - Config file format : [LABEL] [IMG_BASENAME] [DEVICE_PATH]

Change-Id: I7e2d3d3dd6f04c273179b267c6cb611a1ed6542e
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoRemove all files except recovery-init 58/238458/2
Kichan Kwon [Tue, 14 Jul 2020 06:18:08 +0000 (15:18 +0900)]
Remove all files except recovery-init

- GUI will be implemented by others

Change-Id: Ieb3c77d56c12aebd5a30ce2750824ea2f6bb51ee
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoMount USB storage 75/238275/1
Kichan Kwon [Fri, 10 Jul 2020 03:34:35 +0000 (12:34 +0900)]
Mount USB storage

- Mount /dev/sdXX
- Mount only ext4 or vfat file system
- Mountpoint : /opt/media/USBDriveXX
  - Same with storaged

Change-Id: I7c2fb5b83f0c63a39979189bfe0bddc8a4273f03
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoEnable 64 bit 30/236230/1 accepted/tizen/unified/20200616.041008 accepted/tizen/unified/20200727.091516 accepted/tizen/unified/20200728.062744 submit/tizen/20200616.030922 submit/tizen/20200727.091055 submit/tizen/20200728.052705
Kunhoon Baik [Tue, 16 Jun 2020 01:17:50 +0000 (10:17 +0900)]
Enable 64 bit

Tizen will support 64 bit binary officially.
System-Recovery will be included to initrd-recovery partition.
Although initrd-recovery partition size is exceeded, System-Recovery will be applied

Change-Id: I783499d85e63de31f5a2dcf3541a6e09d64e56b0

4 years agoFix a potential nullptr dereference 77/224977/1 accepted/tizen/unified/20200218.145910 submit/tizen/20200214.102415 submit/tizen/20200214.134348 submit/tizen/20200217.104822 submit/tizen/20200217.110047
Michal Bloch [Fri, 14 Feb 2020 10:19:11 +0000 (11:19 +0100)]
Fix a potential nullptr dereference

Change-Id: I275822967bd3cc91214cacaf24fbc8bb223cd96c
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoFix const placement in a declaration 47/221547/1 accepted/tizen/unified/20200108.131431 submit/tizen/20200107.104336
Karol Lewandowski [Fri, 3 Jan 2020 11:14:28 +0000 (12:14 +0100)]
Fix const placement in a declaration

This fixes gcc 9.x compilation failure.

Change-Id: Ie44868d5914f1d6cef2a2c39b4355f48f6749417

4 years agorecovery-action-set: set PATH exactly as security team requires 47/212447/1 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.004308 accepted/tizen/5.5/unified/mobile/hotfix/20201027.075716 accepted/tizen/5.5/unified/wearable/hotfix/20201027.110758 accepted/tizen/unified/20190822.045414 submit/tizen/20190821.165602 submit/tizen_5.5/20191031.000010 submit/tizen_5.5_mobile_hotfix/20201026.185105 submit/tizen_5.5_wearable_hotfix/20201026.184305 tizen_5.5.m2_release
Karol Lewandowski [Wed, 21 Aug 2019 11:59:04 +0000 (13:59 +0200)]
recovery-action-set: set PATH exactly as security team requires

Change-Id: I3604f3c153b1138989805a6f5575849fdcb5310a

5 years agorecovery-action-set: set default PATH 04/204004/1 accepted/tizen/unified/20190419.110533 submit/tizen/20190418.151116
Karol Lewandowski [Thu, 18 Apr 2019 09:50:35 +0000 (11:50 +0200)]
recovery-action-set: set default PATH

Suggested by Security team.

Change-Id: I0ca221986644882dd359f671b2e7689b3f6332dd

5 years agorelease : 0.3.0 81/181181/3 accepted/tizen_5.0_unified tizen_5.0 accepted/tizen/5.0/unified/20181102.021047 accepted/tizen/unified/20180612.130812 submit/tizen/20180611.014532 submit/tizen_5.0/20181101.000004
Kichan Kwon [Mon, 11 Jun 2018 01:33:50 +0000 (10:33 +0900)]
release : 0.3.0

Change-Id: Ia24b47673f4295652c5a512490f2ebdd1c570b41
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
5 years agoInitial source 48/178848/1
Kichan Kwon [Mon, 14 May 2018 08:14:09 +0000 (17:14 +0900)]
Initial source

Change-Id: I22b9a4f8d1082d85290ddc51c50bd816e433d98e
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
5 years agoInitial empty repository master
Tizen Infrastructure [Mon, 14 May 2018 06:36:55 +0000 (06:36 +0000)]
Initial empty repository