Commit Graph

66 Commits

Author SHA1 Message Date
Elliott Hughes
eacb349519 Add uudecode/uuencode.
Some firmware flashing scripts rely on sharutils, which rely on
uudecode/uuencode. Since we're several decades too late to expect
anyone to update sharutils to use base64 instead, and POSIX
includes uudecode/uuencode, let's just support them.

Bug: http://b/31913440
Test: manual
Change-Id: Ia3893de08abfe5b8a8f58349bd298b912fa99e6a
2016-10-04 09:30:00 -07:00
Elliott Hughes
5d83f7a6f9 Merge remote-tracking branch 'toybox/master' into HEAD
Change-Id: Ib0b86bedbf7b9a4370533847ac0acad5aa478795
2016-08-29 08:47:36 -07:00
Elliott Hughes
a1ce46baab Merge remote-tracking branch 'toybox/master' into HEAD
Change-Id: Ie0bea3ba0de34b8ef14ca4af97772530b6736dc2
2016-08-02 09:11:26 -07:00
Elliott Hughes
a126e5f9a2 Merge remote-tracking branch 'toybox/master' into HEAD
Change-Id: I02968eafb038766a5190e0576bf810633e9c4d50
2016-07-15 10:22:31 -07:00
Elliott Hughes
f3304b364a Add file(1).
Shows bitness, arch, Android API level (based off crtbrand.o), the BuildID
note, and whether or not the ELF file is stripped.

  /system/bin/ndc:                   ELF shared object, 64-bit LSB arm64, dynamic (/system/bin/linker64), for Android 23, BuildID=b0dbcbd074276683f06dfe65740411dd, stripped

Change-Id: I7d3d0de8c78c646f07ae1054719dc40075ece498
2016-07-08 10:19:23 -07:00
Elliott Hughes
06b90e3d57 Merge remote-tracking branch 'toybox/master' into HEAD
Change-Id: Ia675ae28c2ce58dfbe0293394f091747b4d7f11c
2016-06-28 14:27:26 -07:00
Elliott Hughes
0803f535c0 Merge remote-tracking branch 'toybox/master' into HEAD
Change-Id: Ifa85ce6790aef1838c29d521b3fdd23d7e8728d7
2016-06-22 10:28:58 -07:00
Elliott Hughes
48e1f81151 Stop building toybox route.
From the commit that stopped creating the symlink:

    We should remove the "route" command because its output is irrelevant and
    misleading. This is because it only looks at the "main" routing table,
    which is a last resort routing table that is a) trumped by all other
    networks, b) empty except for directly-connected routes c) cannot even be
    used by non-root users.

    The proper way to understand device routing is to look at the output of
    "ip rule" and "ip route", both of which are already available.

    Example of how this is confusing:

      $ adb shell route
      Kernel IP routing table
      Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
      160.249.218.72  *               255.255.255.248 U     0      0        0 rmnet_data0
      192.168.144.0   *               255.255.240.0   U     0      0        0 wlan0

    These aren't guaranteed to be used. For example, according to the output
    above 160.249.218.73 should go through rmnet_data0, but it doesn't:

      $ adb shell ip route get 160.249.218.73
      160.249.218.73 via 192.168.159.254 dev wlan0  src 192.168.159.164  uid 0
          cache

    Also, there is no default route. But the device has networking just fine:

      $ adb shell ip route get 8.8.8.8
      8.8.8.8 via 192.168.159.254 dev wlan0  src 192.168.159.164  uid 0
          cache

Bug: http://b/27603033
Change-Id: I40be0a7e2841144797a67f9aeb82b9097cec5400
2016-05-25 14:47:37 -07:00
Elliott Hughes
d9417c0630 Turn on CONFIG_TOYBOX_NORECURSE for SafeStack.
Bug: http://b/27729263
Change-Id: Ibe1f530198045e4133960af61800b40d4348c59a
2016-05-07 11:09:44 -07:00
Elliott Hughes
d9d77619df Remove switch_root.
...since it's never going to run as pid 1.

Change-Id: Idd21951c2966ce37049aa397c8c973b0e7202901
2016-03-08 15:06:22 -08:00
Elliott Hughes
77e56de2cd Regenerate generated files.
Change-Id: I8a889ae35d7846555c3807c4179579e4c7286ac2
2016-02-29 16:14:51 -08:00
Elliott Hughes
bae185a8e0 Regenerate generated files.
Change-Id: I7c353a8c75fc6de1210e78b5729491e6dbfbe778
2016-02-19 21:37:17 -08:00
Elliott Hughes
59224354ca Add ulimit.
Change-Id: I3f8bfcd76811a7719d24cb3a753452f9bc7ab99a
2016-02-11 19:37:05 -08:00
Elliott Hughes
59a36104fb Regenerate generated files.
Change-Id: I3ce89d325c40621d33f5be3af4bb696d53ed5c44
2016-02-11 19:18:13 -08:00
Elliott Hughes
08db7e5f4f Disable CFG_TOYBOX_DEBUG for now.
We turned on CFG_TOYBOX_DEBUG so ls would be asan-clean, but that turns out
to have broken mount for non-root users. So let's turn CFG_TOYBOX_DEBUG off
for now, but let's also say that ls should always be asan-clean on Android.

Bug: http://b/26647560
Change-Id: I5392aedd168c1e765e3319e3c76e996040b7e8ab
2016-01-20 22:23:26 -08:00
Elliott Hughes
a729fc8373 Regenerate generated files.
Also stop using the NORECURSE workaround now runcon has been fixed to
explicitly not recurse.

Change-Id: Ide0e09b9b28adca2f9d4d1e8db98022e9342addd
2016-01-20 20:41:02 -08:00
Elliott Hughes
29d98209b5 Set CONFIG_TOYBOX_NORECURSE.
CONFIG_TOYBOX_NORECURSE means that toybox avoids re-execing where possible.
Unfortunately, this breaks runcon, which requires an exec(2) to have any
effect. Note that this only breaks runcon for toybox commands, and even then
only if you use the bare name (such as "id" rather than "/system/bin/id"),
which is why this went undetected for so long.

Change-Id: Ia02254346800c2c16ac6fc692dc8a79b1ac67f58
2016-01-19 10:14:21 -08:00
Elliott Hughes
e56796db41 Regenerate generated files.
Also track pgrep/pkill move to "ps.c".

Change-Id: I1077d8f5b6e7fdbda27bcf463e4731825422360c
2016-01-15 19:48:59 -08:00
Elliott Hughes
633ae508d9 Turn on CFG_TOYBOX_DEBUG for valgrind.
047bcb8e7d
only made ls valgrind-clean if CFG_TOYBOX_DEBUG is defined. So let's define
that.

The only other stuff this turns on is various bits of error checking that it
doesn't seem unreasonable to run with. If this becomes a problem in future,
we can lobby to have CFG_TOYBOX_VALGRIND_CLEAN broken out of
CFG_TOYBOX_DEBUG.

Change-Id: I8f89459d50f0fc976b225f1bfa01f55ac85de4b5
2016-01-15 16:58:53 -08:00
Elliott Hughes
3fac1bd4c1 Update generated files after toybox sync.
Change-Id: I61a6e7b160133ecf271aa28bf5d5de63191b3bcb
2016-01-04 12:28:44 -08:00
Elliott Hughes
fc9e18a16f Regenerate generated toybox files.
Change-Id: I7315c525b57f02b481e5bbd24f9887e1b8dd166f
2015-12-11 17:31:26 -08:00
Elliott Hughes
e39ad552e7 Regenerate generated files after upstream sync.
Change-Id: Ib322e0ee3c629eff5ed1bf5415f2f0c633792e9d
2015-11-12 20:22:57 -08:00
Elliott Hughes
b131803047 Start building toybox ps.
This lets you use "toybox ps" if you want, but "ps" is still a symbolic link
to the toolbox ps.

Change-Id: I82e4b94d68009640a3e69e0d349dc81aa84c50fd
2015-10-30 13:24:56 -07:00
Elliott Hughes
0cad3b1b07 Regenerate generated files (and build flock).
Change-Id: Ia7a11e6a130f4b043842d54d86c9bb02f7ee6270
2015-10-06 14:31:35 -07:00
Elliott Hughes
ecd3df97a3 Fix generated files after upstream sync.
Change-Id: Ic4b801cf500ac17c4f7ddbff896edf318e373fcd
2015-09-11 10:50:35 -07:00
Elliott Hughes
68640611f4 Switch to toybox uptime.
Now we're manually editing .config because we gave up on the repeated
breakage running the script on the host, we don't need to have a fake
<shadow.h>, and we can fix uptime so we don't need a <utmpx.h> either.

Change-Id: If371bb85bd44fec01362f7fbbbfc392bd2cdfe29
2015-08-31 11:41:08 -07:00
Elliott Hughes
134791c140 Regenerate generated files.
Change-Id: I647814ca584713988ad8f104da0cb3bd5c0787ab
2015-08-31 11:37:31 -07:00
Elliott Hughes
ede3a45132 Regenerate generated files.
Change-Id: I5644b11b7c76e71feaace364d60a03e88cd8fabe
2015-08-12 16:57:42 -07:00
Elliott Hughes
97809c213e Regenerate generated files.
Change-Id: I7b710d9132d04aac7f5ce91a7134af7bc1416acd
2015-08-07 13:58:59 -07:00
Elliott Hughes
e3764ccdc1 Regenerate generated files after upstream toybox sync.
Change-Id: I712c4e8391d333536887dcea162e640b2b73948e
2015-07-06 18:09:49 -07:00
Elliott Hughes
a0da26da9e Regenerate generated files.
Change-Id: I7525f17bf72a87d6eb25d687b70e5b7b4dd41d03
2015-05-31 09:51:58 -07:00
Elliott Hughes
30d712d325 Remove lspci.
This makes no sense right now, not least because we don't have the database.

Change-Id: I7d56386e81b1995577a9813663a9594357618a02
2015-05-15 16:41:23 -07:00
Elliott Hughes
0a5fd80f5b Regenerate generated files.
Change-Id: I0fa3010adc8740b1eaf19b3d073807618ca785ff
2015-05-08 10:39:42 -07:00
Elliott Hughes
12125dd0bf Regenerate generated files.
Change-Id: Ie882b61d9bf3489348d145bc127bab8a128397fe
2015-05-05 13:17:47 -07:00
Elliott Hughes
10a5d416c1 Regenerate generated files after upstream sync.
Change-Id: I21fdf950573bd41610c524c63c71c22939e5badb
2015-05-03 18:48:57 -07:00
Elliott Hughes
d67730eb9a Don't build chvt.
This functionality has been disabled in Android kernels since Cupcake.

Change-Id: I1855df32b618b3889eec75fbac7faac87ea385e0
2015-05-02 11:38:41 -07:00
Elliott Hughes
72502d2738 Regenerate generated files.
Also temporarily stop building pending/ps.c --- it's under construction
and doesn't currently build with clang.

Change-Id: Ie83dc65be22df5850b08569ebb1b88d26155aca5
2015-04-18 13:55:22 -07:00
Elliott Hughes
85cda1a44a Switch to toybox getprop and regenerate generated files.
Change-Id: Ic9ee4d9411bd8904546358db3768d95183be0e82
2015-04-08 10:53:59 -07:00
Elliott Hughes
4b39d13e8c Switch to toybox setprop and regenerate generated files.
Change-Id: I63efaef8d27de661eac497a106e2c2c0cac8a9bb
2015-04-07 17:42:12 -07:00
Elliott Hughes
e0953ac316 Switch to toybox restorecon and regenerate generated files.
Change-Id: If77674a3fb5e0d86193bdcf8850459eef689fba7
2015-04-07 15:33:23 -07:00
Elliott Hughes
0e6551acb8 Regenerate generated files after toybox sync.
Change-Id: Ie46c47811c74decd114bfc0d0cbbc600916fa13e
2015-03-28 12:49:31 -07:00
Elliott Hughes
cfbb8c14dc Regenerate generated files after toybox sync.
Also build toybox runcon.

Change-Id: Ib0db1472e4dbc5d9ac3a3ba1c9732db4c4e3f963
2015-03-23 17:53:47 -07:00
Elliott Hughes
5d2ad2398b Add toybox pgrep/pkill.
This is a better alternative to the toybox ps' simple name filtering.
It's much more scriptable too. And pkill makes one of the common uses
directly available.

Change-Id: I92529b68edd136fb8676029abbcc3a9c4d56f218
2015-03-19 22:54:15 -07:00
Elliott Hughes
40d36f2bcc Regenerate generated files after upstream sync.
Change-Id: Idbfcc6f260f8b993a19a5ef4b54586b2af8026bb
2015-03-11 13:37:18 -07:00
Elliott Hughes
88db412ddc Add expr and tar.
Bug: 19430187
Bug: 19430306
Change-Id: Ibe0f5eeeefd365d31bfc7569e21f5e370049e97a
2015-02-18 17:32:09 -08:00
Elliott Hughes
59cff4a51f Regenerate generated toybox files after sync.
Change-Id: I6b1d120bd08f58d7cfa869070e61ad792698071c
2015-02-18 17:22:23 -08:00
Elliott Hughes
bf65a2e0c8 Regenerate generated toybox files post-sync.
Change-Id: Iab7a9844e8774eb575380c02e3794b5cd838959c
2015-02-09 12:14:46 -08:00
Elliott Hughes
bfa8d0633f Add cpio.
Sony asked for this to be included for some reason. Fine by me.

Bug: 18464157
Change-Id: I497d6d8fe8a912b5c503663cfb12d9de7803343b
2015-02-05 10:08:05 -08:00
Elliott Hughes
9fe4a3a70d Regenerate the toybox generated files.
Change-Id: I69a07e2043ea62fa963bfce12575e746a2f853c8
2015-01-16 18:50:56 -08:00
Elliott Hughes
4ac9dd68f1 Regenerate toybox generated files.
Change-Id: I3225ddc60f8e894d47b51bdc04f74ac97be90328
2015-01-14 17:00:35 -08:00