Comments (5)
from adeb.
I realized the mistake. Original kernel headers on target did not have CONFIG_BPF_SYSCALL enabled. I then flashed new kernel with CONFIG_BPF_SYSCALL. I had failed to update the kernel headers using adeb prepare. I had to remove adeb and reinstall adeb with new kernel path. This makes sure new kernel headers are updated on target. Even though new kernel is flashed, header also needs to be updated in androdeb in target.
I could get filetop (and a few other) command(s) working, though hello_world.py hangs. If I try to quit, it displays following message. It may not be of much consequence, though I wished this basic command to work.
root@localhost:/bcc-master# /usr/share/bcc/examples/hello_world.py
^CTraceback (most recent call last):
File "/usr/share/bcc/examples/hello_world.py", line 12, in
BPF(text='int kprobe__sys_clone(void *ctx) { bpf_trace_printk("Hello, World!\n"); return 0; }').trace_print()
File "/usr/lib/python2.7/dist-packages/bcc/init.py", line 1119, in trace_print
line = self.trace_readline(nonblocking=False)
File "/usr/lib/python2.7/dist-packages/bcc/init.py", line 1099, in trace_readline
line = trace.readline(1024).rstrip()
KeyboardInterrupt
root@localhost:/bcc-master#
from adeb.
Also, by default, bcc native compilation on target board failed. I made following 2 changes for successful compilation on target. Thought of letting you know:
-
A softlink to stdc++ was required since compilation complained of missing stdc++ library.
ln -s /usr/lib/gcc/aarch64-linux-gnu/7/libstdc++.so /usr/lib/libstdc++.so -
Two include paths needed to be provided to avoid missing header error. These were added in CMakeLists.txt in the base folder:
include_directories(/usr/include/c++/7/)
include_directories(/usr/include/aarch64-linux-gnu/c++/7/)
from adeb.
Feel free to follow up with this on BCC's issue list, or send a patch there if you feel something needs fixing there, your contribution there and here are appreciated! Closing this for now.
from adeb.
uname -r get the system kernel version,
if different with the built kernel version.
you need to build the kernel which same with the 'uname -r'
from adeb.
Related Issues (20)
- Tracing user space functions outside the chroot
- eBPF C: cannot use strcmp and strncmp HOT 2
- `adeb prepare` or `adeb prepare --full` download failed HOT 1
- can not find /data/androdeb/run
- Got failed for building arm32 arch bcc HOT 3
- What is the "supported" Android kernel with `CONFIG_IKHEADERS`? HOT 1
- Exception: Failed to compile BPF module <text> HOT 1
- Failed to run some commands HOT 2
- why have aosp removed adeb?
- bpftrace uprobe pthread_create on android adeb env HOT 1
- suggestion for supporting bpftrace HOT 2
- Question: Should I be able to execute AOSP binaries via the adeb shell? HOT 3
- Have this supported Android11 with kernel-5.4? HOT 1
- `/apex` isn't mounted HOT 1
- Why are there so many '[unknown]' address info while using uprobe?
- adeb prepare advertises --distro flag but doesn't accept it HOT 7
- Support Debian Bullseye HOT 3
- how to build with su environment? HOT 1
- /data/androdeb/run: can't execute: Permission denied
- i used ./adeb prepare --archive '/home/android/Downloads/androdeb-fs.tgz.zip' and run adeb shell error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adeb.