Drop specific directory paths we don't want to maintain

This commit is contained in:
Simon Fels 2016-08-20 12:24:58 +02:00
commit 4f950deaf7
4 changed files with 2 additions and 41 deletions

View file

@ -52,16 +52,14 @@ void AndroidApiStub::ensure_rpc_channel() {
void AndroidApiStub::install(const std::string &path) {
ensure_rpc_channel();
const auto target_path = utils::string_format("%s/%s",
config::host_share_path(), fs::path(path).filename().string());
const auto target_path = utils::string_format("/data/anbox-share/%s", fs::path(path).filename().string());
if (fs::exists(target_path))
fs::remove(target_path);
fs::copy(path, target_path);
const auto container_path = utils::string_format("%s/%s",
config::container_android_share_path(), fs::path(path).filename().string());
const auto container_path = utils::string_format("/data/anbox-share/%s", fs::path(path).filename().string());
auto c = std::make_shared<Request<protobuf::rpc::Void>>();
protobuf::bridge::InstallApplication message;

View file

@ -83,10 +83,6 @@ anbox::cmds::Run::Run(const BusFactory& bus_factory)
utils::ensure_paths({
config::socket_path(),
config::host_share_path(),
config::host_android_data_path(),
config::host_android_cache_path(),
config::host_android_storage_path(),
config::host_input_device_path(),
});
@ -157,10 +153,6 @@ anbox::cmds::Run::Run(const BusFactory& bus_factory)
{ qemud_connector->socket_file(), "/dev/qemud" },
{ qemu_pipe_connector->socket_file(), "/dev/qemu_pipe" },
{ bridge_connector->socket_file(), "/dev/anbox_bridge" },
{ config::host_share_path(), config::container_android_share_path()},
{ config::host_android_data_path(), "/data" },
{ config::host_android_cache_path(), "/cache" },
{ config::host_android_storage_path(), "/storage" },
{ config::host_input_device_path(), "/dev/input" },
{ "/dev/binder", "/dev/binder" },
{ "/dev/ashmem", "/dev/ashmem" },

View file

@ -108,29 +108,5 @@ std::string host_input_device_path() {
static std::string path = utils::string_format("%s/anbox/input-devices", runtime_dir());
return path;
}
std::string host_share_path() {
static std::string path = utils::string_format("%s/android-share", data_path());
return path;
}
std::string host_android_data_path() {
static std::string path = utils::string_format("%s/android-data", data_path());
return path;
}
std::string host_android_cache_path() {
static std::string path = utils::string_format("%s/android-cache", data_path());
return path;
}
std::string host_android_storage_path() {
static std::string path = utils::string_format("%s/android-storage", data_path());
return path;
}
std::string container_android_share_path() {
return "/data/anbox-share";
}
} // namespace config
} // namespace anbox

View file

@ -31,12 +31,7 @@ std::string log_path();
std::string socket_path();
std::string container_config_path();
std::string container_socket_path();
std::string host_share_path();
std::string host_input_device_path();
std::string host_android_data_path();
std::string host_android_cache_path();
std::string host_android_storage_path();
std::string container_android_share_path();
} // namespace config
} // namespace anbox