共 29 篇文章 |
|
tfm = crypto_alloc_tfm("sha1",0);3)cipher算法(aes)#include<linux/module.h>#include <linux/kernel.h>#include <linux/crypto.h>#include <linux/scatterlist.h>#include <linux/gfp.h>#include <linux/err.h>#include <linux/syscalls.h>#include <linux/slab.h>#include &l... 阅1578 转7 评0 公众公开 14-10-23 16:53 |
Android中使用代码截图的各种方法总结 1,基于Android SDK的截屏方法。Bitmap;Android截屏实现思路Android系统是基于Linux内核的,所以也存在framebuffer这个设备,我们要实现截屏的话只要能获取到framebuffer中的数据,然后把数据转换成图片就可以了,android中的framebuffer数据是存放在 /dev/graphics/fb0 文件中的,所以我们只需要来获取这... 阅2830 转30 评1 公众公开 14-04-14 16:24 |
* Licensed under the Apache License, Version 2.0 (the "License");* http://www.apache.org/licenses/LICENSE-2.0#include <SkImageEncoder.h>printf("usage: %s path\n", argv[0]);status_t err = composer->captureScreen(0, &heap, &w, &h, &f, 0, 0);printf("saving file as PN... 阅152 转2 评0 公众公开 14-04-14 16:16 |
3.updateThumbnailButton()更新功能按钮去的到相簿按钮 1.调用事件: initializeFirstTime初始化时调用 initializeSecondTime()时调用 Intent.ACTION_MEDIA_SCANNER_FINISHED,扫描SD卡结束时调用 2.mThumbController.isUriValid(),当图库里有图片时,值为TRUE;其中MenuHelper.NO_STORAGE_ERROR包含SD卡状态:MEDIA_... 阅138 转0 评0 公众公开 14-04-11 19:50 |
例如Android实现系统开机自启动程需要在Manifest中加入如下Intent-filter及权限Uses-permission即可。·激活/去激活activity·注册/取消注册动态接受intent·发送/取消发送intent·activity生命周期管理(暂停,恢复,停止,销毁等)·activity task管理(前台->后台,后台->前台,最近task查询,运行时task查... 阅19618 转12 评0 公众公开 14-04-11 10:42 |
ext4格式的 system.img 怎么修改。然后用编译android framework时生成的make_ext4fs命令重新打包成成system.img,这个命令缺省在out/host/linux-x86/bin/make_ext4fs.$sudo ./make_ext4fs -s -l 160M -a system system.img.ext4 tmp/ 压缩成.ext4格式的system.$./simg2img system.img.ext4 system.img 这就是你需要的system.img了。 阅1507 转2 评0 公众公开 14-03-25 14:21 |
Android 4.4源码编译过程。1)模拟一个android设备。二、使用ccache.ccache是一个编译器ccache用于C和C++。$export USE_CCACHE=1$export CCACHE_DIR=/<path_of_your_choice>/.ccache$prebuilts/misc/linux-x86/ccache/ccache -M 50G</path_of_your_choice>建议的cache大小为50-100G.$watch -n1 -d prebuilts/misc/linux-x86/ccache... 阅990 转2 评0 公众公开 14-03-24 16:10 |
使用repo下载google 的android4.4 源码,跟编译。3.安装repo, 通过curl下载repo.google s是这样告诉我们的:curl http://commondatastorage.googleapis.com/git-repo-downloads/repo >~/bin/repo.builder56@builder56-desktop:~/google/android_source$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo >~/bin/rep... 阅1434 转2 评0 公众公开 14-03-24 16:10 |
getevent 工具 和 Android 中input event的分析。# find .-name "*.cpp" |grep -v EventHub | xargs grep EventHub./base/services/jni/com_android_server_KeyInputQueue.cpp:#include <ui/EventHub.h>./base/services/jni/com_android_server_KeyInputQueue.cpp:static sp<EventHub> gHub;"KeyInputQueue".e... 阅5475 转11 评0 公众公开 14-01-26 11:01 |
命令格式2:adb shell sendevent [device] [type] [code] [value]adb shell sendevent /dev/input/event0 1 330 1 //touchadb shell sendevent /dev/input/event0 0 0 0 //it must have.adb shell sendevent /dev/input/event0 3 0 100 //start from point (100,200)adb shell sendevent /dev/input/event0 3 1 200.adb shell sendevent ... 阅259 转1 评0 公众公开 14-01-26 10:54 |