blob: fe03397c5fa0a0f6372397e0d1cd4d6491b305f3 [file] [log] [blame]
Andreas Gampe02d0de52015-11-11 20:43:16 -08001/*
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
Jeff Sharkeyc7d1b222016-01-11 13:07:09 -070031int create_app_data(const char *uuid, const char *pkgname, userid_t userid, int flags,
Janis Danisevskiseecb2d22016-01-12 14:45:55 +000032 appid_t appid, const char* seinfo, int target_sdk_version);
Jeff Sharkeyc7d1b222016-01-11 13:07:09 -070033int restorecon_app_data(const char* uuid, const char* pkgName, userid_t userid, int flags,
34 appid_t appid, const char* seinfo);
Jeff Sharkeycc6281c2016-02-06 19:46:09 -070035int migrate_app_data(const char *uuid, const char *pkgname, userid_t userid, int flags);
Jeff Sharkeyc7d1b222016-01-11 13:07:09 -070036int clear_app_data(const char *uuid, const char *pkgname, userid_t userid, int flags);
37int destroy_app_data(const char *uuid, const char *pkgname, userid_t userid, int flags);
38
39int move_complete_app(const char* from_uuid, const char *to_uuid, const char *package_name,
Janis Danisevskiseecb2d22016-01-12 14:45:55 +000040 const char *data_app_name, appid_t appid, const char* seinfo, int target_sdk_version);
Jeff Sharkeyc7d1b222016-01-11 13:07:09 -070041
42int get_app_size(const char *uuid, const char *pkgname, int userid, int flags,
43 const char *apkpath, const char *libdirpath, const char *fwdlock_apkpath,
44 const char *asecpath, const char *instruction_set, int64_t *codesize, int64_t *datasize,
45 int64_t *cachesize, int64_t *asecsize);
46
Andreas Gampe02d0de52015-11-11 20:43:16 -080047int make_user_config(userid_t userid);
48int delete_user(const char *uuid, userid_t userid);
Andreas Gampe02d0de52015-11-11 20:43:16 -080049int rm_dex(const char *path, const char *instruction_set);
Andreas Gampe02d0de52015-11-11 20:43:16 -080050int free_cache(const char *uuid, int64_t free_size);
51int dexopt(const char *apk_path, uid_t uid, const char *pkgName, const char *instruction_set,
Calin Juravle60a794d2015-12-24 12:36:41 +020052 int dexopt_needed, const char* oat_dir, int dexopt_flags,
53 const char* volume_uuid, bool use_profiles);
Andreas Gampe02d0de52015-11-11 20:43:16 -080054int mark_boot_complete(const char *instruction_set);
Andreas Gampe02d0de52015-11-11 20:43:16 -080055int linklib(const char* uuid, const char* pkgname, const char* asecLibDir, int userId);
56int idmap(const char *target_path, const char *overlay_path, uid_t uid);
Andreas Gampe02d0de52015-11-11 20:43:16 -080057int create_oat_dir(const char* oat_dir, const char *instruction_set);
58int rm_package_dir(const char* apk_path);
Andreas Gampe02d0de52015-11-11 20:43:16 -080059int link_file(const char *relative_path, const char *from_base, const char *to_base);
60
61} // namespace installd
62} // namespace android
63
64#endif // COMMANDS_H_