[Factory mode] 怎么配置工厂模式测试项
[DESCRIPTION]
修改alps/mediatek/custom/$proj/factory/factory.ini配置工厂模式测项
[KEYWORD]
Factory mode test
[SOLUTION]
alps/mediatek/custom/$proj/factory/factory.ini 可以定制Factory mode测试项,如:
MenuItem=M-Sensor;
MenuItem=ALS/PS;
Factory mode启动后,会先后寻找 /sdcard/factory.ini,/etc/factory.ini文件,所以可以复制
factory.ini文件到SD卡,并修改其中的内容来配置测试项. 若找不到ini文件,则使用factory.c中
的默认配置
Related code all in alps/mediatek/factory/src/factory.c:
Golbal test items array:
static item_t ftm_cust_items[ITEM_MAX_IDS]; // factory.ini settings
static item_t ftm_cust_auto_items[ITEM_MAX_IDS];// factory.ini settings
static item_t ftm_test_items[] // Default settings
static item_t ftm_auto_test_items[] // Default settings
ftm_test_items && ftm_auto_test_items controled by MACROS
(ie. FEATURE_FTM_KEYS/CUSTOM_KERNEL_ALSPS...)
In main:
read_config(/sdcard/factory.ini or /etc/factory.ini)
ftm_cust_items = Items in (factory.ini && ftm_test_items)
ftm_cust_auto_items = Items in (factory.ini && ftm_test_items && ftm_auto_test_items)
修改alps/mediatek/custom/$proj/factory/factory.ini配置工厂模式测项
[KEYWORD]
Factory mode test
[SOLUTION]
alps/mediatek/custom/$proj/factory/factory.ini 可以定制Factory mode测试项,如:
MenuItem=M-Sensor;
MenuItem=ALS/PS;
Factory mode启动后,会先后寻找 /sdcard/factory.ini,/etc/factory.ini文件,所以可以复制
factory.ini文件到SD卡,并修改其中的内容来配置测试项. 若找不到ini文件,则使用factory.c中
的默认配置
Related code all in alps/mediatek/factory/src/factory.c:
Golbal test items array:
static item_t ftm_cust_items[ITEM_MAX_IDS]; // factory.ini settings
static item_t ftm_cust_auto_items[ITEM_MAX_IDS];// factory.ini settings
static item_t ftm_test_items[] // Default settings
static item_t ftm_auto_test_items[] // Default settings
ftm_test_items && ftm_auto_test_items controled by MACROS
(ie. FEATURE_FTM_KEYS/CUSTOM_KERNEL_ALSPS...)
In main:
read_config(/sdcard/factory.ini or /etc/factory.ini)
ftm_cust_items = Items in (factory.ini && ftm_test_items)
ftm_cust_auto_items = Items in (factory.ini && ftm_test_items && ftm_auto_test_items)