【原创】linux ubuntu12.04&n…
来源:互联网 发布:开淘宝店怎么代销不了 编辑:程序博客网 时间:2024/06/06 02:07
继上文《删除Android预装软件包,防止恢复出厂再次安装,并装上自己的APP》类刷机后,发现我的手机锁定里面的滑动锁,图案锁,密码锁等可以设置,但是按电源键或者自动锁屏时间到了后失效不灵了,而且按电源键2秒直接关机,也没关机菜单了。
针对这个问题,我成功设置回来了,下面是在Linux上使用adb成功恢复的全过程。
建议你先看到底后再进行操作~~
前提:
步骤:
1.zhipeng@ubuntu:~/samsung$ adb start-server
2.zhipeng@ubuntu:~/samsung$ adb push keystrsdcard/
3.zhipeng@ubuntu:~/samsung$ adb shell
4.shell@android:/ $su
5.shell@android:/# mount -o remount,rw rootfs /
6.shell@android:/ # cpsdcard/keystr /efs/imei/
6.shell@android:/ # cpsdcard/keystr /efs/FactoryApp/
6.shell@android:/ #cp /storage/sdcard0/keystr
6.shell@android:/ #cp 1开启adb服务
2将文件推送至手机内存(推送到其他目录需要androidroot权限,但是linux是没有root权限的)
3.进入android 终端
4.使用root
5.挂载 sdcard 为可读写,(否则下一步会报错:read-only)
6.将sdcrard/keystr 拷贝至对应的目录。
那如何知道这些目录的呢,下面是查询cp keystr目录的步骤:
shell@android:/ # find | grep keystr
./efs/imei/keystr
./efs/FactoryApp/keystr
./efs/FactoryApp/keystr_bak(这个是我自己cp 命令备份的OFF)
./storage/sdcard0/keystr
./proc/LinuStoreIII/keystr
find: ./proc/6240: No such file or directory
find: ./proc/6262: No such file or directory
find: ./proc/6719: No such file or directory
./data/media/keystr
shell@android:/ # od -x /efs/imei/keystr/efs/FactoryApp/keystr /storage/sdcard0/keystr/data/media/keystr
0000000 4e4f 4e4f 4e4f 4e4f
0000010
shell@android:/ # od -x /efs/FactoryApp/keystr
0000000 4e4f
0000002
shell@android:/ # cat/efs/FactoryApp/keystr
ONshell@android:/ #
(内容是OFF,十六进制:4e4f)
shell@android:/ # od -x/efs/FactoryApp/keystr_bak
0000000 464f 0046
0000003
shell@android:/ # cat/efs/FactoryApp/keystr_bak
OFFshell@android:/#
(内容是OFF,十六进制:464f)
od命令查看文件的十六进制,确保keystr输出的结果第一行是 0000000 4e4f
可以使用vikeystr 打开查看,里面内容是ON,如果是OFF建议使用cp命令备份一个bak。
shell@android:/ # ls -al /proc/LinuStoreIII/
-rw-r--r-- root root 02014-02-26 13:55 MD5_checksum
-rw-rw-r-- radio radio 02014-02-26 13:55 keystr
...
这里面的keystr是设备radio,不用管这个。
将前面的keystr全部替换~~
7.重启手机试试看~~
说明:第5步,可以直接跳过,但是第6步需要把cp 替换为cat:cat sdcard/keystr >/efs/imei/keystr
这种方法执行完后需要ctrl+d一次,而且后期使用sdcard很不方便。
参考:
《lock screen disappeared / phonerestarting》
《linux下hexdump和od命令:显示文件十六进制格式》
0 0
- 【原创】linux ubuntu12.04&n…
- 【原创】linux ubuntu12.04&n…
- 【原创】linux ubuntu12.04&n…
- 【原创】linux ubuntu12.04&n…
- 【原创】 linux mysql&n…
- 【原创】Linux-Ubuntu 12.4&n…
- 【原创】Linux 终端/Screen&n…
- [原创]android framelayout&n…
- 【原创】 linux Python&…
- 【原创】Linux-Ubuntu 12.04&…
- 【原创】Linux-Ubuntu 12.04&…
- 【原创】SSH/Python Error:&n…
- Linux 下 PHP 对&n…
- 【原创】 linux net&nbs…
- 【原创】 linux cvlc&nb…
- linux mongodb driver&n…
- Redis 在Centos Linux&n…
- 【原创】Linux Shell/Bash&nb…
- 【原创】 linux Screen 使用
- 解决方案 ERROR: ORA-01033: ORACLE initialization or shutdown in progress
- python 学习系列(3) 读取并显示图片的两种方法
- 【原创】拯救了一次我的破手机
- 【原创】删除Android预装软件包,…
- 【原创】linux ubuntu12.04&n…
- 【原创】mysql while do…
- 适用小白:为什么要用Jupyter?以及,如何在Linux的Ubuntu 14.04LTS上安装和启动Jupyter Notebook
- 【原创】python 简繁体转换
- 【原创】mysql 正则匹配中文&…
- 【转载】Python 获取网卡设置…
- 【原创】linux使用终端命令执行pyt…
- 【原创】linux ubuntu12.04&n…
- 【原创】linux ubuntu12.04&n…