Closed cubesky closed 1 month ago
MaaFramework 压根没做 Linux 下的发现设备功能,大概是因为主要开发者没人用 Linux(
简单糊了个环境变量 adb + adb devices
的,试试能用不? https://github.com/MaaXYZ/MaaFramework/actions/runs/9492928597
替换后可以启动但 adb 位置自动检测有问题
root@yog:/maa/MAS_Nightly# ./MaaPiCli
Welcome to use Maa Project Interface CLI!
MaaFramework: v1.8.6-post.4-ci.9492928597
Version: v0.1.5-ci.10-g05875bd
### Select ADB ###
1. Auto detect
2. Manual input
Please input [1-2]: 1
Finding device...
terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
what(): filesystem error: cannot make absolute path: Invalid argument []
Aborted (core dumped)
MaaFramework 压根没做 Linux 下的发现设备功能,大概是因为主要开发者没人用 Linux(
原来是没有的?还以为是特例
替换后可以启动但 adb 位置自动检测有问题
root@yog:/maa/MAS_Nightly# ./MaaPiCli Welcome to use Maa Project Interface CLI! MaaFramework: v1.8.6-post.4-ci.9492928597 Version: v0.1.5-ci.10-g05875bd ### Select ADB ### 1. Auto detect 2. Manual input Please input [1-2]: 1 Finding device... terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error' what(): filesystem error: cannot make absolute path: Invalid argument [] Aborted (core dumped)
发 log
替换后可以启动但 adb 位置自动检测有问题
root@yog:/maa/MAS_Nightly# ./MaaPiCli Welcome to use Maa Project Interface CLI! MaaFramework: v1.8.6-post.4-ci.9492928597 Version: v0.1.5-ci.10-g05875bd ### Select ADB ### 1. Auto detect 2. Manual input Please input [1-2]: 1 Finding device... terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error' what(): filesystem error: cannot make absolute path: Invalid argument [] Aborted (core dumped)
发 log
[2024-06-13 18:25:48.321][DBG][Px1073][Tx42278][Logger] -----------------------------
[2024-06-13 18:25:48.321][DBG][Px1073][Tx42278][Logger] MAA Process Start
[2024-06-13 18:25:48.321][DBG][Px1073][Tx42278][Logger] Version v1.8.6-post.4-ci.9492928597
[2024-06-13 18:25:48.321][DBG][Px1073][Tx42278][Logger] Built at Jun 13 2024 02:53:52
[2024-06-13 18:25:48.321][DBG][Px1073][Tx42278][Logger] Linux x86_64
[2024-06-13 18:25:48.321][DBG][Px1073][Tx42278][Logger] Working /maa/MAS_Nightly
[2024-06-13 18:25:48.321][DBG][Px1073][Tx42278][Logger] Logging /maa/MAS_Nightly/debug/maa.log
[2024-06-13 18:25:48.321][DBG][Px1073][Tx42278][Logger] -----------------------------
[2024-06-13 18:25:48.321][TRC][Px1073][Tx42278][GlobalOptionMgr.cpp][L36][bool MaaNS::GlobalOptionMgr::set_log_dir(MaaOptionValue, MaaOptionValueSize)] | leave, 0ms
[2024-06-13 18:25:48.321][TRC][Px1073][Tx42278][GlobalOptionMgr.cpp][L13][bool MaaNS::GlobalOptionMgr::set_option(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] | leave, 0ms
[2024-06-13 18:25:48.321][TRC][Px1073][Tx42278][MaaUtility.cpp][L19][MaaBool MaaSetGlobalOption(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] | leave, 0ms
[2024-06-13 18:25:48.321][DBG][Px1073][Tx42278][MaaUtility.cpp][L19][MaaBool MaaSetGlobalOption(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] [key=2] [value=0x7f053713be59] [val_size=1] | enter
[2024-06-13 18:25:48.321][DBG][Px1073][Tx42278][GlobalOptionMgr.cpp][L13][bool MaaNS::GlobalOptionMgr::set_option(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] [key=2] [value=0x7f053713be59] [val_size=1] | enter
[2024-06-13 18:25:48.321][DBG][Px1073][Tx42278][GlobalOptionMgr.cpp][L50][bool MaaNS::GlobalOptionMgr::set_save_draw(MaaOptionValue, MaaOptionValueSize)] | enter
[2024-06-13 18:25:48.321][INF][Px1073][Tx42278][GlobalOptionMgr.cpp][L59][bool MaaNS::GlobalOptionMgr::set_save_draw(MaaOptionValue, MaaOptionValueSize)] Set save draw [save_draw_=false]
[2024-06-13 18:25:48.321][TRC][Px1073][Tx42278][GlobalOptionMgr.cpp][L50][bool MaaNS::GlobalOptionMgr::set_save_draw(MaaOptionValue, MaaOptionValueSize)] | leave, 0ms
[2024-06-13 18:25:48.321][TRC][Px1073][Tx42278][GlobalOptionMgr.cpp][L13][bool MaaNS::GlobalOptionMgr::set_option(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] | leave, 0ms
[2024-06-13 18:25:48.321][TRC][Px1073][Tx42278][MaaUtility.cpp][L19][MaaBool MaaSetGlobalOption(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] | leave, 0ms
[2024-06-13 18:25:48.321][DBG][Px1073][Tx42278][MaaUtility.cpp][L19][MaaBool MaaSetGlobalOption(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] [key=3] [value=0x7f053713be5a] [val_size=1] | enter
[2024-06-13 18:25:48.321][DBG][Px1073][Tx42278][GlobalOptionMgr.cpp][L13][bool MaaNS::GlobalOptionMgr::set_option(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] [key=3] [value=0x7f053713be5a] [val_size=1] | enter
[2024-06-13 18:25:48.322][DBG][Px1073][Tx42278][GlobalOptionMgr.cpp][L82][bool MaaNS::GlobalOptionMgr::set_recording(MaaOptionValue, MaaOptionValueSize)] | enter
[2024-06-13 18:25:48.322][INF][Px1073][Tx42278][GlobalOptionMgr.cpp][L91][bool MaaNS::GlobalOptionMgr::set_recording(MaaOptionValue, MaaOptionValueSize)] Set recording [recording_=false]
[2024-06-13 18:25:48.322][TRC][Px1073][Tx42278][GlobalOptionMgr.cpp][L82][bool MaaNS::GlobalOptionMgr::set_recording(MaaOptionValue, MaaOptionValueSize)] | leave, 0ms
[2024-06-13 18:25:48.322][TRC][Px1073][Tx42278][GlobalOptionMgr.cpp][L13][bool MaaNS::GlobalOptionMgr::set_option(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] | leave, 0ms
[2024-06-13 18:25:48.322][TRC][Px1073][Tx42278][MaaUtility.cpp][L19][MaaBool MaaSetGlobalOption(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] | leave, 0ms
[2024-06-13 18:25:48.322][DBG][Px1073][Tx42278][MaaUtility.cpp][L19][MaaBool MaaSetGlobalOption(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] [key=4] [value=0x7f053713be5c] [val_size=4] | enter
[2024-06-13 18:25:48.322][DBG][Px1073][Tx42278][GlobalOptionMgr.cpp][L13][bool MaaNS::GlobalOptionMgr::set_option(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] [key=4] [value=0x7f053713be5c] [val_size=4] | enter
[2024-06-13 18:25:48.322][DBG][Px1073][Tx42278][GlobalOptionMgr.cpp][L98][bool MaaNS::GlobalOptionMgr::set_stdout_level(MaaOptionValue, MaaOptionValueSize)] | enter
[2024-06-13 18:25:48.322][INF][Px1073][Tx42278][GlobalOptionMgr.cpp][L107][bool MaaNS::GlobalOptionMgr::set_stdout_level(MaaOptionValue, MaaOptionValueSize)] Set log stdout level [level=2]
[2024-06-13 18:25:48.322][TRC][Px1073][Tx42278][GlobalOptionMgr.cpp][L98][bool MaaNS::GlobalOptionMgr::set_stdout_level(MaaOptionValue, MaaOptionValueSize)] | leave, 0ms
[2024-06-13 18:25:48.322][TRC][Px1073][Tx42278][GlobalOptionMgr.cpp][L13][bool MaaNS::GlobalOptionMgr::set_option(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] | leave, 0ms
[2024-06-13 18:25:48.322][TRC][Px1073][Tx42278][MaaUtility.cpp][L19][MaaBool MaaSetGlobalOption(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] | leave, 0ms
[2024-06-13 18:25:48.322][DBG][Px1073][Tx42278][MaaUtility.cpp][L19][MaaBool MaaSetGlobalOption(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] [key=5] [value=0x7f053713be60] [val_size=1] | enter
[2024-06-13 18:25:48.322][DBG][Px1073][Tx42278][GlobalOptionMgr.cpp][L13][bool MaaNS::GlobalOptionMgr::set_option(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] [key=5] [value=0x7f053713be60] [val_size=1] | enter
[2024-06-13 18:25:48.322][DBG][Px1073][Tx42278][GlobalOptionMgr.cpp][L66][bool MaaNS::GlobalOptionMgr::set_show_hit_draw(MaaOptionValue, MaaOptionValueSize)] | enter
[2024-06-13 18:25:48.322][INF][Px1073][Tx42278][GlobalOptionMgr.cpp][L75][bool MaaNS::GlobalOptionMgr::set_show_hit_draw(MaaOptionValue, MaaOptionValueSize)] Set show_hit_draw [show_hit_draw_=false]
[2024-06-13 18:25:48.322][TRC][Px1073][Tx42278][GlobalOptionMgr.cpp][L66][bool MaaNS::GlobalOptionMgr::set_show_hit_draw(MaaOptionValue, MaaOptionValueSize)] | leave, 0ms
[2024-06-13 18:25:48.322][TRC][Px1073][Tx42278][GlobalOptionMgr.cpp][L13][bool MaaNS::GlobalOptionMgr::set_option(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] | leave, 0ms
[2024-06-13 18:25:48.322][TRC][Px1073][Tx42278][MaaUtility.cpp][L19][MaaBool MaaSetGlobalOption(MaaGlobalOption, MaaOptionValue, MaaOptionValueSize)] | leave, 0ms
[2024-06-13 18:25:48.322][TRC][Px1073][Tx42278][GlobalOptionConfig.cpp][L102][bool MaaNS::ToolkitNS::GlobalOptionConfig::apply_option()] [ret=]
[2024-06-13 18:25:48.322][TRC][Px1073][Tx42278][GlobalOptionConfig.cpp][L74][bool MaaNS::ToolkitNS::GlobalOptionConfig::apply_option()] | leave, 1ms
[2024-06-13 18:25:48.322][TRC][Px1073][Tx42278][GlobalOptionConfig.cpp][L19][bool MaaNS::ToolkitNS::GlobalOptionConfig::init(const std::filesystem::__cxx11::path&, const json::value&)] | leave, 1ms
[2024-06-13 18:25:48.322][DBG][Px1073][Tx42278][interactor.cpp][L109][bool Interactor::load(const std::filesystem::__cxx11::path&)] [project_dir=/maa/MAS_Nightly] | enter
[2024-06-13 18:25:48.322][DBG][Px1073][Tx42278][Configurator.cpp][L14][bool MaaNS::ProjectInterfaceNS::Configurator::load(const std::filesystem::__cxx11::path&)] [project_dir=/maa/MAS_Nightly] | enter
[2024-06-13 18:25:48.322][DBG][Px1073][Tx42278][Parser.cpp][L12][static std::optional<MaaNS::ProjectInterfaceNS::InterfaceData> MaaNS::ProjectInterfaceNS::Parser::parse_interface(const std::filesystem::__cxx11::path&)] [path=/maa/MAS_Nightly/interface.json] | enter
[2024-06-13 18:25:48.322][INF][Px1073][Tx42278][Parser.cpp][L43][static std::optional<MaaNS::ProjectInterfaceNS::InterfaceData> MaaNS::ProjectInterfaceNS::Parser::parse_interface(const json::value&)] Interface Version: [data.version=v0.1.5-ci.10-g05875bd]
[2024-06-13 18:25:48.322][TRC][Px1073][Tx42278][Parser.cpp][L12][static std::optional<MaaNS::ProjectInterfaceNS::InterfaceData> MaaNS::ProjectInterfaceNS::Parser::parse_interface(const std::filesystem::__cxx11::path&)] | leave, 0ms
[2024-06-13 18:25:48.322][DBG][Px1073][Tx42278][Parser.cpp][L49][static std::optional<MaaNS::ProjectInterfaceNS::Configuration> MaaNS::ProjectInterfaceNS::Parser::parse_config(const std::filesystem::__cxx11::path&)] [path=/maa/MAS_Nightly/config/maa_pi_config.json] | enter
[2024-06-13 18:25:48.322][WRN][Px1073][Tx42278][Parser.cpp][L53][static std::optional<MaaNS::ProjectInterfaceNS::Configuration> MaaNS::ProjectInterfaceNS::Parser::parse_config(const std::filesystem::__cxx11::path&)] failed to parse /maa/MAS_Nightly/config/maa_pi_config.json
[2024-06-13 18:25:48.323][TRC][Px1073][Tx42278][Parser.cpp][L49][static std::optional<MaaNS::ProjectInterfaceNS::Configuration> MaaNS::ProjectInterfaceNS::Parser::parse_config(const std::filesystem::__cxx11::path&)] | leave, 0ms
[2024-06-13 18:25:48.323][TRC][Px1073][Tx42278][Configurator.cpp][L14][bool MaaNS::ProjectInterfaceNS::Configurator::load(const std::filesystem::__cxx11::path&)] | leave, 0ms
[2024-06-13 18:25:48.323][DBG][Px1073][Tx42278][Configurator.cpp][L41][bool MaaNS::ProjectInterfaceNS::Configurator::check_configuration()] | enter
[2024-06-13 18:25:48.323][TRC][Px1073][Tx42278][Configurator.cpp][L41][bool MaaNS::ProjectInterfaceNS::Configurator::check_configuration()] | leave, 0ms
[2024-06-13 18:25:48.323][TRC][Px1073][Tx42278][interactor.cpp][L109][bool Interactor::load(const std::filesystem::__cxx11::path&)] | leave, 0ms
[2024-06-13 18:25:49.877][DBG][Px1073][Tx42278][MaaToolkitDevice.cpp][L38][MaaBool MaaToolkitPostFindDevice()] | enter
[2024-06-13 18:25:49.877][DBG][Px1073][Tx42278][DeviceMgr.cpp][L22][virtual bool MaaNS::ToolkitNS::DeviceMgr::post_find_device()] | enter
[2024-06-13 18:25:49.877][TRC][Px1073][Tx42278][DeviceMgr.cpp][L22][virtual bool MaaNS::ToolkitNS::DeviceMgr::post_find_device()] | leave, 0ms
[2024-06-13 18:25:49.877][TRC][Px1073][Tx42278][MaaToolkitDevice.cpp][L38][MaaBool MaaToolkitPostFindDevice()] | leave, 0ms
[2024-06-13 18:25:49.878][INF][Px1073][Tx54933][DeviceMgr.cpp][L183][std::vector<MaaNS::ToolkitNS::DeviceMgr::Emulator> MaaNS::ToolkitNS::DeviceMgr::find_emulators() const] [result=[]]
[2024-06-13 18:25:49.878][DBG][Px1073][Tx54933][DeviceMgr.cpp][L211][std::vector<std::__cxx11::basic_string<char> > MaaNS::ToolkitNS::DeviceMgr::request_adb_serials(const std::filesystem::__cxx11::path&, const json::value&) const] [adb_path=/usr/bin/adb] | enter
[2024-06-13 18:25:49.878][DBG][Px1073][Tx54933][LibraryHolder.h][L49][static bool MaaNS::LibraryHolder<T>::load_library(const std::filesystem::__cxx11::path&) [with T = MaaNS::AdbControlUnitLibraryHolder]] [libname=/maa/MAS_Nightly/MaaAdbControlUnit] | enter
[2024-06-13 18:25:49.878][INF][Px1073][Tx54933][LibraryHolder.h][L64][static bool MaaNS::LibraryHolder<T>::load_library(const std::filesystem::__cxx11::path&) [with T = MaaNS::AdbControlUnitLibraryHolder]] Loading library [libname=/maa/MAS_Nightly/MaaAdbControlUnit]
[2024-06-13 18:25:49.878][TRC][Px1073][Tx54933][LibraryHolder.h][L49][static bool MaaNS::LibraryHolder<T>::load_library(const std::filesystem::__cxx11::path&) [with T = MaaNS::AdbControlUnitLibraryHolder]] | leave, 0ms
[2024-06-13 18:25:49.878][DBG][Px1073][Tx54933][LibraryHolder.h][L118][static boost::function<FuncT> MaaNS::LibraryHolder<T>::get_function(const std::string&) [with FuncT = const char*(); T = MaaNS::AdbControlUnitLibraryHolder; std::string = std::__cxx11::basic_string<char>]] [func_name=MaaAdbControlUnitGetVersion] | enter
[2024-06-13 18:25:49.878][TRC][Px1073][Tx54933][LibraryHolder.h][L118][static boost::function<FuncT> MaaNS::LibraryHolder<T>::get_function(const std::string&) [with FuncT = const char*(); T = MaaNS::AdbControlUnitLibraryHolder; std::string = std::__cxx11::basic_string<char>]] | leave, 0ms
[2024-06-13 18:25:49.878][INF][Px1073][Tx54933][ControlUnit.cpp][L23][bool MaaNS::check_version(const std::string&) [with ControlUnitT = AdbControlUnitLibraryHolder; GetVersionT = const char*(); std::string = std::__cxx11::basic_string<char>]] N5MaaNS27AdbControlUnitLibraryHolderE Library version: v1.8.6-post.4-ci.9492928597
[2024-06-13 18:25:49.879][DBG][Px1073][Tx54933][LibraryHolder.h][L118][static boost::function<FuncT> MaaNS::LibraryHolder<T>::get_function(const std::string&) [with FuncT = MaaNS::CtrlUnitNs::ControlUnitAPI*(const char*, const char*, int, const char*, const char*, void (*)(const char*, const char*, void*), void*); T = MaaNS::AdbControlUnitLibraryHolder; std::string = std::__cxx11::basic_string<char>]] [func_name=MaaAdbControlUnitCreate] | enter
[2024-06-13 18:25:49.879][TRC][Px1073][Tx54933][LibraryHolder.h][L118][static boost::function<FuncT> MaaNS::LibraryHolder<T>::get_function(const std::string&) [with FuncT = MaaNS::CtrlUnitNs::ControlUnitAPI*(const char*, const char*, int, const char*, const char*, void (*)(const char*, const char*, void*), void*); T = MaaNS::AdbControlUnitLibraryHolder; std::string = std::__cxx11::basic_string<char>]] | leave, 0ms
[2024-06-13 18:25:49.879][DBG][Px1073][Tx54933][LibraryHolder.h][L118][static boost::function<FuncT> MaaNS::LibraryHolder<T>::get_function(const std::string&) [with FuncT = void(MaaNS::CtrlUnitNs::ControlUnitAPI*); T = MaaNS::AdbControlUnitLibraryHolder; std::string = std::__cxx11::basic_string<char>]] [func_name=MaaAdbControlUnitDestroy] | enter
[2024-06-13 18:25:49.879][TRC][Px1073][Tx54933][LibraryHolder.h][L118][static boost::function<FuncT> MaaNS::LibraryHolder<T>::get_function(const std::string&) [with FuncT = void(MaaNS::CtrlUnitNs::ControlUnitAPI*); T = MaaNS::AdbControlUnitLibraryHolder; std::string = std::__cxx11::basic_string<char>]] | leave, 0ms
[2024-06-13 18:25:49.879][DBG][Px1073][Tx54933][AdbControlUnitAPI.cpp][L41][MaaNS::CtrlUnitNs::ControlUnitAPI* MaaAdbControlUnitCreate(MaaStringView, MaaStringView, MaaAdbControllerType, MaaStringView, MaaStringView, MaaControllerCallback, MaaCallbackTransparentArg)] [adb_path=/usr/bin/adb] [adb_serial=] [type=0] [config={}] [agent_path=] [callback=0] [callback_arg=0] | enter
[2024-06-13 18:25:49.879][TRC][Px1073][Tx54933][AdbControlUnitAPI.cpp][L41][MaaNS::CtrlUnitNs::ControlUnitAPI* MaaAdbControlUnitCreate(MaaStringView, MaaStringView, MaaAdbControllerType, MaaStringView, MaaStringView, MaaControllerCallback, MaaCallbackTransparentArg)] | leave, 0ms
[2024-06-13 18:25:49.879][TRC][Px1073][Tx54933][DeviceMgr.cpp][L211][std::vector<std::__cxx11::basic_string<char> > MaaNS::ToolkitNS::DeviceMgr::request_adb_serials(const std::filesystem::__cxx11::path&, const json::value&) const] | leave, 1ms
使用 maa-cli 的时候运行
maa startup Official
是可以正常操作的,但 MAS 会始终卡在No Devices Found
运行环境: Linux (OpenSUSE Tumbleweed), selinux Permissive 无头服务器