platform/core/system/update-control.git
2 weeks agoosu: Add board parameter setters 33/317633/7 accepted/tizen_unified accepted/tizen_unified_x accepted/tizen_unified_x_asan tizen accepted/tizen/unified/20241006.053324 accepted/tizen/unified/x/20241007.013550 accepted/tizen/unified/x/asan/20241014.000507
SangYoun Kwak [Thu, 12 Sep 2024 11:22:38 +0000 (20:22 +0900)]
osu: Add board parameter setters

Setter for board parameters using hal apis are added.
 * hal_device_board_switch_partition
 * hal_device_board_switch_partition
 * hal_device_board_clear_partition_ab_cloned
 * hal_device_board_set_partition_ab_cloned
 * hal_device_board_set_partition_status
 * hal_device_board_set_upgrade_progress_status
 * hal_device_board_set_upgrade_type
 * hal_device_board_set_upgrade_state

Change-Id: I13d39b210349766d76fadee3679dff337c6b2689
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
2 weeks agoosu: Add board parameter getters 83/316183/9
SangYoun Kwak [Wed, 14 Aug 2024 11:06:00 +0000 (20:06 +0900)]
osu: Add board parameter getters

Getter for board parameters using hal apis are added.
 * hal_device_board_get_boot_mode
 * hal_device_board_get_current_partition
 * hal_device_board_get_partition_ab_cloned
 * hal_device_board_get_partition_status
 * hal_device_board_get_upgrade_progress_status
 * hal_device_board_get_upgrade_state
 * hal_device_board_get_upgrade_type

Change-Id: I8f0fb10487df649887d76036f52e3e75743f1033
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
2 weeks agoFix to print help message once 57/318557/2
SangYoun Kwak [Wed, 2 Oct 2024 07:15:42 +0000 (16:15 +0900)]
Fix to print help message once

Previously, when '--help' option is provided, the help message was
printed twice. To fix this issue, '--help' option is treated as an
argument like other options and print help message if '--help' option is
provided.

Change-Id: I5026fcdfc95a60ea093e15c3860f85eeda3ad2b9
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
5 weeks agoSTDM Console seems to have been removed with no replacement. 84/317384/2
Michal Bloch [Fri, 6 Sep 2024 18:17:59 +0000 (20:17 +0200)]
STDM Console seems to have been removed with no replacement.

Change-Id: I6bd93d73a939ffec92e6a2f6880335c7e6550e57

2 months agoCode reorganize to make SAM happy 97/316097/1
Mateusz Moscicki [Tue, 13 Aug 2024 09:43:18 +0000 (11:43 +0200)]
Code reorganize to make SAM happy

Functions have been separated into utils/ and base/.
In common/ is the code that calls fota_* and recovery_* functions.

SAM score has been improved from 3.62 to 4.92

Change-Id: I285e1f7c53feb3415de22b4a57879bc1ca80a744

2 months agofota: Fix wrongly written "boot mode" to "upgrade type" 30/315330/2 accepted/tizen_unified_dev accepted/tizen_unified_toolchain accepted/tizen/unified/20240731.160147 accepted/tizen/unified/dev/20240805.054500 accepted/tizen/unified/toolchain/20240812.133445 accepted/tizen/unified/x/20240801.044253 accepted/tizen/unified/x/asan/20240813.231928
SangYoun Kwak [Tue, 30 Jul 2024 07:48:51 +0000 (16:48 +0900)]
fota: Fix wrongly written "boot mode" to "upgrade type"

The log message for the failure of calling
hal_device_board_get_upgrade_type() function should be about upgrade
type but "boot mode" is used. It should be fixed.

Comparing two string with strncmp, a string variable "upgrade_type" and
constant string "online", compare length should be provided as "sizeof(
upgrade_type)" but "sizeof(boot_mode)" is used.
Their buffer size(boot_mode and upgrade_type) are same so it was not
making any errors so far but it should be fixed.

Change-Id: I580d04d982b943325643aae885bf5c91dae8c0c5
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
2 months agoupdate-manager: Fix finding checksum for a file 93/314493/7
SangYoun Kwak [Fri, 12 Jul 2024 08:54:11 +0000 (17:54 +0900)]
update-manager: Fix finding checksum for a file

The read_checksum_for() function reads checksum file and finds a
checksum for the given file name.
Checksum file is consisted with multiple lines, which contains checksum
data and following file name like below:
    <checksum>  <filename>

Previously, the file name is compared with first n bytes, which n is the
length of file name searching for. (without following '\0')
This may lead to faulty match of file name, below is an example:
file name in checksum file: "abcd.efg.hi"
file name searching for: "abcd.efg"
With this condition, the previous code compares only 8 characters, which
is the length of "abcd.efg" so the program considers it as matched.

To fix this situation, checksum and file name are gained using strtok_r
function with delimiter " \n" so the file name can be compared as a
whole.

Change-Id: Iaa14ce35f14b69b613881e375666adc3e5de739d
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
2 months agofota: Modify condition of upgrade state transition 21/314721/4
SangYoun Kwak [Wed, 17 Jul 2024 09:57:48 +0000 (18:57 +0900)]
fota: Modify condition of upgrade state transition

upgrade-manager service checks if upgrade is completed at the
initialization time and if upgrade is completed, then transition the
upgrade state from "ready" to "completed".

The transition condition is:
 * upgrade status progress is 100
 * boot mode is "normal"

But if upgrade is performed as 'online' mode, the boot mode(which is
parsed from the /proc/cmdline) is "fota".

To make upgrade state be transitioned to "completed", condition is
modified:
 * upgrade status progress is 100
 * (boot mode is "normal")
    or
   (boot mode is "fota" and upgrade type is "online")

Change-Id: I6d284f135df863c991bc8c08f75d6fa6e2b07ab5
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
2 months agofota: Modify upgrade checking function more readable 20/314720/3
SangYoun Kwak [Wed, 17 Jul 2024 10:10:17 +0000 (19:10 +0900)]
fota: Modify upgrade checking function more readable

Previously, the function is_upgrade_completed() gets no argument and
returns -1 if error, 0 if upgrade is not completed, 1 if upgrade is
completed. This might confusing since the return value does two role:
indicating error and upgrade completion.

To increase the readability, the return value is only shows if function
call is succeed or not and upgrade completion is returned using bool
type parameter "upgrade_completed".

Also, the behavior of function is changed to 'get boolean value about
upgrade is done or not', so the name of this function is changed to
get_upgrade_completed.

Change-Id: I377db07b10d42f253ca44a973b25bbf06583a27c
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
2 months agofota: Change return value of upgrade state checker 33/314833/2
SangYoun Kwak [Mon, 22 Jul 2024 01:48:02 +0000 (10:48 +0900)]
fota: Change return value of upgrade state checker

If upgrade is not completed, the upgrade state is not going to be
transit to 'completed'. It is not an error, so its return value should
be 0.

Change-Id: I866018edda2bc957fd87be136ced89486f786cc3
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
3 months agocommon: Modify glib threads to be unreferenced 70/314670/1 accepted/tizen/unified/20240718.143632 accepted/tizen/unified/dev/20240722.073434 accepted/tizen/unified/x/20240719.012648
SangYoun Kwak [Wed, 17 Jul 2024 06:20:04 +0000 (15:20 +0900)]
common: Modify glib threads to be unreferenced

To trigger update, GThread is used and it is created by g_thread_try_new
function. This function returns GThread object(pointer), which is a
newly allocated resource. Since update-manager does not manage these
threads with join, this resource should be unreferenced.

To unreference GThread, g_thread_unref is called. Since the thread holds
its GThread reference, it is safe to unreference the GThread.

Change-Id: Id656b9404b21ce5d859356beea0717c2481bc724
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
3 months agofota: Fix to call free() before return 20/314620/1
SangYoun Kwak [Tue, 16 Jul 2024 08:29:29 +0000 (17:29 +0900)]
fota: Fix to call free() before return

A variable delta_dir stores newly allocated memory as a char array but
it was not freed before return. It is a resource leackage.
To fix it, free() is added right after the last usage of this variable.

Change-Id: I6c3e9009cc4721738e0d72d45f42affd52809482
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
3 months agoosu: Add ability to set update type 49/313649/4 accepted/tizen/unified/20240708.173206 accepted/tizen/unified/dev/20240709.043440 accepted/tizen/unified/x/20240708.014825
Mateusz Moscicki [Fri, 28 Jun 2024 10:28:35 +0000 (12:28 +0200)]
osu: Add ability to set update type

To perform an offline update use:

    osu --offline-update

To perform an online update use:

    osu --online-update

Option --update will perform an offline update.

Change-Id: I16232e5025094db0484ad53dc022ab2b93d89319

3 months agoModify to set upgrade progress status as upgrade trigger state 85/313385/1 accepted/tizen/unified/20240626.155305 accepted/tizen/unified/dev/20240701.072911 accepted/tizen/unified/x/20240627.011911
SangYoun Kwak [Tue, 25 Jun 2024 06:22:47 +0000 (15:22 +0900)]
Modify to set upgrade progress status as upgrade trigger state

If upgrade trigger is succeed, it means upgrade is started to upgrade
progress status is set to 0.
If upgrade trigger is failed, upgrade progress status is set to -1.

Change-Id: I24b25a2ec52dfdd1bf6a010543361d130eb31ee4
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
3 months agoosu: Fix to return non-zero if upgrade is failed 27/313227/1
SangYoun Kwak [Thu, 20 Jun 2024 06:39:05 +0000 (15:39 +0900)]
osu: Fix to return non-zero if upgrade is failed

In the previous code, osu returned 0 even if upgrade is failed, due to
the deinitialization code. Previously, if error occured during the
upgrade, aborted the rest works and called the deinitialization function
'update_control_deinitialize' and returned its return value.
This caused osu to return 0 even an error is occured, which is invalid
behavior.
To fix this issue, the return value of deinitialization function is
treated as a different variable.

Change-Id: Ie536bafc5bb4e31f461cf1df98db496d77a24664
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
4 months agoosu: Modify to do nothing if no argument passed 10/313010/1 accepted/tizen/unified/20240620.050718 accepted/tizen/unified/toolchain/20240624.121646 accepted/tizen/unified/x/20240620.061617 accepted/tizen/unified/x/asan/20240625.092842
SangYoun Kwak [Tue, 18 Jun 2024 08:06:35 +0000 (17:06 +0900)]
osu: Modify to do nothing if no argument passed

Previously, if osu command executed without any options, upgrade is
triggered.
This behavior may lead to mistake, the osu command modified to trigger
upgrade only with --update option.
Without any options, help page will be printed and return 1.

Change-Id: I0ada77d5ecca92cdc16851e4d3b9a504416bb64c
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
4 months agoupdate-manager: Add upgrade state transition to "completed" 76/312676/1 accepted/tizen/unified/20240614.085117 accepted/tizen/unified/dev/20240620.005823 accepted/tizen/unified/x/20240614.160543
SangYoun Kwak [Wed, 12 Jun 2024 08:55:11 +0000 (17:55 +0900)]
update-manager: Add upgrade state transition to "completed"

It should be checked if the upgrade is completed or not when the device
is booted.

To accomplish this, upgrade-complete checking code is added to the
initial function of update-manager daemon.

Upgrade is considered as complete when the conditions below are all met:
 * bootmode is normal
 * upgrade progress state is 100

Change-Id: I4cf09b6328202497025b61119f46353459e001f8
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
4 months agoAdd upgrade state transition to 'ready' state 75/312675/1
SangYoun Kwak [Wed, 12 Jun 2024 08:07:03 +0000 (17:07 +0900)]
Add upgrade state transition to 'ready' state

The start of upgrade is 'ro upgrade' so when the 'ro upgrade' starts,
the 'upgrade state' should be transit to the 'ready' state.

Change-Id: Ia3311216d22a8be7cb98db5e71f69c5e377044cb
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
4 months agoSplit do_update function into update.c 52/312352/2
SangYoun Kwak [Fri, 7 Jun 2024 06:08:29 +0000 (15:08 +0900)]
Split do_update function into update.c

There are two functionalities in the osu: resize, update.
Function for resize is separated into its file so it is easy to find and
maintain. On the other hand, update is embeded in the osu.c with main
function.

To increase readability and maintainability, update function is
separated into update.c and update.h.

Change-Id: Iaf84325f1ef8edc7236a4a324f1194e1ec9f8b25
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
4 months agoAdd support for multi-part delta 88/311688/9
Mateusz Moscicki [Mon, 20 May 2024 13:52:38 +0000 (15:52 +0200)]
Add support for multi-part delta

Until now, update-manager expected the delta.tar(.gz) file in specified
directories.
This change adds the possibility to provide:

    delta-platform.tar(.gz) - to perform platform upgrade only

or

    delta-platform.tar(.gz) + delta-boot.tar(.gz) - to perform a complete upgrade

Change-Id: I0126823955bb548f7c92dae7e4aa5e823aba024e

4 months agoMinor changes to update-control API header documentation 44/311344/7 accepted/tizen/unified/20240607.170524 accepted/tizen/unified/20240611.122453 accepted/tizen/unified/x/20240612.030014
Antoni [Fri, 17 May 2024 15:08:24 +0000 (17:08 +0200)]
Minor changes to update-control API header documentation

This is neccessary for the ACR process. The name of
UPDATE_CONTROL_ERROR_KEY_NOT_FOUND error code should be changed to
comply with api review script, but it would break backwards
compatability. This is why it is left as is in this commit.

Change-Id: I669ac4ac6ca58935d68dcd63c4485616b83e8487

4 months agoAdd API functions to update-control to trigger specific update stages 63/310263/12
Antoni [Fri, 12 Apr 2024 10:08:10 +0000 (12:08 +0200)]
Add API functions to update-control to trigger specific update stages

Following functions are asynchronous and have associated functions to
set/unset their callbacks.

 * update_control_do_ro_update_async - triggers the RO update part of
upgrade process (does not reboot)

* update_control_do_finish_update_async - finishes update (reboots and
does a few additional things)

The update_control_do_update function behavior is unchanged.
To use these new functions (to recieve the callbacks)
the cilent needs to have a main loop.

Change-Id: Iee128224f7185e8e274a999549002edfd4bf4dd1

5 months agoChange to execlp from execl about running command 27/310627/2 accepted/tizen/unified/20240507.090835 accepted/tizen/unified/20240507.122806 accepted/tizen/unified/20240507.124146 accepted/tizen/unified/20240507.124203 accepted/tizen/unified/toolchain/20240508.012350 accepted/tizen/unified/x/20240507.051023
Jaehoon Chung [Thu, 2 May 2024 12:04:15 +0000 (21:04 +0900)]
Change to execlp from execl about running command

To prevent Svace issue, use execlp instead of execl.

Change-Id: I067bef505796cf2d0a391ead1ab7d1c8f3ad3cbf
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 months agoFix error -Werror=sign-compare 44/310244/2 accepted/tizen/unified/20240425.114243 accepted/tizen/unified/toolchain/20240427.045653 accepted/tizen/unified/x/20240426.050516
Youngjae Cho [Wed, 24 Apr 2024 09:31:55 +0000 (18:31 +0900)]
Fix error -Werror=sign-compare

It blames comparing signed type with unsigned type.

Fix it in two step:
 1. If signed variable is definitely a nonnegative value at the
    code context, cast it into unsigned type directly.
 2. If it is unclear whether a signed variable is nonnegative, then
    add assertion for testing the variable is nonnegative. After
    that assertion, cast it into unsigned type. It helps catching
    violation that casting negative value into unsigned variable.

Change-Id: Iaf2c9b84dc4fcfc5ae183cb2f2f5ee56de3985b0
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
6 months agoAdd chsmack label System::Tools to the osu command 20/309720/1 accepted/tizen/unified/20240423.164602 accepted/tizen/unified/x/20240425.051140
SangYoun Kwak [Tue, 16 Apr 2024 03:32:37 +0000 (12:32 +0900)]
Add chsmack label System::Tools to the osu command

To set privilege and prohibit accesses to the osu command, smack label
System::Tools is added.

Change-Id: Iff9c79036deee7107284401398d6ca5ffa8fc02d
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
6 months agoAdd 'osu --resize' command to support resizing of the rootfs partition. 07/309007/5
Mateusz Moscicki [Wed, 3 Apr 2024 09:40:53 +0000 (11:40 +0200)]
Add 'osu --resize' command to support resizing of the rootfs partition.

resize2fs is disabled in initrd to not modify the flashed image during
system boot, so that delta file can be applied during OS Upgrade.
However additional software may need to be installed during development,
so the ability to perfrom resize is added.
To resize, the rootfs partition must be mounted as RW:

    mount -o rw,remount /
    osu --resize

Change-Id: If65ab5630629b57a47a772c478379af8ca694683

6 months agotools: osu: Rename fota with osu comamnd name 83/308283/2 accepted/tizen/unified/20240322.174306 accepted/tizen/unified/x/20240326.073724
Chanwoo Choi [Thu, 21 Mar 2024 00:42:40 +0000 (09:42 +0900)]
tools: osu: Rename fota with osu comamnd name

In order to use 'osu' command for more overall purpose related to OS
Upgrade, rename fota with osu comamnd name.

Change-Id: I799f92e067fef133f2b5983629d0cf667c82e71b
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 months agoAdd python3-setuptools dependency for python 3.12 21/308021/1
JinWang An [Fri, 15 Mar 2024 08:15:48 +0000 (17:15 +0900)]
Add python3-setuptools dependency for python 3.12

Change-Id: I274f8e32f1d3badc56a48a9accd9beebe5a7abee
Signed-off-by: JinWang An <jinwang.an@samsung.com>
7 months agoRemove tools package 21/307921/1 accepted/tizen/unified/20240318.071423 accepted/tizen/unified/x/20240319.055615
SangYoun Kwak [Thu, 14 Mar 2024 06:43:51 +0000 (15:43 +0900)]
Remove tools package

The update-control-tools package contains 'fota' command but it will be
added to the update-control package.

Change-Id: Ib9818b26e2ea44d9f0819206c3be9c41a090cabc
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
7 months agoDrop plugin from this repo and integrate with libsyscommon 30/306630/2 accepted/tizen/unified/20240311.012815 accepted/tizen/unified/x/20240311.100242
Antoni [Thu, 18 Jan 2024 15:38:41 +0000 (16:38 +0100)]
Drop plugin from this repo and integrate with libsyscommon

Plugin is moved into
platform/core/system/plugin/update-control-generic. Update control API
now uses libsyscommon to manage plugins, should behave very similarlly.

Change-Id: I790f457f222746f19f9784378e5c7a91c412ab43

7 months agoAdd new package update-control-tools 57/307057/1
SangYoun Kwak [Tue, 20 Feb 2024 10:30:06 +0000 (19:30 +0900)]
Add new package update-control-tools

update-control-tools is a package that contains tools for invoking
update, testing update etc.

 * Tool 'fota':
   By using update-control apis, it downloads delta file and triggers
   update.

Change-Id: Id556d224e48657b1e6455774932de34e657d50b9
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
8 months agoplugin: Fix http_util_send_request to free resources 99/306199/2 accepted/tizen/unified/20240219.160437 accepted/tizen/unified/toolchain/20240311.064837 accepted/tizen/unified/x/20240220.150047
SangYoun Kwak [Mon, 19 Feb 2024 02:21:53 +0000 (11:21 +0900)]
plugin: Fix http_util_send_request to free resources

In the function http_util_send_request, it was not freeing resources
which it allocated properly.
To make it to free resources properly, return statements are fixed to
'goto END;' statement.

Change-Id: Idd905ed10098a2403acf609d98c273b86ed72f4a
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
8 months agoplugin: Modify CURLOPT_HTTPPOST to CURLOPT_MIMEPOST 79/306179/2
SangYoun Kwak [Fri, 16 Feb 2024 11:13:02 +0000 (20:13 +0900)]
plugin: Modify CURLOPT_HTTPPOST to CURLOPT_MIMEPOST

Since CURLOPT_HTTPPOST is deprecated option in libcurl, build error
occured in Tizen-Unified-X environment.
According to the documentation of libcurl, CURLOPT_HTTPPOST is replaced
by CURLOPT_MIMEPOST.

Change-Id: Id2dfbe5d7712a2fdfbd36d71f8af09f50160897f
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
19 months agoWorkaround for ASAN problem 42/289042/2 accepted/tizen/8.0/unified/20231005.093907 accepted/tizen/unified/20230302.131057 tizen_8.0_m2_release
Mateusz Moscicki [Mon, 27 Feb 2023 14:23:50 +0000 (15:23 +0100)]
Workaround for ASAN problem

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84732

Change-Id: I8cb27f60994a8f9cb94d8254cdcf62eec937bd2d

20 months agoFix coverity issues 37/287737/2 accepted/tizen/unified/20230209.111248
Mateusz Moscicki [Fri, 3 Feb 2023 08:03:34 +0000 (09:03 +0100)]
Fix coverity issues

Change-Id: I7cd5aef567a7b46e47c356b300992a787b074ac3

20 months agodelta-verifier.c: Fix minor bugs 25/287325/3 accepted/tizen/unified/20230130.165637
Antoni Adaszkiewicz [Thu, 26 Jan 2023 15:10:22 +0000 (16:10 +0100)]
delta-verifier.c: Fix minor bugs

Use strncpy() rather than strcpy() and fix memory leaks.

Change-Id: I389ecadac9aa3bd7c9ba41e8c8a411e833609165

20 months agodelta-verifier: Add verbose output option 64/286964/6
Antoni Adaszkiewicz [Tue, 17 Jan 2023 13:37:03 +0000 (14:37 +0100)]
delta-verifier: Add verbose output option

Change-Id: Ib2fcda4f773acd226acf9212cc5cdddccd354aed

21 months agoVersion 1.0.5 28/287028/4 accepted/tizen/unified/20230120.182103
Mateusz Moscicki [Wed, 18 Jan 2023 11:13:55 +0000 (12:13 +0100)]
Version 1.0.5

Change-Id: I2d98bf4ca6cf1a6ea4125490e90a5c3e2004ebd5

21 months agoupdate-manager: Separation of delta checking into a separate function 98/287098/3
Mateusz Moscicki [Thu, 19 Jan 2023 14:43:33 +0000 (15:43 +0100)]
update-manager: Separation of delta checking into a separate function

Change-Id: I18db976595d920e1f4ab325e65791aa2e3b8762e

21 months agoupdate-manager: Run delta-verifier from delta.tar 27/287027/1
Mateusz Moscicki [Wed, 18 Jan 2023 11:11:05 +0000 (12:11 +0100)]
update-manager: Run delta-verifier from delta.tar

Change-Id: I3fada48d9992d9af4d396482bba8340a96e66203

21 months agoupdate-manager: Drop untaring deltas with system() function 52/285752/10 accepted/tizen/unified/20230116.060914
Antoni Adaszkiewicz [Mon, 19 Dec 2022 12:18:33 +0000 (13:18 +0100)]
update-manager: Drop untaring deltas with system() function

Untaring deltas with system() function can be very slow,
especially for larger deltas. This can result in timouts while
verifying delta-device compatability.

Change-Id: I5ee01e9d8af6d88eb69aff0b8856ab396ea92f64

22 months agodelta-verifier: Compare variables only form file from delta. 90/285290/5
Antoni Adaszkiewicz [Thu, 8 Dec 2022 13:12:42 +0000 (14:12 +0100)]
delta-verifier: Compare variables only form file from delta.

To allow for "full" type delta to pass verification, only variables
present in "update-info.ini" file from provided delta will be compared
against system variables generated by the device.

Change-Id: I60599e6a2673a4649eb47b88a6ef913b66f9d5e9

22 months agoVersion 1.0.4 54/284954/1
Antoni Adaszkiewicz [Thu, 1 Dec 2022 17:03:43 +0000 (18:03 +0100)]
Version 1.0.4

Change-Id: I6772be0c91836b884101a55ab503449f35a80857

22 months agoDrop build_string.txt comparisons used to verify delta-device comaptibility 79/284479/7
Antoni Adaszkiewicz [Mon, 31 Oct 2022 15:13:29 +0000 (16:13 +0100)]
Drop build_string.txt comparisons used to verify delta-device comaptibility
and use delta-verifier binary to perform said verification

Change-Id: Iffff84cbeae8373308ea59aee43eefb67cf16265

22 months agoAdd delta-verifier, a binary which will allow us to check delta-device compatibility... 20/283820/6
Antoni Adaszkiewicz [Thu, 27 Oct 2022 14:51:16 +0000 (16:51 +0200)]
Add delta-verifier, a binary which will allow us to check delta-device compatibility both
for update-manager and upgrade-trigger.sh (in upgrade-tools)

Change-Id: I4f58c3380d8875240794ef839f1d8caca4538c33

2 years agoFix resource leak 34/281234/1 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.062955 accepted/tizen/7.0/unified/hotfix/20221116.105832 accepted/tizen/unified/20220915.015345 accepted/tizen/unified/20220915.023908 accepted/tizen/unified/20220915.025948 tizen_7.0_m2_release
Mateusz Moscicki [Wed, 14 Sep 2022 13:36:39 +0000 (15:36 +0200)]
Fix resource leak

Change-Id: Ib88c81676a741083fcc95289cb690db09564d75e

2 years agoSet the path to the plugin according to the architecture 08/279008/1 accepted/tizen/unified/20220801.131510 submit/tizen/20220729.145528
Mateusz Moscicki [Fri, 29 Jul 2022 07:53:02 +0000 (09:53 +0200)]
Set the path to the plugin according to the architecture

Change-Id: If0449a1ebb2d8de6d83ec5106c48df0200b58ed9

2 years agoDo not track the full upgrade server-side 68/278868/7 accepted/tizen/unified/20220728.044828 submit/tizen/20220727.141559
Mateusz Majewski [Wed, 27 Jul 2022 06:26:13 +0000 (08:26 +0200)]
Do not track the full upgrade server-side

This realises the asynchrony of do_update in a better way, since now the
server does some basic checks, and fades away after spawning the update
process.

Change-Id: I4d53f3d65eaf6e75a425bf3061f10fd0b5f55d7a

2 years agoMake update_control_do_update asynchronous 08/278708/4
Mateusz Majewski [Mon, 25 Jul 2022 08:08:23 +0000 (10:08 +0200)]
Make update_control_do_update asynchronous

This is just a hotfix, we want to do this in a different way. However we
wanted to make this work quickly.

Change-Id: I57a696329013f86fc2e48b574f7773612cb68190

2 years agoAdd upgrade-trigger.sh verification before run 52/276652/1 accepted/tizen/unified/20220701.055312 submit/tizen/20220630.103030
Mateusz Moscicki [Wed, 22 Jun 2022 13:00:12 +0000 (15:00 +0200)]
Add upgrade-trigger.sh verification before run

Change-Id: I6bc5f51ec638c8c23ef7faad4159a615910fd878

2 years agoupdate-manager: Use build.date string 03/276103/1
Mateusz Moscicki [Thu, 9 Jun 2022 13:02:03 +0000 (15:02 +0200)]
update-manager: Use build.date string

Change-Id: Ia20587350a8017e50f71b2aeaff6df6447add891

2 years agoupdate-manager: Use build.release string 59/275759/1
Karol Lewandowski [Tue, 31 May 2022 15:11:02 +0000 (17:11 +0200)]
update-manager: Use build.release string

Change-Id: I035e026ee17fd970b024f411d7a503faee21cf3b

2 years agoupdate-manager: dbus: Drop policy for longer implemented 'result' method 58/275758/3
Karol Lewandowski [Tue, 31 May 2022 13:43:26 +0000 (15:43 +0200)]
update-manager: dbus: Drop policy for longer implemented 'result' method

Change-Id: I9f36ea7e42839f0b20bf1eb8a4c73c53d6f839a5

2 years agoAdd support for the Full Upgrade 53/275653/2
Mateusz Moscicki [Fri, 27 May 2022 14:05:04 +0000 (16:05 +0200)]
Add support for the Full Upgrade

The full upgrade can be applied to any version of the system.
Therefore the file build_string.txt contained in the delta.tar has "0.0"
as its source version.

Change-Id: I181a0978782467670241fcfbe99dcbdc0add9a73

2 years agoIncrease DBus timeout 13/275413/2
Mateusz Majewski [Tue, 24 May 2022 12:01:58 +0000 (14:01 +0200)]
Increase DBus timeout

Change-Id: I0712faba6745a9141e17b242cc9a9fd3c239335f

2 years agoChange the user of update-manager.service to root 27/275327/2
Mateusz Moscicki [Fri, 20 May 2022 12:00:35 +0000 (14:00 +0200)]
Change the user of update-manager.service to root

During the upgrade the service must run the delta.ua program supplied in
the delta.tar file to correctly execute the entire process.

Thus, it's infeasible to depend on POSIX file capabilities as the
delta.ua from upgrade package (delta.tar) will not have it.  This leaves
us with either (1) need to apply needed caps in runtime (de facto
requiring super privileges for the process controlling this action), or
(2) simplifying the process and changing the user of update-manager to
root.

This commit implements (2) option as, in practice, this program is
responsible for flashing complete platform images so it effectively has
every permission possible (as it can flash any data of its choosing)

Change-Id: I33477c7a9981fb59effd1846c8733ff8e77c752b

2 years agoFix plugin installation path to /usr/lib 37/274337/1
Karol Lewandowski [Tue, 26 Apr 2022 20:23:13 +0000 (22:23 +0200)]
Fix plugin installation path to /usr/lib

/usr/lib/libupdate-control-plugin.so is fixed in src/update_control.c, so
this is where plugin must be installed, regardless of actual architecture's
libdir (/usr/lib vs /usr/lib64).

Change-Id: I1d964ef93711f6e7444c66fad374f5f4f9da13cc

2 years agoupdate-manager: Drop get_result from service 07/273207/6
Karol Lewandowski [Thu, 31 Mar 2022 11:55:08 +0000 (13:55 +0200)]
update-manager: Drop get_result from service

This commit reworks service to drop now unusued get_result function,
previously used to retrieve upgrade status.

Additionally, this commits drops generated code in favor of
generating it at build time (this is necessary to drop get_result
function prototype too).

Change-Id: I74933c745e62f27cd6e57f29ccf81012f4ff1e75

2 years agoupdate-control: Use device HAL api to retrieve upgrade progress 06/273206/5
Karol Lewandowski [Thu, 31 Mar 2022 11:19:03 +0000 (13:19 +0200)]
update-control: Use device HAL api to retrieve upgrade progress

This commit reworks API to use HAL-provided functions for retrieving
upgrade progress and sharing it via UPDATE_CONTROL_PROPERTY_RESULT
property.

Change-Id: Ie8888b31af565fd30e3e4c603e7fa8a361a8ac8d

3 years agoFix coverity issue - resource leak 30/259830/1 accepted/tizen/6.5/unified/20211028.120343 accepted/tizen/unified/20210615.215232 submit/tizen/20210615.154137 submit/tizen_6.5/20211028.162501 tizen_6.5.m2_release
Mateusz Moscicki [Tue, 15 Jun 2021 10:12:53 +0000 (12:12 +0200)]
Fix coverity issue - resource leak

Change-Id: Icf860015ab0ae692a14ce2c46af67770f2b30a7c

3 years agoupdate-manager: Fix resource leak 86/259786/2 accepted/tizen/unified/20210615.120233 submit/tizen/20210614.124929
Mateusz Moscicki [Mon, 14 Jun 2021 08:49:32 +0000 (10:49 +0200)]
update-manager: Fix resource leak

Change-Id: Id98b2ff5125720dbcaca3e67be3b50753501db26

3 years agoupdate-manager: Change the search order for the delta file 59/259659/3 submit/tizen/20210611.122523
Mateusz Moscicki [Thu, 10 Jun 2021 13:45:13 +0000 (15:45 +0200)]
update-manager: Change the search order for the delta file

New search order:

    1. /opt/usr/home/owner/app_rw/<appid>/shared/data/delta.tar.gz
    2. /opt/usr/home/owner/app_rw/<appid>/shared/data/delta.tar
    3. /opt/usr/data/fota/delta.tar.gz
    4. /opt/usr/data/fota/delta.tar

If the caller does not have app_id, only the last two directories will
be searched.

Change-Id: I88e69f3de0349a95ac74a4f7a9577e348bc84f57

3 years agoupdate-manager: Change the search location for the delta.tar file 16/258516/5 accepted/tizen/unified/20210601.135332 submit/tizen/20210528.131738 submit/tizen/20210528.131807
Mateusz Moscicki [Wed, 19 May 2021 08:15:45 +0000 (10:15 +0200)]
update-manager: Change the search location for the delta.tar file

update-manager will look for the delta.tar file in the data directory of
the application that called the "install" DBus method.
If the appid of the caller cannot be determined, the delta.tar file will
be searched for in the application data directory that has the value
"client" for the key "tizen-fota-manager".

Change-Id: Iebc9b5badcbe084d98ee41b03760a5f0951f4697

3 years agoSet default timeout for g_dbus_proxy_call() to 5 minutes 36/258236/2 accepted/tizen/unified/20210526.051939 submit/tizen/20210514.153447
Mateusz Moscicki [Tue, 11 May 2021 15:51:56 +0000 (17:51 +0200)]
Set default timeout for g_dbus_proxy_call() to 5 minutes

The current default value (25s) is too small for update-manager to have
time to extract data from delta.tar and restart the target, which is
manifested by the user being shown an error message just before the
target restarts. The time has been extended to ensure that the user is
not unnecessarily informed of an update error that did not occur.

Change-Id: Ia99a9bf79ffc0cbe1dde6c963c9bae3678245595

3 years agoAdd support for delta.tar.gz 35/257635/2
Mateusz Moscicki [Tue, 27 Apr 2021 11:53:20 +0000 (13:53 +0200)]
Add support for delta.tar.gz

By using compressed delta.tar files, the amount of data that must be
downloaded to perform a device update is reduced.

Change-Id: I67a0f8405d67d8b07711e421b8fb782e7fadb82f

3 years agoChange docs link from developer.tizen.org to docs.tizen.org 22/248722/2
Jeon Sang-Heon [Wed, 2 Dec 2020 09:53:54 +0000 (09:53 +0000)]
Change docs link from developer.tizen.org to docs.tizen.org

Change-Id: Ib909a7a63e016e088ffe2ba0ee51c2ab23b642cc
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoAdd capability to service file 93/243493/2 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.113257 accepted/tizen/6.0/unified/hotfix/20201103.001140 accepted/tizen/unified/20200909.155614 submit/tizen/20200907.025654 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
Jeon Sang-Heon [Mon, 7 Sep 2020 22:18:15 +0000 (22:18 +0000)]
Add capability to service file

Change-Id: Idbe2e94817bf31da3a6138e793f30dfe59f4211d
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoTrigger update with update-trigger script 89/242989/1
Jeon Sang-Heon [Wed, 2 Sep 2020 17:46:28 +0000 (17:46 +0000)]
Trigger update with update-trigger script

- Until now, local update use update-trigger script to trigger update
- So, some logic(write version, path) will be removed.
- Change method to find proper delta from removeable storage (upg format will be changed)

Change-Id: I45a99e18d84661fc09339ae46d74eb094b5909d7
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoFix wrong dbus conf file 02/240602/1 accepted/tizen/unified/20200810.123107 submit/tizen/20200810.113531 submit/tizen/20200810.133330
Jeon Sang-Heon [Mon, 10 Aug 2020 11:31:03 +0000 (11:31 +0000)]
Fix wrong dbus conf file

- After removing unnecessary priviliege check should be modified to allow

Change-Id: I031b415e69dca8393cff1e467fbc7d878343a907
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoRemove unnecessary priviliege 83/240383/5 submit/tizen/20200807.173049
Jeon Sang-Heon [Thu, 6 Aug 2020 11:57:02 +0000 (11:57 +0000)]
Remove unnecessary priviliege

- Current result member in dbus only used by get_property with result
- With API documentation, get property do not need updatecontrol.admin privilege, so removed it

Change-Id: I1f048f34948d5a128b8ec668663a7dedcf1f01d1
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoFix svace issue 65/240265/9
Jeon Sang-Heon [Wed, 5 Aug 2020 11:18:16 +0000 (11:18 +0000)]
Fix svace issue

- Check file pointer is null
- Initialize curl error enum code
- WGID: 445288

Change-Id: I074f18b48c095dd7d75bc03ce33218ac080ae1c9
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoMove util and dbus manager to common 05/240105/4
Jeon Sang-Heon [Mon, 3 Aug 2020 19:17:26 +0000 (19:17 +0000)]
Move util and dbus manager to common

- Move util and dbus manager to common

Change-Id: Iddfec94e32a8f4cc4de3b89df14828a1a2198878
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoDivide controller to each files 64/239964/17
Jeon Sang-Heon [Fri, 31 Jul 2020 14:05:05 +0000 (14:05 +0000)]
Divide controller to each files

- Divide controller to each files
- If constants uses by only one files, move from header to file
- Minor clean up log tag and message

Change-Id: Ie6ffd4bdbfffb943bb4dde1d92f3d0992af5571f
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoCheck delta more strictly 07/239907/17
Jeon Sang-Heon [Thu, 30 Jul 2020 20:04:24 +0000 (20:04 +0000)]
Check delta more strictly

- Current delta verify only check target's build string
- Check that new version build string matches with delta additionally
- Devide fota delta verify into fota-delta-verifier file
- Minor changes for log

Change-Id: Idfdf4c5b268f060dee0fea9e873242e3cf1d6587
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoMove fota status and info checker into fota directory 06/239906/11
Jeon Sang-Heon [Thu, 30 Jul 2020 16:01:02 +0000 (16:01 +0000)]
Move fota status and info checker into fota directory

- Change some log message to fota related tag
- Move fota related file to fota directory
- Minor change for variable, constant, method name

Change-Id: Ifbe582164919439a1481ecb41a82bfbe11fe7d31
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoModify client controller to prevent unexpected event send 16/239816/14
Jeon Sang-Heon [Wed, 29 Jul 2020 18:19:23 +0000 (18:19 +0000)]
Modify client controller to prevent unexpected event send

- Using stack(before method), may can send plug and unplug event to client at the same time
- So change it to list and if plug and unplug event set at sametime, remove it.

Change-Id: I9dc3a7e56402f15d8a83ab9e72ef2984fad30611
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoClean up method 15/239815/14
Jeon Sang-Heon [Wed, 29 Jul 2020 12:12:56 +0000 (12:12 +0000)]
Clean up method

- Change common client status -> boot status
- Change comment and log message

Change-Id: Ife35a8716c72697579020c1f5ad2ae4a9838ddae
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoAdd recovery client controller 14/239814/11
Jeon Sang-Heon [Tue, 28 Jul 2020 18:47:47 +0000 (18:47 +0000)]
Add recovery client controller

- Move old client controller to common
- Add recovery client controller and fota info controller
- Plug event : key[recovery-plug] value[image path]
- Unplug event : key[recovery-unplug] value[mount path]

Change-Id: I587d33059474b91455b1ba9d6e5196e115aa61c9
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoMove client status checker to common 13/239813/9
Jeon Sang-Heon [Tue, 28 Jul 2020 17:43:16 +0000 (17:43 +0000)]
Move client status checker to common

- client status(booting) is unique, so move to common

Change-Id: I7d2065ac8131696b8717a7eb6fec3a623a2e036b
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoAdd recovery client info checker 12/239812/9
Jeon Sang-Heon [Tue, 28 Jul 2020 16:41:08 +0000 (16:41 +0000)]
Add recovery client info checker

- Move old client info checker to common
- Add recovery client info checker and fota info checker

Change-Id: Ic28daa3af1e4ddf5ef8b67efed623b3d33f4649d
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoAdd recovery storage checker 11/239811/6
Jeon Sang-Heon [Tue, 28 Jul 2020 16:15:53 +0000 (16:15 +0000)]
Add recovery storage checker

- Divide storage checker logic with common, recovery, fota

Change-Id: I10a89ab797551ce9c9650e1fe48d6e9df6d5859b
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoAdd fota unplugged event 10/239810/3
Jeon Sang-Heon [Tue, 28 Jul 2020 14:56:36 +0000 (14:56 +0000)]
Add fota unplugged event

- key : fota-unplug, value : (mount path)

Change-Id: I4f2f52deafa7c16dc5bafdf00c2e8e93bd18e521
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoChange fota storage checker to common 09/239809/2
Jeon Sang-Heon [Mon, 27 Jul 2020 16:16:48 +0000 (16:16 +0000)]
Change fota storage checker to common

- To setup recovery storage checker, modify fota storage checker to common

Change-Id: I2c9c925e05b5552fd2d9456cc4e566616fd30a94
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoFix svace issue 16/239016/1 accepted/tizen/unified/20200722.014900 submit/tizen/20200721.154421
Jeon Sang-Heon [Tue, 21 Jul 2020 14:40:23 +0000 (14:40 +0000)]
Fix svace issue

- WGID : 444432
- Remove null check after dereference Gerror

Change-Id: I1a645a2976149cc80a523eed53634f3ddfb1469f
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoRollback plugin to API 05/238005/1 accepted/tizen/unified/20200713.094510 submit/tizen/20200710.163409
Jeon Sang-Heon [Tue, 7 Jul 2020 17:56:49 +0000 (17:56 +0000)]
Rollback plugin to API

- We need to use plugin except do_update and get_property(result)
- So, rollback plugin to initialize and get_property
- Add deinitialize logic for dbus

Change-Id: I250a308284b5b84edebd424f73f94ee1e497705f
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoChange build id to build string 58/237958/1
Jeon Sang-Heon [Tue, 7 Jul 2020 12:42:05 +0000 (12:42 +0000)]
Change build id to build string

- build id : tizen-unified
- build string : tizen-unified_2020XXXX.X

Change-Id: I151d4260c65e416264f44feb2b15ad70716cc06d
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoFix segmentation fault 56/237956/2
Jeon Sang-Heon [Tue, 7 Jul 2020 11:45:31 +0000 (11:45 +0000)]
Fix segmentation fault

- Fix wrong pointer casting
- From API reference, get property value must be release using free

Change-Id: Ibf8643e497a2a89bc47bd81b598e879f99169bc9
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoFix 64bit build error 48/237848/2 submit/tizen/20200706.154131
Jeon Sang-Heon [Mon, 6 Jul 2020 14:35:05 +0000 (14:35 +0000)]
Fix 64bit build error

- Change value casting to fix 64bit.

Change-Id: I086c0019f8ab23efabe17f390b5ce39b234ed962
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoChange release version to build id 34/237834/2 submit/tizen/20200706.142233
Jeon Sang-Heon [Mon, 6 Jul 2020 13:54:25 +0000 (13:54 +0000)]
Change release version to build id

- Change release version to build id
- Minor fix with variable name and log

Change-Id: I634a5a6f42547fe7c32f081ca1a6e94cfabef720
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoSupport update_control_get_property with result 58/237758/6
Jeon Sang-Heon [Fri, 3 Jul 2020 17:17:42 +0000 (17:17 +0000)]
Support update_control_get_property with result

- Change update_control_initialize to initialize dbus proxy
- Support get_property with result

Change-Id: I54832e11d6f25aa5f898d9d1427ff3ef46ba2364
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoSupport result dbus method 57/237757/6
Jeon Sang-Heon [Fri, 3 Jul 2020 17:10:40 +0000 (17:10 +0000)]
Support result dbus method

- To better manager, divide dbus manager from fota controller
- Support result dbus method
- Minor log message and convention fix

Change-Id: Ia5eee14f9e314113eed0e098382a75a48cb92947
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoSave fota result to fota status checker 56/237756/2
Jeon Sang-Heon [Fri, 3 Jul 2020 17:02:30 +0000 (17:02 +0000)]
Save fota result to fota status checker

- To reuse fota upgrade result, save result to fota status checker

Change-Id: I54b856159d52e5b770973ec10ed146012617bd26
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoAdd client status cleanup method 55/237755/2
Jeon Sang-Heon [Fri, 3 Jul 2020 16:54:40 +0000 (16:54 +0000)]
Add client status cleanup method

- For unexpected finish, add cleanup for vconf status callback at client status checker

Change-Id: I63cc64819ec32ee0c1315b8bfa417fe6f1d86a0f
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoSupport local storage delta directory 54/237754/1
Jeon Sang-Heon [Fri, 3 Jul 2020 16:49:19 +0000 (16:49 +0000)]
Support local storage delta directory

- Support local storage delta directory : (old_version)-(new_version)/delta.tar

Change-Id: I864578a228665eb285f9f6d6971f739b0f93d37c
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoAdd fota info controller 53/237753/1
Jeon Sang-Heon [Fri, 3 Jul 2020 16:44:34 +0000 (16:44 +0000)]
Add fota info controller

- To reduce system info API call, add fota info controller
- replace system info API call to fota info controller method call

Change-Id: I1b9ae904498c89f45582b7f87cdbabafb72bc219
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoUpdate dbus interface 52/237752/1
Jeon Sang-Heon [Fri, 3 Jul 2020 16:28:23 +0000 (16:28 +0000)]
Update dbus interface

- Add result method to dbus
- Check updatecontrol.admin privilige with dbus call

Change-Id: I597d1d713daac408c53411a77c0158806703b1ac
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoFix code to follow tizen coding rule 13/235913/3
Jeon Sang-Heon [Thu, 11 Jun 2020 12:08:58 +0000 (21:08 +0900)]
Fix code to follow tizen coding rule

Change-Id: I6c95c4841f2727be5d796ce2e1f95074f1cd4350
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoFix null file pointer close 27/235627/1 accepted/tizen/unified/20200608.144728 submit/tizen/20200608.031722 submit/tizen/20200608.083617
Jeon Sang-Heon [Mon, 8 Jun 2020 07:22:32 +0000 (16:22 +0900)]
Fix null file pointer close

- If failed to open file at util_file_write_line, it leads to fclose
with null pointer, So it can be lead to segmentation fault
- So fix it with closing null file pointer only file pointer is not null

Change-Id: Ic33b23e6c2fddfad70fd34f12e536d5a25cc69e9
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoEnhance dbus policy 54/235554/3 accepted/tizen/unified/20200607.214822 submit/tizen/20200605.111029
Jeon Sang-Heon [Fri, 5 Jun 2020 10:23:22 +0000 (19:23 +0900)]
Enhance dbus policy

- Allow org.freedesktop.DBus.Properties
- Create proxy once
- Check not support external device

Change-Id: I5cd3ad41ef6d6cee8fee9ecf1cfcd10454938156
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoFix dbus conf policy setting 12/235512/1 accepted/tizen/unified/20200605.171546 submit/tizen/20200605.064336 submit/tizen/20200605.074440
Jeon Sang-Heon [Fri, 5 Jun 2020 06:24:39 +0000 (15:24 +0900)]
Fix dbus conf policy setting

Change-Id: I490de2c95f6c53dafb7ed8899e443102a6c98481
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>