2022年4月

app 中修改

需要在 xml 文件中增加 system 相关设置,编译的时候,会有红字提示不能安装,这个提示不用管。

aosp 中修改

  1. 找到as编译出的 app,\项目名\app\build\outputs\apk\debug\app_debug.apk
  2. 在AOSP源码 packages/apps/下新建一个文件夹 GetImei
  3. 拷入附件的android.mk 拷入as 编译的 app_debug.apk,改名为 GetImei.apk
  4. 源码 \device\qcom\common\base.mk 中添加一行 PRODUCT_PACKAGES += GetImei
  5. 源码编译:
source build/envsetup.sh
lunch
(选择项目)
mmm packages/apps/GetImei/
  1. 拿到 \out\target\product\msm8937_32\system\app\GetImei\GetImei.apk

  2. 设备 root remount
adb root
adb disable-verity
adb reboot

adb root
adb remount
adb shell
#mkdir system/app/GetImei
#chmod 777 system/app/GetImei
#exit
adb push D:\GetImei.apk system/app/GetImei/
adb shell
#chmod 777 system/app/GetImei/GetImei.apk
#reboot

参考:

RK3399 Android7.1系统 自定义号码CMEI信息写入vendor_storage
https://blog.csdn.net/yafeixi/article/details/95626903

[RK3399][Android7.1] Vendor Storage区域知识及探讨
https://blog.csdn.net/kris_fei/article/details/79580845

通过设置菜单设置

  1. 下拉通知,点击设置,进入设置菜单。
  2. 进入应用和通知,查看全部应用。
  3. 点击 quickstep 或者 其他想要的 app.
  4. 高级,主屏幕应用,点击选中想要的 app 作为 launcher.

通过代码设置

这个网上有很多,修改 xml 文件。

参考:

Launcher安卓手机桌面怎么切换 Launcher手机桌面切换方法
https://product.pconline.com.cn/itbk/sjtx/sjwt/1711/10278395.html
Android 6.0替换原系统Launcher傻瓜教程
https://blog.csdn.net/kkle1994/article/details/85338328

定时器使用:

#include <linux/module.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/fs.h>
#include <linux/cdev.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/timer.h>

#define SECOND_MAJOR 248

struct timer_list mt;

void mtimer_handler(struct timer_list*arg)
{
    printk("__%s__\n",__func__);
    mod_timer(&mt,jiffies + 10*HZ);
}

static int __init timer_init(void)
{   
//  init_timer(&mt);
//  init_timer(mt); 

    timer_setup(&mt,&mtimer_handler,0);
//  mt.function = mtimer_handler;
    mt.expires = jiffies + 10*HZ;

    add_timer(&mt);

    printk("[%s]\n",__func__);
    return 0;
}

module_init(timer_init);

static void __exit timer_exit(void)
{
    del_timer(&mt);
    printk("[%s]\n",__func__);

}

module_exit(timer_exit);

MODULE_AUTHOR("BW");
MODULE_LICENSE("GPL v2");

参考:

Linux内核定时器struct timer_list
https://www.cnblogs.com/Cqlismy/p/11838913.html

linux驱动之定时器的使用
https://www.cnblogs.com/hjj801006/p/4551378.html

linux下网卡链路状态检测方法
https://blog.csdn.net/wj31932/article/details/98087522

Linux驱动程序教程:如何编写简单的Linux设备驱动程序
https://blog.csdn.net/yeshennet/article/details/82290724

Linux驱动技术(七) _内核定时器与延迟工作
https://www.cnblogs.com/xiaojiang1025/p/6388604.html

定时器+工作队列 内核周期性任务的实现机制
https://blog.csdn.net/iteye_8149/article/details/82240560?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1.pc_relevant_antiscanv2&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1.pc_relevant_antiscanv2&utm_relevant_index=2

工作队列(workqueue) create_workqueue/schedule_work/queue_work
https://blog.csdn.net/angle_birds/article/details/8448070

[Linux]softirq,tasklet和workqueue
https://zhuanlan.zhihu.com/p/361409809

Linux-workqueue讲解
https://www.cnblogs.com/vedic/p/11069249.html

【Linux内幕】schedule_work基本流程
https://blog.csdn.net/u012503639/article/details/107933857

(linux)schedule_delayed_work()
https://www.cnblogs.com/yanghong-hnu/p/4671350.html

linux驱动之定时任务timer,队列queue,小任务tasklet机制及用法
https://blog.csdn.net/u013256018/article/details/47803941

参考:

QT中倒计时显示 QLCDNumber
https://blog.csdn.net/zyc_csdn/article/details/78830577

【QT】利用QT做一个简单的LCD的倒计时效果
https://rong11417.blog.csdn.net/article/details/104573462?spm=1001.2101.3001.6650.4&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-4.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-4.pc_relevant_default&utm_relevant_index=9

QT下lcdNumber实现倒计时源代码
https://haigear.blog.csdn.net/article/details/120562850?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1.pc_relevant_default&utm_relevant_index=2

QLCDNumber制作的超简单计时器,按下空格键暂停。
https://blog.csdn.net/shensheng100221/article/details/103671469?spm=1001.2101.3001.6650.2&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-2.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-2.pc_relevant_default&utm_relevant_index=5

QLCDNumber使用
https://blog.csdn.net/xuancailinggan/article/details/77487705?spm=1001.2101.3001.6650.6&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-6.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-6.pc_relevant_default&utm_relevant_index=12

Qt|QTimer动态倒计时显示距离下一次任务执行剩余的时间
https://blog.csdn.net/kllo__/article/details/120221995?spm=1001.2101.3001.6650.10&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-10.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-10.pc_relevant_default&utm_relevant_index=16

关于QT倒计时的简单实现
https://blog.csdn.net/qq_43627385/article/details/100022968?spm=1001.2101.3001.6650.11&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-11.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-11.pc_relevant_default&utm_relevant_index=17

Qt使用QTimer实现倒计时功能
https://blog.csdn.net/kllo__/article/details/120200812?spm=1001.2101.3001.6650.15&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-15.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-15.pc_relevant_default&utm_relevant_index=21

清除数据

lineChart.clear(); 用于清除所有数据。

参考: https://blog.csdn.net/qq_44720366/article/details/104816512

刷新 x 轴数据问题

参考: https://blog.csdn.net/qq_35071078/article/details/76082125

参考:

How to use LineChart in com.github.mikephil.charting.charts
https://www.tabnine.com/code/java/classes/com.github.mikephil.charting.charts.LineChart

Android详细介绍MPAndroidChart-LineChart
https://www.cnblogs.com/leshen/p/12606161.html

MPAndroidChart
https://github.com/PhilJay/MPAndroidChart

MPAndroidChart
https://weeklycoding.com/mpandroidchart/

MPAndroidChart LineChart X轴标签显示问题
https://www.freesion.com/article/6030644140/

MPAndroidChart折线图详细使用
https://www.jianshu.com/p/185e50a70aa7

Android图表控件MPAndroidChart——LineChart实现 XY轴、原点线的直尺刻度样式
https://blog.csdn.net/ww897532167/article/details/78520548

Android图表控件MPAndroidChart——曲线图LineChart的使用(财富收益图)
https://blog.csdn.net/ww897532167/article/details/74129478