Android随笔

runOnUiThread

在UI线程中刷新UI,无需用Handler。

     @DOC

 

     * Runs the specified action on the UI thread. If the current thread is the UI

     * thread, then the action is executed immediately. If the current thread is

     * not the UI thread, the action is posted to the event queue of the UI thread.

 

安卓内存分析工具AMT

http://blog.csdn.net/lg707415323/article/details/7749125

 

 

一个很不错的组件, 是Gallery功能的延伸扩展, 很好用

http://www.cnblogs.com/wader2011/archive/2011/10/10/2205142.html

 

 

Android里尽量不要用static这种方式保存全局变量, 原因是有可能被VM回收掉。

根据实际情况,可采用Application或 preference 来实现。

用Application的话,尚未找到如何在宿住程序上使用。

 

 

 手机没有SD卡, 想把手机内存中data下的数据库复制出来,用下面的方法:

1.进入adb shell
2.对要操作的目录每级进行chmod 777
   $chmod 777 data

   $cd data

   $chmod 777 data

   $cd data

   $chmod 777  APP包名

   ...

   ...

   cp *.db /mnt/

3.退出adb shell

4.将数据拷贝到电脑上

   adb pull /mnt/*.db  F:/  

 

有些系统目录不允许操作,这样来做:

 

我想删掉系统自带的UC浏览器的apk,当我在终端命令 adb remount 之后,命令终端显示
remount failed: Operation not permitted
adb remount 失败。
1. 确定是否正确连接手机了
adb devices
2. 进入shell
adb shell
3. shell中输入命令(命令最前面的#号不用输入)
# su 
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system 
# chmod 777 /system 
# cd system
# chomd 777 app
# cd app
# chmod 777 UCWEB.apk
# exit
4. 然后你就有apk文件(或者系统目录)的读写权限了,

例如你就可以使用adb push 把文件push到系统目录中去了,或者删除系统文件

 

  

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值