`
月下独酌
  • 浏览: 128103 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论
文章列表

python小记

#Python. #!/usr/bin/env python #coding=UTF-8 #计算索引 for index,value in enumerate(list):     print index, value     #列表解析(0到5基数的平方),xrange()构造操大集合 [x*2 for x in range(5) if not x % 2] #属性 #函数,方法,数据值,统称为属性 #异常捕获 try:     pass     raise IOError,'raise a error' except(IOError),e:     pass finally:     ...
http://blog.csdn.net/luoshengyang/article/details/6768304 简要整理: linux-->init | native服务zygote(init.rc中定义的service,代码:app_main.cpp //步骤1) | {AppRuntime.start(),AndroidRuntime.start()} | {通过jni调用Java函数ZygoteInit.java.main(),startVM(),Reg ...

全屏截图

public void onCreate(Bundle savedInstanceState) {                 // //setContentView(R.layout.main2); getWindow().getDecorView().setDrawingCacheEnabled(true); getWindow().getDecorView().measure(                   MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED),                   Meas ...

全局窗口二

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />  <uses-permission android:name="android.permission.SYSTEM_OVERLAY_WINDOW" /> public class LrcTextView extends TextView { private final String TAG = LrcTextView.class.getSimpleName(); ...

全局窗口一

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />  <uses-permission android:name="android.permission.SYSTEM_OVERLAY_WINDOW" /> 通过activity.getWindow().addContectView()可以在activityz中添加控件 import java.util.Random; import android.app.Activi ...

点亮屏幕

            if(!pm.isScreenOn()) {//在点亮屏幕的前提下,activity的onNewIntent才会被执行                 PowerManager.WakeLock locker = pm.newWakeLock(                               PowerManager.ACQUIRE_CAUSES_WAKEUP                             | PowerManager.FULL_WAKE_LOCK, "phone_keyguard");               ...
vendor\third-party\products\ build\target\product\ device\ 系统服务列表 system/core/rootdir/

git 小记

    博客分类:
  • git
mkdir workcopy cd workcopy git init git remote add origin /work/git/firstGit.git/ {     git pull origin master     git push origin master } vi .git/config +++[branch "master"] +++    remote = origin +++    merge = master +++    pushurl = /work/git/firstGit.git/ +++    p ...

app native socket

编写一个简单系统服务,功能很简单,接受命令,返回字符串。 需要在init.rc中定义服务的镜像名称和socket资源 #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <errno.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/poll.h> #include <sys/ ...

app socket native

在应用程序中可以通过此工具类与android系统native服务通信 这些native服务是指在init.rc中定义的随机启动的服务,如zygote 但是如需要通过此工具类来启动和停止系统服务,需要具有system权限 即需要设置sharedUId=system import android.net.LocalSocket; import android.net.LocalSocketAddress; import android.net.vpn.VpnManager; import android.os.SystemProperties; import android.util.L ...
superuser
Rootexplorer

jni

/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LI ...
android/dalvik/libcore/dalvik/src/main/java/dalvik/system/PathClassLoader.java   line157  pathList += pathSep + libPath;  --->>> pathList = libPath + pathSep  + pathList;
       public void onDrop(DragSource source, int x, int y, int xOffset, int yOffset, Object dragInfo) {     if (source != this) {         } else {             if (mDragInfo != null) {                 mDragInfo = null;             }         }     }     public void snapToGroup(int index) {         ...
Global site tag (gtag.js) - Google Analytics