CentOS 7 + android-sdk_r24.3.3-linux.tgz + adb


[root@localhost platform-tools]# ls
adb  dmtracedump  fastboot    NOTICE.txt         sqlite3
api  etc1tool     hprof-conv  source.properties  systrace

[root@localhost platform-tools]# pwd
/opt/android-on-linux/android-sdk-linux/platform-tools

[root@localhost platform-tools]# gedit /root/.bashrc
export PATH=$PATH:/opt/android-on-linux/android-sdk-linux/platform-tools

[root@localhost platform-tools]# adb shell
bash: /opt/android-on-linux/android-sdk-linux/platform-tools/adb: /lib/ld-linux.so.2: bad ELF interpreter: 没有那个文件或目录
[root@localhost platform-tools]# yum whatprovides */ld-linux.so.2            找到相关软件
[root@localhost platform-tools]# yum install ld-linux.so.2

[root@localhost platform-tools]# adb shell
adb: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
[root@localhost platform-tools]# yum install libstdc++.so.6

[root@localhost platform-tools]# adb shell
shell@mb526:/ $

+++++++++++++

[root@localhost src]# pwd
/opt/eclipse-workspace/helloworldc/src
[root@localhost src]# adb push helloworldc /data/data/
failed to copy 'helloworldc' to '/data/data//helloworldc': Permission denied
[root@localhost src]# adb root
[root@localhost src]# adb push helloworldc /data/data/
error: device unauthorized. Please check the confirmation dialog on your device.
[root@localhost src]# adb push helloworldc /data/data/
118 KB/s (5404 bytes in 0.044s)
[root@localhost src]#

---------------
[root@localhost Debug]# ls
helloworldc  makefile  objects.mk  sources.mk  src
[root@localhost Debug]# pwd
/opt/eclipse-workspace/helloworldc/Debug
[root@localhost Debug]# adb push helloworldc /data/data/
401 KB/s (29660 bytes in 0.072s)
[root@localhost Debug]#

+++++++++++++++



你可能感兴趣的:(Android平台/移动互联网)