android content provider 应用卸载后,[摘]adb命令行查询content-provider

一、conent 帮助文档如下

usage: adb shell content [subcommand] [options]

usage: adb shell content insert --uri [--user ] --bind [--bind ...]

usage: adb shell content update --uri [--user ] [--where ]

usage: adb shell content delete --uri [--user ] --bind [--bind ...] [--where ]

usage: adb shell content query --uri [--user ] [--projection ] [--where ] [--sort ]

usage: adb shell content call --uri --method [--arg ]   [--extra ...]

usage: adb shell content read --uri [--user ]

二、content使用案例

1、删除

删除uri=content://settings/settings/中的pointer_speed

adb shell content delete --uri content://settings/settings/pointer_speed

2、查询

查询uri中的所有属性值

adb shell content query --uri content://settings/settings

查询单个

adb shell content query --uri content://icc/adn --projection _id:name --where "name='zhangsan'" --sort "name ASC"

3、插入某个属性的值

adb shell content insert --uri content://icc/adn --bind _id:i:1 --bind index:i:2 --bind name:s:zhangsan --bind number:s:123456789

代表往sim卡联系人中插入 一条记录,其中 id 是1,index 是2,name 是zhangsan,number是123456789,在这个当中,--bind后跟的就是相关数据,i代表int,s代表string,b代表bollean,f代表float,l代表long。

adb shell content insert --uri content://settings/settings --bind name:s:my_number --bind value:i:24

本文摘抄于

1、adb命令行查询content-provider[直达车]

2、Adb Shell 下content使用 [直达车]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值