CN116302182A - Method and device for setting country code based on Android system - Google Patents
Method and device for setting country code based on Android system Download PDFInfo
- Publication number
- CN116302182A CN116302182A CN202310201775.4A CN202310201775A CN116302182A CN 116302182 A CN116302182 A CN 116302182A CN 202310201775 A CN202310201775 A CN 202310201775A CN 116302182 A CN116302182 A CN 116302182A
- Authority
- CN
- China
- Prior art keywords
- country code
- android system
- setting
- target
- writing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4403—Processor initialisation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/442—Shutdown
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44568—Immediately runnable code
- G06F9/44578—Preparing or optimising for loading
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本申请涉及信息技术领域,尤其涉及一种基于Android系统设置国家码的技术。This application relates to the field of information technology, in particular to a technology for setting country codes based on the Android system.
背景技术Background technique
目前市场上的智能手机、平板电脑等移动终端设备,大部分使用Android系统。对于不同的国家和地区,Android设备的硬件配置需求也不相同。例如,出货到英国的机器需要预置该国所需的某款APP,而出货到日本的机器则可能不需要这款APP;英国与日本的WiFi频段不一样,也会导致针对英国的需求制造的机器在日本使用时信号不佳;此外,谷歌对于不同国家地区的RSA要求也是不一样的。Most mobile terminal devices such as smartphones and tablet computers currently on the market use the Android system. For different countries and regions, the hardware configuration requirements of Android devices are also different. For example, a machine shipped to the UK needs to be pre-installed with a certain APP required by the country, while a machine shipped to Japan may not need this APP; the WiFi frequency bands of the UK and Japan are different, which will also lead to the The machines manufactured on demand have poor signal when used in Japan; in addition, Google has different RSA requirements for different countries and regions.
如果针对几十个不同的国家,分别发布几十个版本的软件,则成本非常昂贵。现有技术方案中,部分方案通过在菜单栏中设置若干国家码选项,让用户对国家码进行设置,而未能在工厂端进行设置,导致用户操作繁琐,影响用户体验。If dozens of versions of software are released for dozens of different countries, the cost is very expensive. In the existing technical solutions, some solutions allow users to set the country code by setting several country code options in the menu bar, but fail to set the country code at the factory end, resulting in cumbersome user operations and affecting user experience.
发明内容Contents of the invention
本申请的一个目的是提供一种基于Android系统设置国家码的方法与设备。One purpose of this application is to provide a method and device for setting a country code based on an Android system.
根据本申请的一个方面,提供了一种基于Android系统设置国家码的方法,其中,所述方法包括:According to one aspect of the present application, a method for setting a country code based on an Android system is provided, wherein the method includes:
将目标国家码分为上半段与下半段,通过上下半段分别写入的方式,将所述目标国家码写入到Android系统init部分的属性服务;The target country code is divided into the upper half and the lower half, and the target country code is written into the attribute service of the init part of the Android system by writing the upper and lower halves respectively;
初始化所述Android系统,运行所述Android系统frameworks部分的应用分类;Initialize the Android system, and run the application classification of the frameworks part of the Android system;
运行所述Android系统launcher app部分的桌面分类,完成所述目标国家码的设置。Run the desktop category of the launcher app part of the Android system to complete the setting of the target country code.
进一步地,所述目标国家码的上半段应用于售后端;其中,所述目标国家码的上半段的写入过程包括:用户在设置页面的搜索栏输入对应的暗码后,页面切换到工模应用的国家码设置页面;由用户选择对应的国码、运营商标志位及OEM客制位,组合得到所述目标国家码的上半段;将所述目标国家码的上半段写入NV分区的对应位置。Further, the first half of the target country code is applied to the after-sales end; wherein, the writing process of the first half of the target country code includes: after the user enters the corresponding password in the search bar of the setting page, the page switches to The country code setting page of the mold application; the user selects the corresponding country code, operator logo bit and OEM custom bit, and combines to obtain the upper half of the target country code; write the upper half of the target country code into The corresponding location of the NV partition.
进一步地,所述目标国家码的下半段的写入过程包括:接收关于写入国家码下半段的指令参数,并根据该指令参数设置国家码NV分区的可执行程序,将所述目标国家码的下半段写入NV分区的对应位置。Further, the writing process of the second half of the target country code includes: receiving an instruction parameter about writing the second half of the country code, and setting the executable program of the country code NV partition according to the instruction parameter, and writing the target The second half of the country code is written into the corresponding position of the NV partition.
进一步地,初始化所述Android系统,运行所述Android系统frameworks部分的应用分类,包括:Further, initialize the Android system, and run the application classification of the frameworks part of the Android system, including:
初始化所述Android系统,从NV分区的对应位置读取参数,利用bootloader部分生成参数ro.boot.countrycode=GBXX,并将所述ro.boot.countrycode=GBXX传递至initproperties service;Initialize the Android system, read the parameters from the corresponding position of the NV partition, use the bootloader part to generate the parameter ro.boot.countrycode=GBXX, and pass the ro.boot.countrycode=GBXX to the initproperties service;
设立zprojects,根据硬件OD要求确定所述zprojects中的不同的编译项目,针对每个不同的编译项目分别添加一个宏变量到mk文件中,并将所述mk文件中的project_xx_xx传递至所述init properties service。Set up zprojects, determine the different compilation projects in the zprojects according to the hardware OD requirements, add a macro variable to the mk file for each different compilation project, and pass the project_xx_xx in the mk file to the init properties service.
进一步地,所述init properties service接收所述ro.boot.countrycode=GBXX和所述project_xx_xx,以及读取国家码配置列表的配置文件,通过查询国码判断是否含有出货的国家,确定需要修改的属性信息。Further, the init properties service receives the ro.boot.countrycode=GBXX and the project_xx_xx, and reads the configuration file of the country code configuration list, checks the country code to determine whether it contains the country of shipment, and determines the one that needs to be modified. attribute information.
进一步地,运行所述Android系统frameworks部分的应用分类,包括:根据所述ro.boot.countrycode=GBXX,确定所获取的国家码是否需要添加或移除对应的feature;经过客制的package manager service,获取对应的app配置列表,判断是否需要对该app配置列表进行添加或移除操作。Further, running the application classification of the frameworks part of the Android system includes: according to the ro.boot.countrycode=GBXX, determining whether the obtained country code needs to add or remove the corresponding feature; through the customized package manager service , to obtain the corresponding app configuration list, and determine whether to add or remove the app configuration list.
进一步地,运行所述Android系统launcher app部分的桌面分类,包括:将国家码适配对应的app配置列表之后,获取所述ro.boot.countrycode,利用所述launcher app部分的桌面布局选择器,确定对应的桌面配置。Further, running the desktop classification of the launcher app part of the Android system includes: after adapting the country code to the corresponding app configuration list, obtaining the ro.boot.countrycode, using the desktop layout selector of the launcher app part, Determine the corresponding desktop configuration.
根据本申请的另一个方面,还提供了一种基于Android系统设置国家码的设备,其中,所述设备包括:According to another aspect of the present application, a device for setting the country code based on the Android system is also provided, wherein the device includes:
第一模块,用于将目标国家码分为上半段与下半段,通过上下半段分别写入的方式,将所述目标国家码写入到Android系统init部分的属性服务;The first module is used to divide the target country code into the upper half and the lower half, and write the target country code into the attribute service of the init part of the Android system by writing the upper and lower half respectively;
第二模块,用于初始化所述Android系统,运行所述Android系统frameworks部分的应用分类;The second module is used to initialize the Android system and run the application classification of the frameworks part of the Android system;
第三模块,用于运行所述Android系统launcher app部分的桌面分类,完成所述目标国家码的设置。The third module is used to run the desktop classification of the launcher app part of the Android system, and complete the setting of the target country code.
根据本申请的又一个方面,还提供了一种计算设备,其中,该设备包括用于存储计算机程序指令的存储器和用于执行计算机程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发所述设备执行所述基于Android系统设置国家码的方法。According to yet another aspect of the present application, there is also provided a computing device, wherein the device includes a memory for storing computer program instructions and a processor for executing computer program instructions, wherein when the computer program instructions are processed When the device is executed, the device is triggered to execute the method for setting the country code based on the Android system.
根据本申请的又一个方面,还提供了一种计算机可读介质,其上存储有计算机程序指令,所述计算机可读指令可被处理器执行以实现所述基于Android系统设置国家码的方法。According to another aspect of the present application, there is also provided a computer-readable medium, on which computer program instructions are stored, and the computer-readable instructions can be executed by a processor to implement the method for setting a country code based on the Android system.
本申请提供的方案中,先将目标国家码分为上半段与下半段,通过上下半段分别写入的方式,将所述目标国家码写入到Android系统init部分的属性服务;然后初始化所述Android系统,运行所述Android系统frameworks部分的应用分类;运行所述Android系统launcher app部分的桌面分类,完成所述目标国家码的设置。本申请只需一个软件版本出货即可满足多个国家地区的不同需求,在页面的操作更注重流程性的功能,注重主清除后开机初始化的功能区分,提高了生产效率,提升了用户体验。In the solution provided by this application, the target country code is first divided into the upper half and the second half, and the target country code is written into the attribute service of the init part of the Android system by writing the upper and lower halves respectively; then Initialize the Android system, run the application classification of the frameworks part of the Android system; run the desktop classification of the launcher app part of the Android system, and complete the setting of the target country code. This application only needs one software version to be shipped to meet the different needs of multiple countries and regions. The operation on the page pays more attention to the process-oriented functions, and pays attention to the function distinction of power-on initialization after the main clearing, which improves the production efficiency and improves the user experience. .
附图说明Description of drawings
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其他特征、目的和优点将会变得更明显:Other characteristics, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
图1是根据本申请实施例的一种基于Android系统设置国家码的方法流程图;Fig. 1 is a kind of flow chart of the method for setting country code based on Android system according to the embodiment of the application;
图2是根据本申请实施例的一种写入国家码上半段的流程图;Fig. 2 is a flow chart of writing the first half of the country code according to the embodiment of the present application;
图3是根据本申请实施例的一种写入国家码下半段的流程图;Fig. 3 is a flow chart of writing the second half of the country code according to the embodiment of the present application;
图4是根据本申请实施例的一种写入国家码后初始化Android系统的流程图;Fig. 4 is a flow chart of initializing the Android system after writing the country code according to an embodiment of the present application;
图5是根据本申请实施例的一种图4所示D1部分的原理示意图;Fig. 5 is a schematic diagram of the principle of part D1 shown in Fig. 4 according to an embodiment of the present application;
图6是根据本申请实施例的一种图4所示D2部分的原理示意图;FIG. 6 is a schematic diagram of the principle of part D2 shown in FIG. 4 according to an embodiment of the present application;
图7是根据本申请实施例的一种图4所示D6部分的原理示意图;Fig. 7 is a schematic diagram of the principle of part D6 shown in Fig. 4 according to an embodiment of the present application;
图8是根据本申请实施例的一种图4所示D7部分的原理示意图;FIG. 8 is a schematic diagram of the principle of part D7 shown in FIG. 4 according to an embodiment of the present application;
图9是根据本申请实施例的一种运行Android系统frameworks部分的流程图;Fig. 9 is a kind of flow chart of running Android system frameworks part according to the embodiment of the present application;
图10是根据本申请实施例的一种运行Android系统launcher app部分的流程图;Fig. 10 is a kind of flow chart of operating Android system launcher app part according to the embodiment of the present application;
图11是根据本申请实施例的一种基于Android系统设置国家码的设备示意图。Fig. 11 is a schematic diagram of a device for setting a country code based on an Android system according to an embodiment of the present application.
附图中相同或相似的附图标记代表相同或相似的部件。The same or similar reference numerals in the drawings represent the same or similar components.
具体实施方式Detailed ways
下面结合附图对本申请作进一步详细描述。The application will be described in further detail below in conjunction with the accompanying drawings.
在本申请一个典型的配置中,终端、服务网络的设备和可信方均包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration of the present application, the terminal, the device serving the network and the trusted party all include one or more processors (CPU), input/output interface, network interface and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-permanent storage in computer readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read only memory (ROM) or flash RAM. Memory is an example of computer readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体,可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的装置或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。Computer-readable media includes both volatile and non-volatile, removable and non-removable media, and can be implemented by any method or technology for storage of information. Information may be computer readable instructions, data structures, means of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash memory or other memory technology, compact disc-read-only (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cartridge Magnetic tape, tape disk storage or other magnetic storage device, or any other non-transmission medium, that can be used to store information that can be accessed by a computing device.
本申请实施例提供了一种基于Android系统设置国家码的方法,只需一个软件版本出货即可满足多个国家地区的不同需求。本申请实施例在页面的操作更注重流程性的功能,注重主清除后开机初始化的功能区分;在国家码写入阶段分为上半段写入和下半段写入,其中,上半段主要针对售后的需求,下半段主要针对工厂的批量生产。The embodiment of the present application provides a method for setting the country code based on the Android system, and only one software version is shipped to meet the different needs of multiple countries and regions. In the embodiment of the present application, the operation of the page pays more attention to the function of the process, and pays attention to the function distinction of the boot initialization after the main clear; the country code writing stage is divided into the first half of the writing and the second half of the writing, wherein the first half Mainly for after-sales demand, the second half is mainly for mass production in factories.
在实际场景中,实现该方法的设备可以是用户设备、网络设备或者用户设备与网络设备通过网络相集成所构成的设备。其中,所述用户设备包括但不限于智能手机、平板电脑、个人计算机等终端设备,所述网络设备包括但不限于网络主机、单个网络服务器、多个网络服务器集或基于云计算的计算机集合等实现。在此,云由基于云计算(CloudComputing)的大量主机或网络服务器构成,其中,云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个虚拟计算机。In an actual scenario, the device implementing the method may be a user device, a network device, or a device formed by integrating a user device and a network device through a network. Wherein, the user equipment includes but is not limited to terminal equipment such as smart phones, tablet computers, and personal computers, and the network equipment includes but is not limited to a network host, a single network server, a set of multiple network servers, or a collection of computers based on cloud computing, etc. accomplish. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing (Cloud Computing), wherein cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
图1是根据本申请实施例的一种基于Android系统设置国家码的方法流程图,该方法包括步骤S101、步骤S102和步骤S103。Fig. 1 is a flow chart of a method for setting a country code based on an Android system according to an embodiment of the present application, and the method includes step S101, step S102 and step S103.
例如,如图1所示,通过上下半段写入方式,写入到init部分的属性服务,初始化到frameworks的应用分类,到launcher app的桌面分类,可以完成整个国家码的设置流程。声明上半段的写入和下半段的写入的区分,是针对刷机和启动不同区分的。上半段的写入是通过UI界面的操作写入NV分区的特定位置,这个位置不能被恢复出厂(主清除)擦除,恢复出厂后初始化的国家码。下半段写入是指令写入完成后,通过刷机软件升级完成国家码的设置。For example, as shown in Figure 1, through the upper and lower half of the writing method, write to the attribute service of the init part, initialize to the application category of the frameworks, and go to the desktop category of the launcher app to complete the entire country code setting process. The distinction between writing in the first half of the statement and writing in the second half is for different distinctions between flashing and starting. The writing in the first half is written to a specific location of the NV partition through the operation of the UI interface. This location cannot be erased by factory reset (master clear), and the country code initialized after factory restoration is restored. The second half of writing is to complete the setting of the country code through the firmware upgrade after the command is written.
步骤S101,将目标国家码分为上半段与下半段,通过上下半段分别写入的方式,将所述目标国家码写入到Android系统init部分的属性服务。In step S101, the target country code is divided into an upper half and a lower half, and the target country code is written into the attribute service of the init part of the Android system by writing the upper and lower halves respectively.
在一些实施例中,所述目标国家码的上半段应用于售后端;其中,所述目标国家码的上半段的写入过程包括:用户在设置页面的搜索栏输入对应的暗码后,页面切换到工模应用的国家码设置页面;由用户选择对应的国码、运营商标志位及OEM客制位,组合得到所述目标国家码的上半段;将所述目标国家码的上半段写入NV分区的对应位置。In some embodiments, the first half of the target country code is applied to the after-sales end; wherein, the writing process of the first half of the target country code includes: after the user enters the corresponding password in the search bar on the setting page, The page switches to the country code setting page of the tooling application; the user selects the corresponding country code, operator logo bit and OEM custom bit, and combines to obtain the upper half of the target country code; the upper half of the target country code The segment is written to the corresponding location of the NV partition.
例如,如图2所示,上半段的写入主要在工模的应用中执行。该部分主要应用于售后端,该部分设计的理由为机器不便于使用指令写入,适用于国家码切换非技术性人员的操作。工作过程为:在设置页面的搜索栏(如图2中B1所示)输入暗码##XXX#(或者相似的暗码)后,页面切换到工模应用的国家码切换页面(如图2中B2所示),在国家码设置页(如图2中B2所示)设置国家码,首先选择出货的国家码(比如英国国码为GB),然后选择运营商标志位,如果不选则设置X;选择OEM刻制位,如果不选则设置X;选完后点击确定按钮,把GBXX(如图2中B3所示)写入到NV分区某段位(恢复出厂的主清除操作清除不到的地方),如图2中B4所示;执行完上述操作后执行主清除和开机的动作,如图2中B5所示。For example, as shown in Fig. 2, the writing in the first half is mainly performed in the application of the mold. This part is mainly used in the after-sales end. The reason for the design of this part is that the machine is not easy to use and write instructions, and it is suitable for the operation of non-technical personnel to switch country codes. The working process is as follows: After entering the password ##XXX# (or similar password) in the search bar of the setting page (as shown in B1 in Figure 2), the page switches to the country code switching page of the tooling application (B2 in Figure 2 As shown), set the country code on the country code setting page (as shown in B2 in Figure 2), first select the country code of the shipment (for example, the UK country code is GB), and then select the operator flag, if not selected, set X ; Select the OEM engraved position, if not selected then set X; after the selection, click the OK button to write GBXX (as shown in B3 in Figure 2) to a certain segment of the NV partition (the ones that cannot be cleared by the main clearing operation of restoring the factory) Place), as shown in B4 in Figure 2; after performing the above operations, perform the actions of main clearing and booting, as shown in B5 in Figure 2.
在一些实施例中,所述目标国家码的下半段的写入过程包括:接收关于写入国家码下半段的指令参数,并根据该指令参数设置国家码NV分区的可执行程序,将所述目标国家码的下半段写入NV分区的对应位置。In some embodiments, the writing process of the second half of the target country code includes: receiving an instruction parameter about writing the second half of the country code, and setting the executable program of the country code NV partition according to the instruction parameter, and The second half of the target country code is written into the corresponding position of the NV partition.
例如,如图3所示,下半段的写入没有操作的页面,是在工厂版本写入的(工厂版本具有比较高的Root权限,这个是设置国家码可执行程序的执行的前提),通过指令把国码参数一次性写入NV分区某个段位。其工作过程为:首先在如图3中C1所示的工厂版本接收指令参数,如adb shell lc_nv_ram write 60 8GBXX,这条参数的含义为:运行设置国家码nv分区的可自行程序为lc_nv_ram,执行write操作,在nv分区60的段位偏移8个位写入GBXX的国码参数到nv分区某段位或者分区(如图3中C3所示),待操作刷机(如图3中C4所示)刷机成用户版本,完成国家码的写入。For example, as shown in Figure 3, the page with no operation written in the second half is written in the factory version (the factory version has a relatively high Root authority, which is the prerequisite for setting the execution of the country code executable program), Write the country code parameters into a certain segment of the NV partition at one time through the command. Its working process is as follows: first, the factory version shown as C1 in Figure 3 receives command parameters, such as adb shell lc_nv_ram write 60 8GBXX, the meaning of this parameter is: run the self-programmable program that sets the country code nv partition as lc_nv_ram, execute Write operation, write the national code parameters of GBXX to a certain segment or partition of the nv partition in the nv partition 60 segment offset 8 bits (as shown in C3 in Figure 3), and the flash machine is to be operated (as shown in C4 in Figure 3) Flash the machine into the user version and complete the writing of the country code.
步骤S102,初始化所述Android系统,运行所述Android系统frameworks部分的应用分类。Step S102, initialize the Android system, and run the application categories of the frameworks part of the Android system.
在一些实施例中,所述步骤S102包括:初始化所述Android系统,从NV分区的对应位置读取参数,利用bootloader部分生成参数ro.boot.countrycode=GBXX,并将所述ro.boot.countrycode=GBXX传递至init properties service;设立zprojects,根据硬件OD要求确定所述zprojects中的不同的编译项目,针对每个不同的编译项目分别添加一个宏变量到mk文件中,并将所述mk文件中的project_xx_xx传递至所述init propertiesservice。In some embodiments, the step S102 includes: initializing the Android system, reading parameters from the corresponding position of the NV partition, using the bootloader part to generate the parameter ro.boot.countrycode=GBXX, and setting the ro.boot.countrycode = GBXX is passed to the init properties service; zprojects are set up, different compilation projects in the zprojects are determined according to hardware OD requirements, a macro variable is added to the mk file for each different compilation project, and the mk file is added The project_xx_xx is passed to the init propertiesservice.
例如,在如图2中B4及图3中C3所示的步骤之后,即如图4中D4所示的步骤之后,执行完第一次开机的读取工作。接下来,如图4所示,其工作流程为D2读取D4的分区的参数后,在bootloader里面生成Androidboot.countrycode=GBXX其目的是生成一个参数ro.boot.countrycode=GBXX提供给D6使用。D6读取两个重要的参数,其中一个是mk文件生产的编译宏通过宏控制设备的配置信息,比如wifi版本和LTE版本的device name的区分;mk文件(如图4中D3所示)是通过D1获取的;D1是为了增加编译的项目设立的zprojects,zprojects里面有不同的编译项目,是根据硬件OD要求做出来的,每个不同的项目会添加一个宏变量到mk文件中;D6会获取mk文件中的宏变量,在init程序中做硬件OD要求的区分;D6一共获取了两个部分的变量,一个是bootloader(如图4中D2所示)产生的ro.boot.countrycode,另一个是mk文件的project_wifi或者project_lte版本的宏变量(如图4中D3所示);D6需要按照D2和D3传过来的变量默认属性的添加。For example, after the steps shown in B4 in FIG. 2 and C3 in FIG. 3 , that is, after the steps shown in D4 in FIG. 4 , the reading work for the first boot is performed. Next, as shown in Figure 4, its workflow is to generate Androidboot.countrycode=GBXX in the bootloader after D2 reads the parameters of the partition of D4. Its purpose is to generate a parameter ro.boot.countrycode=GBXX for D6 to use. D6 reads two important parameters, one of which is the compiled macro produced by the mk file to control the configuration information of the device through the macro, such as the distinction between the device name of the wifi version and the LTE version; the mk file (as shown in D3 in Figure 4) is Obtained through D1; D1 is the zprojects set up to add compiled projects. There are different compiled projects in zprojects, which are made according to the hardware OD requirements. Each different project will add a macro variable to the mk file; D6 will Obtain the macro variables in the mk file, and distinguish the hardware OD requirements in the init program; D6 has obtained two parts of the variables, one is the ro.boot.countrycode generated by the bootloader (as shown in D2 in Figure 4), and the other One is the macro variable of the project_wifi or project_lte version of the mk file (as shown in D3 in Figure 4); D6 needs to be added according to the default attributes of the variables passed from D2 and D3.
图4中D1部分的原理如图5所示,其功能主要集中在zprojects存在很多编译的build,比如编译project_wifi、project_lte、project_wifi_audio、project_lte_audio等,这些build在编译过程中形成一个对应的编译宏到init模块的mk文件中,最终提供一个project_xx_xx。The principle of part D1 in Figure 4 is shown in Figure 5. Its functions are mainly concentrated in the fact that there are many compiled builds in zprojects, such as compiling project_wifi, project_lte, project_wifi_audio, project_lte_audio, etc. These builds form a corresponding compilation macro to init during the compilation process. In the mk file of the module, a project_xx_xx is finally provided.
图4中D2部分的原理如图6所示,首先从nv分区的某段位或者某个分区读取写入的参数;bootloader部分在获取该参数后,会判断该参数是否为空;如果为空的话,该部分会给一个默认的国家码参数USXX;如果不为空,则按照读取的参数设置cmdline的值android.countrycode=GBXX/USXX(默认);最终产生的结果是ro.boot.counrtycode=USXX。The principle of the D2 part in Figure 4 is shown in Figure 6. First, read the written parameters from a certain section of the nv partition or a certain partition; after the bootloader part obtains the parameter, it will judge whether the parameter is empty; if it is empty If so, this part will give a default country code parameter USXX; if it is not empty, set the cmdline value android.countrycode=GBXX/USXX (default) according to the read parameter; the final result is ro.boot.counrtycode = USXX.
在一些实施例中,所述init properties service接收所述ro.boot.countrycode=GBXX和所述project_xx_xx,以及读取国家码配置列表的配置文件,通过查询国码判断是否含有出货的国家,确定需要修改的属性信息。In some embodiments, the init properties service receives the ro.boot.countrycode=GBXX and the project_xx_xx, and reads the configuration file of the country code configuration list, checks the country code to determine whether it contains the country of shipment, and determines The attribute information that needs to be modified.
例如,图4中D6部分的原理如图7所示,图4中D1部分(如图5所示)和D2部分(如图6所示)分别产生参数为D6部分(如图7所示)所用。D6部分会收到D1部分和D2部分产生的两个参数:ro.boot.countrycode=GBXX与project_xx_xx;此外,还要读取图7中E7所示的国家码配置列表的配置文件。D6部分在获取图7中E4所示的参数后,首先会进行位拆解,获取国家生成ro.product.google.3bitX,如图7中E6及E7所示的ro.odm.setf.4bitX两个属性,这两个属性会被上层使用区分。在图7中读取config_country_list.xml(如图7中E3所示)后,会按照读取的E4获取的国码查询是否含有出货的国家,从而得到E8,该部分主要设置语言等和E9的重要的系统属性。通过获取E4的国家码和E2的编译参数和E11的E12国码查询判断修改重要的认证属性(如图7中E10所示)。For example, the principle of the D6 part in Fig. 4 is shown in Fig. 7, and the D1 part (as shown in Fig. 5) and the D2 part (as shown in Fig. 6) in Fig. 4 respectively generate parameters as the D6 part (as shown in Fig. 7) Used. Part D6 will receive two parameters generated by parts D1 and D2: ro.boot.countrycode=GBXX and project_xx_xx; in addition, the configuration file of the country code configuration list shown in E7 in Figure 7 must be read. After obtaining the parameters shown in E4 in Figure 7, the D6 part will first disassemble the bits and obtain the country to generate ro.product.google.3bitX, and the two ro.odm.setf.4bitX shown in E6 and E7 in Figure 7 attribute, these two attributes will be distinguished by the upper layer. After reading config_country_list.xml in Figure 7 (as shown in E3 in Figure 7), it will check whether the country code obtained by reading E4 contains the country of shipment, so as to obtain E8. This part mainly sets the language and E9 important system properties. By obtaining the country code of E4, the compilation parameters of E2 and the query of E12 country code of E11, it is determined to modify important authentication attributes (as shown in E10 in Figure 7).
图4中D7部分的原理如图8所示,添加该部分的作用是解决VTS和GSI的认证问题,该部分的执行程序必须放入vendor分区而非system分区。其中,图8中F1所示的和图7中E12所示的是同一个方法,图8中F5所示的和图7中E4所示的为同一参数,图8中F4所示的国家码判断器获取图5所示的参数并调用图8中F1所示的Google要求的国家码,经过判断处理之后后生成一个可触发的属性触发图8中F3所示的处理,最终配置出一个合适的fingerprint,这个fingerprint用于VTS和GSI的送测报告。The principle of part D7 in Figure 4 is shown in Figure 8. The role of adding this part is to solve the authentication problem of VTS and GSI. The execution program of this part must be placed in the vendor partition instead of the system partition. Among them, the method shown in F1 in Figure 8 and the method shown in E12 in Figure 7 are the same method, the method shown in F5 in Figure 8 and the method shown in E4 in Figure 7 are the same parameters, and the country code shown in F4 in Figure 8 The determiner obtains the parameters shown in Figure 5 and calls the country code required by Google shown in F1 in Figure 8, and generates a triggerable attribute after the judgment processing to trigger the processing shown in F3 in Figure 8, and finally configures a suitable The fingerprint, this fingerprint is used for the test report of VTS and GSI.
在一些实施例中,所述步骤S102包括:根据所述ro.boot.countrycode=GBXX,确定所获取的国家码是否需要添加或移除对应的feature;经过客制的package managerservice,获取对应的app配置列表,判断是否需要对该app配置列表进行添加或移除操作。In some embodiments, the step S102 includes: according to the ro.boot.countrycode=GBXX, determine whether the obtained country code needs to add or remove the corresponding feature; through the customized package managerservice, obtain the corresponding app Configuration list, to determine whether the app configuration list needs to be added or removed.
例如,如图9所示,framework部分的主要作用为apk的分类和feature的修改。该部分的主要获取参数为图7中的ro.product.countrycode=GB(如图9中G6所示),该参数用于两路。第一路经图9中G5所示的方法和图8中F1所示的一致的判断来决定获取的国家是否要添加或者移除对应的feature,最终会得到一个适合GB国码的feature。第二路需要经过如图9中G2所示的客制的PMS(package manager service),G2需要获取G3的app配置列表(该列表详细记录了某个国码下需要支持的app和必须移除的app),通过G2中的app加载判断决定app是否需要加载还是移除,最终得到一个适合GB国码的适配后的app列表(如图9中G1所示)。For example, as shown in Figure 9, the main role of the framework part is to classify the apk and modify the feature. The main acquisition parameter of this part is ro.product.countrycode=GB in FIG. 7 (shown as G6 in FIG. 9 ), and this parameter is used for two channels. The first path determines whether to add or remove the corresponding feature in the obtained country through the consistent judgment shown in G5 in Figure 9 and F1 in Figure 8, and finally obtain a feature suitable for the GB country code. The second path needs to go through the customized PMS (package manager service) shown in Figure 9 G2, G2 needs to obtain the app configuration list of G3 (the list records in detail the apps that need to be supported under a certain country code and must be removed app), determine whether the app needs to be loaded or removed through the app loading judgment in G2, and finally obtain an adapted app list suitable for the GB country code (as shown in G1 in Figure 9).
步骤S103,运行所述Android系统launcher app部分的桌面分类,完成所述目标国家码的设置。Step S103, run the desktop category of the launcher app part of the Android system, and complete the setting of the target country code.
在一些实施例中,所述步骤S103包括:将国家码适配对应的app配置列表之后,获取所述ro.boot.countrycode,利用所述launcher app部分的桌面布局选择器,确定对应的桌面配置。In some embodiments, the step S103 includes: after adapting the country code to the corresponding app configuration list, obtaining the ro.boot.countrycode, and using the desktop layout selector of the launcher app part to determine the corresponding desktop configuration .
例如,launcher app的处理如图10所示,该部分的开发主要是由于每个国家要求的初始化的桌面布局不同而设定的。在获取了framework中国家码适配后的剩余app列表后(如图10中H1所示),再获取如图7中E9所示的ro.product.countrycode(如图10中H5所示),通过launcher app中的桌面布局选择器(如图10中H3所示)加载H2中的桌面列表数据库Launcherprovider,最终获取一个合适的桌面布局(如图10中H4所示)。For example, the processing of the launcher app is shown in Figure 10. The development of this part is mainly due to the different initial desktop layouts required by each country. After obtaining the remaining app list after country code adaptation in the framework (as shown in H1 in Figure 10), then obtain ro.product.countrycode as shown in E9 in Figure 7 (as shown in H5 in Figure 10), Load the desktop list database Launcherprovider in H2 through the desktop layout selector in the launcher app (as shown in H3 in Figure 10), and finally obtain a suitable desktop layout (as shown in H4 in Figure 10).
图11是根据本申请实施例的一种基于Android系统设置国家码的设备示意图,该设备包括第一模块111、第二模块112和第三模块113。FIG. 11 is a schematic diagram of a device for setting a country code based on an Android system according to an embodiment of the present application. The device includes a
例如,通过上下半段写入方式,写入到init部分的属性服务,初始化到frameworks的应用分类,到launcher app的桌面分类,可以完成整个国家码的设置流程。声明上半段的写入和下半段的写入的区分,是针对刷机和启动不同区分的。上半段的写入是通过UI界面的操作写入NV分区的特定位置,这个位置不能被恢复出厂(主清除)擦除,恢复出厂后初始化的国家码。下半段写入是指令写入完成后,通过刷机软件升级完成国家码的设置。For example, through the upper and lower half of the writing method, write to the property service of the init part, initialize to the application category of the frameworks, and go to the desktop category of the launcher app, the entire country code setting process can be completed. The distinction between writing in the first half of the statement and writing in the second half is for different distinctions between flashing and starting. The writing in the first half is written to a specific location of the NV partition through the operation of the UI interface. This location cannot be erased by factory reset (master clear), and the country code initialized after factory restoration is restored. The second half of writing is to complete the setting of the country code through the firmware upgrade after the command is written.
第一模块111,将目标国家码分为上半段与下半段,通过上下半段分别写入的方式,将所述目标国家码写入到Android系统init部分的属性服务。The
在一些实施例中,所述目标国家码的上半段应用于售后端;其中,所述目标国家码的上半段的写入过程包括:用户在设置页面的搜索栏输入对应的暗码后,页面切换到工模应用的国家码设置页面;由用户选择对应的国码、运营商标志位及OEM客制位,组合得到所述目标国家码的上半段;将所述目标国家码的上半段写入NV分区的对应位置。In some embodiments, the first half of the target country code is applied to the after-sales end; wherein, the writing process of the first half of the target country code includes: after the user enters the corresponding password in the search bar on the setting page, The page switches to the country code setting page of the tooling application; the user selects the corresponding country code, operator logo bit and OEM custom bit, and combines to obtain the upper half of the target country code; the upper half of the target country code The segment is written to the corresponding location of the NV partition.
例如,如图2所示,上半段的写入主要在工模的应用中执行。该部分主要应用于售后端,该部分设计的理由为机器不便于使用指令写入,适用于国家码切换非技术性人员的操作。工作过程为在设置页面的搜索栏(如图2中B1所示)输入暗码##XXX#(或者相似的暗码)后,页面切换到工模应用的国家码切换页面(如图2中B2所示),在国家码设置页(如图2中B2所示)设置国家码,首先选择出货的国家码(比如英国国码为GB),然后选择运营商标志位,如果不选则设置X;选择OEM刻制位,如果不选则设置X;选完后点击确定按钮,把GBXX(如图2中B3所示)写入到NV分区某段位(恢复出厂的主清除操作清除不到的地方),如图2中B4所示;执行完上述操作后执行主清除和开机的动作,如图2中B5所示。For example, as shown in Fig. 2, the writing in the first half is mainly performed in the application of the mold. This part is mainly used in the after-sales end. The reason for the design of this part is that the machine is not easy to use and write instructions, and it is suitable for the operation of non-technical personnel to switch country codes. The working process is to enter the password ##XXX# (or a similar password) in the search bar of the setting page (as shown in B1 in Figure 2), and the page switches to the country code switching page of the mold application (as shown in B2 in Figure 2) As shown), set the country code on the country code setting page (as shown in B2 in Figure 2), first select the country code of the shipment (for example, the UK country code is GB), and then select the operator flag, if not selected, set X; Select the OEM engraving position, if not, set X; after selection, click the OK button, and write GBXX (as shown in Figure 2, B3) to a certain segment of the NV partition (the place that cannot be cleared by the main clearing operation of restoring the factory) ), as shown in B4 in Figure 2; after performing the above operations, perform the actions of main clearing and starting up, as shown in B5 in Figure 2.
在一些实施例中,所述目标国家码的下半段的写入过程包括:接收关于写入国家码下半段的指令参数,并根据该指令参数设置国家码NV分区的可执行程序,将所述目标国家码的下半段写入NV分区的对应位置。In some embodiments, the writing process of the second half of the target country code includes: receiving an instruction parameter about writing the second half of the country code, and setting the executable program of the country code NV partition according to the instruction parameter, and The second half of the target country code is written into the corresponding position of the NV partition.
例如,如图3所示,下半段的写入没有操作的页面,是在工厂版本写入的(工厂版本具有比较高的Root权限,这个是设置国家码可执行程序的执行的前提),通过指令把国码参数一次性写入NV分区某个段位。其工作过程为首先在如图3中C1所示的工厂版本接收指令参数,如adb shell lc_nv_ram write 60 8GBXX,这条参数的含义为:运行设置国家码nv分区的可自行程序为lc_nv_ram,执行write操作,在nv分区60的段位偏移8个位写入GBXX的国码参数到nv分区某段位或者分区(如图3中C3所示),待操作刷机(如图3中C4所示)刷机成用户版本,完成国家码的写入。For example, as shown in Figure 3, the page with no operation written in the second half is written in the factory version (the factory version has a relatively high Root authority, which is the prerequisite for setting the execution of the country code executable program), Write the country code parameters into a certain segment of the NV partition at one time through the command. Its working process is to first receive command parameters in the factory version shown as C1 in Figure 3, such as adb shell lc_nv_ram write 60 8GBXX, the meaning of this parameter is: run the self-programmable program that sets the country code nv partition as lc_nv_ram, execute write Operation, write the national code parameter of GBXX to a certain segment or partition of the nv partition (as shown in C3 in Figure 3) in the nv partition 60 segment offset of 8 bits, and flash the machine to be operated (as shown in C4 in Figure 3) Into the user version, complete the writing of the country code.
第二模块112,初始化所述Android系统,运行所述Android系统frameworks部分的应用分类。The
在一些实施例中,所述第二模块112用于:初始化所述Android系统,从NV分区的对应位置读取参数,利用bootloader部分生成参数ro.boot.countrycode=GBXX,并将所述ro.boot.countrycode=GBXX传递至init properties service;设立zprojects,根据硬件OD要求确定所述zprojects中的不同的编译项目,针对每个不同的编译项目分别添加一个宏变量到mk文件中,并将所述mk文件中的project_xx_xx传递至所述init propertiesservice。In some embodiments, the
例如,在如图2中B4及图3中C3所示的步骤之后,即如图4中D4所示的步骤之后,执行完第一次开机的读取工作。接下来,如图4所示,其工作流程为D2读取D4的分区的参数后,在bootloader里面生成Androidboot.countrycode=GBXX其目的是生成一个参数ro.boot.countrycode=GBXX提供给D6使用。D6读取两个重要的参数,其中一个是mk文件生产的编译宏通过宏控制设备的配置信息,比如wifi版本和LTE版本的device name的区分;mk文件(如图4中D3所示)是通过D1获取的;D1是为了增加编译的项目设立的zprojects,zprojects里面有不同的编译项目,是根据硬件OD要求做出来的,每个不同的项目会添加一个宏变量到mk文件中;D6会获取mk文件中的宏变量,在init程序中做硬件OD要求的区分;D6一共获取了两个部分的变量,一个是bootloader(如图4中D2所示)产生的ro.boot.countrycode,另一个是mk文件的project_wifi或者project_lte版本的宏变量(如图4中D3所示);D6需要按照D2和D3传过来的变量默认属性的添加。For example, after the steps shown in B4 in FIG. 2 and C3 in FIG. 3 , that is, after the steps shown in D4 in FIG. 4 , the reading work for the first boot is performed. Next, as shown in Figure 4, its workflow is to generate Androidboot.countrycode=GBXX in the bootloader after D2 reads the parameters of the partition of D4. Its purpose is to generate a parameter ro.boot.countrycode=GBXX for D6 to use. D6 reads two important parameters, one of which is the compiled macro produced by the mk file to control the configuration information of the device through the macro, such as the distinction between the device name of the wifi version and the LTE version; the mk file (as shown in D3 in Figure 4) is Obtained through D1; D1 is the zprojects set up to add compiled projects. There are different compiled projects in zprojects, which are made according to the hardware OD requirements. Each different project will add a macro variable to the mk file; D6 will Obtain the macro variables in the mk file, and distinguish the hardware OD requirements in the init program; D6 has obtained two parts of the variables, one is the ro.boot.countrycode generated by the bootloader (as shown in D2 in Figure 4), and the other One is the macro variable of the project_wifi or project_lte version of the mk file (as shown in D3 in Figure 4); D6 needs to be added according to the default attributes of the variables passed from D2 and D3.
图4中D1部分的原理如图5所示,其功能主要集中在zprojects存在很多编译的build,比如编译project_wifi、project_lte、project_wifi_audio、project_lte_audio等,这些build在编译过程中形成一个对应的编译宏到init模块的mk文件中,最终提供一个project_xx_xx。The principle of part D1 in Figure 4 is shown in Figure 5. Its functions are mainly concentrated in the fact that there are many compiled builds in zprojects, such as compiling project_wifi, project_lte, project_wifi_audio, project_lte_audio, etc. These builds form a corresponding compilation macro to init during the compilation process. In the mk file of the module, a project_xx_xx is finally provided.
图4中D2部分的原理如图6所示,首先从nv分区的某段位或者某个分区读取写入的参数;bootloader部分在获取该参数后,会判断该参数是否为空;如果为空的话,该部分会给一个默认的国家码参数USXX;如果不为空,则按照读取的参数设置cmdline的值android.countrycode=GBXX/USXX(默认);最终产生的结果是ro.boot.counrtycode=USXX。The principle of the D2 part in Figure 4 is shown in Figure 6. First, read the written parameters from a certain section of the nv partition or a certain partition; after the bootloader part obtains the parameter, it will judge whether the parameter is empty; if it is empty If so, this part will give a default country code parameter USXX; if it is not empty, set the cmdline value android.countrycode=GBXX/USXX (default) according to the read parameter; the final result is ro.boot.counrtycode = USXX.
在一些实施例中,所述init properties service接收所述ro.boot.countrycode=GBXX和所述project_xx_xx,以及读取国家码配置列表的配置文件,通过查询国码判断是否含有出货的国家,确定需要修改的属性信息。In some embodiments, the init properties service receives the ro.boot.countrycode=GBXX and the project_xx_xx, and reads the configuration file of the country code configuration list, checks the country code to determine whether it contains the country of shipment, and determines The attribute information that needs to be modified.
例如,图4中D6部分的原理如图7所示,图4中D1部分(如图5所示)和D2部分(如图6所示)分别产生参数为D6部分(如图7所示)所用。D6部分会收到D1部分和D2部分产生的两个参数:ro.boot.countrycode=GBXX与project_xx_xx;此外,还要读取图7中E7所示的国家码配置列表的配置文件。D6部分在获取图7中E4所示的参数后,首先会进行位拆解,获取国家生成ro.product.google.3bitX,如图7中E6及E7所示的ro.odm.setf.4bitX两个属性,这两个属性会被上层使用区分。在图7中读取config_country_list.xml(如图7中E3所示)后,会按照读取的E4获取的国码查询是否含有出货的国家,从而得到E8,该部分主要设置语言等和E9的重要的系统属性。通过获取E4的国家码和E2的编译参数和E11的E12国码查询判断修改重要的认证属性(如图7中E10所示)。For example, the principle of the D6 part in Fig. 4 is shown in Fig. 7, and the D1 part (as shown in Fig. 5) and the D2 part (as shown in Fig. 6) in Fig. 4 respectively generate parameters as the D6 part (as shown in Fig. 7) Used. Part D6 will receive two parameters generated by parts D1 and D2: ro.boot.countrycode=GBXX and project_xx_xx; in addition, the configuration file of the country code configuration list shown in E7 in Figure 7 must be read. After obtaining the parameters shown in E4 in Figure 7, the D6 part will first disassemble the bits and obtain the country to generate ro.product.google.3bitX, and the two ro.odm.setf.4bitX shown in E6 and E7 in Figure 7 attribute, these two attributes will be distinguished by the upper layer. After reading config_country_list.xml in Figure 7 (as shown in E3 in Figure 7), it will check whether the country code obtained by reading E4 contains the country of shipment, so as to obtain E8. This part mainly sets the language and E9 important system properties. By obtaining the country code of E4, the compilation parameters of E2 and the query of E12 country code of E11, it is determined to modify important authentication attributes (as shown in E10 in Figure 7).
图4中D7部分的原理如图8所示,添加该部分的作用是解决VTS和GSI的认证问题,该部分的执行程序必须放入vendor分区而非system分区。其中,图8中F1所示的和图7中E12所示的是同一个方法,图8中F5所示的和图7中E4所示的为同一参数,图8中F4所示的国家码判断器获取图5所示的参数并调用图8中F1所示的Google要求的国家码,经过判断处理之后后生成一个可触发的属性触发图8中F3所示的处理,最终配置出一个合适的fingerprint,这个fingerprint用于VTS和GSI的送测报告。The principle of part D7 in Figure 4 is shown in Figure 8. The role of adding this part is to solve the authentication problem of VTS and GSI. The execution program of this part must be placed in the vendor partition instead of the system partition. Among them, the method shown in F1 in Figure 8 and the method shown in E12 in Figure 7 are the same method, the method shown in F5 in Figure 8 and the method shown in E4 in Figure 7 are the same parameters, and the country code shown in F4 in Figure 8 The determiner obtains the parameters shown in Figure 5 and calls the country code required by Google shown in F1 in Figure 8, and generates a triggerable attribute after the judgment processing to trigger the processing shown in F3 in Figure 8, and finally configures a suitable The fingerprint, this fingerprint is used for the test report of VTS and GSI.
在一些实施例中,所述第二模块112用于:根据所述ro.boot.countrycode=GBXX,确定所获取的国家码是否需要添加或移除对应的feature;经过客制的package managerservice,获取对应的app配置列表,判断是否需要对该app配置列表进行添加或移除操作。In some embodiments, the
例如,如图9所示,framework部分的主要作用为apk的分类和feature的修改。该部分的主要获取参数为图7中的ro.product.countrycode=GB(如图9中G6所示),该参数用于两路。第一路经图9中G5所示的方法和图8中F1所示的一致的判断来决定获取的国家是否要添加或者移除对应的feature,最终会得到一个适合GB国码的feature。第二路需要经过如图9中G2所示的客制的PMS(package manager service),G2需要获取G3的app配置列表(该列表详细记录了某个国码下需要支持的app和必须移除的app),通过G2中的app加载判断决定app是否需要加载还是移除,最终得到一个适合GB国码的适配后的app列表(如图9中G1所示)。For example, as shown in Figure 9, the main role of the framework part is to classify the apk and modify the feature. The main acquisition parameter of this part is ro.product.countrycode=GB in FIG. 7 (shown as G6 in FIG. 9 ), and this parameter is used for two channels. The first path determines whether to add or remove the corresponding feature in the obtained country through the consistent judgment shown in G5 in Figure 9 and F1 in Figure 8, and finally obtain a feature suitable for the GB country code. The second path needs to go through the customized PMS (package manager service) shown in Figure 9 G2, G2 needs to obtain the app configuration list of G3 (the list records in detail the apps that need to be supported under a certain country code and must be removed app), determine whether the app needs to be loaded or removed through the app loading judgment in G2, and finally obtain an adapted app list suitable for the GB country code (as shown in G1 in Figure 9).
第三模块113,运行所述Android系统launcher app部分的桌面分类,完成所述目标国家码的设置。The
在一些实施例中,所述第三模块113用于:将国家码适配对应的app配置列表之后,获取所述ro.boot.countrycode,利用所述launcher app部分的桌面布局选择器,确定对应的桌面配置。In some embodiments, the
例如,launcher app的处理如图10所示,该部分的开发主要是由于每个国家要求的初始化的桌面布局不同而设定的。在获取了framework中国家码适配后的剩余app列表后(如图10中H1所示),再获取如图7中E9所示的ro.product.countrycode(如图10中H5所示),通过launcher app中的桌面布局选择器(如图10中H3所示)加载H2中的桌面列表数据库Launcherprovider,最终获取一个合适的桌面布局(如图10中H4所示)。For example, the processing of the launcher app is shown in Figure 10. The development of this part is mainly due to the different initial desktop layouts required by each country. After obtaining the remaining app list after country code adaptation in the framework (as shown in H1 in Figure 10), then obtain ro.product.countrycode as shown in E9 in Figure 7 (as shown in H5 in Figure 10), Load the desktop list database Launcherprovider in H2 through the desktop layout selector in the launcher app (as shown in H3 in Figure 10), and finally obtain a suitable desktop layout (as shown in H4 in Figure 10).
综上所述,本申请实施例只需一个软件版本出货即可满足多个国家地区的不同需求,在页面的操作更注重流程性的功能,注重主清除后开机初始化的功能区分,提高了生产效率,提升了用户体验。To sum up, the embodiment of this application only needs one software version to be shipped to meet the different needs of multiple countries and regions. The operation on the page pays more attention to the process-oriented functions, and pays attention to the function distinction of power-on initialization after the main clearing, which improves the Production efficiency and improved user experience.
另外,本申请的一部分可被应用为计算机程序产品,例如计算机程序指令,当其被计算机执行时,通过该计算机的操作,可以调用或提供根据本申请的方法和/或技术方案。而调用本申请的方法的程序指令,可能被存储在固定的或可移动的记录介质中,和/或通过广播或其他信号承载媒体中的数据流而被传输,和/或被存储在根据程序指令运行的计算机设备的工作存储器中。在此,本申请的一些实施例提供了一种计算设备,该设备包括用于存储计算机程序指令的存储器和用于执行计算机程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发所述设备执行前述本申请的多个实施例的方法和/或技术方案。In addition, a part of the present application can be applied as a computer program product, such as a computer program instruction. When it is executed by a computer, the method and/or technical solution according to the present application can be invoked or provided through the operation of the computer. The program instructions for invoking the method of the present application may be stored in a fixed or removable recording medium, and/or transmitted through broadcasting or data streams in other signal-carrying media, and/or stored in the In the working memory of the computer device on which the instructions are executed. Here, some embodiments of the present application provide a computing device comprising a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor When, the device is triggered to execute the methods and/or technical solutions of the foregoing multiple embodiments of the present application.
此外,本申请的一些实施例还提供了一种计算机可读介质,其上存储有计算机程序指令,所述计算机可读指令可被处理器执行以实现前述本申请的多个实施例的方法和/或技术方案。In addition, some embodiments of the present application also provide a computer-readable medium on which computer program instructions are stored, and the computer-readable instructions can be executed by a processor to implement the methods and methods of the above-mentioned multiple embodiments of the present application. / or technical solutions.
需要注意的是,本申请可在软件和/或软件与硬件的组合体中被实施,例如,可采用专用集成电路(ASIC)、通用目的计算机或任何其他类似硬件设备来实现。在一些实施例中,本申请的软件程序可以通过处理器执行以实现上文所述步骤或功能。同样地,本申请的软件程序(包括相关的数据结构)可以被存储到计算机可读记录介质中,例如,RAM存储器,磁或光驱动器或软磁盘及类似设备。另外,本申请的一些步骤或功能可采用硬件来实现,例如,作为与处理器配合从而执行各个步骤或功能的电路。It should be noted that the present application can be implemented in software and/or a combination of software and hardware, for example, it can be implemented by using an application specific integrated circuit (ASIC), a general-purpose computer or any other similar hardware devices. In some embodiments, the software program of the present application can be executed by a processor to realize the steps or functions described above. Likewise, the software program (including associated data structures) of the present application can be stored in a computer-readable recording medium such as RAM memory, magnetic or optical drive or floppy disk and the like. In addition, some steps or functions of the present application may be implemented by hardware, for example, as a circuit that cooperates with a processor to execute each step or function.
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。装置权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above, but that the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application. Therefore, the embodiments should be regarded as exemplary and not restrictive in all points of view, and the scope of the application is defined by the appended claims rather than the foregoing description, and it is intended that the scope of the present application be defined by the appended claims rather than by the foregoing description. All changes within the meaning and range of equivalents of the elements are embraced in this application. Any reference sign in a claim should not be construed as limiting the claim concerned. In addition, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means stated in the device claims may also be realized by one unit or device through software or hardware. The words first, second, etc. are used to denote names and do not imply any particular order.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310201775.4A CN116302182A (en) | 2023-03-02 | 2023-03-02 | Method and device for setting country code based on Android system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310201775.4A CN116302182A (en) | 2023-03-02 | 2023-03-02 | Method and device for setting country code based on Android system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116302182A true CN116302182A (en) | 2023-06-23 |
Family
ID=86788183
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310201775.4A Pending CN116302182A (en) | 2023-03-02 | 2023-03-02 | Method and device for setting country code based on Android system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116302182A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20130084106A (en) * | 2012-01-16 | 2013-07-24 | 삼성전자주식회사 | Apparatus and method for setting a interface in a portable terminal |
KR20130134441A (en) * | 2012-05-31 | 2013-12-10 | 하이네트(주) | Computer recovery apparatus for recovering computer system and method thereof |
CN104023333A (en) * | 2009-12-17 | 2014-09-03 | 英特尔公司 | Secure subscriber identity module service |
US20160165032A1 (en) * | 2014-12-05 | 2016-06-09 | Software 263 Technology (Beijing) Co., Ltd. | Softphone User Interface System and Method |
CN113329394A (en) * | 2021-06-09 | 2021-08-31 | 希姆通信息技术(上海)有限公司 | Android device-based country code menu and using method thereof |
-
2023
- 2023-03-02 CN CN202310201775.4A patent/CN116302182A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104023333A (en) * | 2009-12-17 | 2014-09-03 | 英特尔公司 | Secure subscriber identity module service |
KR20130084106A (en) * | 2012-01-16 | 2013-07-24 | 삼성전자주식회사 | Apparatus and method for setting a interface in a portable terminal |
KR20130134441A (en) * | 2012-05-31 | 2013-12-10 | 하이네트(주) | Computer recovery apparatus for recovering computer system and method thereof |
US20160165032A1 (en) * | 2014-12-05 | 2016-06-09 | Software 263 Technology (Beijing) Co., Ltd. | Softphone User Interface System and Method |
CN113329394A (en) * | 2021-06-09 | 2021-08-31 | 希姆通信息技术(上海)有限公司 | Android device-based country code menu and using method thereof |
Non-Patent Citations (1)
Title |
---|
GUOYONGCAN: "命令设置wifi国家码", pages 1 - 8, Retrieved from the Internet <URL:https://juejin.cn/post/7130037345339834381> * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI577539B (en) | Computer implementation method for runtime system, computer readable storage memory and system | |
TWI480802B (en) | Platform system, universal extension firmware interface Basic input and output system Support for hardware configuration changes, recording media and computer program products | |
CN107943485B (en) | A patch compilation platform and patch compilation method | |
US20120204160A1 (en) | Managing Non-Common Features for Program Code Translation | |
CN111399840A (en) | Module development method and device | |
CN103123605A (en) | Android platform automation integration testing method and device | |
RU2639667C2 (en) | Context invitation in trial version of application | |
CN110019111B (en) | Data processing method, data processing device, storage medium and processor | |
CN114879976A (en) | Version environment deployment method and device and electronic equipment | |
CN112052000A (en) | Component multiplexing and rendering method and device | |
CN110187872A (en) | A BIOS development method, system, electronic equipment, and storage medium | |
CN110806891A (en) | Method and device for generating software version of embedded equipment | |
CN112235132A (en) | Method, device, medium and server for dynamically configuring service | |
CN111694580B (en) | Method and device for upgrading and initializing storage device and electronic device | |
WO2025093052A1 (en) | Low-code conversion method and apparatus, readable storage medium, and device | |
CN109582396B (en) | Task state processing method, device and system and storage medium | |
CN118796161A (en) | Page updating method, device and non-volatile storage medium | |
CN116302182A (en) | Method and device for setting country code based on Android system | |
CN114185609A (en) | Method and device for processing equipment configuration information, storage medium and processor | |
CN112925523A (en) | Object comparison method, device, equipment and computer readable medium | |
CN112540755A (en) | Front-end-based component processing method, device, equipment and storage medium | |
US9628335B2 (en) | Building and transporting centrally modified software systems | |
CN111158873A (en) | System state machine implementation method and device, storage medium and processor | |
CN116560739A (en) | Boot sign customization method, device, equipment and storage medium | |
JP2019008799A (en) | System and method for merging source data from source application into target data of target application |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |