Drop specific directory paths we don't want to maintain
This commit is contained in:
parent
706678b740
commit
4f950deaf7
4 changed files with 2 additions and 41 deletions
|
|
@ -52,16 +52,14 @@ void AndroidApiStub::ensure_rpc_channel() {
|
||||||
void AndroidApiStub::install(const std::string &path) {
|
void AndroidApiStub::install(const std::string &path) {
|
||||||
ensure_rpc_channel();
|
ensure_rpc_channel();
|
||||||
|
|
||||||
const auto target_path = utils::string_format("%s/%s",
|
const auto target_path = utils::string_format("/data/anbox-share/%s", fs::path(path).filename().string());
|
||||||
config::host_share_path(), fs::path(path).filename().string());
|
|
||||||
|
|
||||||
if (fs::exists(target_path))
|
if (fs::exists(target_path))
|
||||||
fs::remove(target_path);
|
fs::remove(target_path);
|
||||||
|
|
||||||
fs::copy(path, target_path);
|
fs::copy(path, target_path);
|
||||||
|
|
||||||
const auto container_path = utils::string_format("%s/%s",
|
const auto container_path = utils::string_format("/data/anbox-share/%s", fs::path(path).filename().string());
|
||||||
config::container_android_share_path(), fs::path(path).filename().string());
|
|
||||||
|
|
||||||
auto c = std::make_shared<Request<protobuf::rpc::Void>>();
|
auto c = std::make_shared<Request<protobuf::rpc::Void>>();
|
||||||
protobuf::bridge::InstallApplication message;
|
protobuf::bridge::InstallApplication message;
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,6 @@ anbox::cmds::Run::Run(const BusFactory& bus_factory)
|
||||||
|
|
||||||
utils::ensure_paths({
|
utils::ensure_paths({
|
||||||
config::socket_path(),
|
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(),
|
config::host_input_device_path(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -157,10 +153,6 @@ anbox::cmds::Run::Run(const BusFactory& bus_factory)
|
||||||
{ qemud_connector->socket_file(), "/dev/qemud" },
|
{ qemud_connector->socket_file(), "/dev/qemud" },
|
||||||
{ qemu_pipe_connector->socket_file(), "/dev/qemu_pipe" },
|
{ qemu_pipe_connector->socket_file(), "/dev/qemu_pipe" },
|
||||||
{ bridge_connector->socket_file(), "/dev/anbox_bridge" },
|
{ 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" },
|
{ config::host_input_device_path(), "/dev/input" },
|
||||||
{ "/dev/binder", "/dev/binder" },
|
{ "/dev/binder", "/dev/binder" },
|
||||||
{ "/dev/ashmem", "/dev/ashmem" },
|
{ "/dev/ashmem", "/dev/ashmem" },
|
||||||
|
|
|
||||||
|
|
@ -108,29 +108,5 @@ std::string host_input_device_path() {
|
||||||
static std::string path = utils::string_format("%s/anbox/input-devices", runtime_dir());
|
static std::string path = utils::string_format("%s/anbox/input-devices", runtime_dir());
|
||||||
return path;
|
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 config
|
||||||
} // namespace anbox
|
} // namespace anbox
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,7 @@ std::string log_path();
|
||||||
std::string socket_path();
|
std::string socket_path();
|
||||||
std::string container_config_path();
|
std::string container_config_path();
|
||||||
std::string container_socket_path();
|
std::string container_socket_path();
|
||||||
std::string host_share_path();
|
|
||||||
std::string host_input_device_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 config
|
||||||
} // namespace anbox
|
} // namespace anbox
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue