Execution of Dalvik VM directly on desktop - dalvik

Is it possible to execute task directly on Dalvik VM machine as we run other virtual machines on desktop system?

If i have understood your question correctly :I'm considering task mentioned in question as apk (If so then following answer might help ypu)
If you have your target connected to host then you can use two of the most common command tools :
activity manager (am)
package manager (pm)
First install apllication through command line adb install <path_to_apk>
For example : adb shell am start -a android.intent.action.MAIN -n com.android.settings/.Settings
will launch settings .
If you don't know that package name or any activity name then start application from GUI ,then capture the logs using logcat it will show you action,category,component .
After knowing action,category,component use am command as shown above
Please check this link
Also check documentation
And for Dalvik Debugger Support check this link

If all you want to do is run a command-line program on the device, it's pretty straightforward. The Android sources include a document describing how to do it in dalvik/docs/hello-world.html (original docs), including instructions for using a debugger.
Here's the example from that page:
% echo 'class Foo {'\
> 'public static void main(String[] args) {'\
> 'System.out.println("Hello, world"); }}' > Foo.java
% javac Foo.java
% dx --dex --output=foo.jar Foo.class
% adb push foo.jar /sdcard
% adb shell dalvikvm -cp /sdcard/foo.jar Foo
Hello, world

Related

manually executing script on cygwin works but not remote

I am trying to figure out what exactly an issue is, below is the step i am trying :
on Windows 2019, installed cygwin64, directly from cygwin terminal, executing beloow "configure" script works fine, below is the configure command :
bash configure --with-freetype=bundled --with-tools-dir=/cygdrive/c/progra~2/micros~1/2017/Enterprise/VC/Tools/ --with-boot-jdk=/cygdrive/c/jdk-10.0.2/ --with-jtreg=/cygdrive/c/jtreg-5.1-b01/ --with-version-pre=sncmid --with-version-build=$build --with-version-opt=
However when i automate using jenkins which will execute on windows slave node, it is failing with this below
configure: Found potential Boot JDK using configure arguments
configure: Potential Boot JDK found at /cygdrive/c/jdk-10.0.2/ is incorrect JDK version (Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8); ignoring
configure: (Your Boot JDK version must be one of: 10 11)
configure: error: The path given by --with-boot-jdk does not contain a valid Boot JDK
configure exiting with result code 1
Wondering why the difference between "direct execute on cygwin works fine" and "from jenkins job" where i called using "c:\cygwin64\bin\bash.exe -l script.sh" this script.sh executes configure script.
Invocation of the script
c:\cygwin64\bin\bash.exe -l '%WORKSPACE%\script.sh' %BUILD_NUMBER% /cygdrive/c/openjdk11windows
content of script.sh:
#!/bin/bash
echo $1
build=$1
source ~/.bash_profile
source ~/.bashrc
bash configure --with-freetype=bundled --with-tools-dir=/cygdrive/c/progra~2/micros~1/2017/Enterprise/VC/Tools/ --with-boot-jdk=/cygdrive/c/jdk-10.0.2/ --with-jtreg=/cygdrive/c/jtreg-5.1-b01/ --with-version-pre=sncmid --with-version-build=$build --with-version-opt=
If any one has idea about this, please share.

VBoxManage throwing VERR_ACCESS_DENIED error on Windows 10

I'm attempting to follow these instructions to set up OpenWrt on Virtual Box on Windows 10. I installed Virtual Box 6.1.4 on Windows 10. I configured my environment variables to have access to the VBox executables so I could run VBoxManage convertfromraw openwrt-15.05.1-x86-64-combined-ext4.img openwrt.vdi --format VDI. However, when I run that command (from Powershell or cmd, both of which I ran as an administrator), I get the following error:
Converting from raw image file="openwrt-15.05.1-x86-64-combined-ext4.img" to file="openwrt.vdi"...
VBoxManage.exe: error: Cannot open file "openwrt-15.05.1-x86-64-combined-ext4.img": VERR_ACCESS_DENIED
What can I do to get around this?
use 7zip to extract .gz file/
create a folder in Documents eg test
run cmd ad admin (right click run as administrator)
cd ....Documents\test (... your computer eg c:\users\john)
type command "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" convertfromraw --format VDI openwrt-bcm27xx-bcm2711-rpi-4-ext4-factory.img openwrt.vdii
(with "" included exactly as I wrote)
and it's done.
I had the same problem and I found the solution on this video.
Seems a discompability in extraction.

How to start "Xilinx SDK" from command line instead of from Vivado "File->Launch-SDK" Menu?

I'm wondering how to start "Xilinx SDK Eclipse GUI" (XSDK) directly from the command line?
Currently, I'm launching XSDK by first launching "vivado", and then going to the "File->Launch SDK" menu. However, this is a bit cumbersome to always open Vivado first, just to open "Xilinx SDK". What I want to do, is launch "Xilinx SDK" directly from my Git bash Shell under windows 10 and then open the previous project under "project_1.sdk" and to continue with what I was working on last time.
My Git Bash Setup:
#~/.bashrc:
export PATH=/c/Xilinx/Vivado/2017.3/bin:$PATH
export PATH=/c/Xilinx/SDK/2017.3/bin:$PATH
Then:
$ xsdk -workspace your_project_dir.sdk &
Also:
$ xsdk -h
Display Options:
-help
Help -- just display this message and quit.
-version
Display Version and quit.
-batch
SDK Tcl Batch Mode.
-wait
Wait for SDK to complete.
Options:
-workspace <Workspace location>
Specify the Workspace directory for SDK projects
-hwspec <hardware specification file>
Specify the XML file to load.
-bit <bitstream file>
Specify the Bitsteam file to use for programming FPGA
-bmm <bmm file>
Specify the BMM file to use for BRAM initialization
-batch -source <tcl script file>
Specify tcl Script file to executee all commands in SDK batch mode
{-lp <repository_path>}
Add <repository_path> to the list of Driver/OS/Library search directories.
-eclipseargs <eclipse arguments>
Any other arguments that should be passed to Eclipse.
This should follow all other SDK arguments.
-vmargs <java vm arguments>
Any other arguments that should be passed to Java VM.
This should follow all other SDK arguments.
Also useful:
SDK Command Line Batch Mode
The Eclipse/SDK can be launched in these two other ways
(1) Launch from the Vivado TCL Command Line:
Going from Vivado to SDK often has these steps
- File > Export (Hardware)
- File > Launch SDK
Each of these commands prints information in blue text in the Tcl Console.
Those commands can be copied into a tcl script and run from Tcl Console.
By default Tcl runs from this folder
C:\Users\WinUserName\AppData\Roaming\Xilinx\Vivado
If the script is placed there (e.g. zz1.tcl, or just zz1)
Then it can be run from the Tcl Console as
source zz1.tcl
That will execute the commands in zz1.tcl -> export hardware and launch the SDK
(2) Or, run Eclipse/SDK from Windows, then select the SDK folder:
The SDK can be run directly and can be found here:
C:\Xilinx\SDK\2019.1\bin\xsdk.bat
When it runs it will ask for a Workspace
Click [Browse] and navigate to the .SDK folder in the Vivado project
It will open and run as usual, without Vivado running, etc
Note: I have noticed that Vivado/SDK can be temperamental about how and when project folder contents are changed. Including if the SDK is launched and another SDK is already running in that folder. In some cases, the easiest recovery is to rename the ~corrupt SDK folder, create a new HelloWorld project, get HelloWorld running, and then update files into the new folder.

Installing SoapUI on Amazon AMI Linux command line

I need to install and run SoapUI on linux OS (Amazon AMI linux).
This is a command line version (no GUI)
I was able to successfully download and unzip SoapUI tar using the below commands
Download SoapUI installation files
wget http://freefr.dl.sourceforge.net/project/soapui/soapui/5.0.0/SoapUI-5.0.0-linux-bin.tar.gz
Extract Contents
tar -xzf SoapUI-5.0.0-linux-bin.tar.gz -C /opt/
Install SoapUI
cd /opt/SoapUI-5.0.0/bin/
After this when i run the following command:
./soapui.sh
I get below exception
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
at java.awt.Window.<init>(Window.java:535)
at java.awt.Frame.<init>(Frame.java:420)
at javax.swing.JFrame.<init>(JFrame.java:218)
at com.eviware.soapui.SoapUI.startSoapUI(SoapUI.java:842)
at com.eviware.soapui.SoapUI$SoapUIRunner.run(SoapUI.java:697)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.r...(EventDispatchThread.java:91)
Is there something missing here or any other commands needs to be called ?
SoapUI itself is a graphical tool, and the main application isn't going to like running without a graphics display.
When I've run the SoapUI stuff on a Linux server without X11, it's been the mock service facility that I'm after - I use it to provide substitute SOAP or REST services for automated testing etc.
The mock service runner runs well without an X11 server - you just have to tell java not to look for a graphical user interface.
So you add -Djava.awt.headless=true to the command line:
./mockservicerunner.sh -Djava.awt.headless=true
If you just to that it will give you a 'help' output, because this tool is designed to use an existing SoapUI project file to provide preconfigured responses, rather than for interactive use.
The alternative is to use X-Forwarding, so SoapUI runs on your server, but the UI is displayed on your local workstation. I've never done that (because, as I said, I'm after the standalone interaction for automated testing), but this page has some detail: http://blog.ashwani.co.in/blog/2013-01-10/soapui-mockservicerunner-on-linux-without-x-config/
(it also mentions the 'headless' option for mockservicerunner.sh.
This page has some detail about setting up a project in SoapUI first before using it for one of the automated tools (loadrunner in this case): http://www.soapui.org/load-testing/command-line-execution.html
I just installed and executed SoapUI in AWS (Red Hat) without using any graphical interface:
1.- Download SoapUI directly from soapui.org; search for the latest Linux version, copy the link address and download the software into any Linux directory using the wget command. This should have downloaded an installation script file (for example, SoapUI-x64--5.3.0.sh).
2.- Execute the previous installation script from command line and answer the installation prompts. Once you have finished go to the directory where you elected to install it and verify that you have all the folders and files (bin, lib, etc.).
3.- To run SoapUI from the command prompt, go to your SoapUI home directory and execute an instruction like this:
sh bin/testrunner.sh -s"Your Suite Name" -c"Your Test Case Name" -f/your/output/path/ /your/project/path/your-soapui-project.xml

linux eclipse: run a shell command as the pre-build command

How can I have the pre-build step in eclipse/CDT (Linux) run a simple shell command, echo specifically. I think eclipse has a screwed up value for PKG_CONFIG_PATH and want to see what Linux thinks the value is.
Under the covers, Eclipse uses "make". You can simly edit the project's makefile:
help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.cdt.doc.user/concepts/cdt_c_makefile.htm
You can also create an:
"External Tool", which is up there beside the Debug and Run buttons in
the toolbar. Then I tell the external tool to run the shell with the
configure script and any of it's arguments as arguments to the tool.
http://www.eclipse.org/forums/index.php/t/61866/

Resources