首页 文章 精选 留言 我的

精选列表

搜索[安卓系统],共10021篇文章
优秀的个人博客,低调大师

RF Analyzer for Android 安卓平台连接HackRF的App

Over the last week I've been working on a new project, trying to build a spectrum analyzer for Android that works with my hackrf_android library. Now I finally reached the point were it is stable enough to be useful and I created the GitHub repository today: https://github.com/demantz/RFAnalyzer It is still very basic and I have a lot of ideas to extend its functionality, but I thought it's better to have testers involved as early as possible. Eventually it should evolve in something similar to GQRX, supporting different modes and devices. But that will take some time! The new version of RF Analyzer (1.07) has now support for AM/FM demodulation! It is now also available on Google Play: See the readme on GitHub for a more detailed description! RF Analyzer running on a Nexus 5 In this blog I'm going to show what you can do with the app and in the end I explain how it is working internally for those who like to play with the source code. I also tried to document the code as good as possible, but it is always easier if the basic flow of the program is explained before looking at it. What you can do with it Right now there aren't many fancy features. The app will present you with a simple UI showing the frequency spectrum including a waterfall plot. Here is a list of what you can do right now with version 1.00: Browse the spectrum by scrolling horizontally Zoom in and out, both horizontally and vertically Adjust the sample rate and center frequency to match the current view of the screen by double tapping Auto scale the vertical axis Jump directly to a frequency Adjust the gain settings of the HackRF Select a pre-recorded file as source instead of a real HackRF Change the FFT size Setting the frame rate either to a fixed value or to automatic control Activate logging and showing the log file I'm planning to also support the rtl-sdr in the future and of course I want to include the actual demodulation for common analog modes like AM, FM, SSB, ... But so far you can only browse the spectrum. Here is how you get it to work: Plug the HackRF into your Android device using an OTG (on-the-go) cable. You can get those cables for around 3$ and you can also find them as Y-version which enables external powering the HackRF, for those phones/tablets that don't deliver enough power. After you start RF Analyzer you can hit the start button in the action bar and it should prompt you for the permission to access the USB device. Once you did that the FFT will start: FFT at 20 Msps showing FLEX pagers at 931 MHz Use common gestures to zoom and scroll both vertically and horizontally. Note that the vertical axis of the FFT plot also affects the colors of the waterfall plot: Zoomed in(both vertical and horizontal)view If you scroll outside the current range of the FFT or if you zoom so that the resolution of the FFT is too low you can simply double tap the screen. RF Analyzer will re-tune the HackRF to the frequency currently centered on the screen and also ajust the sample rate so that the FFT covers exactly the frequency range that is currently visible: The resolution of the FFT is too low when zoomed in too closely. And we scrolled to far right that we can see the end of the FFT on the right site After double tapping the HackRF is tuned to 931,61 MHz (note the DC offset peak!) and the sample rate is now adjusted to about 2.5 Msps so that we see the full FFT resolution again You can also use the autoscale button in the action bar to adjust the vertical scale so that it ranges from the minimum to the maximum of the currently visible values of the FFT: If you want to jump to a certain frequency, use the 'set frequency' button and it will prompt you to enter a new frequency: The gain settings of the HackRF (both VGA and LNA gain) can be accessed through the 'set gain' button in the overflow menu: In the settings activity you can: Select other source types (currently only HackRF or file source) Set the FFT size Set the screen orientation (auto / landscape / portrait) Turn autostart on and off (so that you don't have to hit the start button every time) Set the frame rate to auto or a fixed value (useful if you want a linear time axis in the waterfall plot) Deactivate vertical zoom and scrolling (so that you don't accidentally alter the vertical scale while scrolling through frequencies) Turn on logging and set the location of the log file. Show the log file Settings Activity of RF Analyzer on a Nexus 7 Implementing the file source was helpful for debugging the application. It is also a way to test the app if you don't have an OTG cable or your phone/tablet doesn't output enough power for the HackRF. Selecting the file source type will allow you to use RF Analyzer with recorded samples from hackrf_transfer or Test_HackRF. I've uploaded a short capture of some FLEX pager signals for testing:FLEX Pager at 931MHz (2Msps) How it works For those who want to play with the sources of RF Analyzer (GPLv2) I want to quickly explain the internal structure of the app: (Uncomplete) class diagram of RF Analyzer. Underlined classes are running in seperate threads. Gray elements are external modules. To support different devices I defined a common interface that is implemented by all classes which represent sources of IQ samples. The Scheduler will continuously read samples from the source to prevent the receive buffers of the device to fill up. It forwards samples in packets of the size of the FFT to the AnalyzerProcessingLoop by inserting them in a queue. If the queue is full, the samples are thrown away in order to not block the input device. The AnalyzerProcessingLoop also runs in a separate thread and reads the sample packets from the queue, processes them with the help of the FFT class and then calls draw() on the AnalyzerSurface. This method draws the given FFT samples on a SurfaceView and also draws a new line of the waterfall plot as well as the horizontal and vertical axis. For a more detailed impression of how the app works, have a look into the sources onGitHub. I tried my best to add helpful comments to understand the flow of the program. If you have any questions, comments or any other input, don't hesitate to leave a comment or contact me directly on Twitter:@dennismantz Have fun testing it! ;) Here is the video were I demonstrate the old version of RF Analyzer: 原文地址:http://tech.mantz-it.com/2014/10/rf-analyzer-explore-frequency-spectrum.html 本文转自 K1two2 博客园博客,原文链接: http://www.cnblogs.com/k1two2/p/5705149.html ,如需转载请自行联系原作者

优秀的个人博客,低调大师

[cocos2dx]windows上编译安卓程序

首先在exclipe上配置好java的jdk1.6或更高,配置好android环境(最好有android2.1或2.2以及更高版本的sdk)。 在下载个ndk,ndk解压后先放到一边,cygwin,解压后,sygwin解压安装会比较久大概4-5个小时,如果解压安装成功, cygwin安装过程请参考http://wenku.baidu.com/view/88b001ef4afe04a1b171de05.html看到第三步就行了,接下来继续看 安装好cygwin后验证下是否成功打入(注意空格)make -v ,gcc -v 没有出现意外的话就出现以下画面 表示你已经装好cygwin了,接下来是修改在安装cygwin目录下,如本人安装目录如下D:\cygwinx\home\Administrator 然后最好用UE编辑器点开.bash_profile,然后在最下面加上 (ndk路径以及cocos2dx路径即/cygdrive/你所在的盘的ndk路径如下) NDK_ROOT=/cygdrive/e/AndroidNDK/android-ndk-r8e export NDK_ROOT COCOS2DX_ROOT=/cygdrive/d/cocos2d-2.1beta3-x-2.1.1 export COCOS2DX_ROOT 然后就完成了大半了,再在D:\cocos2d-2.1beta3-x-2.1.1下点击 第一个填写的是包名称,一般填写***.***.***之类, 第二个是填写工程名,你根据需要定义咯 在最好选项是选择哪种android的sdk,最好使用经历低的版本(如2.1或2.2)比较好兼容。 然后生产出来时个简单的helloworld工程,如果是要将自己的工程装成android的,及将生成工程文件中的proj.android拷贝到自己的工程文件中,如下图 然后需要修改三个地方如 1)将proj.win32里面的.h以及.cpp文件拷贝到Classes中 (如果以后修改那些.cpp文件或.h文件需要继续从proj.win32拷贝到Classes中覆盖掉之前的文件再生成新的android工程) 2)进去proj.android\jni下面修改Android.mk, 将所有.cpp的路径都添加进去即可,如本人增加了下面那些路径, 3)用UE编辑器修改build_native.sh文件 在第三行下面加入,如下 NDK_ROOT=/cygdrive/E/AndroidNDK/android-ndk-r8e COCOS2DX_ROOT=/cygdrive/D/cocos2d-2.1beta3-x-2.1.1 GAME_ROOT=$COCOS2DX_ROOT/RussiaGame (注意RussiaGame是我cocos2dx的工程名) GAME_ANDROID_ROOT=$GAME_ROOT/proj.android RESOURCE_ROOT=$GAME_ROOT/Resources 好了 修改完这些保证每错误之后 打开cygwin,然后经过下面路径(以本人路径为参照) 到最后./build_native.sh之后没错误的话(这个过程比较久大概十几二十分钟,有些可能要半个钟头),它就能生产android项目了(成功的判断是看他是否生产.so文件) 成功的话在路径D:\cocos2d-2.1beta3-x-2.1.1\RussiaGame\proj.android\libs\armeabi下能看到libgame.so文件 然后接下来就可以生成可以在eclipse上运行的android工程了,导入D:\cocos2d-2.1beta3-x-2.1.1\RussiaGame\proj.android这个就可以在eclipse上看到该工程了 如果出现 如果一开始这个文件没有存在的话(我当时是一开始没有这个文件,当时很悲剧,常看了项目jdk是1.6的没问题,最后发现就是这个文件缺失造成的) 右键点击你的项目-》选择导入-》再点击browse-》(进入到你的项目所在的目录,进入cocos2dx->platform->android->java)然后就会出现那个文件了 以及有个libcocos2dx项目也有了(这个项目相当于类库不要删掉它),以后就不用重复上面这些导入了。 然后没有报错就说明成功啦,然后就可以在eclipse上进行真机运行啦(注意好像虚拟机运行一直会出现bug,我也一直没成功,所以建议真机运行吧,好像现在只能真机运行才行),然后就可以成功运行以及会在bin文件下回生成一个apk文件可以拷贝给大家玩啦,好开心的喔。。。。。 然后到现在这样就算是转android成功了, (悄悄说下 ,如果需要把项目在真机上弄成竖屏,及要在AndroidManifest.xml中改一改,android:screenOrientation="landscape"(横屏),android:screenOrientation="portrait"(竖屏),它默认为横屏),到现在好开心的,打了这么多,大家一起学习吧加油 本文转蓬莱仙羽51CTO博客,原文链接:http://blog.51cto.com/dingxiaowei/1366192,如需转载请自行联系原作者

优秀的个人博客,低调大师

在安卓中对应用进行单元测试

实际开发中,开发 android软件的过程需要不断的进行 测试。使用 Junit测试框架,是正规android开发的必用技术,在Junit中可以得到组件,可以模拟发送时间和检测程序处理的正确性。使用方法如下: 第一步:添加单元测试所使用到的类库以及单元测试的运行工具 在application结点内部添加 <uses-library android:name=”android.test.runner”/> 在application结点外部添加 <instrumentation android:name=”android.test.InstrumentationTestRunner” Android:targetPackage=”cn.itcast.action”android:label=” Testfor My App”/> 上面的targetPackage就是要测试的目标应用的包名 第二步:编写单元测试类代码,选择要测试的方法,右键点击”Run As”-“Android JUnit Test”来进行测试,注意该类需要继承AndroidTestCase类 最新内容请见作者的GitHub页:http://qaseven.github.io/

优秀的个人博客,低调大师

不只网页,17 款安卓应用存在“心血”漏洞

据国外媒体的报道,美国安全软件供应商FireEye日前发布研究报告称,他们一共发现了17款存在“心脏流血(Heartbleed)”漏洞的Android应用,而这些应用的下载量累积超过1.5亿次。 FireEye 指出,在目前已经发现漏洞的这17款Android应用中,至少有6款宣称已经封堵该漏洞的应用仍然存在安全威胁。具体来说,该漏洞主要存在于Jelly Bean 4.1和4.1.1的Android版本之中。大部分用户通常情况下不会调用OpenSSL,所以也不会受到“心脏流血”漏洞的影响,但是如果设备上安装 了调用OpenSSL的应用,并且该应用处于开启状态时,该设备就极有可能遭到黑客的攻击。 FireEye的研究团队表示,这些应用以游戏为主。虽然游戏中并没有太多有用的数据,但是有许多用户在玩游戏时通常会使用Facebook或Twitter的授权账户,所以黑客就有可能通过攻击某个游戏账户来获得更有价值的社交网络账户。 此 外,在上述17款应用中,其中有6款宣称已经封堵了“心脏流血”漏洞,但是在研究人员的实际测试中,发现这些应用所采用的封堵方法对于“心脏流血”漏洞来 说是无效的,所以它们仍然存在严重的安全威胁。“实际上只有两款应用完全通过了漏洞测试,”研究人员在报告中表示,“尽管部分应用宣称自己不会受到漏洞的 影响,但却未能通过我们的测试,所以我们认为这不过是开发者的广告宣传所需,实际上这些应用仍然存在安全威胁,而我们在报告中也对其进行了详细分析。” FireEye 进行本次研究的截止日期为4月17日,所以目前受到“心脏流血”漏洞影响的应用数量可能已经有所下降,因为研究人员在4月10日进行首轮检测时,发现存在 安全威胁的应用总下载量高达2.2亿次,“幸运的是,我们看到大部分开发者都非常重视这一漏洞,并且通过及时发布补丁对其继续了修复,”FireEye在 报告中说道。 另据了解,就在上述报告发布的同一天,苹果针对iPhone和iPad进行了软件更新来修复可能存在的安全漏洞,同时也已经对AirPort Extreme路由器的固件进行了相关更新。 文章转载自 开源中国社区 [http://www.oschina.net]

优秀的个人博客,低调大师

Parse Server 支持 iOS 和安卓的消息推送

Parse Server 是前些天 Facebook 刚刚开源的兼容 Parse.com API 的服务器软件。目前该项目宣布支持 iOS 和 Android 平台的消息推送。可通过 PushAdapter 来实现。 使用方式: curl -X POST \ -H “X-Parse-Application-Id: YOUR_APP_ID” \ -H “X-Parse-Master-Key: YOUR_MASTER_KEY” \ -H “Content-Type: application/json” \ -d ‘{ “where”: { “deviceType”: { “$in”: [ “ios” ] }, “fan”: “Giants” }, “data”: { “title”: “A special discount for Giants fans”, “alert”: “Check out our app for a 15% discount!” } } ====================================分割线================================文章转载自 开源中国社区[http://www.oschina.net]

优秀的个人博客,低调大师

谷歌为安卓版 Chrome 开启安全浏览功能

据国外媒体theverge报道,谷歌周一表示默认情况下将为Android版Chrome用户访问网页增加安全浏览保护。谷歌表示,安全浏览功能是桌面版已有功能,用来保护用户电脑免受恶意软件、钓鱼软件和其它网络攻击软件的威胁。通常情况下,谷歌Chrome会显示一个鲜红的网页来表明用户点击的网页链接可能有危险。 此前,这些警告页面只会在移动用户打开Chrome移动版鲜为人知的数据压缩功能之后,才会弹出。用户需要在Chrome的设置里进行更改。新的安全浏览功能将不只局限于网页浏览,同样会为应用程序下载和服务提供安全保障 文章转载自 开源中国社区[https://www.oschina.net]

资源下载

更多资源
腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册