This thread is a WIP and will be updated as I have time to include and write more info.
With this guide you will be able to launch games and emulated games much more "seemlessly".
Requirements:
Keyboard ( although you could manually add everything to the launchers.xml config )
ADB
A rooted OUYA http://forum.xda-developers.com/showthread.php?t=2387507
( NOTE: Technically most arg's being passed could be done without root... More info in 3rd post. )
XBMC installed ( official or spmc... I haven't tried with a gotham build )
Advanced Launcher plugin for XBMC http://forum.xbmc.org/showthread.php?tid=85724
OR
Rom Collection Browser ( see second post )
A reasonable text editor ( If on windows - Notepad++ )
ADVANCED LAUNCHER
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
1.) Install Advanced Launcher
Copy over the Advanced Launcher plugin to the OUYA and install it ( You can install it by going to Settings -> Add-Ons -> Install From Zip File )
2.) Create a new category
Load the addon and with a keyboard press "c", which will open a popup. Choose "Create New Category" and call it "Emulation".
3.) Create a "launcher"
Open the newly created category which should prompt you to create a new launcher. Select "Files Launcher" and go through the menus ( select the launcher application [ su or am... read 3rd post ], select files path [ where the games are stored ] and set file extensions [ look at the example it gives ] )
At "Application Arguments" leave it as default ( due to a scroll limit you can't see what to type... we will modify this later )
Continue with the setup ( Set title of launcher [ typically label of system ], select platform [ which system you are emulating ], set thumbnails path and set fanart path )
4.) Adding the correct arguments
Pull launchers.xml from:
Code:
/sdcard/Android/data/com.semperpax.spmc/files/.xbmc/userdata/addon_data/plugin.program.advanced.launcher/launchers.xml
( change the "com.semperpax.spmc" to whatever version of xbmc you have installed )
Open launchers.xml and under "launchers" look for the emulator you added ( this would be the name you chose when you set the title of the launcher ) and you should see the following line:
Code:
<args>"%rom%"</args>
Change it to represent one of the arguments found in the 3rd post. for example purposes here's what the line would look like if I were setting up the Reicast:
Code:
<args>start -n com.reicast.emulator/.GL2JNIActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"</args>
Save it and push it back to the location it was pulled from.
5.) Reload XBMC ( or just the script )
Once you reload you should be able to add games... to add games hit the "c" key on your keyboard with the emulator highlighted and select "Add items". Select any game(s) you wish to add.
Afterwards you should be able to launch the games from Advanced Launcher
ROM COLLECTION BROWSER
Install RCB like you would any addon.
In order to get RCB to work there's a few changes that have to be made... 2 files to be specific.
1.) applaunch.sh
located at:
Code:
/sdcard/Android/data/com.semperpax.spmc/files/.xbmc/userdata/addon_data/script.games.rom.collection.browser/scriptfiles/applaunch.sh
or
Code:
/sdcard/Android/data/org.xbmc.xbmc/files/.xbmc/addons/script.games.rom.collection.browser/resources/scriptfiles/applaunch.sh
( change the "com.semperpax.spmc" to whatever version of xbmc you have installed )
You'll need to comment out the following lines:
Code:
case "$(uname -s)" in
Darwin)
XBMC_PID=$(ps -A | grep XBMC.app | grep -v Helper | grep -v grep | awk '{print $1}')
XBMC_BIN=$(ps -A | grep XBMC.app | grep -v Helper | grep -v grep | awk '{print $5}')
;;
Linux)
XBMC_PID=$(pidof xbmc.bin)
XBMC_BIN="xbmc"
;;
*)
echo "I don't support this OS!"
exit 1
;;
esac
Save it and push it back to the same location we pulled it from.
2.) launcher.py
located at:
Code:
/sdcard/Android/data/com.semperpax.spmc/files/.xbmc/addons/script.games.rom.collection.browser/resources/lib/launcher.py
( change the "com.semperpax.spmc" to whatever version of xbmc you have installed )
Comment out:
Code:
if(isFullScreen):
Logutil.log("Toggle to Windowed mode", util.LOG_LEVEL_INFO)
#this minimizes xbmc some apps seems to need it
try:
xbmc.executehttpapi("Action(199)")
except:
xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Input.ExecuteAction","params":{"action":"togglefullscreen"},"id":"1"}')
toggledScreenMode = True
Code:
pre launch command
if(precmd.strip() != '' and precmd.strip() != 'call'):
Logutil.log("Got to PRE", util.LOG_LEVEL_INFO)
os.system(precmd.encode(sys.getfilesystemencoding()))
preDelay = settings.getSetting(SETTING_RCB_PRELAUNCHDELAY)
if(preDelay != ''):
preDelay = int(float(preDelay))
xbmc.sleep(preDelay)
Modify:
Code:
if(romCollection.usePopen):
import subprocess
subprocess.Popen(cmd.encode(sys.getfilesystemencoding()), shell=True)
else:
os.system(cmd.encode(sys.getfilesystemencoding()))
to this:
Code:
if(romCollection.usePopen):
import subprocess
subprocess.Popen(cmd.encode('utf-8'), shell=True)
else:
os.system(cmd.encode('utf-8'))
Comment out:
Code:
postDelay = settings.getSetting(SETTING_RCB_POSTLAUNCHDELAY)
if(postDelay != ''):
postDelay = int(float(postDelay))
xbmc.sleep(postDelay)
post launch command
if(postcmd.strip() != '' and postcmd.strip() != 'call'):
Logutil.log("Got to POST: " + postcmd.strip(), util.LOG_LEVEL_INFO)
os.system(postcmd.encode(sys.getfilesystemencoding()))
Save it and push it back to the same location we pulled it from.
3.) Create a "Rom Collection"
Hit the "U" button ( or "C" key on a keyboard ) on your OUYA controller, this will open a menu... select "Add Rom Collection".
Fill out all the info ( how you want to select info/artwork, what console, location of emulator ( su or am... read 3rd post )
On the "Emulator params" just select the default for now... we will modify this afterward.
Continue on in the setup... ( path to the roms, what file mask [ in otherwords which extensions to look for... look at the example it gives ] and lastly select a location for the artwork )
4.) Adding the correct emulator arguments
Pull config.xml from:
Code:
/sdcard/Android/data/com.semperpax.spmc/files/.xbmc/userdata/addon_data/script.games.rom.collection.browser/config.xml
( change the "com.semperpax.spmc" to whatever version of xbmc you have installed )
Open config.xml and under the rom collection you created... look for the following line:
Code:
<emulatorParams>"%ROM%"</emulatorParams>
Change it to represent one of the arguments found in the 3rd post. for example purposes here's what the line would look like if I were setting up the SNES:
Code:
<emulatorParams>start -n com.explusalpha.Snes9xPlus/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%ROM%"</emulatorParams>
Save it and push it back to the same location we pulled it from.
5.) Reload XBMC ( or just the script )
After you reload you should be able to launch the games without a problem.
There are some arguments that will require root and others that do NOT require root... If theres a root/nonroot option I will list both.
If the argument is non-root required, for the "application" use /system/bin/am
If the argument is root required, use /system/xbin/su for the "application"
-=Emulator Arguments=-
2600.EMU:
non-root:
start -n com.explusalpha.A2600Emu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
Ataroid:
non-root:
start -n com.androidemu.atari/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
C64.EMU:
non-root:
start -n com.explusalpha.C64Emu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
DraStic:
non-root:
start -n com.dsemu.drastic/.DraSticActivity -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -e GAMEPATH "%rom%"
ePSXe:
non-root:
start -n com.epsxe.ePSXe/.ePSXe -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -e com.epsxe.ePSXe.isoName "%rom%"
FPSE: ( NOTE: can be rather....buggy... also will only work in nobios mode )
non-root:
start -n com.emulator.fpse/.Main -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -e path "%rom%"
GameBoid:
non-root:
start -n com.androidemu.gba/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
GBA.EMU:
non-root:
start -n com.explusalpha.GbaEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
GBC.EMU:
non-root:
start -n com.explusalpha.GbcEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
GBCoid:
non-root:
start -n com.androidemu.gbc/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
Gearoid:
non-root:
start -n com.androidemu.gg/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
Gensoid:
non-root:
start -n com.androidemu.gens/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
MD.EMU:
non-root:
start -n com.explusalpha.MdEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
MSX.EMU:
non-root:
start -n com.explusalpha.MsxEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
Mupen64Plus AE Free 2.4.4: ( playstore )
non-root: ( will load the emulator menu with the correct rom selected )
start -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
root: ( will first load the emulator with the correct rom and then reload to the play menu to either resume where you last left off on your game or restart the emu so the game is at first boot )
-c 'am start -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%" && am start -S -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.PlayMenuActivity'
Mupen64Plus AE 2.4.4: ( playstore )
non-root: ( will load the emulator menu with the correct rom selected )
start -n paulscode.android.mupen64plus/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
root: ( will first load the emulator with the correct rom and then reload to the play menu to either resume where you last left off on your game or restart the emu so the game is at first boot )
-c 'am start -n paulscode.android.mupen64plus/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%" && am start -S -n paulscode.android.mupen64plus/paulscode.android.mupen64plusae.PlayMenuActivity'
Mupen64Plus AE: ( ouya discovery )
non-root: ( will load the emulator menu with the correct rom selected )
start -n paulscode.android.mupen64plusae/.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
root: ( will first load the emulator with the correct rom and then reload to the play menu to either resume where you last left off on your game or restart the emu so the game is at first boot )
-c 'am start -n paulscode.android.mupen64plusae/.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%" && am start -S -n paulscode.android.mupen64plusae/.PlayMenuActivity'
N64oid:
non-root:
start -n com.androidemu.n64/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
NEO.EMU:
non-root:
start -n com.explusalpha.NeoEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
NES.EMU:
non-root:
start -n com.explusalpha.NesEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
NESoid:
non-root:
start -n com.androidemu.nes/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
NGP.EMU:
non-root:
start -n com.explusalpha.NgpEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
PCE.EMU:
non-root:
start -n com.PceEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
PPSSPP:
non-root:
start -n org.ppsspp.ppsspp/.PpssppActivity -e org.ppsspp.ppsspp.Shortcuts "%rom%"
Reicast:
non-root:
start -n com.reicast.emulator/.GL2JNIActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
RetroArch: ( example using PS1 )
non-root:
start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -e ROM "%rom%" -e LIBRETRO /data/data/com.retroarch/cores/pcsx_rearmed_libretro_neon_android.so -e CONFIGFILE /data/data/com.retroarch/retroarch.cfg -e IME tv.ouya.console.ime.keyboard/.OUYAKeyboard -n com.retroarch/.browser.retroactivity.RetroActivityFuture
( for the other emulator cores just point to the appropriate libretro*.so )
Snes9x EX+:
non-root:
start -n com.explusalpha.Snes9xPlus/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
SNesoid:
non-root:
start -n com.androidemu.snes/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
SuperGNES lite:
non-root:
start -n com.bubblezapgames.supergnes_lite/.SuperGNES -a android.intent.action.VIEW -eu Uri "file://%rom%"
SuperGNES:
non-root:
start -n com.bubblezapgames.supergnes/.SuperGNES -a android.intent.action.VIEW -eu Uri "file://%rom%"
-=Game Arguments=-
coming soon...
man, thanks to the reference to ouyaforum, I've seen the link to the latest/cheapest BT+IR controller that honestly will work both my TV/LCD and the Ouya at the same time - http://www.amazon.com/Media-Blu-ray-Remote-Control-Playstation-3/dp/B0050SX9I2/. ordered and gonna give it a try.
I got a Rii bluetooth off spamazon a while back but it is not performing up to snuff.
Just curious since I don't know what all the currently most used ( or user preferred ) emulators these days are.... but if people here could start listing emulators they use or would like to see the args and setup for please do post here and I'll get to adding it into the second post.
Sega Saturn and Atari Jaguar would be cool! :good:
I just wanted to say that this looks really awesome and can't wait to try it out!
Speechless
I cant believe I never found this thread until today. This is amazing, I cant thank you enough. This makes the Ouya a 1000x better. :good::good::good:
This needs to be put in more places. Is it okay if I post a link to this thread on a couple of forums(gwenael, xbmc.org, freaktab, xbmchub, xunitytalk, and so on)? Many people are curios about launching games through xbmc on android.
This is just.........I can't even put it into words.
You just made my month.
Thank you.Thank you. Thank you.Thank you. Thank you.Thank you. Thank you.Thank you. Thank you.Thank you.
---------- Post added at 07:47 AM ---------- Previous post was at 07:38 AM ----------
IncognitoMan said:
Just curious since I don't know what all the currently most used ( or user preferred ) emulators these days are.... but if people here could start listing emulators they use or would like to see the args and setup for please do post here and I'll get to adding it into the second post.
Click to expand...
Click to collapse
ppsspp(side-loaded) is the only one I dont see that id like to know for the ouya(Retroarch/libretro along with Mupen64plus pretty much handle everything else for me)
So how do you figure these arguments out in the first place?
1995mkw said:
I cant believe I never found this thread until today. This is amazing, I cant thank you enough. This makes the Ouya a 1000x better. :good::good::good:
This needs to be put in more places. Is it okay if I post a link to this thread on a couple of forums(gwenael, xbmc.org, freaktab, xbmchub, xunitytalk, and so on)? Many people are curios about launching games through xbmc on android.
This is just.........I can't even put it into words.
You just made my month.
Thank you.Thank you. Thank you.Thank you. Thank you.Thank you. Thank you.Thank you. Thank you.Thank you.
---------- Post added at 07:47 AM ---------- Previous post was at 07:38 AM ----------
ppsspp(side-loaded) is the only one I dont see that id like to know for the ouya(Retroarch/libretro along with Mupen64plus pretty much handle everything else for me)
So how do you figure these arguments out in the first place?
Click to expand...
Click to collapse
I was meaning to right a bit more in the guide in regards to how to figure out the args ( or in this case what intents are being called upon ) but to basically sum it up you can logcat and see how the apps intents are being passed and whats being called for ( you can also do the same thing by decompiling and looking at the source but for 90% of it you *should* be able to get away with using just logcat )
So far I haven't been able to get ppsspp to work due to it missing intents we need... so until the author adds intents that we can use to call for we cant use ppsspp with this other than to load the emulator.
Also I'll be massively updating ( and cleaning ) this thread *soon* to include RCB support ( Rom Collection Browser )
Yesterday between me and EldonMcGuinness we figured out what was causing the issues with it not wanting to work on android... lucky for us the changes were small and very little had to be done to make it work ( and it basically works the same way as Advanced Launcher )... The benefit of being able to use RCB is quite nice since not only is RCB included in the main repo of plugins ( thus this works not only on frodo but gotham too! ) but also because some skins actually have RCB support as a widget... so for instance my last 10 played games are shown on the home screen...
As for posting this at other forums I'm fine with that as long as it links back here so I can answer questions or maybe take requests on which games/apps they'd like to see added to the list.
--edit:
In fact you should start seeing the changes today ( I'll probably be moving posts around and refining more throughout the day )
IncognitoMan said:
I was meaning to right a bit more in the guide in regards to how to figure out the args ( or in this case what intents are being called upon ) but to basically sum it up you can logcat and see how the apps intents are being passed and whats being called for ( you can also do the same thing by decompiling and looking at the source but for 90% of it you *should* be able to get away with using just logcat )
So far I haven't been able to get ppsspp to work due to it missing intents we need... so until the author adds intents that we can use to call for we cant use ppsspp with this other than to load the emulator.
Also I'll be massively updating ( and cleaning ) this thread *soon* to include RCB support ( Rom Collection Browser )
Yesterday between me and EldonMcGuinness we figured out what was causing the issues with it not wanting to work on android... lucky for us the changes were small and very little had to be done to make it work ( and it basically works the same way as Advanced Launcher )... The benefit of being able to use RCB is quite nice since not only is RCB included in the main repo of plugins ( thus this works not only on frodo but gotham too! ) but also because some skins actually have RCB support as a widget... so for instance my last 10 played games are shown on the home screen...
As for posting this at other forums I'm fine with that as long as it links back here so I can answer questions or maybe take requests on which games/apps they'd like to see added to the list.
Click to expand...
Click to collapse
Its a shame ppsspp wont work. However the fact that RCB is on the verge of working is quite nice(RCB is what Im using on my HTPC).
I'll try fiddling around with logcat later(Its all always good to know how to do things yourself.)
One of the things I noticed about this thread is the lack of activity(posts/veiws) despite its significance(I believe this is due to the lack of traffic in the Ouya section of xda). Im sure a lot of people are interested in this but just haven't had the opportunity to see the thread(Ive been looking for something like this since just after Christmas and only found it just now). This is is useful to more than just people with an Ouya. Anyone running an android device attached to their TV can benefit from this guide(Though the Ouya makes the most sense since it is operated with a gamepad).
So I figured posting links to this thread on the places I was originally looking(Mainly xbmc and advanced launcher related resouses/fourums. I just never thought about looking in a device specific forum despite it being the device I wanted this for in the first place) would help people find this easier.
1995mkw said:
Its a shame ppsspp wont work. However the fact that RCB is on the verge of working is quite nice(RCB is what Im using on my HTPC).
I'll try fiddling around with logcat later(Its all always good to know how to do things yourself.)
One of the things I noticed about this thread is the lack of activity(posts/veiws) despite its significance(I believe this is due to the lack of traffic in the Ouya section of xda). Im sure a lot of people are interested in this but just haven't had the opportunity to see the thread(Ive been looking for something like this since just after Christmas and only found it just now). This is is useful to more than just people with an Ouya. Anyone running an android device attached to their TV can benefit from this guide(Though the Ouya makes the most sense since it is operated with a gamepad).
So I figured posting links to this thread on the places I was originally looking(Mainly xbmc and advanced launcher related resouses/fourums. I just never thought about looking in a device specific forum despite it being the device I wanted this for in the first place) would help people find this easier.
Click to expand...
Click to collapse
I've been thinking about posting this into a more generic section once the guide is a little more... finished. As yes you are correct, the guide applies to all devices that are plugged into a tv and use xbmc ( very little of the guide has to be changed... only retroarch's IME selection and location of su is about it )
As for RCB I updated the second post so far to include what has to be changed to get it to work on android... the rest of it works similar to Advanced Launcher but I need to fill the rest out for that.
This is an amazing thread and its opened up a whole new world for me and my JXD S7800. I just figured out how to get RCB to launch Android games. It requires using nfo files as ROM files, and the %GAMECMD% param to parse the right info to the command line. GAMECMD can be entered manually within RCB but its easier to put it in the nfo file your going to use as a ROM file and then set one of your scrapers as LocalNFO.
For the file located
Code:
/addons/script.games.rom.collection.browser/resources/lib/dbupdate.py
Replace:
Code:
region = self.resolveParseResult(gamedescription, 'Region')
With:
Code:
gameCmd = self.resolveParseResult(gamedescription, 'GameCmd')
region = self.resolveParseResult(gamedescription, 'Region')
and Replace:
Code:
gameId = self.insertGame(gamename, plot, romCollection.id, publisherId, developerId, reviewerId, yearId,
With:
Code:
gameId = self.insertGame(gamename, plot, gameCmd, romCollection.id, publisherId, developerId, reviewerId, yearId,
and Replace:
Code:
def insertGame(self, gameName, description, romCollectionId, publisherId, developerId, reviewerId, yearId,
With:
Code:
def insertGame(self, gameName, description, gameCmd, romCollectionId, publisherId, developerId, reviewerId, yearId,
and Replace:
Code:
Game(self.gdb).insert((gameName, description, None, None, romCollectionId, publisherId, developerId, reviewerId, yearId,
With:
Code:
Game(self.gdb).insert((gameName, description, gameCmd, None, romCollectionId, publisherId, developerId, reviewerId, yearId,
and Replace:
Code:
Game(self.gdb).update(('name', 'description', 'romCollectionId', 'publisherId', 'developerId', 'reviewerId', 'yearId', 'maxPlayers', 'rating', 'numVotes',
'url', 'region', 'media', 'perspective', 'controllerType', 'originalTitle', 'alternateTitle', 'translatedBy', 'version', 'isFavorite', 'launchCount'),
(gameName, description, romCollectionId, publisherId, developerId, reviewerId, yearId, players, rating, votes, url, region, media, perspective, controller,
originalTitle, alternateTitle, translatedBy, version, int(isFavorite), int(launchCount)),
gameId, allowOverwriteWithNullvalues)
With:
Code:
Game(self.gdb).update(('name', 'description', 'gameCmd', 'romCollectionId', 'publisherId', 'developerId', 'reviewerId', 'yearId', 'maxPlayers', 'rating', 'numVotes',
'url', 'region', 'media', 'perspective', 'controllerType', 'originalTitle', 'alternateTitle', 'translatedBy', 'version', 'isFavorite', 'launchCount'),
(gameName, description, gameCmd, romCollectionId, publisherId, developerId, reviewerId, yearId, players, rating, votes, url, region, media, perspective, controller,
originalTitle, alternateTitle, translatedBy, version, int(isFavorite), int(launchCount)),
gameId, allowOverwriteWithNullvalues)
Then for the file located
Code:
/addons/script.games.rom.collection.browser/resources/scraper/00 - local nfo.xml
Replace:
Code:
<Game>title</Game>
With:
Code:
<Game>title</Game>
<GameCmd>gameCmd</GameCmd>
Now set your "Emulator Cmd" to:
Code:
/system/xbin/su
and your "Emulator Params" to
Code:
-c 'am start -n %GAMECMD%'
and your "Rom Fie Mask" to
Code:
*.nfo
and one of your scrapers need to be set to "local nfo"
Now set the "Rom Path" to any empty folder on your SD card. Then create text files in this folder and change their extensions to nfo. The name of the nfo is not important but inside it you need:
Code:
<game>
<gameCmd>PackageName/ActivityName</gameCmd>
<game>
An example is the following to run Punch Quest
Code:
<game>
<gameCmd>com.noodlecake.punchquest.humble/com.noodlecake.punchquest.punchquest</gameCmd>
<game>
And that's it. This setup has it working for me.
Ignore this post.
I'm having some problems with Mupen64Plus AE. I've used the root command, haven't tried the one with am. I think there's some problems with the parameters, because I've tried running the command in terminal it says that the MainActivity doesn't exist.
I checked Mupen64Plus AE on Github, and it seems like they don't use the MainActivity any longer, but I don't know what command to use instead. Oh, and I'm using an Android stick, not an Ouya, but that shouldn't matter in this case - should it? I'm still using SPMC.
Any help, please?
Cheers
sindrefyrn said:
I'm having some problems with Mupen64Plus AE. I've used the root command, haven't tried the one with am. I think there's some problems with the parameters, because I've tried running the command in terminal it says that the MainActivity doesn't exist.
I checked Mupen64Plus AE on Github, and it seems like they don't use the MainActivity any longer, but I don't know what command to use instead. Oh, and I'm using an Android stick, not an Ouya, but that shouldn't matter in this case - should it? I'm still using SPMC.
Any help, please?
Cheers
Click to expand...
Click to collapse
I'll check it out sometime today... ATM I'm using my ouya for test flashing cm10.2/cm11 builds so I haven't had much time to see if they've changed ( I did find out that retroarch changed and have fixed the args accordingly ).
IncognitoMan said:
I'll check it out sometime today... ATM I'm using my ouya for test flashing cm10.2/cm11 builds so I haven't had much time to see if they've changed ( I did find out that retroarch changed and have fixed the args accordingly ).
Click to expand...
Click to collapse
That's awesome - thanks.
sindrefyrn said:
That's awesome - thanks.
Click to expand...
Click to collapse
I'm guessing you are using the free version from the google play store...
If so then there's a *slight* change to the command... heres the command set for people wanting to use the one on the playstore. ( as of 2.4.4 )
Mupen64Plus AE Free 2.4.4:
non-root: ( will load the emulator menu with the correct rom selected )
start -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
root: ( will first load the emulator with the correct rom and then reload to the play menu to either resume where you last left off on your game or restart the emu so the game is at first boot )
-c 'am start -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%" && am start -S -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.PlayMenuActivity'
-----
*sigh* this is why I wish I would have a more vanilla android device to test this with...
Anyway thanks for the heads up sindrefyrn... if you run across any others that have problems let me know and I'll see about checking it out.
IncognitoMan said:
I'm guessing you are using the free version from the google play store...
If so then there's a *slight* change to the command... heres the command set for people wanting to use the one on the playstore. ( as of 2.4.4 )
Mupen64Plus AE Free 2.4.4:
non-root: ( will load the emulator menu with the correct rom selected )
start -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"
root: ( will first load the emulator with the correct rom and then reload to the play menu to either resume where you last left off on your game or restart the emu so the game is at first boot )
-c 'am start -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%" && am start -S -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.PlayMenuActivity'
-----
*sigh* this is why I wish I would have a more vanilla android device to test this with...
Anyway thanks for the heads up sindrefyrn... if you run across any others that have problems let me know and I'll see about checking it out.
Click to expand...
Click to collapse
THANK YOU!!! :laugh:
This is amazing. I'm actually using the paid version, but even I could figure out what to do with the command.
Roms on NFS mount
First I would like to thank you for all of the work that has been put to get things working!!!!
My question is around XMBC and NFS mounts. In XMBC / Rom Collection Browser I am able to map an nfs share to my roms. When I click on a rom to play it comes up to the menu for Snes9x EX+. Is this the expected behavior? I know when I launch Snes9x that it only sees the local file system so I am guessing that is the reason that it does not play the game but wanted to check because of going through XBMC. If that is the case is there a way to mount an nfs mount to the system when the system is rooted ?
Thank you
Techhead33 said:
First I would like to thank you for all of the work that has been put to get things working!!!!
My question is around XMBC and NFS mounts. In XMBC / Rom Collection Browser I am able to map an nfs share to my roms. When I click on a rom to play it comes up to the menu for Snes9x EX+. Is this the expected behavior? I know when I launch Snes9x that it only sees the local file system so I am guessing that is the reason that it does not play the game but wanted to check because of going through XBMC. If that is the case is there a way to mount an nfs mount to the system when the system is rooted ?
Thank you
Click to expand...
Click to collapse
Should work as long as the command is passed correctly... sounds like its not finding the rom...
could you tell me where you are pointing your the roms folder? ( maybe paste the config for snes? )
Hi,
This is a guide on compiling the latest (as of 2015-06-24) dropbear SSH daemon (2015.67) for the Zenfone 2 but should also work for other x86-64 architecture Android devices. The guide is mainly based off the work from the blog http://blog.xulforum.org/index.php?post/2013/12/19/Compiling-Dropbear-for-a-Nexus-7-tablet which is an excellent guide to getting an older version of dropbear running on Android devices.
I've modified the patch made by the original author to work on the latest dropbear version. There are not much changes from ver 2013.58 to 2015.67. The main difference seems to be the support for Elliptical Curve encryption.
** START DISCLAIMER **
I did not write the original codes/patch myself and have not scrutinized it for any security issues. USE IT AT YOUR OWN RISK.
** END DISCLAIMER **
Here's the list of requirements :-
1) Dropbear 2015.67 source code - dropbear-2015.67.tar.bz2 (https://matt.ucc.asn.au/dropbear/releases/dropbear-2015.67.tar.bz2)
2) Patch to compile for Android - dropbear-v67-android-patch-20150629 (https://goo.gl/LBokgG)
3) A recent Linux distro (I use Ubuntu 14.04.2 LTS) running x86-64.
4) Development tools i.e. C compiler, linker, etc... all the necessary tools to run configure, make, etc..
Steps :-
(1) Extract the source code to a directory of its own :-
Code:
tar xjf dropbear-2015.67.tar.bz2
cd dropbear-2015.67
(2) Patch the source :-
Code:
patch -p1 < dropbear-v67-android-patch-20150629
(3) Run configure :-
Code:
./configure --disable-zlib --disable-largefile --disable-loginfunc \
--disable-shadow --disable-utmp --disable-utmpx --disable-wtmp \
--disable-wtmpx --disable-pututline --disable-pututxline --disable-lastlog
(4) Run make :-
Code:
STATIC=1 MULTI=1 SCPPROGRESS=0 PROGRAMS="dropbear dropbearkey scp dbclient" make strip
(5) You should end up with a single static binary "dropbearmulti" which you should link dropbear, dbclient/ssh, dropbearkey and scp to.
Code:
./dropbear -h
Dropbear server v2015.67 [URL]https://matt.ucc.asn.au/dropbear/dropbear.html[/URL]
Usage: ./dropbear [options]
-A Android Mode, specify a user explicitly
-N Android Mode, user name
-C Android Mode, password
-R Android Mode, public key file (authorized_keys)
-U Android Mode, UID
-G Android Mode, GID
-b bannerfile Display the contents of bannerfile before user login
(default: none)
-r keyfile Specify hostkeys (repeatable)
defaults:
dss /etc/dropbear/dropbear_dss_host_key
rsa /etc/dropbear/dropbear_rsa_host_key
ecdsa /etc/dropbear/dropbear_ecdsa_host_key
-F Don't fork into background
-E Log to stderr rather than syslog
-m Don't display the motd on login
-w Disallow root logins
-s Disable password logins
-g Disable password logins for root
-B Allow blank password logins
-j Disable local port forwarding
-k Disable remote port forwarding
-a Allow connections to forwarded ports from any host
-p [address:]port
Listen on specified tcp port (and optionally address),
up to 10 can be specified
(default port is 22 if none specified)
-P PidFile Create pid file PidFile
(default /var/run/dropbear.pid)
-i Start for inetd
-W <receive_window_buffer> (default 24576, larger may be faster, max 1MB)
-K <keepalive> (0 is never, default 0, in seconds)
-I <idle_timeout> (0 is never, default 0, in seconds)
-V Version
I will assume you know what to do with the binary file generated so will not elaborate on the process.
Hope it works for you guys. I'll be happy to help out anyone who needs more details.
Cheers.
UPDATE: 2015-06-29
- I've updated the patch to fix dbclient/ssh client using password authentication.
Hi all,
For those of you using the dropbear ssh client and encountering a seg fault when using password authentication, I've fixed the patch now and it should be working.
Cheers.
wolfdude said:
I will assume you know what to do with the binary file generated so will not elaborate on the process.
Hope it works for you guys. I'll be happy to help out anyone who needs more details.
Click to expand...
Click to collapse
Ehm...
Replacing the not working dropbear binaries of ARM-oriented SSHD servers with a link to this should solve the problem discussed here ...
is it right ?!
Thanks again
Val3r10 said:
Ehm...
Replacing the not working dropbear binaries of ARM-oriented SSHD servers with a link to this should solve the problem discussed here ...
is it right ?!
Thanks again
Click to expand...
Click to collapse
In a nutshell, you will need to copy dropbearmulti to /system/xbin, create some symbolic links to it (dropbear, dropbearkey, dbclient, scp), run dropbearkey to generate your host keys, copy your client pubkey to /data/dropbear/authorized_keys and then startup dropbear with parameters like :-
Code:
dropbear -A -N root -R /data/dropbear/authorized_keys
Hope this helps.
Cheers.
wolfdude said:
[...] and then startup dropbear with parameters like :-
Hope this helps.
Click to expand...
Click to collapse
Thanks. Got that.
Actually I mean I would replace - with the symlink - the x86 binary file inside one of the above mentionned packages, i.e. QuickSSHd or SSHDroid, to make them compatible with ZE55xML...
I'm trying and reporting here
Hey guys, I've just decided to get inside of the Android development world. Anyways, I'm mostly a fan of Linux, so I've made my first Linux script, I know it's simple, but I've never interacted with the user before, or picked an output. When I knew that Android made use of Linux in its core, my interest on working inside it grew up faster than ever.
In my script, firstly, you type the filename. For compatibility reasons, it'll everytime save to /sdcard/filename. Then, it will ask you how many times you want the script to log everything, and lately, every how many seconds should it save everything to the file.
The script will save, before every entry at the log, the screen status (if it's on or off), that can help to, for example, if your device has been lagging as a result of a bad screen driver or UI error.
Last thnig: it also works on recovery (maybe it give some error, and if no dumpsys is present on your recovery's ramdisk, it'll save everything as OFF).
Remember to send it anywhere excepting from /storage and any sbudir, it won't work as the Android permissions system blocks script execution on those dirs.
Code:
clear
# Wipe $logfile content in /sdcard (if any existing)
echo "Please type the filename where you want to save the log: "
read -r logfile
echo "" > /sdcard/$logfile
echo "Deleted previous log."
echo "SCREEN | CPU" >> /sdcard/$logfile
#cont=60
cont=1
#SHOWLOG=X
echo "Please type how many times the cycle must repeat: "
read -r maxcont
echo "Please type how many seconds will the interval take: "
read -r maxmin
clear
# Here it counts how many times the logging script has been ran
while [ $cont -lt $((maxcont + 1)) ];
do
# That nested while takes control of how many seconds have passed in the current cycle
while [ "$contmin" -lt "$maxmin" ];
do
contmin=$((contmin + 1))
sleep 1
clear
echo "C: $cont/$maxcont - T: $contmin/$maxmin"
done
# echo "$maxmin seconds passed."
# Logs the fist line of "busybox top" to a var
LOGVAR=$(busybox top -d 1 -n 1 | grep "idle")
# Logs the screen state (on or off) to another var
SCREENSTATE=$(dumpsys input_method | grep mScreenOn | tr -dc '[:alnum:]\n\r' | tr '[:upper:]' '[:lower:]')
# Saves a string that tells what it should expect if the screen is on
SCREENSTATEON="msystemreadytruemscreenontrue"
if [ "$SCREENSTATE" == "$SCREENSTATEON" ]
then
echo "ON: $LOGVAR" >> /sdcard/$logfile
else
echo "OFF: $LOGVAR" >> /sdcard/$logfile
fi
cont=$((cont + 1))
contmin=0
done
echo "Show logged values? [Y/N]"
read -r SHOWLOG
case $SHOWLOG in
[yY] | [yY][Ee][Ss] )
cat /sdcard/$logfile
;;
[nN] | [n|N][O|o] )
echo "Ok, goodbye. You'll see a what you've asked me to log in /sdcard/$logfile";
exit 1
;;
*) echo "You must write Y or N to continue."
;;
esac
exit 0
For example, save it as script.sh (remember to save it using Unix codifcation, if you're running Windows, else, it'll tell you that it's unable to find many binaries, as long as Linux isn't ok with CR+LF and requires LF as newline). Then, send it to the sdcard (over USB or adb push script.sh /sdcard/) , now, run ADB shell. Type the following commands:
Code:
su -c "cp -f /sdcard/script.sh /data/local/;chmod 777 /data/local/script.sh"
Then, if you want to run it:
Code:
su
sh /data/local/script.sh
That's all, I hope you enjoy it and not so many people kills me for explaining and feeling so grateful for that simple script.