sinkuri256 / android-scripting

Automatically exported from code.google.com/p/android-scripting
0 stars 0 forks source link

Uknown RPC when using Remote Control on Android 2.2 w/Python running on Linux #449

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What device(s) are you experiencing the problem on?

Device: HTC Dream (Google ADP1) running Cyanogen Mod 6 Nightly (Android 2.2)

What firmware version are you running on the device?

Cyanogen Mod 6-09232010-NIGHTLY-DS (Build Number FRF91)

What steps will reproduce the problem?

1. On Device, Start Private Server and note IP address (53881 for instance)
2. $ adb forward tcp:9999 tcp:53881 
3. $ export AP_PORT=9999
4. $ python
>>> import android
>>> droid = android.Android()
com.googlecode.android_scripting.rpc.RpcError: Unknown RPC.

The same command works when running scripts on the phone directly. I made sure 
that iptables wasn't blocking anything and verified that adb is actually 
listening on tcp 9999. 

What version of the product are you using? On what operating system?

This is using Python 2.6.4 on Fedora 13 i686. 

Original issue reported on code.google.com by emi...@gmail.com on 30 Sep 2010 at 2:03

GoogleCodeExporter commented 9 years ago
Port number is wrong. the original tuturial in wiki doesnt have correct 
instruction for RPC. use following:

to find out correct port:
1. start private server on sl4a
2. select running scripts (pull down top-menu)
3. correct port is shown next to localhost. should be 5 digits. e.g. 
localhost:35252

Original comment by mr.ped...@gmail.com on 16 Oct 2010 at 11:38

GoogleCodeExporter commented 9 years ago
Port number is correct. I noted that I found the ip (although I didn't mention 
the method, that's what I found through experimentation). In the example I have 
it hapPened to be 53881.  

The other port can be arbitrary as long as the user adb is running under has 
privileges to bind to that port and it matches AP_PORT.

I just bought a droid x so ill revisit this again To see if it's still an issue.

Original comment by emi...@gmail.com on 16 Oct 2010 at 3:56

GoogleCodeExporter commented 9 years ago
same issue samsung galaxy s gt i 9000

Original comment by cherian....@gmail.com on 20 Oct 2010 at 9:31

GoogleCodeExporter commented 9 years ago
Make sure you're using the latest version of android.py: 
http://code.google.com/p/android-scripting/source/browse/python/ase/android.py

If you're not, it will try to authenticate with the server. The server is not 
expecting authentication since it wasn't started by a script.

Original comment by damonkoh...@gmail.com on 21 Oct 2010 at 7:13

GoogleCodeExporter commented 9 years ago
I assume this was due to an out of date android.py. Please open this again if 
you're still having trouble.

Original comment by damonkoh...@gmail.com on 6 Nov 2010 at 9:24

GoogleCodeExporter commented 9 years ago
i am having nearly the same issues, for the complete information of the issue, 
please see on http://code.google.com/p/android-scripting/issues/detail?id=475

Original comment by indra....@gmail.com on 11 Nov 2010 at 4:46

GoogleCodeExporter commented 9 years ago
Same problem on HTC Incredible (Default HTC Kernel)
Android 2.2
Kernel: 2.6.32.17, Build 149 #1
WindowsXP

python_r7.zip
python_extras_r8.zip
python_scripts_r8.zip
python_for_android_r1.apk

Seems to randomly generate this error or the issue in 
http://code.google.com/p/android-scripting/issues/detail?id=475

Original comment by lance.ea...@gmail.com on 5 Jan 2011 at 9:24

GoogleCodeExporter commented 9 years ago
Just outcomment line 37 in android.py
    # self._authenticate(HANDSHAKE)
works for me. Seems that there is no RPC method "_authenticate".

Have started a public server and connected from PC Python2.6 with

import android
a = android.Android('192.168.178.60', 56454) # check your host and port!

Original comment by spex66 on 13 Jan 2011 at 11:03

GoogleCodeExporter commented 9 years ago
Yesss... after commenting line #37 it is working fine.... 
Thank you so much guys. :)

Original comment by testing...@gmail.com on 21 Aug 2012 at 11:59

GoogleCodeExporter commented 9 years ago
Just commenting the line 37, or both line 37 and line 38?

Original comment by wshb...@gmail.com on 5 Jun 2013 at 7:37