Ask / Submit

how do I trigger an Android Intent from outside Alien-Dalvik?

asked 2014-04-12 02:45:25 +0300

dsilveira gravatar image

updated 2015-02-18 05:23:26 +0300

foss4ever gravatar image

Can someone give me some pointers on how to go about doing this?

I tried the solution from the selected answer from this:

but it didn't work, it kept saying: /opt/alien/system/bin/am: line 6: exec: app_process: not found

Anyone have any clue?


this is what's in /opt/alien/system/bin/am:

# Script to start "am" on the device, which has a very rudimentary
# shell.
export CLASSPATH=$base/framework/am.jar
exec app_process $base/bin "$@"

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


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.
export CLASSPATH=$base/framework/am.jar
exec /opt/alien/system/bin/app_process $base/bin "$@"

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

edit retag flag offensive close delete


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 +0300 )edit

To 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 +0300 )edit

It 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:

[nemo@Jolla ~]$ file /opt/alien/system/bin/app_process
/opt/alien/system/bin/app_process: ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), stripped

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

exec /opt/alien/system/bin/app_process $base/bin "$@"

it has a chance to work.

tingo ( 2014-04-14 21:34:01 +0300 )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 +0300 )edit

2 Answers

Sort by » oldest newest most voted

answered 2015-02-14 21:11:01 +0300

attah gravatar image

I found a solution! The problem we were experiencing is an incomplete environment, so I went down the app-launching rabbit hole and found a place where am is invoked, and then i recreated that environment in a shell script.

I put it up here:

Now the road is paved for this:

Give it a spin, let me know what you think and keep on tinkering!

edit flag offensive delete publish link more

answered 2014-04-12 09:35:24 +0300

rooster13 gravatar image

Check from the respective desktop file. Use the Exec= command. With that you can launch an Android application from the command line.

edit flag offensive delete publish link more



he doesn't want to launch an application, but trigger an Intent, which can be received by running android apps.

Acce ( 2014-04-12 10:04:20 +0300 )edit

Ok, did not understand the requirement.

rooster13 ( 2014-04-12 10:10:43 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2014-04-12 02:45:25 +0300

Seen: 1,476 times

Last updated: Feb 14 '15