Android debug bridge does not return anything in commands with python - adb

I'm doing some tests with android debug bridge in python(adb) and at the moment as a test I'm using Bluestacks 5 version 5.4.50.1009, I've been trying the code below and I just get nothing
from ppadb.client import Client as AdbClient
client = AdbClient(host="127.0.0.1", port=5605);
print(client.version())
and the code doesn't work for me

Related

Getting "Message from debugger: Error 1" - for simple project (in Xcode 11.0 11A420a) [duplicate]

This question already has answers here:
Mac OS X app crash with Code Signature Invalid error
(2 answers)
Closed 1 year ago.
my code is simple like this:
#include <stdio.h>
int main(int argc, const char * argv[]) {
// insert code here...
printf("Hello, World!\n");
printf(" sizeof int = %lu\n", sizeof(int));
return 0;
}
run on xcode and got error:
Message from debugger: Error 1
Program ended with exit code: -1
run Terminal :
Tap PROJECT settings Signing & Capabilities, in Signing - Signing Certificate, if your selected is "Development", you can change it to "Sign to Run Locally" to have a try.
If you don't have a development certification, you can not be coding with that certificate mode.
The code that you've posted runs fine for me in an Xcode 12 project configured as a command line tool. Here's the output:
Hello, World!
sizeof int = 4
Program ended with exit code: 0
Try pasting the same code into a new project, and again, set it up as a command line tool. You shouldn't need to make any changes to the project default settings. If it works, compare that to your original project; the reason for the failure is somewhere in the original project's configuration.
From: https://developer.apple.com/library/archive/qa/qa1884/_index.html
Q: When I run my Mac app, it crashes immediately, and the crash log says Exception Type: EXC_CRASH (Code Signature Invalid). What is going on here?
A: The crash log indicates that your app is signed with your Mac App Store distribution identity, with the certificate’s Subject Common Name starting with “3rd Party Mac Developer Application.” Mac apps signed this way can no longer be run directly. Here’s the background on this.
Over time, more Mac App Store technologies have been added that require entitlements that come from a provisioning profile. This started with push notifications and iCloud. Later, Game Center and Maps were added to the list.
Recently, the com.apple.developer.team-identifier entitlement was added to all new Mac provisioning profiles. This means that, going forward, distribution builds of Mac apps cannot be run directly; they are for submitting to iTunes Connect for app review only
Instead, developers should adopt the Archive Build Workflow in QA1778: How to reproduce bugs reported against Mac App Store submissions for testing the builds that they plan to submit for the Mac App Store. On Xcode 6, select Export as a Mac Application. You won't see any chance to select your development signing identity, but Xcode will export the app from the archive as it was signed at build time. So the result will be the same.
You can create an installer package containing your development-signed app by hand with the productbuild tool, like this:
$ productbuild --component Sample.app /Applications --sign “3rd Party Mac Developer Installer:" Sample.pkg
Then install the package as documented in Testing the Mac Installer Package:
$ sudo installer -store -pkg Sample.pkg -target /
This workflow means that you will need to add your beta testers’ test systems to your Mac Developer Program account so they will be able to run your app.
Another possibility is to use Xcode Organizer > Export > Export a Developer ID-signed Application. Developer ID-signed apps can be run by anyone. However, code that uses technologies only available to Mac App Store apps, such as receipt validation, iCloud, and push notifications, will not work if your app is Developer ID-signed. You might need to temporarily disable those parts of your app if you opt for the Developer ID testing approach.
I have the same problem, which is very disturbing.
screenshot-img
These settings solve my problem. You can have a try.

"ImportError: No module named _ssl" with dev_appserver.py from Google App Engine

Background
"In the Python runtime, we've added support for the Python SSL
Library, so you can now open secure connections to remote services
such as Apple's Push Notification service."
This quote is taken from a recent post on the Google App Engine blog.
Implementation
If you want to use native python ssl, you must enable it using the libraries configuration in your application's app.yaml file where you specify the library name "ssl" . . .
These instructions are provided for developers through the Google App Engine documentation.
The following lines have been added to the app.yaml file:
libraries:
- name: ssl
version: latest
This much is in line with the advice provided through the Google App Engine documentation.
Problem
I have tried running my project in three different configurations. Two are working, and one is not.
Working ...
After I upload my application to Google App Engine, and run my project through the live server, everything works fine.
Working ...
When I run my project with manage.py runserver and include the Google App Engine SKD in my PYTHONPATH, everything works fine.
Not Working ...
However, when I run my project with dev_appserver.py, I get the following error:
ImportError at /
No module named _ssl
Request Method: GET
Request URL: http://localhost:8080/
Django Version: 1.4.3
Exception Type: ImportError
Exception Value:
No module named _ssl
Exception Location: /usr/local/lib/google_appengine_1.7.7/google/appengine/tools/devappserver2/python/sandbox.py in load_module, line 856
Python Executable: /home/rbose85/Code/venvs/appserver/bin/python
Python Version: 2.7.3
Python Path:
['/home/rbose85/Code/product/site',
'/usr/local/lib/google_appengine_1.7.7',
'/usr/local/lib/google_appengine_1.7.7/lib/protorpc',
'/usr/local/lib/google_appengine_1.7.7',
'/usr/local/lib/google_appengine_1.7.7',
'/usr/local/lib/google_appengine_1.7.7/lib/protorpc',
'/usr/local/lib/google_appengine_1.7.7',
'/usr/local/lib/google_appengine_1.7.7/lib/protorpc',
'/home/rbose85/Code/venvs/appserver/lib/python2.7',
'/home/rbose85/Code/venvs/appserver/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/local/lib/google_appengine',
u'/usr/local/lib/google_appengine_1.7.7/lib/django-1.4',
u'/usr/local/lib/google_appengine_1.7.7/lib/ssl-2.7',
u'/usr/local/lib/google_appengine_1.7.7/lib/webapp2-2.3',
u'/usr/local/lib/google_appengine_1.7.7/lib/webob-1.1.1',
u'/usr/local/lib/google_appengine_1.7.7/lib/yaml-3.10']
Server time: Wed, 24 Apr 2013 11:23:49 +0000
For the current GAE version (1.8.0 at least until 1.8.3), if you want to be able to debug SSL connections in your development environment, you will need to tweak a little bit the gae sandbox:
add "_ssl" and "_socket" keys to the dictionary _WHITE_LIST_C_MODULES in /path-to-gae-sdk/google/appengine/tools/devappserver2/python/sandbox.py
Replace the socket.py file provided by google in /path-to-gae-sdk/google/appengine/dis27 from the socket.py file from your Python framework.
IMPORTANT: Tweaking the sandbox environment might end up with functionality working on your local machine but not in production (for example, GAE only supports outbound sockets in production). I will recommend you to restore your sandbox when you are done developing that specific part of your app.
The solution by jmg works, but instead of changing the sdk files, you could monkey patch the relevant modules.
Just put something like this on the beginning of your project setup.
# Just taking flask as an example
app = Flask('myapp')
if environment == 'DEV':
import sys
from google.appengine.tools.devappserver2.python import sandbox
sandbox._WHITE_LIST_C_MODULES += ['_ssl', '_socket']
from lib import copy_of_stdlib_socket.py as patched_socket
sys.modules['socket'] = patched_socket
socket = patched_socket
I had to use a slightly different approach to get this working in CircleCI (unsure what peculiarity about their venv config caused this):
appengine_config.py
import os
if os.environ.get('SERVER_SOFTWARE', '').startswith('Development'):
import imp
import os.path
import inspect
from google.appengine.tools.devappserver2.python import sandbox
sandbox._WHITE_LIST_C_MODULES += ['_ssl', '_socket']
# Use the system socket.
real_os_src_path = os.path.realpath(inspect.getsourcefile(os))
psocket = os.path.join(os.path.dirname(real_os_src_path), 'socket.py')
imp.load_source('socket', psocket)
I had this problem because I wasn't vendoring ssl in my app.yaml file. I know the OP did that, but for those landing here for the OP's error, it's worth making sure lines like the following are in your app.yaml file:
libraries:
- name: ssl
version: latest
Stumbled upon this thread trying to work with Apples Push notification service and appengine... I was able to get this working without any monkey patching, by adding the SSL library in my app.yaml, as recommended in the official docs, hope that helps someone else :)
I added the code to appengine_config.py as listed by Spain Train, but had to also add the following code as well to get this to work:
phttplib = os.path.join(os.path.dirname(real_os_src_path), 'httplib.py')
imp.load_source('httplib', phttplib)
You can test if ssl is available at your local system by opening a python shell and typing import ssl. If no error appears then the problem is something else, otherwise you don't have the relevant libraries installed on your system. If you are using a Linux operating system try sudo apt-get install openssl openssl-devel or the relevant instructions for your operating system to install them locally. If you are using windows, these are the instructions.

How Do I install an app on the ubuntu Touch device

I've been looking into Ubuntu Touch.
So I installed ubuntu on a Nexus 10 following the instructions here
I built the sample app following the instructions here
So now I have a device running ubuntu touch and an application, how do I put the application on the device?
You can use Qt Creator: Connect your Ubuntu Touch Device through usb open your project and simply press Ctrl+F12.
This works only if you have once installed ssh-server on the device.
Alternatively you can do it manually. Copy the necessary files (*.qml and *.desktop) to the device and start the application via ssh
qmlscene --desktop_file_hint=/usr/share/applications/qmlscene.desktop YourApp.qml
Source
Remember, this is all beta and if you are not a developer then you won't have much use for Ubuntu Touch at this stage. Eventually, Ubuntu Touch will have its own app store where it will be much easier to download apps and install them on your device.
If you are using the sdk provided by Ubuntu, then all you have to do is go:
Build -> Ubuntu Touch -> Install Application on Device
This will actually install the App instead of just running it. Now you can bring your prototypes with you =)

BlackBerry 10 Cascades - Running app on the simulator

I am new to blackberry development and ran into this problem several times and cannot find a solution.
When I try to run an empty cascades project just with a simple HelloWorld label I get the following error
Deployment Failed: Info: Sending request: Install and Launch
Info: Action: Install and Launch
Info: Debug native: on
Info: File size: 190910
Info: Installing com.example.HelloWorld.testDev__HelloWorld7d1bfe91...
Info: Processing 190910 bytes
I'm using Momentics, VMware running BB10 Dev Alpha Sim and followed all the instructions here. http://developer.blackberry.com/cascades/documentation/getting_started/setting_up.html
I made sure my build config is set to Simulator-Debug and not even the example projects are able to run on the simulator.
Edit: I am not sure if this bit of info helps but when I try to run the application, the Progress hangs at 91% before the error dialog appears.
May be you are not setting the development Mode (like current Development Mode Simulator or Device) . I also getting the issue that Project Compile but not able to run on virtual Machine , today I sort the issue . check out the link http://supportforums.blackberry.com/t5/Native-Development/BB10-Native-Cascades-SDK-not-connecting-to-Alpha-BB10-simulator/td-p/1719865/page/5

Anyone Else Having Trouble Registering Ghostdriver with Selenium Grid?

I know that there is documentation on the ghostdriver wiki on how to attach it to a selenium grid. For those that don't know you can find it here
I've compiled the special phantomjs twice, tried to attach it to selenium servers local, and remote using both Selenium versions 2.24 and 2.25 to no avail. It starts up Ghostdriver locally just like you expect, but there's certainly no registering going on.
I tried both ip/localhost:4444 and ip/localhost:4444/grid/register with no results. I also thought perhaps it just didn't show up on the grid console and tried to run tests against it anyway, which failed stating there was nothing populating the grid.
I've tried this on both CentOS 6 and Ubuntu 12.04 with no luck.
I'm out of ideas. Has anyone else had problems like this?
I had exactly the same problem and fixed it with using the lastest version of selenium-grid.
The good website: https://code.google.com/p/selenium/wiki/Grid2 (this is no longer http://selenium-grid.seleniumhq.org/).
Here the steps (version 2.31.0):
Download the selenium-server:
wget https://selenium.googlecode.com/files/selenium-server-standalone-2.31.0.jar
Launch selenium grid server:
java -jar selenium-server-standalone-2.31.0.jar -role hub
In a new terminal, launch GhostDriver:
phantomjs --webdriver=5555 --webdriver-selenium-grid-hub=http://localhost:4444
Check out available remote control on http://localhost:4444/grid/console.
You should see something like that:
listening on http://127.0.0.1:5555
test session time out after 300 sec.
Supports up to 1 concurrent tests from:
phantomjs
I was testing this commands on CentOS 6.3, I hope it works for you!

Resources