IP Library › Granted Patent US 12,724,908
Granted Patent B2
US 12,724,908 · App. 18/570,483 · Granted Sep 1, 2026

File migration method, electronic device , and storage medium

Inventors: Weiming Dou (Shenzhen, CN); Jianwu Li (Shenzhen, CN)
Assignee: HONOR DEVICE CO., LTD.
G06F21/6218G06F16/119
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,724,908
App. No.
18/570,483
Granted
Sep 1, 2026
Kind
B2
Abstract

A main space, a private space, and a first application are disposed on an electronic device, and a filesystem of the electronic device is a filesystem in user space. A file migration method includes: receiving a first access request of the first application for a first-type file, where a space running the first application is the private space; if it is determined that the first application has a read and write permission on the first-type file, redirecting a content provider corresponding to the first-type file from a second content provider in the private space to a first content provider in the main space; and receiving a first migration request of the first application for a first specified file in the first-type file, where the first migration request is used to request to migrate the first specified file from the main space to the private space.

Claims (78)

1 . A file migration method, applied to an electronic device, wherein a main space, a private space, and a first application are disposed on the electronic device, a filesystem of the electronic device is a filesystem in user space, and the method comprises:

receiving a first access request of the first application for a first-type file in the main space, wherein a space running the first application is the private space, and the first-type file comprises one of a picture, a video, audio, or a contact;

when determining that the first application has a read permission on the first-type file in the main space,

redirecting, in response to the first access request, a content provider corresponding to the first-type file from a second content provider in the private space to a first content provider in the main space, wherein the first content provider is used by the first application to obtain the first-type file, wherein the redirecting comprises;

querying an identity document of a main space user from an Activity manager service;

returning the identity document of the main space user; and

obtaining the first content provider based on the identity document of the main space user;

receiving a first migration request of the first application for a first specified file in the first-type file in the main space, wherein the first migration request is used to request to migrate the first specified file from the main space to the private space; and

in response to the first migration request, migrating the first specified file from the main space to the private space when determining that the first application has a read and write permission on the first-type file in the main space, wherein the first application is a file migration service configured for migrating files between the main space and the private space.

2 . The method according to claim 1 , wherein the first migration request comprises a first file path and a second file path, the first file path is a path for obtaining the first specified file, and the second file path is a path for writing the first specified file; and

the first file path points to the main space, and the second file path points to the private space.

3 . The method according to claim 2 , wherein the first content provider is configured to provide the first file path.

4 . The method according to claim 3 , wherein the migrating the first specified file from the main space to the private space comprises:

obtaining the first specified file from the main space based on the first file path; and

writing the obtained first specified file into the private space based on the second file path.

5 . The method according to claim 1 , wherein the method further comprises: when determining that the first application has no read and write permission on the first-type file, returning information of an identity of a private space user in response to the first migration request; and

obtaining the second content provider based on the information of the identity of the private space user, wherein

the second content provider cannot provide a path for accessing the first specified file.

6 . The method according to claim 1 , wherein the method further comprises:

receiving a second migration request of the first application for a second specified file in the private space, wherein the second migration request is used to request to migrate the second specified file from the private space to the main space, the space running the first application is the private space, and a type of the second specified file comprises any one of a picture, a video, audio, and a contact; and

when determining that the first application has a read and write permission on the second specified file,

in response to the second migration request, redirecting a content provider corresponding to the second specified file from a fourth content provider in the private space to a third content provider in the main space, wherein

the third content provider is used by the first application to write the second specified file into the main space, to migrate the second specified file from the private space to the main space.

7 . The method according to claim 6 , wherein the second migration request comprises a third file path and a fourth file path, the third file path is a path for accessing the second specified file, and the fourth file path is a path for writing the second specified file; and

the third file path points to the private space, and the fourth file path points to the main space.

8 . The method according to claim 7 , wherein the redirecting a content provider corresponding to the second specified file from a fourth content provider in the private space to a third content provider in the main space comprises:

returning information of an identity of a main space user in response to the second migration request; and

obtaining the third content provider based on the information of the identity of the main space user, wherein

the third content provider is configured to provide the fourth file path.

9 . The method according to claim 8 , wherein the migrating the second specified file from the private space to the main space comprises:

obtaining the second specified file from the private space based on the third file path; and

writing the obtained second specified file into the main space based on the fourth file path.

10 . An electronic device, wherein a main space, a private space, and a first application are disposed on the electronic device, a filesystem of the electronic device is a filesystem in user space, and the electronic device comprising:

one or more processors and one or more memories, wherein the one or more memories store one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device is enabled to perform the following steps:

receiving a first access request of the first application for a first-type file in the main space, wherein a space running the first application is the private space, and the first-type file comprises any one of a picture, a video, audio, and a contact;

when determining that the first application has a read permission on the first-type file in the main space,

redirecting, in response to the first access request, a content provider corresponding to the first-type file from a second content provider in the private space to a first content provider in the main space, wherein the first content provider is used by the first application to obtain the first-type file, wherein the redirecting comprises:

querying an identity document of a main space user from an Activity manager service;

returning the identity document of the main space user; and

obtaining the first content provider based on the identity document of the main space user;

receiving a first migration request of the first application for a first specified file in the first-type file in the main space, wherein the first migration request is used to request to migrate the first specified file from the main space to the private space; and

in response to the first migration request, migrating the first specified file from the main space to the private space when determining that the first application has a read and write permission on the first-type file in the main space, wherein the first application is a file migration service configured for migrating files between the main space and the private space.

11 . The electronic device according to claim 10 , wherein the first migration request comprises a first file path and a second file path, the first file path is a path for obtaining the first specified file, and the second file path is a path for writing the first specified file; and

the first file path points to the main space, and the second file path points to the private space.

12 . The electronic device according to claim 11 , wherein the first content provider is configured to provide the first file path.

13 . The electronic device according to claim 12 , wherein the migrating the first specified file from the main space to the private space comprises:

obtaining the first specified file from the main space based on the first file path; and

writing the obtained first specified file into the private space based on the second file path.

14 . The electronic device according to claim 10 , wherein the steps further comprise: when determining that the first application has no read and write permission on the first-type file,

returning information of an identity of a private space user in response to the first migration request; and

obtaining the second content provider based on the information of the identity of the private space user, wherein

the second content provider cannot provide a path for accessing the first specified file.

15 . The electronic device according to claim 10 , wherein the steps further comprise:

receiving a second migration request of the first application for a second specified file in the private space, wherein the second migration request is used to request to migrate the second specified file from the private space to the main space, the space running the first application is the private space, and a type of the second specified file comprises any one of a picture, a video, audio, and a contact; and

when determining that the first application has a read and write permission on the second specified file,

in response to the second migration request, redirecting a content provider corresponding to the second specified file from a fourth content provider in the private space to a third content provider in the main space, wherein

the third content provider is used by the first application to write the second specified file into the main space, to migrate the second specified file from the private space to the main space.

16 . The electronic device according to claim 15 , wherein the second migration request comprises a third file path and a fourth file path, the third file path is a path for accessing the second specified file, and the fourth file path is a path for writing the second specified file; and

the third file path points to the private space, and the fourth file path points to the main space.

17 . The electronic device according to claim 16 , wherein the redirecting a content provider corresponding to the second specified file from a fourth content provider in the private space to a third content provider in the main space comprises:

returning information of an identity of a main space user in response to the second migration request; and

obtaining the third content provider based on the information of the identity of the main space user, wherein

the third content provider is configured to provide the fourth file path.

18 . The electronic device according to claim 17 , wherein the migrating the second specified file from the private space to the main space comprises:

obtaining the second specified file from the private space based on the third file path; and

writing the obtained second specified file into the main space based on the fourth file path.

19 . The electronic device according to claim 10 , wherein

when the first application is a file migration service, it is determined that the first application has the read and write permission on the first-type file in the main space; or

when the first application is a file migration service, it is determined that the first application has the read and write permission on the second specified file.

20 . A non-transitory computer-readable storage medium, wherein the storage medium stores instructions, and when the instructions are executed on a computer, the computer is enabled to perform the following steps:

receiving a first access request of a first application for a first-type file in a main space, wherein a space running the first application is a private space, and the first-type file comprises any one of a picture, a video, audio, and a contact;

when determining that the first application has a read permission on the first-type file in the main space,

redirecting, in response to the first access request, a content provider corresponding to the first-type file from a second content provider in the private space to a first content provider in the main space, wherein the first content provider is used by the first application to obtain the first-type file, wherein the redirecting comprises:

querying an identity document of a main space user from an Activity manager service;

returning the identity document of the main space user; and

obtaining the first content provider based on the identity document of the main space user;

receiving a first migration request of the first application for a first specified file in the first-type file in the main space, wherein the first migration request is used to request to migrate the first specified file from the main space to the private space; and

in response to the first migration request, migrating the first specified file from the main space to the private space when determining that the first application has a read and write permission on the first-type file in the main space, wherein the first application is a file migration service configured for migrating files between the main space and the private space.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 19, 2024
From: DOU, WEIMING; LI, JIANWU
To: HONOR DEVICE CO., LTD.
Reel/Frame 066822/0684 →
Priority Claims (1)
CN 202111300248.6 · Nov 4, 2021 · national
Continuity (1)
Related Publication 20240281549A1 · Aug 22, 2024
References Cited (36)
US 8997248B1 · McKay · 2015 [cited by examiner]
US 10277601B1 · Higgins · 2019 [cited by examiner]
US 11941139B2 · Mika · 2024 [cited by examiner]
US 20040117836A1 · Karaoguz · 2004 [cited by examiner]
US 20040210796A1 · Largman · 2004 [cited by examiner]
US 20090046858A1 · Iyer · 2009 [cited by examiner]
US 20110252232A1 · De Atley · 2011 [cited by examiner]
US 20110252243A1 · Brouwer · 2011 [cited by examiner]
US 20130275548A1 · Molaro · 2013 [cited by examiner]
US 20150169880A1 · Kim · 2015 [cited by applicant]
US 20150261972A1 · Lee · 2015 [cited by examiner]
US 20160285958A1 · Das et al. · 2016 [cited by applicant]
US 20160292443A1 · von Muhlen · 2016 [cited by examiner]
US 20160300079A1 · Gong · 2016 [cited by examiner]
US 20170091182A1 · Wurster · 2017 [cited by examiner]
US 20170262655A1 · Runkis · 2017 [cited by examiner]
US 20170277395A1 · Suo · 2017 [cited by examiner]
US 20170300260A1 · Lv et al. · 2017 [cited by applicant]
US 20180239555A1 · Cao et al. · 2018 [cited by applicant]
US 20180239930A1 · Lai · 2018 [cited by examiner]
US 20190220528A1 · Cruciani · 2019 [cited by examiner]
US 20210042002A1 · Lee · 2021 [cited by examiner]
US 20220342850A1 · Cao et al. · 2022 [cited by applicant]
CN 104657674A · 2015 [cited by applicant]
CN 105912951A · 2016 [cited by applicant]
CN 106844464A · 2017 [cited by applicant]
CN 107636612A · 2018 [cited by applicant]
CN 108229203A · 2018 [cited by applicant]
CN 108573161A · 2018 [cited by applicant]
CN 107003950B · 2020 [cited by applicant]
CN 113157231A · 2021 [cited by applicant]
CN 113495869A · 2021 [cited by applicant]
WO 2021083378A1 · 2021 [cited by applicant]
No stated author; Secure Folder User Guide; 2021; Retrieved from the Internet https://web.archive.org/web/20210924011809/https://docs.samsungknox.com/secure-folder/Content/secure-folder-overview.htm; pp. 1-29, as printe… [cited by examiner]
Cipriani; what you need to know about note 7 . . . ; 2016; Retrieved from the Internet https://www.cnet.com/tech/mobile/what-you-need-to-know-about-the-note-7s-secure-folder/; pp. 1-12, as printed. (Year: 2016). [cited by examiner]
Yong et al., “Behavioral Model Construction Method for Mobile Applications Based on Small Code,” Computer Science, Nov. 15, 2015, 15 pages (with English abstract). [cited by applicant]