yashsingh1/xdaforums huggingface dataset:
[Xperia Play Android Development] nscxp2005:
Hi All,

This is the error message I am getting:

I have removed the Java version I had installed and then install Java6 Update27 and JDK.

I hope somebody can help me figure out how to get the app successfully make an APK.

Thank you for your time

All the best,

NSCXP2005
[Xperia Play Android Development] subcu1ture:
Did you change the number?
[Xperia Play Android Development] nscxp2005:
yep.

Here are the settings I used:

All the best,

NSCXP2005
[Xperia Play Android Development] Cat_On_Droid:
i dont know if this would work,but try replacing the zeros from numbers ranging from 1-9 . As of now,i never included a 0 in any of my 2 converted games.

Also,try this:

Put the files (Ripped Data and OutPut Directory) as something as this

C:Desktop/Folder/etc

worked for me
[Xperia Play Android Development] nscxp2005:
I have but it still says it Cannot Build APK.

I used the number shown in the Screenshot above.

EDIT

Just to let you know I tried it in a different location, but I still get the error.
[Xperia Play Android Development] Logseman:
There is SCREENSHOT ME, which has two paid versions: a rooted one and an unrooted one. However, the non-rooted one tends to work with low-value brands and devices.
[Xperia Play Android Development] bubblegumballoon:
Hmmm I wish we could use this method to add other apps to the xperia launcher. I want to be able to do it with emulators but I wouldnt be able to add that string unless I could compile the emulator from source. I dont think theres any open source emulators for android :/
[Xperia Play Android Development] TLRtheory:
I'd like to do that too... developers are already getting into this BAD habit of being too incompetent to add one damn line in the manifest so that their "Xperia PLAY Optimized" game shows up where it's supposed to be.
[Xperia Play Android Development] subcu1ture:
Some people have been having trouble with the output directory being in the same directory as the other files. Try putting the output directory to desktop.
[Xperia Play Android Development] yifanlu:
Try removing the space in the file path.
[Xperia Play Android Development] nscxp2005:
Ok. I will try and let u know how it goes.
[Xperia Play Android Development] Rogue Leader:
Yeah I don't even have the PS Pocket App version, just the Xperia Play Launcher like you posted. I use Crash Bandicoot 1.0.1 for all my builds and every single time the game shows in that app.
[Xperia Play Android Development] subcu1ture:
Oh so it must be a region thing with people without playstation pocket all games go to Xperia Play Launcher.

All my PS games are in PS pocket including crash but do not show up on Xperia Play launcher.
[Xperia Play Android Development] Rogue Leader:
What does the pocket app do that the Xplay Launcher doesn't?
[Xperia Play Android Development] ncaissie:
Do you still need a dump of a paid PSX game?

I have Medieval. Just tell me how. I have a rooted phone with the UK image.
[Xperia Play Android Development] ncaissie:
The pocket one is just for PSX games I think.
[Xperia Play Android Development] nscxp2005:
Hi Yifanlu,

When I get the error message and click OK, this is the error I get in Terminal

java.io.FileNotFoundException: temp.dat (Too many open files)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:209)
at java.io.FileOutputStream.<init>(FileOutputStream.java:99)
at com.yifanlu.PSXperiaTool.PSImageCreate.splitPart(PSImageCreate.java:54)
at com.yifanlu.PSXperiaTool.PSImageCreate.compress(PSImageCreate.java:46)
at com.yifanlu.PSXperiaTool.PSXperiaTool.generateImage(PSXperiaTool.java:159)
at com.yifanlu.PSXperiaTool.PSXperiaTool.startBuild(PSXperiaTool.java:61)
at com.yifanlu.PSXperiaTool.Interface.GUI$12.run(GUI.java:695)
at java.lang.Thread.run(Thread.java:636)

I hope this helps.

All the best,

NSCXP2005
[Xperia Play Android Development] yifanlu:
This bug should be fixed in the 1.0 release.

In other news. 1.0 release is out. It's mainly just a version bump, not really any new features. I've fixed that bug, added to the string filter (you can have quotes in description now!), and some better error messages. In addition, I've included a quick troubleshooting guide in the readme that should solve most of the "cannot build apk" and "crashes on startup" problems.
[Xperia Play Android Development] nscxp2005:
I have just tried the new version and got this error:

Cannot run program "./aapt-linux": java.io.IOException: error=12, Cannot allocate memory

Also it seemed not to get the Cannot Build APK error dialog when I do not set a new Icon or change the game name.

Any reason why this happens?

Thanks

NSCXP2005

EDIT

Hi yifanlu,

I get this error message when it is finished creating the ZPAK:

[D] Running command: [./aapt-linux package -f -F /home/nscxp/Desktop/PSX/com.sony.playstation.NCXA56789_1.apk.unsigned -S ./.psxperia.346/res -M ./.psxperia.346/assets/AndroidManifest.xml -I ./android-framework.jar ./.psxperia.346]
[E] Cannot build APK! Java says: Cannot run program "./aapt-linux": java.io.IOException: error=12, Cannot allocate memory

EDIT 2

Success!!! APK and ZPAK Data created.

Thanks yifanlu
[Xperia Play Android Development] Warudakumi:
AWESOME!

Thanks for the awesome app! I was waiting for this day since I got this phone.... I'm so disappointed with Sony not releasing titles more quickly. I could care less about running android games that are compatible with the sony controls... I want to play all my japanese imported titles as well as my classic rpgs: FF9, Xenogears, Star Ocean etc.

I just injected my first game and it runs definitely faster than the FPSE emulator however it does have a few glitches in the game itself.

The game I injected was Street Fighter EX2+ and the game runs very smoothly however the characters shadows Bleed and spike up from the ground....also it crashes before the first bonus stage.

I've had an issue with Tekken 2 doing the bleeding sprites glitch in the FPSE emulator and found out it was my ISO that was corrupt. I'm going to try to rip my original psx game again and try it out again!

Again thank you very much for the hard work well done!
[Xperia Play Android Development] Nhialor:
This is already possible, use APK Manager, decompile the app, add in the Xperia Play Optimized tag line in the manifest and recompile it. Sign it, copy it over, install it and it works. I have N64oid, Snesoid, Gameboid etc etc in my Xperia Play launcher through this method. So easy to do!
[Xperia Play Android Development] rizenreincarna:
Error

Have this error.....it says something bout the .png file.....any comments?

Edit 2:

Found the problem....i convert the img to png using Online .PNG converter
[Xperia Play Android Development] Warudakumi:
Just a follow up:

Earlier I injected Street Fighter EX2 plus and had emulation issues. I re-ripped my psx game cd and came up with the same results with the bleeding sprites for the game characters. I then noticed that the game was slowing down in certain areas and popping sometimes (I had the volume low last time) I then pressed home and noticed my system ram was way too low and my setcpu profile was on min powersave with 385min profile!(saves battery)

I then went to a normal cpu profile and cleared some system memory and now the game sprites are loading normally! Perfect emulation! This would probably explain why the game would exit and seem to crash when I was more than likely just low on system ram in the first place! I can't wait to get off work to dust off some psx games off my shelf!

Conclusion: So those of you guys with rooted phones, make sure you have a cpu profile high enough and system ram resources high enough for the built in psx emu to take full advantage. What I noticed is that the emulator will try to run regardless and it seems like this is causing sprites to not load correctly into memory. How I wish this phone had at least 1GB of RAM.... oh well :)
[Xperia Play Android Development] ps3taker:
would be good if PSXperia had options to generate preferences.xml in ucc folder for games data and/or another APK with interface to modify/test it on the play directly first as per below please:

http://xdaforums.com/showthread.php?t=1220541

besides the above SW-render and Up-rendering for fixing emulation glitches other options like Screen Mode to default to full screen would be nice for people who prefer this always? Same with Button Mapping and Analog Mode and Save Progress? I know that above 4 options are changeable via Playstation Pocket but having them set at conversion with PSXperia to user's preference would be nice.

Wonder if FPS-counter and Frame Skipping would be relevant for emulation results.
[Xperia Play Android Development] nscxp2005:
yifanlu,

Would you be able to add an option for making APK's for the Xperia 'Xperia Play Optimized'?

Would make life a lot easier than trying to do them manually as I keep getting java errors when trying this.

Thank you for your time.

All the best,

NSCXP2005
[Xperia Play Android Development] yifanlu:
Like I said before, all you have to do is modify /data/assets/androidmanifest.XML and every apk you generate from now on will have it.
[Xperia Play Android Development] nscxp2005:
OK Thanks.

Hi Yifanlu,

Just a suggestion, would keeping the same TitleID for multidisk games make the work with the same save game or maybe changing the _1 to _2 might work.

What do you think?

All the best,

NSCXP2005
[Xperia Play Android Development] Alexander33:
I'm back to report some of my crazy tests :)

So I ripped my NFS:Underground PS2 CD and I converted the image and after like 5 hours i managed to get it on the phone (3 GB :| ) What is amazing that the phone actually wanted to run the game but it wasn't good (doh you can't convert PS2 games using ps1 method) still I think yifanlu you should check this >:)

The conversion worked perfect,the program created the .zpak and everything needed from the PS2 ISO with 100% success but as i said we need a new method of conversion? oh and the phone deleted the Zpak of 3 GB from the card wanting to redownload the "data" for the game because it isn't the good one...
[Xperia Play Android Development] yifanlu:
You can't run PS2 games.
[Xperia Play Android Development] m3dteam:
Hmmm,

If you wana replace functions with your own, I could patch them in for you, as long as they are shorter than the original one. (if it is longer, or contains string or large data, then you will need my tool)

Also, doesn't IDA Pro show you the function inputs?

Oh and here is a quick POC of my tool:

I modified the sample project helloJni (which basically displays a string from JNI to screen), it now calls a function that return a string. This function is called Vic (short for victim). by modifing the apk after it is build I can replace with my own function, called inj (inject).

Any way, here is how I had to modify it:

1- change AndroidManifest.xml to set android:debuggable to true (this is a must)

2- modified HelloJni.smali so it would call my library: libsotool.so

3- add my library to the apk, sign and install

now whenever vic() is called, the call is redirected to inj()

if you like I can email the source of sotool but you need to give me a few hours (need some sleep 3am here).
[Xperia Play Android Development] yifanlu:
Thank you. Regarding the function name. It's a C-function, so the paramaters are not exported. I don't have Hex Rays ARM Decompiler either, but with it, you can find out.
[Xperia Play Android Development] m3dteam:
I don't have ARM Decompiler either, I only have IDA Pro 5 the freeware.

You always can look at when the function is called, and see what params are set.

Also, do you really have to look at its input? (can you produce the output without looking into the input?)

also, what is the function name?
[Xperia Play Android Development] yifanlu:
Through tons of guessing and checking, I THINK this is the format:

int PsCrypt_GetImageToc(void* dest); // returns size of data written

int PsCrypt_GetImageTocLength(); // returns size of data

I may be missing some variables, but calling them like this works. All I need is to replace these two.

Here's my reproduction of the code to load the TOC table into memory.
[Xperia Play Android Development] gwaine:
yifanlu...can you start to smell the bounty money? ;) Sounds like we're getting close!
[Xperia Play Android Development] yifanlu:
Ha, as much as I love money, in some weird way, this is pretty fun.

Also, if I try to write to the function pointer with memcpy or something, I get an error. I think it's android's security.
[Xperia Play Android Development] m3dteam:
you can man use memcopy by doing the following:

#include <android/log.h>
#include <string.h>
#include <jni.h>
#include <time.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <linux/user.h>
#include <errno.h>
#include <sys/mman.h>

int allignedVic = (((int) FuncToEdit)& 0xfffff000);
mprotect((void *)allignedVic,0x1000, PROT_READ|PROT_EXEC|PROT_WRITE)

the return of mprotect should be 0, if it works.

Also, make sure that AndroidManifest.xml debug tag is set to true or it wont work.

To check through adb shell if worked do:

cat /proc/pid/maps

where pid is the process id. you should see rwx before the library you wana edit
[Xperia Play Android Development] yifanlu:
IT'S DONE!

I'm uploading a youtube video right now of the Play running Crash Bandicoot 3. Now I just need to write the GUI. No more then a day for that. As much as I hate Java in every way, I feel like it would be the easiest way of making a multi-platform tool. I'll also do a final writeup on my site in a couple of days.

EDIT: Video - http://www.youtube.com/watch?v=6sV0rXHBekQ
[Xperia Play Android Development] Mills00013:
You're amazing! Cant wait to get my hands on your work. Congratulations!

Are you releasing your findings open source?
[Xperia Play Android Development] gojoechris:
Do you have multidisc working?
[Xperia Play Android Development] MechaBouncer:
Fantastic work! This is a great day indeed! :D
[Xperia Play Android Development] yifanlu:
Yes, everything from the tool to the wrapper library will be released under GNU v3. I will also do another writeup about how I hooked the functions and other stuff.

Not yet, I'm sure you guys would want a beta release of the tool before I work any more.

Thanks, it was about a week of non-stop work.
[Xperia Play Android Development] Nhialor:
you ****ing LEGEND!!!

does everything work as intended? Will we be able to add cover art for the games? how does the save state work? Your ingeniousness amazes me!
[Xperia Play Android Development] kupo5131:
Absolutely fantastic work dude. I bow down before you! Lol.

Just 1 quick question, have you changed the icon and name in the menu?? What it means is when you open the app draw do you have 2 Crash 1s or do you have Crash 1 and Crash 3 installed?
[Xperia Play Android Development] m3dteam:
CONGRATZ!!!!

btw, was mprotect any good?
[Xperia Play Android Development] yifanlu:
Yes, the tool will allow you to set custom icon, cover art, and metadata. Save states do work. Maybe in the future, I can hack the emulator to have multiple save states. (Of course, multidisk and manual before that).

It was actually easier, much much easier then I expected. After rereading the assembly code again, I realized that it was using "0xFFFFFFFF" as the handle for dlsym(). I kinda suspected that because it would have been hard to find the library file since android doesn't put the app libs in LD_PATH. All I had to do was overwrite the symbol.
[Xperia Play Android Development] Nhialor:
ETA on release date?
[Xperia Play Android Development] yifanlu:
No promises, but if I don't run into any more complications, a couple of days.
[Xperia Play Android Development] gwaine:
Wow, yifanlu...amazing stuff! Thanks for all of your hard work!
[Xperia Play Android Development] Scorbion:
nice work :D gratz
[Xperia Play Android Development] ncaissie:
yet! ;) lol
[Xperia Play Android Development] nscxp2005:
Hi yifanlu,

What do you think about my suggestion for getting Multidisc games to work with the same save game? would it work or have you had any success with getting them running?

All the best,

NSCXP2005
[Xperia Play Android Development] crono141:
Ever.
[Xperia Play Android Development] yifanlu:
So I've extracted the 1.0.2 emulator (release 3) from cool boarders 2. I don't see any major changes in the code, but the file size did increase by 0.5MB. I don't want to work on injecting the new emulator before I can get confirmation that it is indeed better. If anyone's good at reading ARM ASM, PM me.

Build string for Crash Bandicoot EUR (Release 2) emulator:

W1106_Sprint19.3 TARGET_FINAL

Tue Feb 8 14:22:48 PST 2011

Build string for Crash Bandicoot USA emulator:

W1110_Sprint19.7 TARGET_FINAL

Fri Mar 11 13:29:27 PST 2011

Build string for Cool Boarders 2 EUR emulator:

W1126_Sprint36.1 TARGET_FINAL

Wed Jun 29 13:19:01 PDT 2011

take that as you will.

There is also lists of games in each emulator. I'm guessing it's what it offically supports

Crash Bandicoot EUR:

Crash Bandicoot USA:

Cool Boarders 2 EUR

again, take that as you will.
[Xperia Play Android Development] Alexander33:
why not, can you elaborate that a bit?

the phone can't handle it?
[Xperia Play Android Development] TheVicious:
Could You tell me how to made 1.02 from oryginal game ? I bought Destruction Derby but when I want to ectract files there is CRC error :( .
[Xperia Play Android Development] edokassiah:
what am i doing wrong?

i extracted the crash files the apk and zpak

i ran the tool using windows i uploaded the files and i loaded marvel vs street fighter.bin

and it said everything was ok and when i check the output i get

com.sony.playstation.NCXA00000_1.apk

and a folder called data

inside the folder i have data/com.sony.playstation.NCXA00000_1/files/content/

img_ps_toc.bin

NCXA00000_1.zpak

where am i suppose these files?

i tried installing the apk and it installs fine then when i try to fire it up it says content on sd can not be found
[Xperia Play Android Development] Cat_On_Droid:
Replace the 0s with numbers from 1 to 9. Com. Sony. Playstation NCXA should be moved to SD, android, data
[Xperia Play Android Development] yifanlu:
Started a wiki.

https://github.com/yifanlu/PSXperia/wiki contains usage guide (detailed as many requested) some guidelines for settings and troubleshooting advice.

https://github.com/yifanlu/PSXperia/wiki/Compatibility is the compatibility. I need someone to help translate the this thread to the nice format.
[Xperia Play Android Development] netorino:
I'm surprised that tony hawk pro skater is in all of those lists. I can't even get proper polygons on the character selection (with and without the mod) and it crashes as soon as I enter a map.

I don't think it's the version of crash I used because other games I've converted are perfect.
[Xperia Play Android Development] Nhialor:
After beating the Arcade mode of Tekken 3, the game crashes, anyone else notice this?
[Xperia Play Android Development] edokassiah:
lol success thanks chief i only had a chance to try out one game which was marvel vs street fighter i got it to boot but when i try to ply anything itll say loading then itll crash and take me back to the game home screen atleast i know how to do it now ima keep messing with it
[Xperia Play Android Development] crono141:
Seriously? First of all, the native emulator is a Ps1 emulator. So to run ps2 games, you'd need to write a ps2 emulator from scratch. 2nd, if you had a ps2 emulator, the phone doesn't have anywhere close to the capabilities of running it. It's been almost 10 years since the ps2 came out, and the best pc emulator on the highest end hardware NOW can't even emulate it well.
[Xperia Play Android Development] Alexander33:
Ok i didn't thought about the emulator for ps1 but the phones specs are far better than a PS2 specs for example the CPU of the PS2 has 300Mghz and the phone has 1024Mghz and 32MB RAM that the Phone has 512MB RAM

http://en.wikipedia.org/wiki/PlayStation_2#Technical_specifications
[Xperia Play Android Development] arcticmedia:
That doesn't mean squad if that was the case we could run a ps2 emulator on old Pentium 3's or even the Pentium 2 generation.

All commands need to be emulated so that means all hardware and hardware instructions need to be emulated. A dualcore is a min to run the last game smoothest ( on pc ). The xperia play has only one core.

I know where you are getting to but it's not possible on current generation phones

Just have to wait :)
[Xperia Play Android Development] TheVicious:
And remember of diffrent architecture! PS2 have been build only to play games and movies, but phone is phone, wifi transmiter and many more! Structure of procesor is diffrent too - ps2 have a 64bit processor (I don't know what kind of procesor is in Xperia). Soo mghz is not equal to mghz.

About emulator in ver. 1.0.2 is any way to make it ?
[Xperia Play Android Development] ncaissie:
PS2 games can and may get ported by Sony. For instance GOW collection on the PS3 and the new PSP GOW collection going to the PS3. I'm keeping my fingers crossed. I have the PSP GOW games so I would love GOW 1,2 and maybe 3 on the play. Of course 3 would be stripped down or compressed to ****. I know there is no chance for 3 but 1 and 2 could get ported. :D
[Xperia Play Android Development] ncaissie:
That doesn't mean Sony wont port some games. Ported games do not run in an emulator. Also you are talking about emulators built by homebrew. If Sony built it they could probably do it no problem. No offence but you have no idea what SE has planned for this phone.

Yes I’m a Sony Fanboy. ;)
[Xperia Play Android Development] kingvillain:
Yes, after the fmv you hear "the king of iron fist tournaments", thats it then just black screen and no response.
[Xperia Play Android Development] Logseman:
Neither do you.
[Xperia Play Android Development] ncaissie:
Nope. But I can dream. :p
[Xperia Play Android Development] crono141:
You're also an idiot. Sony can't even emulate ps2 thru software on the PS3. Are you suggesting that the Xperia Play is more capable than the PS3?

Seriously people, use your brains here.
[Xperia Play Android Development] TheVicious:
The truth is Sony are fight with everyone who want to make ps2 emulator because - PS2 still have a good record in sales ! PS 2 is out of Xperia Play - mayby on Xperia Play 2...
[Xperia Play Android Development] Cat_On_Droid:
I played around with the preferences. Xml in ucc folder. If you make and set bootlean SPUIRQ to true the game crashes and won't start. I tried this to make fmv play on ffix. Apk and ZPAKS bypass ppf patches and antipircAy it seems. Don't forget you need to make your own bootlean

Tomorrow you will get 2 results for

"Can I play a game that has a anti piracy set like Spyro 1 NTSC? I "

'Games like harreh potta won't start and are stuck in beginning in Fpse

Edit1 :small edit but harreh potta without SW rendering doesn't work. Will try again with Pal and so rendering. What does this mean? Games who have startup issues In fpse will persist with psxperia, will try again though

All done from UK crash
[Xperia Play Android Development] JasonKnight:
I do not have this problem, mine works flawlessly.
[Xperia Play Android Development] nscxp2005:
What version of crash are you using and what region are the games you are testing from?
[Xperia Play Android Development] Nhialor:
What are you using? Crash 1.02? Ripped ISO or d/ld?
[Xperia Play Android Development] ncaissie:
No, you are an idiot. Who said anything about the PS3? If you are referring to them not emulating on the PS3 then you’re wrong because I have two PS3s with PS2 BC through software emulation. So what are you talking about the PS3 for?

Don't start slinging insults if you don't know what you are talking about.

Edit:

BTW Sony removed BC so that they could sell the re-mastered games like God of War, Sly Cooper, ICO and Prince of Persia. That is common sense.
[Xperia Play Android Development] Nhialor:
Has anyone finished Tekken 3 Arcade Mode and managed to view what happens after the charachters cut scenes?