fix.修复HyperV小后门的bug

This commit is contained in:
MistEO
2022-05-31 00:40:23 +08:00
parent 4f40003f8b
commit a3ba8803ea
3 changed files with 7 additions and 6 deletions

View File

@@ -14,10 +14,10 @@
- 在模拟器 `设定` - `进阶` 中打开 `Android调试桥`
- 由于蓝叠 Hyper-V 的端口号在不断变动,所以留了个专用的小后门:
- 开启一次 MAA会在同目录下生成 `gui.json` 文件
- 在蓝叠模拟器的安装目录下找到 `bluestacks.conf` 这个文件
- `bluestacks.conf` 的完整路径 填入 `gui.json` - `Bluestacks.Config.Path` 的值,保存文件
- 重启 MAA, 会自动获取当次的 adb 地址
1. 在蓝叠模拟器的安装目录下找到 `bluestacks.conf` 这个文件
2. 开启 MAA会在同目录下生成 `gui.json` ,打开它
3. 新增一个字段 `Bluestacks.Config.Path`,填入 `bluestacks.conf` 的完整路径
4. LinkStart!
### 夜神模拟器

View File

@@ -608,6 +608,7 @@ namespace MeoAsstGui
return false;
}
}
settings.TryToSetBlueStacksHyperVAddress();
if (settings.AdbPath.Length == 0)
{
error = "请选择 adb 路径";

View File

@@ -57,7 +57,6 @@ namespace MeoAsstGui
InfrastInit();
ToastPositionInit();
TryToSetBlueStacksHyperVAddress();
}
private List<string> _listTitle = new List<string>();
@@ -1011,6 +1010,8 @@ namespace MeoAsstGui
ConnectConfig = emulators.First();
AdbPath = adapter.GetAdbPathByEmulatorName(ConnectConfig) ?? AdbPath;
UpdateAddressByConfig();
TryToSetBlueStacksHyperVAddress();
return true;
}
@@ -1048,7 +1049,6 @@ namespace MeoAsstGui
{
if (bluestacksConfig.Length == 0)
{
ViewStatusStorage.Set("Bluestacks.Config.Path", "");
return;
}
if (!File.Exists(bluestacksConfig))