commands.h revision 02d0de56c75347a0cb8d5a8565dc8c4ee7616057
1/* 2** 3** Copyright 2008, The Android Open Source Project 4** 5** Licensed under the Apache License, Version 2.0 (the "License"); 6** you may not use this file except in compliance with the License. 7** You may obtain a copy of the License at 8** 9** http://www.apache.org/licenses/LICENSE-2.0 10** 11** Unless required by applicable law or agreed to in writing, software 12** distributed under the License is distributed on an "AS IS" BASIS, 13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14** See the License for the specific language governing permissions and 15** limitations under the License. 16*/ 17 18#ifndef COMMANDS_H_ 19#define COMMANDS_H_ 20 21#include <inttypes.h> 22#include <unistd.h> 23 24#include <cutils/multiuser.h> 25 26#include <installd_constants.h> 27 28namespace android { 29namespace installd { 30 31int install(const char *uuid, const char *pkgname, uid_t uid, gid_t gid, const char *seinfo); 32int uninstall(const char *uuid, const char *pkgname, userid_t userid); 33int renamepkg(const char *oldpkgname, const char *newpkgname); 34int fix_uid(const char *uuid, const char *pkgname, uid_t uid, gid_t gid); 35int delete_user_data(const char *uuid, const char *pkgname, userid_t userid); 36int make_user_data(const char *uuid, const char *pkgname, uid_t uid, 37 userid_t userid, const char* seinfo); 38int copy_complete_app(const char* from_uuid, const char *to_uuid, 39 const char *package_name, const char *data_app_name, appid_t appid, 40 const char* seinfo); 41int make_user_config(userid_t userid); 42int delete_user(const char *uuid, userid_t userid); 43int delete_cache(const char *uuid, const char *pkgname, userid_t userid); 44int delete_code_cache(const char *uuid, const char *pkgname, userid_t userid); 45int move_dex(const char *src, const char *dst, const char *instruction_set); 46int rm_dex(const char *path, const char *instruction_set); 47int protect(char *pkgname, gid_t gid); 48int get_size(const char *uuid, const char *pkgname, int userid, 49 const char *apkpath, const char *libdirpath, 50 const char *fwdlock_apkpath, const char *asecpath, 51 const char *instruction_set, int64_t *codesize, int64_t *datasize, 52 int64_t *cachesize, int64_t *asecsize); 53int free_cache(const char *uuid, int64_t free_size); 54int dexopt(const char *apk_path, uid_t uid, const char *pkgName, const char *instruction_set, 55 int dexopt_needed, const char* oat_dir, int dexopt_flags); 56int mark_boot_complete(const char *instruction_set); 57int movefiles(); 58int linklib(const char* uuid, const char* pkgname, const char* asecLibDir, int userId); 59int idmap(const char *target_path, const char *overlay_path, uid_t uid); 60int restorecon_data(const char *uuid, const char* pkgName, const char* seinfo, uid_t uid); 61int create_oat_dir(const char* oat_dir, const char *instruction_set); 62int rm_package_dir(const char* apk_path); 63int move_package_dir(char path[PKG_PATH_MAX], const char *oat_dir, const char *apk_path, 64 const char *instruction_set); 65int link_file(const char *relative_path, const char *from_base, const char *to_base); 66 67} // namespace installd 68} // namespace android 69 70#endif // COMMANDS_H_ 71