qhuyduong / arm_adb Goto Github PK
View Code? Open in Web Editor NEWADB for ARM/AARCH64
License: GNU General Public License v3.0
ADB for ARM/AARCH64
License: GNU General Public License v3.0
I want to compile the adb.exe used in Windows!~
How to do it...
thanks help
This project works great, but currently builds a large (relatively) statically linked binary. We already have libcrypto and libssl in our board, is there a built-in way to build with dynamic linking instead?
您好,我下载了之后尝试在树莓派3B+上使用,raspbian的系统
使用工业级hub,当连接6台手机设备的时候正常使用,而且操作不会卡
但是当连接第7台手机的时候,树莓派CPU的%wait就会突然升高,达到50%左右
我通过iotop查看,发现是kworker的IO特别高,达到99%,但是实际上是没有IO读写产生的
然后就会导致7台手机都特别的卡
查了很多资料不清楚是什么导致的
请教下,有没有可能是adb产生的问题?
谢谢
Using:
Android Debug Bridge version 1.0.40
Version 28.0.1-SOONG BUILD NUMBER PLACEHOLDER
Installed as /usr/bin/adb
Android devices constantly run offline with the following dmesg log showing:
[Wed Feb 13 04:32:04 2019] adb: page allocation failure: order:8, mode:0x24040c0
[Wed Feb 13 04:32:04 2019] CPU: 0 PID: 20323 Comm: adb Not tainted 4.4.13-v7+ #894
[Wed Feb 13 04:32:04 2019] Hardware name: BCM2709
[Wed Feb 13 04:32:04 2019] [<80018724>] (unwind_backtrace) from [<80014058>] (show_stack+0x20/0x24)
[Wed Feb 13 04:32:04 2019] [<80014058>] (show_stack) from [<80320744>] (dump_stack+0xd4/0x118)
[Wed Feb 13 04:32:04 2019] [<80320744>] (dump_stack) from [<801047b8>] (warn_alloc_failed+0xec/0x128)
[Wed Feb 13 04:32:04 2019] [<801047b8>] (warn_alloc_failed) from [<80107e10>] (__alloc_pages_nodemask+0x848/0x9e0)
[Wed Feb 13 04:32:04 2019] [<80107e10>] (__alloc_pages_nodemask) from [<80108228>] (alloc_kmem_pages+0x20/0x28)
[Wed Feb 13 04:32:04 2019] [<80108228>] (alloc_kmem_pages) from [<80123cd4>] (kmalloc_order+0x20/0x5c)
[Wed Feb 13 04:32:04 2019] [<80123cd4>] (kmalloc_order) from [<80123d3c>] (kmalloc_order_trace+0x2c/0xd4)
[Wed Feb 13 04:32:04 2019] [<80123d3c>] (kmalloc_order_trace) from [<80148448>] (__kmalloc+0x1e4/0x238)
[Wed Feb 13 04:32:04 2019] [<80148448>] (__kmalloc) from [<8041e4e4>] (proc_submiturb+0x6ac/0xd7c)
[Wed Feb 13 04:32:04 2019] [<8041e4e4>] (proc_submiturb) from [<8041f0d0>] (usbdev_do_ioctl+0x51c/0x1850)
[Wed Feb 13 04:32:04 2019] [<8041f0d0>] (usbdev_do_ioctl) from [<8042041c>] (usbdev_ioctl+0x18/0x1c)
[Wed Feb 13 04:32:04 2019] [<8042041c>] (usbdev_ioctl) from [<801693b8>] (do_vfs_ioctl+0x424/0x614)
[Wed Feb 13 04:32:04 2019] [<801693b8>] (do_vfs_ioctl) from [<801695ec>] (SyS_ioctl+0x44/0x6c)
[Wed Feb 13 04:32:04 2019] [<801695ec>] (SyS_ioctl) from [<8000fb40>] (ret_fast_syscall+0x0/0x1c)
[Wed Feb 13 04:32:04 2019] Mem-Info:
[Wed Feb 13 04:32:04 2019] active_anon:51841 inactive_anon:55127 isolated_anon:0
active_file:66908 inactive_file:46056 isolated_file:0
unevictable:0 dirty:68 writeback:136 unstable:0
slab_reclaimable:6004 slab_unreclaimable:2648
mapped:9826 shmem:11900 pagetables:576 bounce:0
free:4731 free_pcp:103 free_cma:116
[Wed Feb 13 04:32:04 2019] Normal free:18924kB min:8192kB low:10240kB high:12288kB active_anon:207364kB inactive_anon:220508kB active_file:267632kB inactive_file:184224kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:966656kB managed:947748kB mlocked:0kB dirty:272kB writeback:544kB mapped:39304kB shmem:47600kB slab_reclaimable:24016kB slab_unreclaimable:10592kB kernel_stack:1768kB pagetables:2304kB unstable:0kB bounce:0kB free_pcp:412kB local_pcp:412kB free_cma:464kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
[Wed Feb 13 04:32:04 2019] lowmem_reserve[]: 0 0
[Wed Feb 13 04:32:04 2019] Normal: 15614kB (UMEC) 2908kB (UMEC) 10316kB (UMEC) 4232kB (UME) 2364kB (UME) 21128kB (UME) 7256kB (UME) 3512kB (UM) 01024kB 02048kB 0*4096kB = 19044kB
[Wed Feb 13 04:32:04 2019] 124897 total pagecache pages
[Wed Feb 13 04:32:04 2019] 9 pages in swap cache
[Wed Feb 13 04:32:04 2019] Swap cache stats: add 133, delete 124, find 20/26
[Wed Feb 13 04:32:04 2019] Free swap = 818756kB
[Wed Feb 13 04:32:04 2019] Total swap = 819196kB
[Wed Feb 13 04:32:04 2019] 241664 pages RAM
[Wed Feb 13 04:32:04 2019] 0 pages HighMem/MovableOnly
[Wed Feb 13 04:32:04 2019] 4727 pages reserved
[Wed Feb 13 04:32:04 2019] 2048 pages cma reserved
Hi Huy Duong, thanks for this project!
Can I use this project from TermuxArch aarch64?
Thanks for your help,
Juan
Can I implement it by modifying android.mk? I really need your help
I wanted to compile the ARM-Linux ADB, but there was no tool chain. Or the tool chain could not be used, and then I compiled it, but linker was wrong, so I created the directory/system/bin/linker and /system/lib
branch v1.0.40
client/auth.cpp:37:10: fatal error: openssl/base64.h: No such file or directory
#include <openssl/base64.h>
I just comment it, then make, which is success.
Is any reason for 5038 as default port?
And I want to use 5037 as default port,Can you provide the step?
Thanks for your help.
Running the provided adb
build on ARMv7 gives me the following warning several times:
/lib/libstdc++.so.6: no version information available (required by adb)
root@htnice:/home/htnice# sudo apt-get install libtool automake
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package automake is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package libtool is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libtool' has no installation candidate
E: Package 'automake' has no installation candidate
root@htnice:/home/htnice#
I hava a raperbarry PI3, want a custom adb for it, and use PI3 as a host.
Follow your step, successfully build adb, then use "adb devices" cannot find the Android devices. And I see the adb command use the socket port 5038.
Then I tried to delete "-DADB_HOST_ON_TARGET=1" in "Makefile.am" & "Makefile.in", also successfully build, and also "adb devices" can not find the Android devices.
The libs can be compiled statically, but the final binary always ends up dyn linked to glibc.
Hi, Hduong,
I have a problem on Cross Building (for AARCH64) on x86_64 Ubuntu(64bit) .
Could you pls give me some help?
build log:
libtool: link: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbeginS.o libcutils/.libs/libcutils_la-socket_inaddr_any_server_unix.o libcutils/.libs/libcutils_la-socket_local_client_unix.o libcutils/.libs/libcutils_la-socket_local_server_unix.o libcutils/.libs/libcutils_la-socket_network_client_unix.o libcutils/.libs/libcutils_la-load_file.o libcutils/.libs/libcutils_la-threads.o libcutils/.libs/libcutils_la-sockets.o -L/usr/lib/gcc-cross/aarch64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/5/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o -g -O2 -Wl,-soname -Wl,libcutils.so.0 -o .libs/libcutils.so.0.0.0
/usr/bin/ld: libcutils/.libs/libcutils_la-socket_inaddr_any_server_unix.o: Relocations in generic ELF (EM: 183)
/usr/bin/ld: libcutils/.libs/libcutils_la-socket_inaddr_any_server_unix.o: Relocations in generic ELF (EM: 183)
/usr/bin/ld: libcutils/.libs/libcutils_la-socket_inaddr_any_server_unix.o: Relocations in generic ELF (EM: 183)
/usr/bin/ld: libcutils/.libs/libcutils_la-socket_inaddr_any_server_unix.o: Relocations in generic ELF (EM: 183)
/usr/bin/ld: libcutils/.libs/libcutils_la-socket_inaddr_any_server_unix.o: Relocations in generic ELF (EM: 183)
libcutils/.libs/libcutils_la-socket_inaddr_any_server_unix.o: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Makefile:532: recipe for target 'libcutils.la' failed
make[2]: *** [libcutils.la] Error 1
make[2]: Leaving directory '/home/wenguangqiu/arm_adb/lib'
Makefile:452: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/wenguangqiu/arm_adb'
Makefile:363: recipe for target 'all' failed
make: *** [all] Error 2
I'm observing build failure on my Rpi4:
make[2]: Entering directory '/home/pi/build/adb-source/src'
g++ -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -I/tmp/openssl/include -I../include -I../lib/base/include -I../lib/libcrypto_utils/include -std=c++14 -lcrypto -lpthread -lrt -DADB_HOST=1 -DHAVE_FORKEXEC=1 -DHAVE_SYMLINKS -DHAVE_TERMIO_H -DHAVE_SYS_SOCKET_H -DHAVE_OFF64_T -D_GNU_SOURCE -D_XOPEN_SOURCE -DHAVE_ANDROID_OS=1 -D'ADB_VERSION="x.x-x"' -DADB_HOST_ON_TARGET=1 -DALLOW_ADBD_ROOT=1 -DWORKAROUND_BUG6558362 -DFAKE_LOG_DEVICE=1 -DDONT_USE_LIBUSB -DDONT_USE_MDNS -g -O2 -fdebug-prefix-map=/home/pi/build/=. -fstack-protector-strong -Wformat -Werror=format-security -c -o client/adb-usb_linux.o `test -f 'client/usb_linux.cpp' || echo './'`client/usb_linux.cpp
client/usb_linux.cpp: In function ‘void native::find_usb_device(const string&, void (*)(const char*, const char*, unsigned char, unsigned char, int, int, unsigned int, size_t))’:
client/usb_linux.cpp:274:38: error: ‘major’ was not declared in this scope
major(st.st_rdev), minor(st.st_rdev));
^~~~~
client/usb_linux.cpp:274:57: error: ‘minor’ was not declared in this scope
major(st.st_rdev), minor(st.st_rdev));
^~~~~
client/usb_linux.cpp:274:57: note: suggested alternative: ‘mknod’
major(st.st_rdev), minor(st.st_rdev));
^~~~~
mknod
make[2]: *** [Makefile:685: client/adb-usb_linux.o] Error 1
make[2]: Leaving directory '/home/pi/build/adb-source/src'
make[1]: *** [Makefile:452: all-recursive] Error 1
make[1]: Leaving directory '/home/pi/build/adb-source'
make: *** [Makefile:363: all] Error 2
It seems you are missing #include <sys/sysmacros.h>
inside client/usb_linux.cpp
It works fine for me after I added this change.
Hello,
Just wondering if it's possible to run this on an android device using terminal emulator? I tried run it but got permission denied error. chmod +x didn't help either.
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.