Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a68049a8 authored by Brian Carlstrom's avatar Brian Carlstrom
Browse files

Merge remote branch 'goog/froyo' into mm

parents b99a099c 7c19bbe0
Loading
Loading
Loading
Loading

CleanSpec.mk

0 → 100644
+49 −0
Original line number Diff line number Diff line
# Copyright (C) 2007 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# If you don't need to do a full clean build but would like to touch
# a file or delete some intermediate files, add a clean step to the end
# of the list.  These steps will only be run once, if they haven't been
# run before.
#
# E.g.:
#     $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
#     $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
#
# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
# files that are missing or have been moved.
#
# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
# Use $(OUT_DIR) to refer to the "out" directory.
#
# If you need to re-do something that's already mentioned, just copy
# the command and add it to the bottom of the list.  E.g., if a change
# that you made last week required touching a file and a change you
# made today requires touching the same file, just copy the old
# touch step and add it to the end of the list.
#
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************

# For example:
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)

# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
+2 −1
Original line number Diff line number Diff line
@@ -895,9 +895,10 @@ int adb_main(int is_daemon)
        ** AID_GRAPHICS to access the frame buffer
        ** AID_NET_BT and AID_NET_BT_ADMIN to diagnose bluetooth (hcidump)
        ** AID_SDCARD_RW to allow writing to the SD card
        ** AID_MOUNT to allow unmounting the SD card before rebooting
        */
        gid_t groups[] = { AID_ADB, AID_LOG, AID_INPUT, AID_INET, AID_GRAPHICS,
                           AID_NET_BT, AID_NET_BT_ADMIN, AID_SDCARD_RW };
                           AID_NET_BT, AID_NET_BT_ADMIN, AID_SDCARD_RW, AID_MOUNT };
        setgroups(sizeof(groups)/sizeof(groups[0]), groups);

        /* then switch user and group to "shell" */
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@
#define ADB_VERSION_MAJOR 1         // Used for help/version information
#define ADB_VERSION_MINOR 0         // Used for help/version information

#define ADB_SERVER_VERSION    25    // Increment this when we want to force users to start a new adb server
#define ADB_SERVER_VERSION    26    // Increment this when we want to force users to start a new adb server

typedef struct amessage amessage;
typedef struct apacket apacket;
+17 −8
Original line number Diff line number Diff line
@@ -105,8 +105,8 @@ void help()
        "                                 environment variable is used, which must\n"
        "                                 be an absolute path.\n"
        " devices                       - list all connected devices\n"
        " connect <host>:<port>         - connect to a device via TCP/IP"
        " disconnect <host>:<port>      - disconnect from a TCP/IP device"
        " connect <host>:<port>         - connect to a device via TCP/IP\n"
        " disconnect <host>:<port>      - disconnect from a TCP/IP device\n"
        "\n"
        "device commands:\n"
        "  adb push <local> <remote>    - copy file/dir to device\n"
@@ -126,9 +126,10 @@ void help()
        "                                   dev:<character device name>\n"
        "                                   jdwp:<process pid> (remote only)\n"
        "  adb jdwp                     - list PIDs of processes hosting a JDWP transport\n"
        "  adb install [-l] [-r] <file> - push this package file to the device and install it\n"
        "  adb install [-l] [-r] [-s] <file> - push this package file to the device and install it\n"
        "                                 ('-l' means forward-lock the app)\n"
        "                                 ('-r' means reinstall the app, keeping its data)\n"
        "                                 ('-s' means install on SD card instead of internal storage)\n"
        "  adb uninstall [-k] <package> - remove this app package from the device\n"
        "                                 ('-k' means keep the data and cache directories)\n"
        "  adb bugreport                - return all information from the device\n"
@@ -220,8 +221,8 @@ static void read_and_dump(int fd)
            if(errno == EINTR) continue;
            break;
        }
        /* we want to output to stdout, so no adb_write here !! */
        unix_write(1, buf, len);
        fwrite(buf, 1, len, stdout);
        fflush(stdout);
    }
}

@@ -1255,17 +1256,25 @@ int install_app(transport_type transport, char* serial, int argc, char** argv)
{
    struct stat st;
    int err;
    const char *const WHERE = "/data/local/tmp/%s";
    const char *const DATA_DEST = "/data/local/tmp/%s";
    const char *const SD_DEST = "/sdcard/tmp/%s";
    const char* where = DATA_DEST;
    char to[PATH_MAX];
    char* filename = argv[argc - 1];
    const char* p;
    int i;

    for (i = 0; i < argc; i++) {
        if (!strcmp(argv[i], "-s"))
            where = SD_DEST;
    }

    p = adb_dirstop(filename);
    if (p) {
        p++;
        snprintf(to, sizeof to, WHERE, p);
        snprintf(to, sizeof to, where, p);
    } else {
        snprintf(to, sizeof to, WHERE, filename);
        snprintf(to, sizeof to, where, filename);
    }
    if (p[0] == '\0') {
    }
+15 −1
Original line number Diff line number Diff line
@@ -176,9 +176,23 @@ void restart_usb_service(int fd, void *cookie)
void reboot_service(int fd, void *arg)
{
    char buf[100];
    int ret;
    int pid, ret;

    sync();

    /* Attempt to unmount the SD card first.
     * No need to bother checking for errors.
     */
    pid = fork();
    if (pid == 0) {
        /* ask vdc to unmount it */
        execl("/system/bin/vdc", "/system/bin/vdc", "volume", "unmount",
                getenv("EXTERNAL_STORAGE"), "force", NULL);
    } else if (pid > 0) {
        /* wait until vdc succeeds or fails */
        waitpid(pid, &ret, 0);
    }

    ret = __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
                    LINUX_REBOOT_CMD_RESTART2, (char *)arg);
    if (ret < 0) {
Loading