how do I trigger an Android Intent from outside Alien-Dalvik?
Can someone give me some pointers on how to go about doing this?
I tried the solution from the selected answer from this: http://stackoverflow.com/questions/4567904/how-to-start-an-application-using-android-adb-tools
but it didn't work, it kept saying: /opt/alien/system/bin/am: line 6: exec: app_process: not found
Anyone have any clue?
EDIT 1:
this is what's in /opt/alien/system/bin/am:
# Script to start "am" on the device, which has a very rudimentary
# shell.
#
base=$ANDROID_ROOT
export CLASSPATH=$base/framework/am.jar
exec app_process $base/bin com.android.commands.am.Am "$@"
This is the command I used (I know it's just a start intent, no action flag to trigger the intent, but before this works, the action won't either):
(I have aptoide v5 installed, and this same command (without the full path) works on an android that I got with the same version of aptoide installed)
/opt/alien/system/bin/am start -n cm.aptoide.pt/cm.aptoide.pt.Start
EDIT 2:
thanks to @tingo, I got a little bit further, by modifying the am script adding the full path to app_process, so am looks like this now: this is what's in /opt/alien/system/bin/am:
# Script to start "am" on the device, which has a very rudimentary
# shell.
#
base=$ANDROID_ROOT
export CLASSPATH=$base/framework/am.jar
exec /opt/alien/system/bin/app_process $base/bin com.android.commands.am.Am "$@"
The thing is that now it does not start the Aptoide (like it did on Android), but instead, returns Segmentation Fault on the console, and that's it.
Any thoughts?
I feel I'm getting closer, but still, just, can't reach my goal :P
It would be easier to answer if you showed us the whole command line you tried. 'am' in Android just starts an application; the error message suggests that you did not provide an application to start, or that you tried to start a non existing application.
tingo ( 2014-04-14 00:22:31 +0200 )editTo make it clear I added the information you requested, altough it is not that important, because I'm looking for any information from anyone that successully achieved any intent trigger, not anyone that succeded with my particular test command.
dsilveira ( 2014-04-14 18:50:55 +0200 )editIt seems someone forgot to fix the am script when it was put into /opt/alien/system/bin. I tries to exec 'app_process' which is an executable in also in /opt/alien/system/bin:
but /opt/alien/system/bin isn't in PATH, so this can't work. IMHO, scripts should always specify the full path to any executables (or other scripts) they use. If you change the last line of the am script (make a backup of it first) to read
it has a chance to work.
tingo ( 2014-04-14 21:34:01 +0200 )edit@tingo You were right about the error I was getting, it's fixed now. But It Segfaults right away :P
Any suggestion, anyone?
dsilveira ( 2014-04-16 14:19:45 +0200 )edit