首页 \ 问答 \ 如何在LG android移动版4.0中运行我的android程序?(How can i run my android program in LG android mobile version 4.0? [closed])

如何在LG android移动版4.0中运行我的android程序?(How can i run my android program in LG android mobile version 4.0? [closed])

我正在使用linux操作系统并在我的手机上运行一个Android程序。 我的手机版本是4.0,但我的手机没有检测到检查android输出。 我可以进行数据传输,但android程序没有在我的设备上运行。


I am using linux os and running a android program in my mobile . my mobile version is 4.0 but my mobile is not detecting for checking the android output . i can do data transfer but the android program is not running in my device.


原文:https://stackoverflow.com/questions/19109715
更新时间:2023-08-06 15:08

最满意答案

不幸的是,Ansible不会在这种情况下帮助你。

最好的方法是使用相同的参数单独调试DSC部件。 在这种情况下,它很糟糕,因为这是一个很大的问题。 如果成功,您将设置CA. 如果可以的话,为了理智,可以部署一个可以继续拆卸和提升的测试环境。

如果你很幸运,你会发现Test方法中没有任何改变的问题。

第一步,转到运行win_dsc的主机上。 打开PowerShell。

创建一个包含DSC模块所有参数的[hashtable] ,如下所示:

if (-not $cred) {
    $cred = Get-Credential # maybe just run this once in your session?
}

$params = @{
    IsSingleInstance = $true
    CAType = 'EnterpriseRootCA'
    CryptoProviderName = 'RSA#Microsoft Software Key Storage Provider'
    KeyLength = 2048
    HashAlgorithmName = 'SHA256'
    ValidityPeriod = 'Years'
    ValidityPeriodUnits = 99
    PsDscRunAsCredential = $cred
}

接下来,直接调用DSC资源,让我们使用Test方法:

Invoke-DscResource -Name AdcsCertificationAuthority -ModuleName ActiveDirectoryCSDsc -Property $params -Verbose -Method Test

看看它吐出来的是什么。 它可能会因类似的错误而失败。 希望它能做到。 如果没有,请尝试使用Get方法,如果Set使用它但Test没有。 这不太可能,但如果可能的话,你想避免Set

如果所有运行顺利,请使用方法Set运行。 如果成功,请返回ansible并找出不同之处(用户ansible是否正在进行身份验证,因为它具有调用DSC的权限?)。

如果您在任何时候出现故障并希望深入挖掘,则可以调试实际的DSC调用。 这有点令人费解。

首先, Enable-DscDebug -BreakAll

接下来,打开一个单独的PowerShell ISE窗口(这是我的偏好,使事情变得更容易)。 然后,在同一原始窗口(而不是新的ISE窗口)中重新运行之前执行的Invoke-DscResource命令。

它将中断,它将为您提供一系列命令来运行以连接到调试会话。 该列表将包括Enter-PSHostProcess 。 在ISE窗口的终端中运行这些命令。

您将进入正在运行的DSC过程,您将看到该模块的源代码,并能够逐步完成它并找出出现了什么问题。

此时,您可能会发现您传递的参数不太正确,并且您可以通过调整它来修复调用。 那很好。

您可能会发现模块中存在错误,在这种情况下,您可以报告它,甚至提供带有拉取请求的修复程序; 这需要时间。

在此期间,您可以自己克隆模块并使用不符合PR要求的快速修复将其分发到您的服务器。

这里有很多可能性,但是如果你发现了实际的错误,它可能需要一个关于如何处理这个特定问题的新问题。

笔记

我发现在调试过程中,大约一半的时间连接到会话导致完全卡住的调试会话无效。 在这种情况下,使用他们给你的PID并终止进程。 无论如何,你可能必须在运行之间执行此操作,不要害怕它。

最后,在尝试再次使用DSC之前(例如来自Ansible), 不要忘记禁用调试!

Disable-DscDebug

(强烈建议您在禁用调试后终止进程)


Ansible will not help you in this situation, unfortunately.

The best way to go is to debug the DSC part separately, with the same parameters. In this case, it kind of sucks because this is a big ask. If it succeeds, you're going to have your CA set up. If you can, deploy a test environment that you can keep tearing down and bringing up, for sanity's sake.

If you're lucky you'll find the problem in the Test method that doesn't change anything.

First step, go onto the host that you are running win_dsc against. Open PowerShell.

Create a [hashtable] that contains all of the parameters to your DSC module, so something like this:

if (-not $cred) {
    $cred = Get-Credential # maybe just run this once in your session?
}

$params = @{
    IsSingleInstance = $true
    CAType = 'EnterpriseRootCA'
    CryptoProviderName = 'RSA#Microsoft Software Key Storage Provider'
    KeyLength = 2048
    HashAlgorithmName = 'SHA256'
    ValidityPeriod = 'Years'
    ValidityPeriodUnits = 99
    PsDscRunAsCredential = $cred
}

Next, invoke the DSC resource directly, let's use the Test method:

Invoke-DscResource -Name AdcsCertificationAuthority -ModuleName ActiveDirectoryCSDsc -Property $params -Verbose -Method Test

See what it spits out. It will probably fail with a similar error. Hope that it does. If it doesn't, try the Get method in case Set uses it but Test doesn't. It's unlikely, but you want to avoid Set if possible.

If all that runs smoothly, run with method Set. If it succeeds, go back to ansible and figure out what's different (does the user ansible is authenticating as have permission to invoke DSC?).

If you get a failure at any point and want to dig deeper, you can debug the actual DSC invocation. It's a little convoluted.

First, Enable-DscDebug -BreakAll.

Next, open a separate PowerShell ISE window (this is my preference, makes things easier). Then, re-run the Invoke-DscResource command you did before, in the same original window (not the new ISE window).

It will break, and it will give you a series of commands to run to connect to the debug session. The list will include Enter-PSHostProcess. Run those commands in the terminal in the ISE window.

You'll be entered into the running DSC process, and you will see the source code of the module and be able to step through it and figure out what's going wrong.

At this point, you may find that a parameter you passed is not quite right, and that you can fix the invocation by tweaking it. That's good.

You may find there's a bug in the module, in which case you can report it or even offer a fix with a pull request; this will take time.

In the meantime, you can clone the module yourself and distribute it to your servers with a quick fix that wouldn't meet the requirements for a PR.

There's a lot of possibilities here but if you find the actual error it may warrant a new question as to how to deal with that specific problem.

Notes

I've found that during the debug process, about half the time connecting to the session leads to a complete stuck debug session that doesn't work. In that case, use the PID they gave you and kill the process. You may have to do this between runs anyway, don't be afraid of it.

And finally, before attempting to use DSC again (like from Ansible), don't forget to disable debugging!

Disable-DscDebug

(strongly encourage you to kill the process after disabling the debugging as well)

相关问答

更多
  • 如果启用了UAC,请确保PowerShell控制台主机或PowerShell集成脚本编辑器(ISE)正在管理Windows令牌下运行。 应用PowerShell DSC配置要求您默认为管理员。 Make sure that the PowerShell console host or PowerShell Integrated Scripting Editor (ISE) is running under your administrative Windows token, if UAC is enable ...
  • 固定! 找到与脚本扩展相关的论坛帖子,而不是重新处理。 这是解决方案。 将VM scale set属性upgradePolicy更改为Automatic。 如何强制使用ARM模板+ CustomScriptExtension创建的VM重新下载脚本并运行它? "properties": { "overprovision": "true", "upgradePolicy": { "mode": "Automatic" }, Discovered the problem. ...
  • 不,这些模式不能存在于同一台机器上; 它是一个或另一个。 我不得不质疑你为什么要这样做。 据推测,如果机器已经处于Pull配置中,那么您要推送到其上的配置必须与Pull服务器上的配置不同。 如果是这种情况,为什么你想恢复到完全覆盖Push配置的Pull呢? 根据您的评论,我建议您在要进行更改时更改节点的Pull服务器上的配置。 生成MOF文件和校验和文件然后将它们复制到Pull服务器的过程可以自动完成。 然后你可以使用: Invoke-CimMethod -Namespace root/Microsoft/ ...
  • 我不确定您对Ensure属性和Ensure属性的含义,但默认值为Present 。 您可以在文档中看到DSC Windows功能资源 , Ensure不需要; Name是唯一必需的属性: WindowsFeature [string] #ResourceName { Name = [string] [ Credential = [PSCredential] ] [ Ensure = [string] { Absent | Present } ] [ IncludeAllSu ...
  • 确保资源可用的最简单方法是设置基于文件共享的存储库以下拉模块。 这个博客应该帮助你http://nanalakshmanan.com/blog/Push-Config-Pull-Module/ The easiest way to ensure resources are available is to setup a file share based repository for pulling down modules. This blog should help you out http://nana ...
  • 经过多次尝试并隔离问题,我是如何通过-Argument开关传递参数的,我发现我的一个参数中有空格,所以我试图按如下方式调用参数,它将单个参数看作是多个参数,不会像预期的那样将它传递给我的脚本,因为参数是空格分隔的。 注意:Azure自动化Runbook提示输入以下值: Input for Value 1: myvalue1 Input for Value 2: my value 2 [parameter(Mandatory=$true)][String] $value1, [parameter(Ma ...
  • 不幸的是,Ansible不会在这种情况下帮助你。 最好的方法是使用相同的参数单独调试DSC部件。 在这种情况下,它很糟糕,因为这是一个很大的问题。 如果成功,您将设置CA. 如果可以的话,为了理智,可以部署一个可以继续拆卸和提升的测试环境。 如果你很幸运,你会发现Test方法中没有任何改变的问题。 第一步,转到运行win_dsc的主机上。 打开PowerShell。 创建一个包含DSC模块所有参数的[hashtable] ,如下所示: if (-not $cred) { $cred = Get-Cr ...
  • 您没有指定productId,因此它尝试使用productId验证包是否已安装,并且(显然)失败。 如果产品没有productId,您可以使用脚本扩展安装它,如果有,请将productId添加到URL Rewrite资源 you didn't specify the productId, so it tries to verify the package is installed using the productId and fails (obviously). If the product doesn' ...
  • 你需要调用你声明的configuration ,就像PowerShell函数一样,在声明这个invokation之后输出: TestDSC 调用它并获取MOF文件。 You need to invoke the configuration you declared, as it would a PowerShell function, e.g.put after the declaration this invokation: TestDSC to invoke it and get the MOF fil ...
  • 首先,您需要安装并导入xWindowsUpdate xHotfix WMF5_1 { Id = "KB3191564" Ensure = "Present" Path = "https://go.microsoft.com/fwlink/?linkid=839516" } KB编号和路径适用于Windows Server 2012 R2,我从本文中获取了它们。 First you need to install and import xWindowsUpdate xHotfix WMF5_1 ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。