BusyBox

how do I install the traceroute functionality from busybox programmatically

余生长醉 提交于 2019-12-06 14:27:20
I am currently working on implementing traceroute functionality in android and for that I need some help. I aksed question on this on SO . And in answer user of suggested me to do following : The busybox utility includes traceroute. You can run busybox on your device without rooting your phone by following this youtube tutorial . You should then be able to use the first code segment you posted to query traceroute from within your app. Of course, you will need to make sure that you use the correct path when calling traceroute. Now you will think why I am asking same again but I watched video

Syntax for shell command in Android app

旧街凉风 提交于 2019-12-06 13:26:45
问题 I am trying to run String command = "su -c 'busybox ls /data'"; p = Runtime.getRuntime().exec(command); in my app, but it seems like the syntax is somehow wrong. I have no problem running it from the terminal emulator app on the phone, though, so I just can't understand why it is not working when called from within my app. Any help is deeply appreciated! 回答1: SOLUTION FOUND! Thanks to the link suggested by onit here. See the code below: for superuser shell commands to work properly, you first

QEMU搭建ARM LINUX开发环境

五迷三道 提交于 2019-12-06 06:42:33
QEMU搭建ARM LINUX开发环境 QEMU简介: QEMU是一种纯软件实现的虚拟化模拟器,几乎可以模拟所有硬件,包括我们本次要用的ARM A9平台。它的原理是将guest架构代码转换为TCG中间代码,再转换为host架构代码。 环境: 虚拟机:ubuntu18.04 LTS 步骤: 安装gcc-arm-linux-gnueabi sudo apt install gcc-arm-linux-gnueabi 安装完成后,我们可以看一下该工具链支持的目标架构: arm-linux-gnueabi-gcc --target 翻一下结果可以看到: Known ARM CPUs (for use with the -mcpu= and -mtune= options): arm1020e arm1020t arm1022e arm1026ej-s arm10e arm10tdmi arm1136j-s arm1136jf-s arm1156t2-s arm1156t2f-s arm1176jz-s arm1176jzf-s arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm70 arm700 arm700i arm710 arm7100 arm710c arm710t arm720 arm720t arm740t

ubuntu 交叉编译 busybox-1.31.1

痴心易碎 提交于 2019-12-06 05:06:35
目的:静态编译 Busybox_arm64-1.13.1 环境:Ubuntu 18.04.3 #----------------环境配置 # aarch64-linux-gnu-g++ sudo apt install -y g++ g++-aarch64-linux-gnu # menuconfig sudo apt install -y libncurses5-dev flex bison #----------------编译过程 #下载源码 wget https://busybox.net/downloads/busybox-1.31.1.tar.bz2 tar -jxvf busybox-1.31.1.tar.bz2 cd busybox-1.31.1 #生成默认编译配置 生成文件大小约2.04MB。 make defconfig #编辑配置 make menuconfig #Settings ---> # --- Build Options # [ ] Build static binary (no shared libs) #按“空格键”勾选此项。 make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- #-j8代表8线程编译 来源: https://www.cnblogs.com/srczhang/p

tmux在busybox上的移植

左心房为你撑大大i 提交于 2019-12-06 03:43:09
作者:彭东林 邮箱:pengdonglin137@163.com 参考 https://gist.github.com/tessus/5e118d44261a6ab2f198 环境 Qemu-4.1 Linux-4.14 ARM64 aarch64-linux-gnu-gcc 8.3 概述   在进行嵌入式开始时,经常会用到串口,这样就可以使用串口来登录到板子上,但是如果通过一个串口实现多个终端的功能的话,对于我们的开发调试就会更加方便,而tmux就提供了这样的功能。   下面介绍tmux如何静态交叉编译,使其运行在arm开发板上。 软件版本 tmux-2.1 libevent:2.1.10 ncurses-6.1 正文 交叉编译tmux需要libevent和ncurses两个软件包。 下载和编译libevent 1、下载libevent: https://github.com/libevent/libevent/releases/download/release-2.1.10-stable/libevent-2.1.10-stable.tar.gz 2、解压和交叉编译,下面是编译脚本: 1 ./configure --prefix=`pwd` \ 2 --host=aarch64-linux-gnu \ 3 --disable-shared 4 5 make 6 make

docker网络

倖福魔咒の 提交于 2019-12-05 22:41:47
docker网络 Docker 允许通过外部访问容器或容器互联的方式来提供网络服务。 端口映射允许外部访问容器 --link 容器互联 容器桥接网络 1.通过--link容器通信,给test2添加一个hosts解析记录 docker run -d --name test2 --link test1 busybox /bin/sh -c "while true;do sleep 3600;done" test2可以ping通test1,反之不可以 但是--link是不推荐使用的,而是更强大的自定义docker网络链接容器 1.新建一个docker网络 docker network create -d bridge my-net -d 参数指定 Docker 网络类型,有 bridge overlay 2.连接容器 运行一个容器并连接到新建的 my-net 网络 $ docker run -it --rm --name busybox1 --network my-net busybox sh 打开新的终端,再运行一个容器并加入到 my-net 网络 $ docker run -it --rm --name busybox2 --network my-net busybox sh 再打开一个新的终端查看容器信息 $ docker container ls CONTAINER ID

Getting a valgrind for android. Problems with `valgrind`'s looking for `memcheck-arm-linux`

牧云@^-^@ 提交于 2019-12-05 22:23:24
Context is developing an android app that uses several static executable binaries through sh syscall. One of the binaries eventually segfaults when using a samsung galaxy s4 cellphone (but not when using emulator or a Sony Xperia tipo cellphone), so following http://embetek.blogspot.com.es/2011/10/valgrind-for-arm.html with several custom modifications (CFLAGS='-static -march=armv7-a') end up getting a $ ldd valgrind not a dynamic executable $ file valgrind valgrind: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 3.2.0, not stripped. Loaded on the target

STM32F746-DISCO运行Linux4.19

自闭症网瘾萝莉.ら 提交于 2019-12-05 22:10:54
STM32F746-DISCO运行Linux4.19 Linux Kernel 主线linux已经提供对无MMU的处理器的支持,configs中已经存在stm32_defconfig,DTS中包含:stm32f746-disco;因此只需要编译即可。 下载主线源码: http://cdn.kernel.org/pub/linux/kernel/v4.x 安装交叉编译链,可以使用之前编译uboot的arm-none-eabi-gcc,但是这个是编译链线程模式是single,而不是posix,也就是说虽然这个编译链可以编译内核和根文件系统,但是不能编译linux应用程序。如果需要支持编译linux应用程序(一般要支持,不然移植linux干嘛--!),则需要自己去构建交叉编译链,网上讲解的比较详细,不过我推荐使用Buildroot来构建支持stm32的交叉编译链,简单快捷,当然也可以用Buildroot来构建内核和根文件系统。 根文件系统 根文件系统可以使用busybox构建,也可以使用buildroot构建。 elinux.org提供了一个使用busybox编译好的Ramdisk最小系统, File:Stm32 mini rootfs.cpio.bz2 , 但需要做如下改动: 使用initramfs,将下载的Stm32_mini_rootfs.cpio.bz2解压,先解压成cpio文件

busybox date 时间的加减

☆樱花仙子☆ 提交于 2019-12-05 16:53:57
1、下载安装busybox: # wget http://busybox.net/downloads/busybox-1.29.3.tar.bz2 # tar -jxvf busybox-1.29.3.tar.bz2 # cd busybox-1.29.3 # make defconfig //如果对根文件系统的大小不是很苛求,可以直接使用busybox的默认配置 # make # make install构建date链接# ln -sf ./busybox ./date busybox date参数详解 [busybox-1.29.3]# ./date --help BusyBox v1.29.3 (2019-11-25 11:00:35 CST) multi-call binary. Usage: date [OPTIONS] [+FMT] [TIME] Display time (using +FMT), or set time [-s,--set] TIME Set time to TIME -u,--utc Work in UTC (don't convert to local time) -R,--rfc-2822 Output RFC-2822 compliant date string -I[SPEC] Output ISO-8601 compliant date

dockers-k8s本地共享仓库

牧云@^-^@ 提交于 2019-12-05 06:28:36
docker k8s 组件名称 说明 kube-dns 负责为整个集群提供DNS服务 Ingress Controller 为服务提供外网入口 Heapster 提供资源监控 Dashboard 提供GUI Federation 提供跨可用区的集群 Fluentd-elasticsearch 提供集群日志采集、存储与查询 配置 主机 节点 hosts 10.0.0.202 master cat > /etc/hosts <<EOF 10.0.0.202 purple 10.0.0.203 yellow 10.0.0.204 blue EOF 10.0.0.203 node cat > /etc/hosts <<EOF 10.0.0.202 purple 10.0.0.203 yellow 10.0.0.204 blue EOF 10.0.0.204 node cat > /etc/hosts <<EOF 10.0.0.202 purple 10.0.0.203 yellow 10.0.0.204 blue EOF k8s集群搭建 202:master节点安装etcd yum install etcd -y vim /etc/etcd/etcd.conf 6行:ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379" 21行:ETCD