Method and apparatus for managing applications

Through the UID mapping resident program, changing the UID when the application is updated and building a new sandbox environment is solved, which solves the resource access problem caused by UID changes after the application is installed, ensures that the updated application can use old data, and achieves smooth updates and data of resources. reserved.

CN114096946BActive Publication Date: 2024-11-01SAMSUNG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080050231.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-07-10
Filing Date
2020-07-06
Publication Date
2024-11-01
Estimated Expiration
2040-07-06

AI Technical Summary

Technical Problem

After the application is installed, the prior art is difficult to change the user ID (UID), resulting in the inability to maintain the resource status of the old application when updating the application, and the updating application may not be able to use the user data generated by the old application.

Method used

Through the UID mapping resident, determine whether the UID needs to be changed and assign a new UID when needed, building a new sandbox environment so that the updated application can use the resources of the old application.

Benefits of technology

It implements changing the UID when the application is updated without deleting existing user data, ensuring that the update application can use the user data generated previously, and solves the resource access problem caused by UID changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114096946B_ABST
    Figure CN114096946B_ABST
Patent Text Reader

Abstract

An electronic device is disclosed, the electronic device comprising a memory storing a first application running based on a first sandbox environment and a processor connected to the memory. The memory stores instructions, which, when executed, cause the processor to: determine whether a first user identifier (UID) for the first application needs to be changed in response to an application installation request requesting to update the first application to a second application; assign a second UID for the second application using a UID mapping resident program based on the need to change the first UID; and construct a second sandbox environment for the second application to have the second UID and resources included in the first sandbox environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a technology for installing or updating an application in an electronic device. Background Art

[0002] Electronic devices such as smart phones or tablets may include applications that provide various functions or services. The application may be included in the electronic device in a preloaded form and may be downloaded to the electronic device through an application market (e.g., Google Play Store, App Store, etc.).

[0003] Such an application may include a developer signature to prevent the application from being tampered with by a malicious user of the application or replaced by another application. For example, an application installed in an electronic device may be signed using a key of an application developer (e.g., a developer key). When installing or updating an application that is the same as a previously installed application, the electronic device may compare the signature information of the old application with the signature information of the new application, and may allow the new application to be installed only if the signature information of the old application is the same as the signature information of the new application, thereby ensuring the integrity of the application and the security of the electronic device.

[0004] In addition, the electronic device can assign a user ID (UID) of the application to the application installed in the electronic device. In addition, the electronic device can build a sandbox for the application based on the assigned UID. The sandbox can build a resource space. Only the application assigned the UID has the authorization to access the resources of the resource space. Therefore, the electronic device can assign non-repetitive UIDs to the applications installed in the electronic device to protect the resources of each application.

[0005] An electronic device can update an application installed in the electronic device. When updating an application, the updated application having the same UID as the old application can use the resources of the sandbox environment used by the old application. In other words, when the package name, signature key, and UID of the previously installed application and the updated application are identical to each other, the updated application can be updated while maintaining the resources of the old application. Here, the updated application may not be able to maintain the UID used by the old application. For example, due to a policy change of the operating system platform installed in the electronic device, the updated application does not use the previously used UID. However, the UID assigned to the application cannot be changed. Therefore, it is necessary to newly install the application to be updated independently of the old application. In addition, since the newly installed application has a UID different from the UID of the old application, the updated application may not be able to access the sandbox environment used by the old application. Therefore, the updated application may not be able to use the user data generated using the old application.

[0006] The above information is presented as background information only to assist with understanding the present disclosure. No determination has been made, and no assertion is made, as to whether any of the above might be applicable as prior art with respect to the present disclosure. Summary of the invention

[0007] Technical issues

[0008] Embodiments of the present disclosure solve at least the above problems and / or disadvantages and provide at least the advantages described below. Embodiments of the present disclosure provide a method and apparatus for managing an application to change an assigned UID after the application is installed.

[0009] Additional embodiments will be set forth in part in the description which follows and, in part, will be apparent from the description.

[0010] Technical Solution

[0011] According to an example embodiment of the present disclosure, an electronic device is provided. The electronic device may include: a memory storing a first application running based on a first sandbox environment and a processor connected to the memory. The memory stores instructions, which, when executed, cause the processor to: in response to an application installation request requesting to update the first application to a second application, determine whether it is necessary to change the first user identifier (UID) for the first application; based on the need to change the first UID, use the UID mapping resident program to assign a second UID for the second application; and construct a second sandbox environment for the second application to have the second UID and the resources included in the first sandbox environment.

[0012] According to another exemplary embodiment of the present disclosure, a method for updating an application in an electronic device is provided. The method may include: obtaining an application installation request requesting to update a first application running based on a first sandbox environment to a second application; determining, in response to the application installation request, whether a first UID for the first application needs to be changed; assigning a second UID for the second application using a UID mapping resident program based on the need to change the first UID; and constructing a second sandbox environment for the second application to have the second UID and resources included in the first sandbox environment.

[0013] According to another exemplary embodiment of the present disclosure, a storage medium is provided. The storage medium may be a non-transitory computer-readable storage medium that may store a program that, when executed by a processor, causes an electronic device to perform a process, the process comprising: obtaining an application installation request requesting to update a first application running based on a first sandbox environment to a second application; determining, in response to the application installation request, whether a first UID for the first application needs to be changed; assigning a second UID for the second application using a UID mapping resident program based on the need to change the first UID; and constructing a second sandbox environment for the second application to have the second UID and resources included in the first sandbox environment.

[0014] Other aspects, advantages, and salient features of the disclosure will become apparent to those skilled in the art from the following detailed description, which, taken in conjunction with the annexed drawings, discloses various embodiments of the disclosure.

[0015] Advantageous Effects of the Invention

[0016] The user ID (UID) cannot be changed after the application is installed. However, according to the embodiments disclosed in the present disclosure, the electronic device can update the application with another ID.

[0017] When the UID is changed to update the application, the existing application is deleted together with the user data generated before the update, or the updated application does not use the existing user data. However, according to the embodiments disclosed in the present disclosure, the updated application can use the user data generated before the update.

[0018] Furthermore, various effects directly or indirectly determined by the present disclosure can be provided.

[0019] Although the present disclosure has been shown and described with reference to various exemplary embodiments of the present disclosure, it will be understood that the various exemplary embodiments are intended to be illustrative rather than restrictive. Those skilled in the art will further understand that various changes in form and details may be made therein without departing from the true spirit and full scope of the present disclosure including the appended claims and their equivalents. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and other aspects, features and advantages of certain embodiments of the present disclosure will become more apparent from the following detailed description taken in conjunction with the accompanying drawings, in which:

[0021] Figure 1 is a block diagram illustrating an example electronic device in a network environment according to various embodiments;

[0022] Figure 2 is a block diagram illustrating an example procedure according to various embodiments;

[0023] Figure 3 is a block diagram illustrating an example configuration of an example electronic device and an external device communicable with the electronic device according to an embodiment;

[0024] Figure 4 is a diagram showing an example program module of an application for managing an electronic device according to an embodiment;

[0025] Figure 5 is a diagram showing an example method for an application of an electronic device to access a sandbox environment according to an embodiment;

[0026] Figure 6is a block diagram showing an example configuration of an electronic device for managing a user ID (UID) of an application according to an embodiment;

[0027] Figure 7 is a flowchart showing an example process of an electronic device updating an application according to an embodiment;

[0028] Figure 8 is a flowchart illustrating an example process of an electronic device building a sandbox for an updated application according to an embodiment;

[0029] Fig. 9 is a signal flow chart illustrating an example process of component update application of an electronic device according to an embodiment; and

[0030] Fig.10 is a signal flow diagram illustrating an example process of a component update application of an electronic device according to another embodiment.

[0031] Regarding the description of the drawings, the same or similar symbols may be used for the same or similar components. DETAILED DESCRIPTION

[0032] Hereinafter, various exemplary embodiments of the present disclosure may be described with reference to the accompanying drawings. However, it should be understood that this is not intended to limit the present disclosure to a specific implementation form, but rather includes various modifications, equivalents and / or replacements of the embodiments of the present disclosure.

[0033] Figure 1 is a block diagram illustrating an example electronic device 101 in a network environment 100 according to various embodiments. Figure 1In the network environment 100, the electronic device 101 may communicate with the electronic device 102 through the first network 198 (e.g., a short-range wireless communication network), or may communicate with the electronic device 104 or the server 108 through the second network 199 (e.g., a long-range wireless communication network). According to an embodiment, the electronic device 101 may communicate with the electronic device 104 through the server 108. According to an embodiment, the electronic device 101 may include a processor 120, a memory 130, an input device 150, a sound output device 155, a display device 160, an audio module 170, a sensor module 176, an interface 177, a haptic module 179, a camera module 180, a power management module 188, a battery 189, a communication module 190, a subscriber identification module 196, and an antenna module 197. According to some embodiments, at least one of the components of the electronic device 101 (e.g., the display device 160 or the camera module 180) may be omitted, or one or more other components may be added to the electronic device 101. According to some embodiments, some of the above components may be implemented in one integrated circuit. For example, the sensor module 176 (eg, a fingerprint sensor, an iris sensor, or an illumination sensor) may be embedded in the display device 160 (eg, a display).

[0034] The processor 120 may execute, for example, software (e.g., program 140) to control at least one other component (e.g., hardware and / or software component) of the electronic device 101 connected to the processor 120, and may process or calculate various data. According to an embodiment, as part of data processing or operation, the processor 120 may load a command set or data received from other components (e.g., sensor module 176 or communication module 190) into the volatile memory 132, may process the command or data loaded into the volatile memory 132, and may store the resultant data in the non-volatile memory 134. According to an embodiment, the processor 120 may include a main processor 121 (e.g., a central processing unit or an application processor) and an auxiliary processor 123 (e.g., a graphics processing device, an image signal processor, a sensor hub processor, or a communication processor), the auxiliary processor 123 operating independently of the main processor 121 or operating together with the main processor 121. Additionally or alternatively, the auxiliary processor 123 may use less power than the main processor 121, or be assigned a designated function. The auxiliary processor 123 may be implemented separately from the main processor 121 or as a part of the main processor 121 .

[0035] The auxiliary processor 123 may control at least some of the functions or states associated with at least one component (e.g., display device 160, sensor module 176, or communication module 190) among the components of the electronic device 101, for example, instead of the main processor 121 when the main processor 121 is in an inactive (e.g., sleep) state, or together with the main processor 121 when the main processor 121 is in an active (e.g., application execution) state. According to an embodiment, the auxiliary processor 123 (e.g., an image signal processor or a communication processor) may be implemented as a part of another component (e.g., camera module 180 or communication module 190) that is functionally related to the auxiliary processor 123.

[0036] The memory 130 may store various data used by at least one component of the electronic device 101 (e.g., the processor 120 or the sensor module 176). For example, the data may include software (e.g., the program 140) and input data or output data about commands associated with the software. The memory 130 may include a volatile memory 132 or a non-volatile memory 134.

[0037] The program 140 may be stored as software in the memory 130 , and may include, for example, an operating system 142 , middleware 144 , or an application 146 .

[0038] The input device 150 may receive a command or data for a component (e.g., processor 120) of the electronic device 101 from outside (e.g., a user) of the electronic device 101. The input device 150 may include, for example, a microphone, a mouse, a keyboard, or a digital pen (e.g., a stylus).

[0039] The sound output device 155 can output a sound signal to the outside of the electronic device 101. The sound output device 155 may include, for example, a speaker or a receiver. The speaker may be used for general purposes such as multimedia playback or recording playback, and the receiver may be used to receive calls. Depending on the embodiment, the receiver and the speaker may be implemented integrally or separately.

[0040] The display device 160 can visually provide information to the outside of the electronic device 101 (e.g., a user). For example, the display device 160 may include a display, a holographic device, or a projector and a control circuit for controlling the corresponding device. According to an embodiment, the display device 160 may include a touch circuit configured to sense a touch or a sensor circuit (e.g., a pressure sensor) for measuring the intensity of pressure on the touch.

[0041] The audio module 170 can bidirectionally convert sound and electrical signals. According to an embodiment, the audio module 170 can obtain sound through the input device 150, or can output sound through the sound output device 155 or through an external electronic device (e.g., electronic device 102 (e.g., speaker or earphone)) directly or wirelessly connected to the electronic device 101.

[0042] The sensor module 176 may generate an electrical signal or data value corresponding to an environmental state (e.g., user state) external to the electronic device 101 or an internal operating state (e.g., power, temperature). According to an embodiment, the sensor module 176 may include, for example, a gesture sensor, a gyro sensor, an atmospheric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an infrared sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illumination sensor.

[0043] The interface 177 may support one or more specified protocols to allow the electronic device 101 to be directly or wirelessly connected to an external electronic device (e.g., the electronic device 102). According to an embodiment, the interface 177 may include, for example, an HDMI (High Definition Multimedia Interface), a USB (Universal Serial Bus) interface, an SD card interface, or an audio interface.

[0044] The connection end 178 may include a connector that physically connects the electronic device 101 to an external electronic device (e.g., the electronic device 102). According to an embodiment, the connection end 178 may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).

[0045] The haptic module 179 may convert the electrical signal into mechanical stimulation (eg, vibration or movement) or electrical stimulation that the user senses through touch or motion. According to an embodiment, the haptic module 179 may include, for example, at least one of a motor, a piezoelectric element, an electrical simulator, or the like.

[0046] The camera module 180 may capture still images or video images. According to an embodiment, the camera module 180 may include, for example, at least one or more lenses, an image sensor, an image signal processor, or a flash.

[0047] The power management module 188 may manage power supplied to the electronic device 101. According to an embodiment, the power management module 188 may be implemented as at least a part of a power management integrated circuit (PMIC).

[0048] The battery 189 may supply power to at least one component of the electronic device 101. According to an embodiment, the battery 189 may include, for example, a non-rechargeable (primary) battery, a rechargeable (secondary) battery, or a fuel cell.

[0049] The communication module 190 can establish a direct (e.g., wired) or wireless communication channel between the electronic device 101 and an external electronic device (e.g., electronic device 102, electronic device 104, or server 108), and support communication execution through the established communication channel. The communication module 190 may include at least one communication processor that operates independently of the processor 120 (e.g., application processor) and supports direct (e.g., wired) communication or wireless communication. According to an embodiment, the communication module 190 may include a wireless communication module 192 (e.g., a cellular communication module, a short-range wireless communication module, or a GNSS (Global Navigation Satellite System) communication module) or a wired communication module 194 (e.g., a LAN (local area network) communication module or a power line communication module). The corresponding communication module among the above communication modules can communicate with the external electronic device 104 through a first network 198 (e.g., a short-range communication network such as Bluetooth, Wi-Fi Direct or IrDA (Infrared Data Association)) or a second network 199 (e.g., a long-range wireless communication network such as a cellular network, the Internet, or a computer network (e.g., LAN or WAN)). The various communication modules described above may be implemented as one component (e.g., a single chip), or may be implemented as separate components (e.g., multiple chips). The wireless communication module 192 may identify and authenticate the electronic device 101 in a communication network such as the first network 198 or the second network 199 using user information (e.g., International Mobile Subscriber Identity (IMSI)) stored in the subscriber identification module 196.

[0050] The antenna module 197 may send a signal or power to the outside of the electronic device 101 (e.g., an external electronic device), or receive a signal or power from the outside of the electronic device 101 (e.g., an external electronic device). According to an embodiment, the antenna module 197 may include an antenna, the antenna including a radiating element, and the radiating element including a conductive pattern or conductive material formed in or on a substrate (e.g., a PCB). According to an embodiment, the antenna module 197 may include a plurality of antennas. In such a case, at least one antenna suitable for a communication scheme used in a communication network such as the first network 198 or the second network 199 may be selected from the plurality of antennas, for example, by the communication module 190. Then, a signal or power may be sent or received between the communication module 190 and the external electronic device via the selected at least one antenna. According to an embodiment, another component (e.g., a radio frequency integrated circuit (RFIC)) in addition to the radiating element may be additionally formed as part of the antenna module 197.

[0051] At least some of the components may be connected to each other via a communication method used between peripheral devices (e.g., a bus, GPIO (General Purpose Input and Output), SPI (Serial Peripheral Interface), or MIPI (Mobile Industry Processor Interface)) to exchange signals (e.g., commands or data) with each other.

[0052] According to an embodiment, a command or data may be sent or received between the electronic device 101 and the external electronic device 104 by a server 108 connected to the second network 199. Each of the electronic devices 102 and 104 may be of the same type or of a different type as the electronic device 101. According to an embodiment, all or some of the operations performed by the electronic device 101 may be performed by one or more external electronic devices among the external electronic devices 102, 104 or 108. For example, when the electronic device 101 automatically or by a request from a user or another device performs some functions or services, in addition to or in place of performing the functions or services by itself, the electronic device 101 may request one or more external electronic devices to perform at least some of the functions related to the functions or services. The one or more external electronic devices receiving the request may perform at least a portion of the requested functions or services or additional functions or services associated with the request, and send the execution result to the electronic device 101. The electronic device 101 may provide the result as is, or provide the result after additional processing, as at least a portion of the response to the request. For this, for example, cloud computing, distributed computing or client-server computing technology may be used.

[0053] Figure 2 is a block diagram 200 illustrating an example procedure in accordance with various embodiments.

[0054] According to an embodiment, the program 140 may include a program for controlling an electronic device (e.g., Figure 1 The operating system 142, middleware 144, and applications 146 executable by the operating system 142 of one or more resources of the electronic device 101 of the embodiment of the present invention can include, for example, Android TM 、iOS TM , Windows TM , Symbian TM 、Tizen TM or Bada TM For example, at least a portion of the program 140 may be preloaded on the electronic device 101 when the electronic device 101 is manufactured, or may be downloaded from an external electronic device (eg, Figure 1 electronic device 102 or 104 or server 108) to download and update.

[0055] The operating system 142 may control to manage (e.g., allocate or collect) one or more system resources (e.g., processes, memory, or power) of the electronic device 101. Additionally or alternatively, the operating system 142 may include another hardware device (e.g., Figure 1 The operating system 142 may include one or more driver programs for the input device 150, the sound output device 155, the display device 160, the audio module 170, the sensor module 176, the interface 177, the tactile module 179, the camera module 180, the power management module 188, the battery 189, the communication module 190, the subscriber identification module 196 or the antenna module 197 of the electronic device 101. The operating system 142 may include a kernel 290 for managing one or more system resources of the electronic device 101. The kernel 290 may be compared with a shell located at the outermost part of the operating system 142 to process user commands. The service of the kernel 290 may be requested through another part of the operating system 142 or a series of program interfaces called system paging. The kernel 290 may include, for example, a system resource manager 291 or a device driver 293. The system resource manager 291 may perform control, allocation, retrieval, etc. of system resources. According to an embodiment, the system resource manager 291 may include a process management unit, a memory management unit, a file system management unit, etc. The device driver 293 may include, for example, a display driver, a camera driver, a Bluetooth driver, a shared memory driver, a USB driver, a keypad driver, a Wi-Fi driver, an audio driver, or an inter-process communication (IPC) driver.

[0056] The middleware 144 may provide various functions for the application 146 via an application programming interface (API) 145 so that functions or information provided from one or more resources of the electronic device 101 may be used by the application 146. The middleware 144 may include, for example, an application manager 201, a window manager 203, a multimedia manager 205, a resource manager 207, a power manager 209, a database manager 211, a package manager 213, a connectivity manager 215, a notification manager 217, a location manager 219, a graphics manager 221, a security manager 223, a telephony manager 225, or a speech recognition manager 227.

[0057] The application manager 201 may manage, for example, the life cycle of the application 146. The window manager 203 may manage, for example, one or more graphical user interface (GUI) resources used on the screen. The multimedia manager 205 may identify, for example, one or more formats required to play a media file, and may encode or decode a corresponding media file among the media files using a codec suitable for a format selected among the one or more formats. The resource manager 207 may manage, for example, Figure 1The power manager 209 may manage, for example, the capacity, temperature, or power of the battery 189, and may use corresponding information among the capacity, temperature, or power of the battery 189 to determine or provide information associated with the operation of the electronic device 101. According to an embodiment, the power manager 209 may interwork with a basic input / output system (BIOS) (not shown) of the electronic device 101.

[0058] The database manager 211 may generate, search or modify, for example, a database to be used by the application 146. The package manager 213 may manage the installation or update of, for example, an application distributed in the form of a package file. The connectivity manager 215 may manage, for example, a wireless connection or a direct connection between the electronic device 101 and an external electronic device. The notification manager 217 may provide, for example, a function for notifying a user of the occurrence of a specified event (e.g., an incoming call, a message, or an alarm). The location manager 219 may manage, for example, location information of the electronic device 101. The graphic manager 221 may manage, for example, one or more graphic effects to be provided to the user, or may manage a UI associated with the graphic effect.

[0059] The security manager 223 can provide, for example, system security or user authentication. The phone manager 225 can manage, for example, voice or video call functions provided by the electronic device 101. The voice recognition manager 227 can, for example, send the user's voice data to the server 108, and can receive commands corresponding to functions to be performed in the electronic device 101 based at least in part on the voice data from the server 108 or at least in part on text data converted from the voice data. According to an embodiment, the middleware 144 can dynamically exclude some existing components or can further include new components. According to an embodiment, at least a portion of the middleware 144 can be included as part of the operating system 142 or can be implemented as separate software different from the operating system 142.

[0060] According to an embodiment, the middleware 144 may include a runtime library (not shown). The runtime library may include, for example, a library module used by a compiler to add new functions through a programming language when the application 146 is being executed. The runtime library may perform input / output management, memory management, capabilities regarding arithmetic functions, etc.

[0061] API 145 may be, for example, a set of programming functions and may be configured according to the operating system. TM or iOS TM In the case of Tizen, it can provide one API set for each platform. TM In some cases, it may provide two or more API sets for each platform.

[0062] Application 146 may include, for example, a home application 251, a dialer application 253, an SMS / MMS application 255, an instant messaging (IM) application 257, a browser application 259, a camera application 261, an alarm application 263, a contact application 265, a voice recognition application 267, an email application 269, a calendar application 271, a media player application 273, an album application 275, a watch application 277, a health application 279 (e.g., an application for measuring biometric information such as exercise volume or blood sugar), or an environmental information application 281 (e.g., an application for measuring information about atmospheric pressure, humidity, or temperature). According to an embodiment, application 146 may also include an information exchange application (not shown) capable of supporting information exchange between electronic device 101 and an external electronic device. The information exchange application may include, for example, a notification relay application configured to send specified information (e.g., a call, message, or alarm) to an external electronic device or a device management application configured to manage an external electronic device. For example, the notification relay application may send notification information corresponding to a specified event (e.g., mail reception) occurring in another application (e.g., email application 269) of electronic device 101 to an external electronic device. Additionally or alternatively, the notification relay application may receive notification information from the external electronic device and may provide the received notification information to a user of electronic device 101.

[0063] For example, the device management application may control the power of an external electronic device communicating with the electronic device 101 (e.g., turning the power on / off) and the power of each of some components of the electronic device 101 (e.g., the display device 160 or the camera module 180), or may control the function (e.g., brightness, resolution, or focal length) of each of some components of the electronic device 101 (e.g., the display device 160 or the camera module 180). Additionally or alternatively, the device management application may support the installation, deletion, or update of an application running on the external electronic device.

[0064] Figure 3 is a diagram showing an example electronic device (eg, Figure 1 The electronic device 101) and an example external device 310 (eg, Figure 1 Block diagram 300 of an example configuration of an electronic device 102, electronic device 104, or server 108).

[0065] According to an embodiment, the electronic device may include a processor (e.g., including a processing circuit) 120, a memory 130, and a communication module (e.g., including a communication circuit) 190. The electronic device may download an application from an external device 310 via the communication module 190. For example, in a state where a first application 301 is installed in the memory 130 of the electronic device, the electronic device may download data from the external device 310 to update the first application 301 to a second application 302.

[0066] According to an embodiment, the external device 310 may be a server that is connectable with an external device through a network and distributes applications. For example, the external device 310 may include an application market server that distributes applications available for electronic devices.

[0067] According to another embodiment, the external device 310 may be a user device that is connectable to the electronic device via a network. For example, the user device may include a desktop or laptop PC. The user device may be connected to an application distribution server via a network, and may obtain an application from the application distribution server. When the electronic device is connected to the user device, the user device may send the obtained application to the electronic device.

[0068] According to an embodiment, the first application 301 stored in the memory 130 may be installed when the electronic device is manufactured. The electronic device may obtain the first application 301 from the outside to store the first application 301 in the memory 130. The second application 302 may be a new application downloaded and installed from the external device 310. The electronic device may compare the list of applications stored in the electronic device from the external device 310 and the version information of each application with the version information of the application provided from the external device 310. When another version of an application different from the version of an application having the same identification information (e.g., an application package name such as Facebook, Chrome, or Google Maps) exists in the external device 310, the electronic device may download the other version of the application from the external device 310. In various example embodiments disclosed herein, the first application 301 may be described as, or refer to, for example, an old version of an application installed in the electronic device, and the second application 302 may be described as a new version of an application having the same identification information as the first application 301.

[0069] According to an embodiment, the first application 301 can be electronically signed using a first signature key or a simple first key to provide to the electronic device. Information about the first key may be included in a file included in the installation package of the first application 301 (e.g., a CERT.RSA file included in the application package of the Android operating system).

[0070] The second application 302 may be electronically signed using a second signature key or a simple second key to provide to the electronic device. The processor 120 may compare the information (or file) about the second key included in the second application 302 with the information (or file) about the first key. When the first key and the second key are identical to each other, the processor 120 may update the first application 301 to the second application 302. For example, the processor 120 may delete the first application 301 and may install the second application 302. For another example, the processor 120 may patch some files of the first application 301 using the files of the second application 302. For another example, the processor 120 may add data to the first application 301 using the files of the second application 302. In other words, the processor 120 may replace at least a portion of the first application 301 with at least a portion of the second application 302. For example, the processor 120 may replace some or all of the configurations (files and / or folders) of the application package with the configuration of the package of the new application. In the following, the configuration referred to as the first key or the second key may be various types of signature information for authenticating the developer of the application.

[0071] In addition, according to an embodiment, the first application 301 may have a first user ID (UID) assigned according to a policy of an operating system installed in the electronic device. The electronic device may build a first sandbox environment accessible to the first application 301 based on the first UID. When the first application 301 is updated to the second application 302, the electronic device may determine whether the second application 302 can have the first UID. For example, when a shared ID is assigned to the first application 301 and when a shared UID cannot be assigned due to a policy change of the operating system, the electronic device may determine that the first UID needs to be changed to a second UID that is a normal UID.

[0072] Combination Figure 3 , various components can be added or modified. For example, Figure 1 The various modules, interfaces, sensors, etc. shown can be added to Figure 3 Or you can use Figure 3 Replacement of components. Figure 3 and another embodiment described is applicable to Figure 1 or Figure 2 Related content. Similarly, combined Figure 1 or Figure 2 The content described is applicable to Figures 3 to 10 Description.

[0073] Figure 4 is a diagram showing a method for managing an electronic device (e.g., Figure 1 Schematic diagram of an example program module 400 of an application of an electronic device 101).

[0074] According to an embodiment, the program module 400 may be configured to include an application 410 , an application framework 420 , a library 430 , and a kernel layer 440 . Figure 4 The program module 400 shown in FIG. 4 shows an example program module using an operating system according to an embodiment and is not limited to a specific operating system. Operations associated with the program module 400 may be performed by a processor (e.g., Figure 1 The processor 120 or Figure 3 In addition, the embodiments of the electronic device disclosed in the present disclosure may be configured to be applicable to another operating system (e.g., Tizen TM 、iOS TM , Windows TM wait).

[0075] The package manager 421 and the UID manager 422 according to the embodiment may be implemented in the application framework 420. The package manager 421 may manage the installation of application packages and applications. For example, the package manager 421 may identify the package name of the installed application package. In addition, the package manager 421 may identify whether an application to be installed having the same package name is installed in the electronic device. The package name may be included in the identification information of the application. The package manager 421 may determine whether the UI of the application needs to be changed. When it is determined that a change in the UID is requested, the package manager 421 may pass a UID change request to the UID manager 422.

[0076] The UID manager 422 according to the embodiment can flexibly manage the UID of the application. In response to the UID change request of the package manager 421, the UID manager 422 can assign a UID to the application or change the UID assigned to the application. In addition, when the UID is assigned to the application or when the assigned UID is changed, the UID manager 422 can request the kernel 440 to build a sandbox based on the newly assigned UID.

[0077] When the UID assigned to the application is changed, the UID manager 422 according to an embodiment may obtain resource information about one or more resources included in the first sandbox that is accessible based on the UID before the change. According to an embodiment, the resources included in the sandbox may refer to, for example, resources included in the application package of the application. In addition, the UID manager 422 may request the kernel 440 to build a second sandbox having one or more resources included in the first sandbox based on the obtained resource information. The kernel 440 may build a second sandbox that is accessible using the changed UID and has one or more resources included in the first sandbox in response to the request of the UID manager 422.

[0078] Figure 5 is a diagram showing an electronic device (eg, Figure 1101) is an example method for an application of an electronic device 101 to access a sandbox environment. For example, Figure 5 An example is shown in which an A application 510 , a B application 520 , and a C application 530 are installed in an electronic device.

[0079] In principle, the UIDs assigned to applications by electronic devices are not repeated. Here, as an exception, when resources need to be shared between applications, the same UI can be assigned to two or more applications using a shared UID. TM An example of an operating system, where two or more applications can be electronically signed and provided using the same signing key, and the same shared UID can be set through AndroidManifest.xml to install the applications.

[0080] In the present disclosure, the same signature key may include belonging to a signature key group (a group for managing signature keys) to which the first signature key and the second signature key belong and when the signature keys themselves are completely identical.

[0081] Reference Figure 5 , the A application 510 and the B application 520 are electronically signed and provided using the same signature key, and 2000 as a shared UID is assigned to the A application 510 and the B application 520. Therefore, the A application 510 and the B application 520 can share resources included in the same sandbox 511.

[0082] In contrast, 10001 as a normal UID is assigned to C application 530. C application 530 can access resources of sandbox 531 configured based on 10001 as a normal UID, but may not access resources of sandbox 511 having a UID of 2000.

[0083] Figure 6 is an electronic device (eg, Figure 1 Block diagram 600 of an example configuration of an electronic device 101).

[0084] The electronic device according to the embodiment may be configured to include a package manager 610, a UID manager 620, and a kernel 630. The package manager 610 may manage information about applications installed in the electronic device. When installing or deleting an application from the electronic device, the package manager 610 may register or delete information about the application. According to the embodiment, the package manager 610 may store information about the application in a memory (e.g., Figure 1 Memory 130 or Figure 3The package manager 610 stores information about each application separately for each package name of the application package in the memory 130 of the electronic device. The information of the application may include, for example, at least one of an app code path, a UID, signature information, and available authorization information. When the package manager 610 should change the UID when updating an application installed in the electronic device, it may transmit a UID change request to the UID manager 620.

[0085] The UID manager 620 according to an embodiment may include a UID mapping resident program (e.g., a daemon), an APK resource center 623, and a sandbox rebuilder 625. When receiving a UID change request for an updated application from the package manager 610, the UID manager 620 may pass a sandbox rebuild request to the kernel 630 to assign a new UID to the application and build a sandbox based on the assigned UID.

[0086] The UID mapping resident program 621 may assign a new UID to an application in response to a UID change request received from the package manager 610. The UID mapping resident program 621 may manage the UID list so that duplication and interference do not occur between UIDs assigned to applications.

[0087] The APK resource center 623 may obtain resource information about resources included in the sandbox of the previously installed application package. Using the resource information obtained by the APK resource center 623, the resources included in the previously built sandbox may be moved to the newly built sandbox.

[0088] The sandbox rebuilder 625 may deliver the UID newly allocated by the UID mapping resident program 621 and the resource information obtained by the APK resource center 623 to the kernel 630. Therefore, the kernel 630 may build a new sandbox to move the resources included in the sandbox of the old application to the newly built sandbox.

[0089] The kernel 630 may be the lowest level software forming the platform. The kernel 630 may apply the location of the installed application, the resource directory, and the sandbox policy. The kernel 630 may build an accessible sandbox based on the UID assigned to the application in response to a sandbox rebuild request. In addition, the kernel 630 may store resources in the sandbox in response to a request from the package manager 610 or the UID manager 620.

[0090] Figure 7 is a diagram showing an electronic device (eg, Figure 1 Flowchart 700 of an example process for updating an application of an electronic device 101).

[0091] In operation 710, the electronic device according to the embodiment may obtain an application installation request associated with the first application. The application installation request associated with the first application may be a request to update the first application to a second application. For example, the electronic device may update at least one application stored in the electronic device with an application from an external device (e.g., Figure 1 Electronic equipment 102, Figure 1 Electronic equipment 104, Figure 1 Server 108, or Figure 3 When there is a second application that has the same identification as the first application (e.g., the same application package name) and has a different version than the first application, the electronic device may generate an application installation request to update the first application to the second application. For another example, the electronic device may receive a request from an external device (e.g., Figure 1 Electronic equipment 102, Figure 1 Electronic equipment 104, Figure 1 Server 108 or Figure 3 For example, the electronic device may receive an application installation request via an output device of the electronic device (e.g., Figure 1 The electronic device 160, the sound output device 155 or the touch module 179) outputs information to receive a user input from a user for generating an application installation request. According to an embodiment, the first application can be executed using resources allocated to the first sandbox environment. In the present disclosure, the expression of generating an application installation request may include when the electronic device itself generates the application installation request or when the electronic device receives the application installation request from the outside.

[0092] In operation 720, the electronic device may determine whether the first UID of the first application needs to be changed. According to an embodiment, the electronic device may identify the first UID of the first application and may determine whether the first UID may be assigned to an application newly installed in the electronic device.

[0093] When the first UID needs to be changed ("Yes" in operation 720) (for example, when the first UID cannot be assigned to the application newly installed in the electronic device), in operation 730, the electronic device can assign the second UID to the application to be installed. For example, when the first application is installed, a shared UID can be assigned according to the policy of the platform installed in the electronic device, but the shared UID cannot be assigned depending on the change of the policy. In this case, the updated second application may not be able to use the shared UID. Therefore, the electronic device can assign a normal UID to the second application.

[0094] In operation 740, the electronic device may construct a second sandbox environment with a second UID. In other words, the electronic device may construct a second sandbox environment accessible to a second application with a second UID. However, when the second application is simply run based on the newly constructed second sandbox environment, the resources used by the first application may not be available. For example, since the user data (e.g., user account, document file, or environment settings of the application) generated by user input when the first application is running cannot be used by the second application, the inconvenience that the user should generate the user data again using the second application may occur. Therefore, the electronic device may construct a second sandbox environment so that the second sandbox environment has the resources included in the first sandbox environment.

[0095] When the second sandbox environment is constructed in operation 740 , the electronic device may complete installation of the second application based on the second UID and the second sandbox environment in operation 750 .

[0096] When it is determined in operation 720 that the first UID does not need to be changed (“No” in operation 720 ), in operation 750 , the electronic device may complete the installation of the second application based on the first UID and the first sandbox environment.

[0097] Figure 8 is a diagram showing an electronic device (eg, Figure 1 An example process of constructing a sandbox for an updated application (eg, Figure 7 800 of operations 720, 730, and 740).

[0098] In operation 810, the electronic device according to the embodiment may determine whether a first application having the same package name as the second application for which an application installation request has occurred is installed in the electronic device. Here, the package name may describe the embodiment, but is not limited thereto. In other words, the electronic device may search for a first application having identification information that matches the identification information of the second application to be installed.

[0099] When an application matching the second application to be installed is not installed in the electronic device, the electronic device may install the second application as a new application.

[0100] When a first application having the same package name as a second application for which an application installation request has occurred is found ("Yes" in operation 810), the electronic device may determine in operation 820 whether the signature keys of the first application and the second application are the same as each other. For example, the electronic device may obtain signature information included in the first application to identify the signature key of the first application. The electronic device may identify whether information corresponding to the signature key is included in the second application. When the second application is not authenticated based on the signature key of the first application, the electronic device may not be able to replace the first application to install the second application. On the other hand, when the second application is authenticated based on the signature key of the first application, the electronic device may replace the first application to install the second application. In other words, the electronic device may update the first application to the second application.

[0101] When it is desired to install the second application in place of the first application, the electronic device may determine in operation 830 whether the first UID assigned to the first application is the same as the second UID to be assigned to the second application.

[0102] When the first UID is different from the second UID to be assigned to the second application, the electronic device may construct a second sandbox environment to include resources included in the first sandbox environment of the first application in operation 840. When the first UID and the second UID are identical to each other, since the electronic device assigns the first UID to the second application so that the second application can access resources included in the first sandbox environment, the electronic device may not be able to construct a new sandbox environment.

[0103] Fig. 9 is a diagram showing an electronic device (eg, Figure 1 Signal flow diagram 900 of an example process of updating an application of a component of an electronic device 101).

[0104] In operation 901, the package manager 610 may receive an application installation request requesting installation of a second application. In operation 903, the package manager 610 may compare the second application with at least one application installed in the electronic device in response to the application installation request. The package manager 610 may determine whether to update the first application installed in the electronic device to the second application based on the comparison result, and may determine whether the UID assigned to the first application needs to be changed.

[0105] When it is determined that the UID needs to be changed, in operation 905, the package manager 610 may transmit a UID change request to the UID mapping resident program 621 of the UID manager 620. In response to the UID change request, the UID mapping resident program 621 may reallocate the UID in operation 907. In other words, the UID mapping resident program 621 may allocate a second UID to replace the first UID allocated to the first application.

[0106] In operation 909, the UID mapping resident 621 may deliver a UID reallocation notification to notify the sandbox rebuilder 625 that the UID is reallocated to the sandbox rebuilder 625. In operation 911, the sandbox rebuilder 625 may deliver a sandbox rebuild request to the kernel 630 requesting the kernel 630 to build a new sandbox in response to the UID reallocation notification.

[0107] In response to the sandbox rebuild request, the kernel 630 may build a new sandbox in operation 913. To build the new sandbox, the kernel 630 may transmit a sandbox build completion notification for the built new sandbox to the sandbox rebuilder 625 in operation 915. Here, resources previously included in the sandbox of the first application may not be included in the sandbox generated by the kernel 630.

[0108] In operation 917, the sandbox rebuilder 625 may pass an application resource request requesting resource information for the first application (e.g., information for identifying resources included in the first sandbox environment) to the APK resource center 623. In operation 919, the sandbox rebuilder 625 may receive resource information about the first application in response to the application resource request. In operation 921, the sandbox rebuilder 625 may pass the obtained resource information to the kernel 630. In operation 923, the kernel 630 may store the resource information sent from the sandbox rebuilder 625 in the new sandbox so that applications that can access the new sandbox can use the resources included in the resource information.

[0109] The resource information is stored in the sandbox, and in operation 925, the kernel 630 may deliver a sandbox building completion notification to the sandbox rebuilder 625. Upon receiving the sandbox building completion notification, in operation 927, the sandbox rebuilder 625 may deliver an application installation completion notification to the package manager 610.

[0110] Fig.10 FIG. 2 is a diagram showing an electronic device (eg, Figure 1 Signal flow diagram 1000 of an example process of updating an application of an electronic device 101).

[0111] In operation 1001, the package manager 610 may receive an application installation request requesting installation of a second application. In operation 1003, the package manager 610 may compare the second application with at least one application installed in the electronic device in response to the application installation request. The package manager 610 may determine whether to update the first application installed in the electronic device to the second application based on the result of the comparison, and may determine whether the UID assigned to the first application needs to be changed.

[0112] When it is determined that the UID needs to be changed, the package manager 610 may transmit a UID change request to the UID mapping resident program 621 of the UID manager 620 in operation 1005. In response to the UID change request, the UID mapping resident program 621 may reallocate the UID in operation 1007. In other words, the UID mapping resident program 621 may allocate a second UID to replace the first UID allocated to the first application. In operation 1009, the UID mapping resident program 621 may transmit a UID reallocation notification to the sandbox rebuilder 625 for notifying the sandbox rebuilder 625 that the UID is reallocated.

[0113] In operation 1011, the sandbox rebuilder 625 may transmit an application resource request requesting resource information about the first application to the APK resource center 623. In operation 1013, the sandbox rebuilder 625 may receive resource information about the first application from the APK resource center 623 in response to the application resource request.

[0114] In operation 1015, the sandbox rebuilder 625 may transmit a sandbox rebuild request including resource information about the first application to the kernel 630. In response to the sandbox rebuild request, in operation 1017, the kernel 630 may build a new sandbox including resources used by the first application and accessible based on the second UID, and store the resource information.

[0115] The new sandbox is built. In operation 1019, the kernel 630 may transmit a sandbox building completion notification to the sandbox rebuilder 625. After receiving the sandbox building completion notification, in operation 1021, the sandbox rebuilder 625 may transmit an application installation completion notification to the package manager 610.

[0116] The electronic devices according to various example embodiments disclosed in the present disclosure may be various types of devices. The electronic devices may include, for example, portable communication devices (e.g., smart phones), computer devices, portable multimedia devices, mobile medical devices, cameras, wearable devices, household appliances, etc. The electronic devices according to the embodiments of the present disclosure should not be limited to the above devices.

[0117] It should be understood that the various embodiments of the present disclosure and the terms used in the embodiments are not intended to limit the technical features disclosed in the present disclosure to the specific embodiments disclosed herein; on the contrary, the present disclosure should be understood to cover various modifications, equivalents or alternatives of the embodiments of the present disclosure. With respect to the description of the drawings, the same or related components may be assigned the same reference numerals. As used herein, the singular form of the noun corresponding to an item may include one or more items, unless the context clearly indicates otherwise. In the present disclosure disclosed herein, each of the expressions "A or B", "at least one of A and B", "at least one of A or B", "A, B or C", "one or more of A, B and C" or "one or more of A, B or C" etc. used herein may include any or all possible combinations of one or more of the associated listed items. Expressions such as "first", "second", "the first" and "the second" may be used only for the purpose of distinguishing a component from other components, without limiting the corresponding components in other aspects (e.g., importance or order). It will be understood that if an element (e.g., a first element) is referred to as being “coupled with another element (e.g., a second element)”, “coupled to another element (e.g., the second element)”, “connected with another element (e.g., the second element)”, or “connected to another element (e.g., the second element)” with or without the term “operably” or “communicatively”, the element may be coupled to the other elements directly (e.g., by wire), wirelessly, or via a third element.

[0118] The term "module" used in the present disclosure may include a unit implemented in hardware, software or firmware, and may be used interchangeably with the terms "logic", "logic block", "component" or "circuit". A "module" may be the smallest unit of an integrated component, or may be a part thereof. A "module" may be the smallest unit for performing one or more functions or a part thereof. For example, according to an embodiment, a "module" may include an application specific integrated circuit (ASIC).

[0119] Various embodiments of the present disclosure may be implemented by software (e.g., program 140), which includes instructions stored in a machine-readable storage medium (e.g., internal memory 136 or external memory 138) readable by a machine (e.g., electronic device 101). For example, a processor (e.g., processor 120) of a machine (e.g., electronic device 101) may call instructions from a machine-readable storage medium and execute the instructions so called. The machine may perform at least one function based on at least one instruction called. One or more instructions may include code generated by a compiler or code executable by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, a "non-transitory" storage medium is tangible, but may not include a signal (e.g., an electromagnetic wave). The term "non-transitory" does not distinguish between a case where data is permanently stored in a storage medium and a case where data is temporarily stored in a storage medium.

[0120] According to an embodiment, the method according to various embodiments disclosed in the present disclosure may be provided as part of a computer program product. The computer program product may be traded between a seller and a buyer as a product. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., a compact disk read-only memory (CD-ROM)), or may be downloaded through an application store (e.g., Play Store TM ) or directly distributed online (e.g., downloaded or uploaded) between two user devices (e.g., smart phones). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or generated in a machine-readable storage medium, such as a memory of a manufacturer's server, a server of an application store, or a relay server.

[0121] According to various embodiments, each component (e.g., module or program) in the above-mentioned components may include one or more entities. According to various embodiments, at least one or more components in the above-mentioned components or operations may be omitted, or one or more components or operations may be added. Alternatively or additionally, some components (e.g., modules or programs) may be integrated into one component. In such a case, the integrated components may perform the same or similar functions performed by each corresponding component before integration. According to various embodiments, the operations performed by modules, programming or other components may be performed sequentially, in parallel, repeatedly or in a heuristic manner, or at least some operations may be performed or omitted in a different order, or other operations may be added.

[0122] The user ID (UID) may not be changed after the application is installed. However, according to an embodiment disclosed in the present disclosure, the electronic device may update the application to have another ID.

[0123] When the UID is changed to update the application, the existing application is deleted together with the user data generated before the update, or the updated application does not use the existing user data. However, according to the embodiments disclosed in the present disclosure, the updated application can use the user data generated before the update.

[0124] Furthermore, various effects directly or indirectly determined by the present disclosure can be provided.

[0125] Although the present disclosure has been shown and described with reference to various exemplary embodiments of the present disclosure, it will be understood that the various exemplary embodiments are intended to be illustrative rather than restrictive. Those skilled in the art will further understand that various changes in form and details may be made therein without departing from the true spirit and full scope of the present disclosure including the appended claims and their equivalents.

Claims

1. An electronic device, include: A memory for storing a first application running in a first sandbox environment; as well as A processor connected to a memory, The memory stores instructions which, when executed, cause the processor to: In response to an application installation request requesting to update the first application to the second application, determining whether a first user identifier (UID) for the first application needs to be changed; assigning a second UID for the second application using the UID mapping resident program based on the need to change the first UID; and A second sandbox environment for the second application is constructed to have the second UID and the resources included in the first sandbox environment.

2. The electronic device according to claim 1, in, The processor is configured to determine whether the first UID needs to be changed based on a result of comparing the first application to the second application to determine whether the second application is an application that replaces the first application.

3. The electronic device according to claim 2, in, The processor is configured to determine whether the second application is an application that replaces the first application based on whether a package name of the first application is the same as a package name of the second application.

4. The electronic device according to claim 2, in, The processor is configured to determine whether the second application is an application that replaces the first application based on a result of comparing a signing key of the first application with a signing key of the second application.

5. The electronic device according to claim 4, in, The processor is configured to determine that the second application is an application that replaces the first application based on that the signing key of the first application and the signing key of the second application belong to the same signing key group.

6. The electronic device according to claim 2, in, The processor is configured to determine that the first UID needs to be changed based on the second application being an application that replaces the first application and based on the first UID being different from a second UID assignable to the second application.

7. The electronic device according to claim 6, in, The first UID is a shared UID, and Among them, the second UID is the normal UID.

8. The electronic device according to claim 1, in, The processor is configured to allocate a second UID to construct a second sandbox environment and store resources included in the first sandbox environment in the constructed second sandbox environment.

9. The electronic device according to claim 1, in, The processor is configured to collect resource information about resources included in the first sandbox environment based on determining that the first UID needs to be changed and construct a second sandbox environment to include the resources included in the first sandbox environment based on the resource information.

10. The electronic device according to claim 1, in, Resources included in the first sandbox environment are included in an application package of the first application.

11. A method for updating an application in an electronic device, the method include: Obtaining an application installation request for updating a first application running in a first sandbox environment to a second application; In response to the application installation request, determining whether a first UID for a first application needs to be changed; Based on the need to change the first UID, assigning a second UID for the second application using the UID mapping resident program; as well as A second sandbox environment for the second application is constructed to have the second UID and the resources included in the first sandbox environment.

12. The method according to claim 11, in, Determining whether the primary UID needs to be changed includes: comparing the first application to the second application; determining whether the second application is an application that replaces the first application based on the comparison; and Based on a result of determining whether the second application is an application that replaces the first application, it is determined whether the first UID needs to be changed.

13. The method according to claim 11, in, Building the second sandbox environment includes: Allocating a second UID to build a second sandbox environment; and The resources included in the first sandbox environment are stored in the constructed second sandbox environment.

14. The method of claim 11, further comprising: include: Based on determining that the first UID needs to be changed, collecting resource information about resources included in the first sandbox environment, Among them, building the second sandbox environment includes: A second sandbox environment is constructed based on the resource information to include the resources included in the first sandbox environment.

15. The method according to claim 11, in, Resources included in the first sandbox environment are included in an application package of the first application.