yashsingh1/xdaforums huggingface dataset:
[Xperia Play Android Development] Logseman:
I'm sure there'll be no need to break a sweat about this.

LOL @ashergray's sig :D
[Xperia Play Android Development] ashergray:
I figured I earned it. I was for about 20 minutes the only unlocked R800x.

That felt pretty awesome.
[Xperia Play Android Development] yifanlu:
So I have extracted ALL the encrypted files now, this means libdefault.so, image_ps_toc, and ps1_rom.bin. It was pretty hard because it was obfuscated in memory, but I got it using another, unorthodox method. Now, here's the weird thing. I can't figure out how the PS1 bios works. It's not a copy of any of the BIOS floating around the internet, in fact, it's not even the same format (all the bios that can be found on the internet have a similar structure). In addition, I still can't figure out what image_ps_toc is for. If anyone wants to take a look at these files for me (I've already decrypted them, you're welcome), PM me.

EDIT: I spoke too soon, I found out that the PS1 ROM is actually part of the PS2 BIOS. Yea, wtf. It seems to be using the PS1 emulator bios from the PS2, or something like that. Now, to find what the toc file is.
[Xperia Play Android Development] Blagus:
TOC maybe contains sub-channel data, known from original PSX CD-s, which served in copy-protection mechanism?
[Xperia Play Android Development] yifanlu:
I've been trying to find some information on the PSX iso format, like what's at the different offset, where checksums are, where the executable starts, etc, but google isn't helping. Can you tell me more about this? If this copy protection thing is true, that means every game has a different libjava-activity.so. Could someone with another game pm me with /data/data/packagename/libs/libjava-activity.so where package name starts with com.sony and ends with the titleld? Also, Blagus, if you want, I can let you take a look at the decrypted toc files.
[Xperia Play Android Development] Blagus:
You may want to download original Crash PSX image in CloneCD format, which comes with CUE, IMG and SUB files. Check the SUB file size, if it's approximate to TOC fle, then it might be worth downloading it.
[Xperia Play Android Development] yifanlu:
I made an image using CloneCD and looked at the subdata file. It's 25MB uncompressed and 4MB compressed. The TOC file is 67KB, so I don't think that's it.
[Xperia Play Android Development] ashergray:
maybe it stands for Table Of Contents.

sort of a way to keep track of all the files within the package.
[Xperia Play Android Development] yifanlu:
It seems like a license or license check. I used the libjava-activity for another game, and it said could not authenticate the licensed content.
[Xperia Play Android Development] m3dteam:
I am still getting "This is apk is not a valid one" error, I am sure that I got the right game (First UK XPlay)

Still how are you loading the wraper library?
[Xperia Play Android Development] Nhialor:
use the gui, shouldn't be a problem then mate...
[Xperia Play Android Development] :
same here, the tool cant find the java files even though they are in my path.

PSXperiaTool initialized, outputting to: C:\Documents and Settings\Admin\Des

ktop\dev\PSXXPERIA\.\output

Starting build.

Checking to make sure all files are there.

[D] Done checking data.

Creating temporary directory.

[D] Created temporary directory at, .\.psxperia.262

Copying icon if needed.

Replacing strings.

[D] Replacing strings in XML data.

[D] Writing to temporary file: .\.psxperia.262\assets\AndroidManifest.xml.tmp

[D] Successfully cleaned up and done with string replacement.

[D] Writing to temporary file: .\.psxperia.262\assets\ZPAK\metadata.xml.tmp

[D] Successfully cleaned up and done with string replacement.

[D] Writing to temporary file: .\.psxperia.262\res\values\strings.xml.tmp

[D] Successfully cleaned up and done with string replacement.

[D] Writing to temporary file: .\.psxperia.262\ZPAK\metadata.xml.tmp

[D] Successfully cleaned up and done with string replacement.

[D] Done with string replacement.

[D] Done replacing strings.

Generating PSImage.

Beginning PSImage compression.

Generating image TOC.

[D] Done generating PSImage

Generating ZPAK.

Generating zpak file from directory .\.psxperia.262\ZPAK with compression =

false

[D] Done with ZPAK creation.

[D] Done generating ZPAK at .\.psxperia.262\NCXA61354_1.zpak

Generating default ZPAK.

Generating zpak file from directory .\.psxperia.262\assets\ZPAK with compres

sion = true

[D] Done with ZPAK creation.

[D] Done generating default ZPAK at .\.psxperia.262\assets\NCXA61354_1.zpak

Done processing, generating output.

[D] Moving files around.

[D] Running command: [aapt package -f -F C:\Documents and Settings\Admin\Desktop

\dev\PSXXPERIA\.\output\com.sony.playstation.NCXA61354_1.apk -S .\.psxperia.262\

res -M .\.psxperia.262\assets\AndroidManifest.xml -I .\android-framework.jar .\.

psxperia.262]

[D] Running command: [jarsigner -keystore .\signApk -storepass password -keypass

password -signedjar C:\Documents and Settings\Admin\Desktop\dev\PSXXPERIA\.\out

put\com.sony.playstation.NCXA61354_1.apk.signed C:\Documents and Settings\Admin\

Desktop\dev\PSXXPERIA\.\output\com.sony.playstation.NCXA61354_1.apk signPSXperia

]

[D] Error: Could not find or load main class sun.security.tools.JarSigner

[E] Cannot build APK!

java.io.IOException: Executable did not return without error.

at com.yifanlu.PSXperiaTool.PSXperiaTool.runCmdWithOutput(PSXperiaTool.j

ava:282)

at com.yifanlu.PSXperiaTool.PSXperiaTool.generateOutput(PSXperiaTool.jav

a:259)

at com.yifanlu.PSXperiaTool.PSXperiaTool.startBuild(PSXperiaTool.java:61

)

at com.yifanlu.PSXperiaTool.Interface.GUI$12.run(GUI.java:693)

at java.lang.Thread.run(Unknown Source)
[Xperia Play Android Development] Nhialor:
i think i have mine sorted...! yup, just finished. ok, got to ur enviroment varibales, and copy the path to your android sdk/platform-tools and then put a ; no space and then the location of the java.exe. restart the computer and you should be ok to go! The space was screwing me over!
[Xperia Play Android Development] m3dteam:
To everyone who is complaining that the tool could not find aapt, here is how to check if it is in path:

open command prompt(start->run->cmd) or shell

type:

aapt

jarsigner

if you get "'XXX' is not recognized as an internal or external command,

operable program or batch file."

then either you don't have it or it is not in your system path. aapt is in android sdk, and jarsigner is in java JDK

to add something to your system path, GOOGLE it!!!!! it is not a simple copy and past
[Xperia Play Android Development] :
I was banging my head against the wall until I read your post, this isnt my first time messing with java ;)

It was only until I rebooted my computer that it started working. Of all things!! :rolleyes:
[Xperia Play Android Development] arcticmedia:
I am only having trouble with

C:\Users\arcticmedia>jarsigner
Error: Could not find or load main class sun.security.tools.JarSigner

googled the error but no luck :mad:
[Xperia Play Android Development] Nhialor:
try my fix, i am now able to install all files etc...however, now they don't run, just crash within seconds of opening
[Xperia Play Android Development] Nhialor:
same here,

apk builds etc, but once the game is launched, it closes right away! :(
[Xperia Play Android Development] arcticmedia:
I tried a diffrent method for signing the apk since the jarsigner won't work

I used the command

java -jar signapk.jar certificate.pem key.pk8 com.sony.playstation
.NCXA00000_1.apk test.apk

then the apk would install just fine to it opens the emulator but crashes within seconds aswell seems we are in the same boat only using diffrent methods

I tried renaming the final input since it's 2x same name and used this command

C:\psx>jarsigner -keystore .\signApk -storepass password -keypasspassword -signe
djar C:\psx\.\output\com.sony.playstation.NCXA00000_1.apk.signedC:\psx\.\output\
com.sony.playstation.NCXA00000_11.apk signPSXperia
Error: Could not find or load main class sun.security.tools.JarSigner

Still no luck

Guess we have to wait for Yifan Lu to sort it out already great progress though ! :) The bounty will be his for sure
[Xperia Play Android Development] yifanlu:
If it's crashing on load, PLeASe post the logcat output for when the app is launched to when it crashes. Also try using default setting (don't change name, titleid, icon, anything).
[Xperia Play Android Development] icebear8:
you getting pretty famous yifanlu

http://dvice.com/archives/2011/08/this-is-why-a-p.php

idk what i would do if i was the talk of the town lol
[Xperia Play Android Development] Croccy22:
Link to Beta2 download not working anymore :(. Can anyone re-upload somewhere?

EDIT:

Link has changed https://github.com/downloads/yifanlu/PSXperia/psxperiatool-beta-2.zip
[Xperia Play Android Development] subcu1ture:
Can we start a thread with the successful games converted ?
[Xperia Play Android Development] nextria:
hey,

after some hours of figering out to get the aapt.exe and the jarsinger to work.

I now get a error while extracting the files:

This APK is not a known valid one. The extractor will continue, but may get errors later on.

when i try to make a conver a game it gives me no errors but when i try to install the apk it just tells me aplication not installed.

I have the option enabled for installing apps from other places.

can someone help me with this ?
[Xperia Play Android Development] nscxp2005:
I can't find aapk in my Android SDK. I have found aapt.

Will that work or do I just rename it to aapk?

Thanks

NSCXP2005
[Xperia Play Android Development] Red_Kop:
WOW!!!

This is great.

Probably out of my technical reach just yet (I'm an idiot) but when its as simple as few clicks I'll be there, this is great.

Thankyou for all your hard work, it is very much appreciated. Can't wait to use it, hopefully will remedy a couple of games that FPSE has problems with.

BIG THANKS!!!
[Xperia Play Android Development] muhski:
No, don't rename anything!

aapt.exe is the right one ;-)

BTW this is what your GUI puts out for extracting the .apk:

Verifying files

[W] This APK is not a known valid one. The extractor will continue, but you may

get errors later on.

Decoding values

Aug 11, 2011 11:31:25 AM brut.androlib.res.AndrolibResources loadMainPkg

Information: Loading resource table...

Aug 11, 2011 11:31:25 AM brut.androlib.res.AndrolibResources loadMainPkg

Information: Loaded.

Aug 11, 2011 11:31:25 AM brut.androlib.res.AndrolibResources loadFrameworkPkg

Information: Loading resource table from file: C:\Users\Mazzel\apktool\framework

\1.apk

Aug 11, 2011 11:31:30 AM brut.androlib.res.AndrolibResources loadFrameworkPkg

Information: Loaded.

Aug 11, 2011 11:31:30 AM brut.androlib.res.AndrolibResources decode

Information: Decoding file-resources...

Aug 11, 2011 11:31:30 AM brut.androlib.res.AndrolibResources decode

Information: Decoding values*/* XMLs...

Aug 11, 2011 11:31:30 AM brut.androlib.res.AndrolibResources decode

Information: Done.

Extracting APK

Extracting ZIP file: L:\java\Beta2\com.sony.playstation.ncea00344_1.apk to:

L:\java\Beta2\.\data

[D] Done extracting ZIP.

Extracting ZPAKS

Extracting ZIP file: L:\java\Beta2\.\data\assets\NCEA00344_1_1.zpak to: L:\j

ava\Beta2\.\data\assets\ZPAK

[D] Done extracting ZIP.

Extracting ZIP file: L:\java\Beta2\NCEA00344_1_1.zpak to: L:\java\Beta2\.\da

ta\ZPAK

[D] Done extracting ZIP.

Removing unneeded files.

Adding new files.

Patching XML strings with tags.

[D] Replacing strings in XML data.

[D] Writing to temporary file: L:\java\Beta2\.\data\assets\AndroidManifest.xml.t

mp

[D] Successfully cleaned up and done with string replacement.

[D] Writing to temporary file: L:\java\Beta2\.\data\assets\ZPAK\metadata.xml.tmp

[D] Successfully cleaned up and done with string replacement.

[D] Writing to temporary file: L:\java\Beta2\.\data\res\values\strings.xml.tmp

[D] Successfully cleaned up and done with string replacement.

[D] Writing to temporary file: L:\java\Beta2\.\data\ZPAK\metadata.xml.tmp

[D] Successfully cleaned up and done with string replacement.

[D] Done with string replacement.

Done.

And this is my LogCat when I try to install the new .apk on pastebin:

http://pastebin.com/g4fKiMNV
[Xperia Play Android Development] nscxp2005:
ok, I'm on Ubuntu Linux.

The only problem I have now is I start up the GUI with

java -jar PSXperiaTool.jar

It runs, I accept the terms and it wont let me do anything else.

I can't access the Extract tab or the Convert tab.

Do you know what is wrong?

Thanks

NSCXP2005
[Xperia Play Android Development] Laberkopf:
Read the text carefully.

Failure [INSTALL_FAILED_INVALID_APK]

Damned -.-
[Xperia Play Android Development] nextria:
You have to hilight his name in the box above.

:P
[Xperia Play Android Development] Red_Kop:
Read the last line of the main paragraph.
[Xperia Play Android Development] nscxp2005:
Ahh, OK.

Thanks
[Xperia Play Android Development] Dousan:
Same here though i'm on windws xp, have set my variables, but no game yet?

Have googled how to set system path's and think i've done it right.

Wrote this in a cmd: echo %aapt% and it returned a path i pasted in a new system path. Did the same with jarsigner and java. Rebooted and still nothing when i open psxperiatool-gui-windows but 4 boxes i can tick, nothing else responds :confused:

Regards Dousan...

e: lol rofl noob me o.O
[Xperia Play Android Development] bubblegumballoon:
Some help for a common error:

Ok if the tools says the apk is not valid and it may cause problems later on thats fine, I had exactly the same error and It still worked for me.

If the tool has trouble making the apk and is complaining about "aapk" then you need to download and install the android sdk and move the aapk tool from the sdk to your system path. Im not sure how to find your system path on windows but I know on Mac you just type $PATH into the terminal, this may work for linux as well.

if you enable analog controls the game your using must support it!

when you choose an image for the game it must be a 170x170 png file.

hope this helps somebody
[Xperia Play Android Development] Laberkopf:
The phone says apk not valid..
[Xperia Play Android Development] muhski:
It seems like on Windows that the APK gets not signed, so Android rejects it...

I think it has something to do with jarsigner, but I have absolutely no clue with this java stuff :(

BTW: The file on Win-Systems is called AAPT not AAPK. Is it the same on MAc?

I think we have a WIN-Problem here, because it seems to work on Mac...
[Xperia Play Android Development] bubblegumballoon:
hmm with the command line tools everything worked fine even with the error, but now with the GUI tool is hangs after it gives me the error and then it deletes all the files in my psxperia folder. very odd...

I would encourage people to try both the command line tools and the gui to see what sort of result you get.
[Xperia Play Android Development] Alexander33:
You need to sign the apk yourself (use APkTool) tested and it works I managed to install the game and copy the files but when i start the game in closes immediately.

Can someone tell me how to get the logcat?

EDIT: Here it is the LogCat http://pastebin.com/hEkQDPxL
[Xperia Play Android Development] Croccy22:
Using Windows XP.

Get message when extracting the APK saying that it is not a known APK.

Everything then continues with no errors. Get a signed APK file at the end of it. Install the APK and copy the data folder but when I launch it just exits.

Are there different versions on the Crash APK? I have a UK Xperia and my Crash Version is 1.01

I have noticed that my other games have all been updated to 1.02?

Matt.
[Xperia Play Android Development] shotgunfool:
The Tool converts the .img file perfectly into an apk for me, no errors loading no errors converting,

transfer the apk to my phone and it installs fine, but when i go to launch i get an error -

*No content was found on the SD Card. Check the SD card, or download this content again*

Any ideas on what iv done wrong?

Cheers oh and this is the cmd print of the file conversion incase there is an error in it for some reason

[I] PSXperiaTool initialized, outputting to: C:\Users\Oscar\Desktop\psxperiatool
-beta-2\.\output
[I] Starting build.
[I] Checking to make sure all files are there.
[D] Done checking data.
[I] Creating temporary directory.
[D] Created temporary directory at, .\.psxperia.829
[I] Copying icon if needed.
[I] Replacing strings.
[D] Replacing strings in XML data.
[D] Writing to temporary file: .\.psxperia.829\assets\AndroidManifest.xml.tmp
[D] Successfully cleaned up and done with string replacement.
[D] Writing to temporary file: .\.psxperia.829\assets\ZPAK\metadata.xml.tmp
[D] Successfully cleaned up and done with string replacement.
[D] Writing to temporary file: .\.psxperia.829\res\values\strings.xml.tmp
[D] Successfully cleaned up and done with string replacement.
[D] Writing to temporary file: .\.psxperia.829\ZPAK\metadata.xml.tmp
[D] Successfully cleaned up and done with string replacement.
[D] Done with string replacement.
[D] Done replacing strings.
[I] Generating PSImage.
[I] Beginning PSImage compression.
[I] Generating image TOC.
[D] Done generating PSImage
[I] Generating ZPAK.
[I] Generating zpak file from directory .\.psxperia.829\ZPAK with compression =
false
[D] Done with ZPAK creation.
[D] Done generating ZPAK at .\.psxperia.829\NCXA00000_1.zpak
[I] Generating default ZPAK.
[I] Generating zpak file from directory .\.psxperia.829\assets\ZPAK with compres
sion = true
[D] Done with ZPAK creation.
[D] Done generating default ZPAK at .\.psxperia.829\assets\NCXA00000_1.zpak
[I] Done processing, generating output.
[D] Moving files around.
[D] Running command: [aapt package -f -F C:\Users\Oscar\Desktop\psxperiatool-bet
a-2\.\output\com.sony.playstation.NCXA00000_1.apk -S .\.psxperia.829\res -M .\.p
sxperia.829\assets\AndroidManifest.xml -I .\android-framework.jar .\.psxperia.82
9]
[D] Running command: [jarsigner -keystore .\signApk -storepass password -keypass
password -signedjar C:\Users\Oscar\Desktop\psxperiatool-beta-2\.\output\com.son
y.playstation.NCXA00000_1.apk.signed C:\Users\Oscar\Desktop\psxperiatool-beta-2\
.\output\com.sony.playstation.NCXA00000_1.apk signPSXperia]
[I] Done.
[I] APK file: C:\Users\Oscar\Desktop\psxperiatool-beta-2\.\output\com.sony.plays
tation.NCXA00000_1.apk
[I] Data dir: C:\Users\Oscar\Desktop\psxperiatool-beta-2\.\output\data\com.sony.
playstation.NCXA00000_1\files\content
[I] Deleting temporary directory
[I] Done.
[Xperia Play Android Development] Alexander33:
Did you copy the data folder from the output directory to /sdcard/Android/data on your phone?
[Xperia Play Android Development] bubblegumballoon:
Did you install the game data before running the apk?
[Xperia Play Android Development] shotgunfool:
Thats fixed that problem, now i have an issue where the game starts to load and then just closes, i can see the little playstation pocket loading screen then the app just closes,

Any ideas?

Cheers

Shotgunfool
[Xperia Play Android Development] Croccy22:
The APK Error/Warning I get is when you Extract the Original Crash Bandicoot APK. Which is why I was wondering if there are different version floating around.

After that error everything else works fine. The outputted APK installs fine on the phone and I have copied the data folder to the correct location on the phone.

Still doesn't launch though.

I have now attached my LogCat output to my above post showing my created APK and original Crash Bandicoot APK.

There are a couple of path differences between the two of them (Mine is looking in data for the apk package but the orignal looks in system. After this there seems to be a library file that doesnt get loaded with my APK.

Will keep on playing.

I'm tempted to set up a linux system to try it that way.

Matt.
[Xperia Play Android Development] crono141:
Concerning people with auto closes and others with crummy gameplay. I hate to bring up this possibility, but it seems to me that the emulator we've reverse engineered here is specifically optimized for crash bandicoot. If that is indeed the case, there won't be any fixing of some of these issues.
[Xperia Play Android Development] Nhialor:
dousan, your enviroment variables path to aapt is incorrrect and as such your system can't find it. Go to enviroment variables (Right click computer, properties, advanced system settings, enviroment variables) Then double click on path, add in the location of aapt and java!

you need to restart your computer and you should be good to go.

My path looks like this: C:\Program Files\Android\android-sdk\platform-tools;C:\Program Files\Java\jdk1.6.0_23\bin;

dunno if it makes a difference, but mine wouldn't work with a space between ; and C (where the 2 seperate). A restart is required anyways. :-)

Anyways, crashing on launching game, this is the logcat file: http://pastebin.com/qdjA06wM
[Xperia Play Android Development] Dousan:
Cheers for the quick answer, will try it out and reboot :D

Regards Dousan...
[Xperia Play Android Development] Nhialor:
cool, lemme know if it works!
[Xperia Play Android Development] bubblegumballoon:
Just made a video tutorial to help people use this. its rendering atm so I will post it here when its uploaded to youtube. :)
[Xperia Play Android Development] Nhialor:
was gonna do that, but my upload speed isn't the best
[Xperia Play Android Development] bubblegumballoon:
I tried to explain as best as I could haha. I recorded my desktop and then I recorded installing and using the PS1 games on the phone itself. :)
[Xperia Play Android Development] nscxp2005:
Excellent on the tutorial.

What system is the converter running on? Windows, Linux, Mac?
[Xperia Play Android Development] yifanlu:
Sorry for making you guys modify your PATH variable. A future release will use a built in tool.

For those of you who are getting successful installations, but failures launching (and you didn't modify anything like signing the apk on your own). It may be because the image you're using is ripped incorrectly. What you can do is replace your image.ps AFTER CONVERTING to the one from Crash Bandicoot to check if that's the problem

1) Convert your image and install the APK

2) Extract data/image.ps from NCUA94900_1_1.zpak or NCEA00344_1_1.zpak

3) You need the metadata.xml from your converted zpak, so extract the ZPAK from data/com.sony.playstation.bla/contents/files

4) Replace data/image.ps from the one in crash bandicoot

5) Recompress, make sure you choose "no compression" when generating the zip file. Rename it to the ZPAK and try it.
[Xperia Play Android Development] bubblegumballoon:
Its running on mac but its basically the same on every system. the only differences between each OS is where the path variable is located.
[Xperia Play Android Development] nscxp2005:
OK, cool.

Do you have an ETA on when the Video with be uploaded?

Thanks again

NSCXP2005
[Xperia Play Android Development] yifanlu:
Added some info to the front page:

Troubleshooting

Open a new command line or terminal window. Type in "aapt" and then "jarsigner" if any of those commands return with a "not found" error, you need to modify your system's PATH variable to point to 1) Android SDK's bin, and 2) Java's bin

Try leaving all settings to defaults (game name, title id, etc) and rebuilding

Your ISO may not be ripped correctly, try using a different software, or a dedicated PSX image ripper (google)

PLEASE PM ME IF YOU...

Received no error in creating the APK, but you cannot install it. Also attach the APK in question.

Received an error building the APK, but typing in "aapt" and "jarsigner" on a new command prompt/terminal window doesn't give any errors. Please attach a zip of your ".psxperia.###" (### is a random number) temporary folder found in the same path as the JAR.
[Xperia Play Android Development] bubblegumballoon:
No probs, youtube says it should take 28 minutes to upload.
[Xperia Play Android Development] Nhialor:
I'm sorry man, you've lost me...I have created the apk, installed it fine. I have extracted image.ps from the Crash Bandicoot ZPAK, I have extracted the ZPAK from my converted game...now what?
[Xperia Play Android Development] nscxp2005:
Thanks bubblegumballon.

I look forward to watching the tutorial.