- 博客(53)
- 问答 (4)
- 收藏
- 关注
原创 Ubuntu20.04安装FastRTPS,报错没有fastrtps-config.cmake
检测fastrtps源码的versions.md发现Version 2.14.0开始,最新的源码把fastrtps-config.cmake改名成fastdds-config.cmake了。下载fastrtps源码,编译、安装后。发现依然没有fastrtps-config.cmake文件生成。所以应该把fastrtps源码切换到2.14之前的版本。
2024-12-27 14:57:29
381
原创 Error opening terminal: xterm.”的解决方法
文章浏览阅读2.1k次。make menuconfig时提示“Error opening terminal: xterm.”的解决方法 Linux环境下,编译嵌入式系统时会用到make menuconfig或make config命令,这些命令通常会使用ncurses库,如果ncurses库没有安装设置正确,可能出现如下的错误信息: Error opening terminal: xterm.解决办...文章浏览阅读401次。主要是看下面这两个变量是否设置正确。
2023-11-27 11:21:44
2157
原创 隐私政策链接
一、引言本软件重视用户的隐私。您在使用我们的服务时,我们可能会收集和使用您的相关信息。我们希望通过本《隐私政策》向您说明,在使用我们的服务时,我们如何收集、使用、储存和分享这些信息,以及我们为您提供的访问、更新、控制和保护这些信息的方式。本《隐私政策》与您所使用的服务息息相关,希望您仔细阅读,在需要时,按照本《隐私政策》的指引,作出您认为适当的选择。本《隐私政策》中涉及的相关技术词汇,我们尽量以简明扼要的表述,并提供进一步说明的链接,以便您的理解。您使用或继续使用我们的服务,即意味着同意我们按照本《
2022-02-23 21:31:41
553
原创 Android中fork的子进程崩溃后,logcat没有子进程崩溃信息
我的app中用C++实现了一个函数,这个函数使用fork创建一个进程执行新的功能。然后在app中调用这个函数,在这个函数中有一个字符数组,在给字符数组赋值时,指针越界,导致fork的进程崩溃,但是用logcat看不到fork进程崩溃信息,fork部分代码如下:pid = fork();if(pid == 0) { //child int ret = -1; close(pipe_fd[0]); ret = pCase->runCaseBlock(pBlockName);
2022-02-23 15:10:02
2258
原创 android invoke hidden API
String classpath = "android.content.pm.parsing.ParsingPackageUtils";getAssistClass(classpath).getDeclaredMethod("readKeySetMapping", Parcel.class);报错,接口被hidden01-20 10:31:53.467 3929 3964 W eHandlerServic: Accessing hidden method Landroid/content/.
2022-01-20 10:55:50
2885
原创 java中invoke第一个参数为空/类对象,而不是类实例
使用invoke时,有时其第一个参数为空。查了一下大部分答案都说如果反射的方法是static时,可以为空。其他情况下,参数需为类对象的实例,但测试发现参数是类对象,而不是类实例。Method forName = Class.class.getDeclaredMethod("forName", String.class);Class<?> vmRuntimeClass = (Class<?>) forName.invoke(null, "dalvik.system.VMRunt
2022-01-19 18:45:17
1329
1
原创 android 11源码框架不支持.cc和.cpp文件的混合编译
.cc和.cpp文件放在一个文件夹中,利用android 11源码构建平台进行构建,出错。报错信息:[ 76% 708/920] including apps/Wheeljack/app/src/main/jni/Android.mk ...FAILED:apps/Wheeljack/app/src/main/jni//gabi++/sources.mk: error: stlport_static: Files ending in .cpp .cc.arm are deprecated. Se.
2022-01-13 18:10:04
1697
原创 更改repo的python版本
Ubuntu电脑的默认版本是python2.7但是repo时确用的是python3更改方法:➜ localbin which repo/home/wq/Applications/localbin/repo➜ localbin vim repo打开repo文件后会发现,以下代码def check_python_version(): """Make sure the active Python version is recent enough.""" def reexe
2021-10-14 15:00:16
7400
1
原创 android 8.1中的ActivityManager.getService()在低版本的形式
android 8.1及网上版本可以调用ActivityManager.getService()获得service。如pkg = ActivityManager.getService().getLaunchedFromPackage(activityToken);但在低版本如7.1,ActivityManager没有getService()这个函数。需要用ActivityManagerNative.getDefault()替代,如:ActivityManagerNative.getDefault().
2021-09-08 11:48:01
1086
转载 Android adb shell am 命令介绍
参考https://blog.youkuaiyun.com/soslinken/article/details/50245865-a <ACTION> intent action, 例如 "android.intent.action.VIEW". -d <DATA_URI> intent data URI, 例如 "content://contacts/people/1". -t <MIME_TYPE> intent MIME type, 例如 "i
2021-08-27 15:13:50
918
原创 gpg秘钥的--keyserver
下载高通代码时,出现错误➜ qualcomm sudo repo init -u git://codeaurora.org/platform/manifest.git -b release -m LA.UM.5.9.r1-01700-8x53.0.xml --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stableDownloading Repo source from git://codeaurora.org..
2021-08-19 16:36:36
2174
9
原创 编译内核代码
编译内核代码git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git先运行make menuconfig命令,生成.config文件。再运行make命令。如果需要更改编译配置,可以再运行make menuconfig命令,更改相应的配置选项后,生成新的.config文件后,再重新make...
2021-07-27 17:03:32
135
原创 修改编译Android 11源码时发现报can‘t find symble的错误
在/home/wq/android_11_source_repo/packages/apps/Contacts/src/com/android/contacts/activities/ContactSelectionActivity.java加入了一句 getWindow().addSystemFlags(android.view.WindowManager.LayoutParams .SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_W
2021-07-21 11:42:58
1072
原创 android studio 对apk进行v1签名
Build->Generate Signed Bundle or APK,选择签名文件,并输入密码和别名即可在app/debug文件夹得到相应签名的文件
2021-07-06 11:32:34
484
原创 Could not get resource ‘https://registry-mirrors.avlyun.org/repository/maven-releases/com/avl/module
./gradlew build编译时出现一些下载问题FAILURE: Build failed with an exception.* What went wrong:Could not determine the dependencies of task ':app:lintVitalRelease'.> Could not resolve all artifacts for configuration ':app:debugCompileClasspath'. > Cou
2021-05-21 16:10:19
418
1
原创 Unable to load class ‘javax.xml.bind.JAXBException‘.
android studio 4.2时出现,Unable to load class 'javax.xml.bind.JAXBException'.This is an unexpected error. Please file a bug containing the idea.log file.谷歌查看,好像与JDK版本有关,要用JDK8才行,下载JDK8后,发现项目无法更改adk路径,file->project structure->SDK Location->JDK
2021-05-17 16:23:02
9890
1
原创 编译7源码时,报错:SSL error when connecting to the Jack server. Try ‘jack-diagnose‘
ninja: Entering directory `.'[ 0% 1/2530] Ensure Jack server is installed and startedFAILED: /bin/bash -c "(prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.8.ALPHA.jar 2>...
2021-05-12 17:43:08
6194
2
原创 Android手机刷机不用源码的fastboot导致出错
1.编译源码后,源码的fastboot devices无法识别到设备解决方法:➜ android_11_source_repo which fastboot /home/android_11_source_repo/out/soong/host/linux-x86/bin/fastboot#更改源码目录下的fastboot的权限➜ sudo chown root:root /home/android_11_source_repo/out/soong/host/linux-x86/b
2021-04-08 10:25:16
1470
原创 adb用法
1.adb pull 设备中没有权限目录下的文件到本地(1)先用su命令把文件拷到公共目录/data/local/tmp目录下(2)把文件从/data/local/tmp目录下adb pull出来➜ 2020-0033 adb shell "su 0 cp /system/vendor/lib/hw/android.hardware.drm@1.0-impl.so /data/local/tmp"➜ 2020-0033 adb pull /data/local/tmp/android.hardw
2021-03-10 17:31:02
136
原创 android9开始的非SDK接口限制
参照以下两个官方信息https://developer.android.google.cn/distribute/best-practices/develop/restrictions-non-sdk-interfaceshttps://developer.android.google.cn/about/versions/10/non-sdk-q
2021-02-02 10:37:18
182
原创 signal 6 (SIGABRT), code -6 (SI_TKILL) Abort message: ‘stack corruption detected (-fstack-protector
在测试调用native的rw_i93.cc文件的rw_i93_sm_format函数时,出现程序crash,报错信息如下12-18 11:19:39.056 1453 2114 I WifiStateMachine: checkScoreBasedQuality - mPreviousScore[0]:81 mPreviousScore[1]:81 mPreviousScore[2]:81 s2Score:80mPrevoiusScoreAverage:8112-18 11:19:39.113 ...
2020-12-18 15:38:28
4267
原创 处理器如何实现原子操作
处理器如何实现原子操作一、并发和并行概念二、单核原子操作解决方法三、多核多核原子操作总线锁方式缓存锁方式(缓存一致性)存储器结构多核cpu的存储关系缓存一致性MESI协议CAS一、并发和并行概念原子(atomic):是“不能被进一步分割的最小粒子”,而原子操作(atomic operation)意为“不可被中断的一个或一系列操作”。并发:单核cpu上,当多个线程在在操作时,把cpu运行时间划分为若干时间段,再将时间段分配给各个线程执行,在一个时间段的线程代码运行时,其他线程处于挂起状态。并行:多核c
2020-11-29 23:41:07
2778
2
原创 c++ 11标准原子操作atomic和mutex锁的区别
c++在线编码网站http://cpp.sh/不加锁情况#include <thread>#include <atomic> #include <iostream>#include <time.h>using namespace std;// 全局的结果数据 long total = 0; static const int numthread = 50;// 点击函数void click(){ for(i...
2020-11-23 01:07:58
2168
2
原创 Android studio链接设备用的是platform-tools里的adb工具
android studio的file->project structure里的Android SDK location 里设置了SDK路径,platform-tools就在这个路径下,我之前把这个文件删了,所以studio一直识别不到设备
2020-11-03 10:18:12
785
原创 kernel下msm的版本信息
angle 3.10.73对应的commit ID为 cedc139f6187bullhead 3.10.73对应的commit ID为 c33d1bdff9c4bullhead 3.10.73对应的commit ID为 7d1(或l)e90244638safish 3.18.*对应的commit ID为 a765425526fe01a8649cea4ce0ae706fa8e8a227
2020-11-02 15:27:04
629
原创 git用法
git diff Avengers_ui/app/src/main/java/com/weiqing/tanyou/ui/ScanHelper.java结尾出现^M,说是编辑器换行符不一样的问题,用git config --global core.whitespace cr-at-eol命令可已解决。
2020-10-26 11:19:33
451
原创 adb的查看手机的信息
➜ debug git:(master) ✗ adb shell127|dipper:/ $ getprop ro.product.model MI 8dipper:/ $ getprop ro.product.board sdm845查看设备信息build.prop里面还有好多其他的信息把/system/build.pr.
2020-10-26 10:27:21
521
1
原创 linux mint更改锁屏壁纸
系统是Linux mint。进入/usr/share/backgrounds/linuxmint 目录下,把自己的图片拷到目录下,改变default_background.jpg的软链接指向即可。➜ bulletin git:(master) ✗ cd /usr/share/backgrounds/linuxmint➜ linuxmint ls -altotal 5836drwxr-xr-x 2 root root 4096 Dec 14 2019 .drwxr-xr-x 7 r
2020-10-24 11:37:12
903
原创 编译kernel是报错不支持pic
解决方法:在根目录下的Makefile文件的-std=gnu89后添加-fno-pieKBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common \ -Werror-implicit-function-declaration \ -Wno-format-security \ -std=gnu89添加-fno..
2020-10-12 13:12:10
418
原创 python编程踩坑记
1.用dict不包含的键读取value值,会报错test_result_dict = dict()#test_result_dict没有'CVE_2016_5345'这个键case_result = test_result_dict['CVE_2016_5345']#不是返回空值,而是报错'CVE_2016_5345'
2020-10-11 19:56:53
91
原创 android中Servive类特性
//bind service Intent intent = new Intent(mContext, CaseHandlerService.class); mContext.bindService(intent, mConn, mContext.BIND_AUTO_CREATE);在MainActivity绑定Service类时,先调用的是CaseHandlerService的onCreate();再调用...
2020-09-20 18:34:24
366
原创 寄存器的使用
r0-r3用作传入函数参数,传出函数返回值。在子程序调用之间,可以将 r0-r3 用于任何用途。 被调用函数在返回之前不必恢复 r0-r3。如果调用函数需要再次使用 r0-r3 的内容,则它必须保留这些内容。r4-r11被用来存放函数的局部变量。如果被调用函数使用了这些寄存器,它在返回之前必须恢复这些寄存器的值。r12是内部调用暂时寄存器 ip。它在过程链接胶合代码(例如,交互操作胶合代码)中用于此角色。在过程...
2020-09-02 18:19:05
963
转载 native层c语言获取网络NTP时间
https://www.cnblogs.com/zy791976083/p/9779421.html
2020-08-18 11:59:10
1586
3
原创 数组指针和指针数组;引用数组和(const)数组引用
int a[4]: 表示a是一个数组,数组大小为4,存储的数据类型为int型int* a[4]: 表示a是一个指针数组,数组大小为4,存储的是指向int型数据的指针。[]的优先级比*高,a先于[]结合构成一个数组,int* 表示a[4]数组中存储的数据类型。int (*b)[4]:表示(*b)是一个数组,数组大小为4,存储的数据类型为int型。既然(*b)表示一个数组,那么b就表示一个指向数组的指针,所以这就是数组指针。用法如下:#include <stdio.h>in..
2020-05-14 11:41:01
468
原创 输出字符串时,printf与cout的区别
最近写了了一段代码 std::string* str=new std::string("1233"); std::string& tem=*str; printf("str=%s\n",str->c_str()); printf("tem=%s\n",tem.c_str()); std::cout<<"str="<<*str<<std...
2020-05-05 17:06:17
459
1
原创 linux下线程之间pipe通信c++练习
首先是用pipe在主线程和子线程通信,而且read是阻塞的#include <pthread.h>#include <unistd.h>#include <stdlib.h>#include <stdio.h>#include <fcntl.h>typedef struct __Thread{ pthread...
2020-04-22 23:46:49
869
原创 bitset只能处理数字型的字符串
最近在使用bitset时,发现bitset只能处理数字型的字符串,但不明白原因, string strval("1100"); bitset<8> kkk(strval);上面的代码可以编译通过,但是改为带字符的字符串时,编译就报错了 string strval("110h"); bitset<8> kkk(strval);...
2020-04-13 23:15:59
436
1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人