备份Android软件狗 [英] Taking Backup of Android dongle

查看:105
本文介绍了备份Android软件狗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在使用android ADB命令从android设备进行备份.我使用此命令从移动设备上备份 -s xxxxxxxxxxxxxx backup -apk -all -f backup.ab" 时,该命令会在移动设备上弹出(进行备份/不进行备份).我触摸了备份,一切正常.现在,当我使用相同的命令执行此操作时,在android dongle上时,该如何单击我在移动设备中获得的选项,因为android stick/dongle没有屏幕.我被这个问题困扰.

很抱歉输入错误的内容.

以下是代码

Hello Guys,

I am working on android ADB commands to take a back up from android device. I use this command to take backup "-s xxxxxxxxxxxxxx backup -apk -all -f backup.ab" from Mobile device when I used this command a pop up display in mobile (Take backup/Do no take backup). I touched the take backup and everything working fine. Now when I have on android dongle when I used same command to do this then how can I click on options which I got in mobile because android stick/dongle don''t have screen. I am stuck with this issue.

Sorry for wrong engish.

Below are the code

Process p = new Process();
           p.StartInfo.FileName = @"adb.exe";
           p.StartInfo.Arguments ="-s xxxxxxxxxxxxxx backup -apk -all -f backup.ab"; //"   ";
           p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
           p.StartInfo.CreateNoWindow = true;
           p.StartInfo.UseShellExecute = false;
           p.StartInfo.RedirectStandardOutput = true;
           p.StartInfo.RedirectStandardError = true;
           p.Start();
           string regular = p.StandardOutput.ReadToEnd();
           string error = p.StandardError.ReadToEnd();



感谢



Thanks

推荐答案

使用Process.Start与您从资源管理器中自行启动命令没有什么不同.您启动的内容不属于您的过程.它完全独立于您的代码运行.

如果没有命令行参数告诉它该怎么做,那么您将不得不使用
Using Process.Start is no different than if you launched the command yourself from Explorer. What you launch is not part of your process. It runs completely independent of your code.

If there is no command line argument to tell it what to do, then you''ll have to use something along the lines of SendKeys[^] to send appropriate keystrokes (not mouse clicks!) to the other application to get it to do what you want. Be warned...SendKeys is not reliable!


这篇关于备份Android软件狗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆