FORUMS
Remove All Ads from XDA

Editing the Xperia Play (slide open) app

13 posts
Thanks Meter: 15
 
By deepestblue, Junior Member on 4th June 2011, 08:21 PM
Post Reply Email Thread
12th June 2011, 03:23 PM |#11  
OP Junior Member
Thanks Meter: 15
 
More
Quote:
Originally Posted by AndroHero

Maybe an app along the lines of ninjamorph but more dedicated to editing the android mainifest

Sent from my R800i using Tapatalk

Hi, I tried ninjamorph but it didn't actually decompile the the android manifest...

However apktool did!

So, it's a simple matter of copying your apk, decompile with apktool, add the xperia play optimized tag, recompile with apktool and then install

It's a much quicker process than it sounds, and to add the tag to an app in total takes about 15 mins with install...

If anyone wants step by step instructions let me know!

It's so much better having the apps you want in the launcher....
13th June 2011, 12:54 AM |#12  
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by deepestblue

Hi, I tried ninjamorph but it didn't actually decompile the the android manifest...

However apktool did!

So, it's a simple matter of copying your apk, decompile with apktool, add the xperia play optimized tag, recompile with apktool and then install

It's a much quicker process than it sounds, and to add the tag to an app in total takes about 15 mins with install...

If anyone wants step by step instructions let me know!

It's so much better having the apps you want in the launcher....

If it isnt too much trouble,could you please post the step by step process. I would greatly appreciate it.
The Following User Says Thank You to g9man For This Useful Post: [ View ] Gift g9man Ad-Free
13th June 2011, 06:20 PM |#13  
Logseman's Avatar
Senior Member
Flag Tenerife
Thanks Meter: 655
 
Donate to Me
More
I picked the Xperia Play Camera Mod app, courtesy of Zoop57, to tinker a bit. svenk's suggestion left me with this error:

Code:
C:\Users\Logseman\Downloads\seb.camera.mod-1\AndroidManifest.xml:46: error: Error: No resource found that matches the given name (at 'resource' with value '@drawable/icon').
and some others chained to it. I presume we need to add something more than that line? This is the first time I actually use apktool, so I can perfectly have missed something.
13th June 2011, 09:20 PM |#14  
svenk919's Avatar
Senior Member
Flag Enschede
Thanks Meter: 62
 
Donate to Me
More
apk tool should give a "res" map, if you have folders like: "drawable-h/m/ldpi" look into it, mostly it has an icon named "icon.png" but it could be named different with the camera app, if it is different change the icon '@drawable/icon' to what the file is named in the camera app. If such folders don't exist you probably have to chancgte the '@drawable' part to.

PS.

I think the line of code in case of the camera app should be:

Code:
<meta-data android:name="xperiaplayoptimized_content" android:resource="@drawable/ic_launcher_camera" />
13th June 2011, 09:44 PM |#15  
Logseman's Avatar
Senior Member
Flag Tenerife
Thanks Meter: 655
 
Donate to Me
More
I managed to build the app using "@drawable/ic_launcher_camera" in that field. However, after installing it, it won't show in the Xperia Play launcher with the games. Moreover, I decoded fifa.apk, which does appear in the launcher as Fifa 10, and it doesn't show that line on the Manifest:


Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="1034" android:versionName="1.0.34" package="com.eamobile.Fifa"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="com.android.vending.CHECK_LICENSE" />
    <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
    <application android:label="@string/app_name" android:icon="@drawable/icon">
        <activity android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:name=".Fifa" android:launchMode="singleTask" android:screenOrientation="landscape" android:configChanges="keyboardHidden|orientation">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    <uses-sdk android:minSdkVersion="3" />
</manifest>
13th June 2011, 09:48 PM |#16  
svenk919's Avatar
Senior Member
Flag Enschede
Thanks Meter: 62
 
Donate to Me
More
Did you reboot the phone? The launcher doesn't refresh its database all the time. The line was there with the happy vikings game and it did work to add my touchpadtester app to my launcher.
13th June 2011, 10:13 PM |#17  
Logseman's Avatar
Senior Member
Flag Tenerife
Thanks Meter: 655
 
Donate to Me
More
I've uninstalled the app, reinstalled it, opened it, closed it and rebooted the phone to no avail. It won't show in the menu.
13th June 2011, 10:38 PM |#18  
svenk919's Avatar
Senior Member
Flag Enschede
Thanks Meter: 62
 
Donate to Me
More
Does the camera app uses sdk version 9 or later? It should be stated in the manifest. Probably the xperia play optimized tag only works since android 2.3.2.
13th June 2011, 11:01 PM |#19  
Logseman's Avatar
Senior Member
Flag Tenerife
Thanks Meter: 655
 
Donate to Me
More
Quote:
Originally Posted by svenk919

Does the camera app uses sdk version 9 or later? It should be stated in the manifest. Probably the xperia play optimized tag only works since android 2.3.2.

Hmmm... Zoop mentioned that he grabbed the latest source, so it should be 2.3.4.

Here's the manifest of his camera mod:

Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="5" android:versionName="5" package="seb.camera.mod"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <original-package android:name="com.android.camera" />
    <uses-sdk android:minSdkVersion="9" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.SET_WALLPAPER" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_SMS" />
    <application android:label="Camera Mod" android:icon="@drawable/ic_launcher_camera" android:taskAffinity="">
        <receiver android:name="com.android.camera.CameraButtonIntentReceiver">
            <intent-filter>
                <action android:name="android.intent.action.CAMERA_BUTTON" />
            </intent-filter>
        </receiver>
        <activity android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:name="com.android.camera.Camera" android:taskAffinity="android.task.camera" android:clearTaskOnLaunch="true" android:screenOrientation="landscape" android:configChanges="keyboardHidden|orientation">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.media.action.IMAGE_CAPTURE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.media.action.STILL_IMAGE_CAMERA" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:label="@string/video_camera_label" android:icon="@drawable/ic_launcher_video_camera" android:name="com.android.camera.VideoCamera" android:taskAffinity="android.task.camcorder" android:clearTaskOnLaunch="true" android:screenOrientation="landscape" android:configChanges="keyboardHidden|orientation">
            <intent-filter>
                <action android:name="android.media.action.VIDEO_CAMERA" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.media.action.VIDEO_CAPTURE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
    </application>
</manifest>
14th June 2011, 01:12 AM |#20  
svenk919's Avatar
Senior Member
Flag Enschede
Thanks Meter: 62
 
Donate to Me
More
This is the manifest of my touchpad app:

Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest package="test.play.controls"
  xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.2" android:versionCode="2">
    <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="9" />
    <application android:label="@string/app_name" android:icon="@drawable/icon">
        <activity android:label="@string/app_name" android:name="android.app.NativeActivity" android:launchMode="singleInstance" android:screenOrientation="landscape" android:configChanges="keyboardHidden|orientation">
            <meta-data android:name="android.app.lib_name" android:value="touchpadndk" />
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
      	<meta-data android:name="xperiaplayoptimized_content" android:resource="@drawable/launchericon" />
    </application>
</manifest>
14th June 2011, 02:06 PM |#21  
OP Junior Member
Thanks Meter: 15
 
More
Ok, here is a step by step guide I have tried to keep it as simple and straight forward as possible…

The good news is you don't even need root, to get your apps in the launcher!
Those with root can keep the save data from edited apps, those without will lose save data.

Every app, I have tried works! The only app, which didn't was ScummVM due to an integrity check! There is alternative version of ScummVM you can use though (which I think is better anywho)!

You need the following installed:


File Expert *
https://market.android.com/details?i...=search_result
Titanium Backup * (required for backing up save data of the app you are editing - root only)
https://market.android.com/details?i...=search_result
QuickSSHd *
https://market.android.com/details?i...=search_result
ZipSigner 2
https://market.android.com/details?i...=search_result

-

Apktool (Mac / Linux)
http://code.google.com/p/android-apktool/

OR

ApkManager (Windows / Linux)
http://forum.xda-developers.com/showthread.php?t=695701

-

Smultron (Mac / Linux) *
http://sourceforge.net/projects/smultron/

OR

Notepad ++ (Windows) *
http://notepad-plus-plus.org/


(* Optional, you can use alternatives)

=================================================

Ok, so here goes the guide if you get stuck or need help just ask….
You could also no doubt skip some steps, or do things differently so feel free to tweak the guide

1. Open File Expert and click on the app tab, backup the apps you wish to edit…. The app files, .apk - will be saved in a folder called backup_apps on your SD card.

2. (ROOT ONLY STEP) Open up Titanium Backup - first backup the apps - (this will allow you to restore the saved data later on)… Then remove the apps…

3. Copy the apps to your computer…. For this I use QuickSSHd

4. Install Apktool (Mac / Linux) or ApkManager (Windows / Linux)

4a) Use Apktool or ApkManager to decompile the app

There is a nice youtube video of ApkManager (Windows / Linux) here:
http://www.youtube.com/watch?v=dkQVX...eature=related

Also, here is a great guide to using Apktool (Mac / Linux) here:
http://forum.xda-developers.com/showthread.php?t=916814

5. You should now have a nice decompiled app, go to the folder and open up AndroidManifest.xml - using either Smultron (Mac / Linux) or Notepad ++ (Windows)

6. Edit the manifest…. I found Apktool sometimes didn't like certain changes…. So instead of adding a line I replaced lines which where not needed…. For example in the excellent emulators by Yongzh here is what the manifest looks like:

Code:
            </intent-filter>
        </activity>
        <service android:name="EmulatorService" android:process=":emulator" />
    </application>
</manifest>
replace

Code:
<service android:name="EmulatorService" android:process=":emulator" />
with this line

Code:
<meta-data android:name="xperiaplayoptimized_content" android:resource="@drawable/icon" />
so it now looks like

Code:
            </intent-filter>
        </activity>
        <meta-data android:name="xperiaplayoptimized_content" android:resource="@drawable/icon" />
    </application>
</manifest>
6. Part of the problem of adding this line however is that you need to add some extra files inside the 'res' folder.
Go to the res folder and create three new folders, called:
drawable-hdpi
drawable-ldpi
drawable-mdpi

7. Go to the drawable folder and copy the app icon, then go to the drawable-hdpi and paste the app icon renaming it icon.png, paste the image once more this time renaming it launchericon.png…. Paste a further copy of icon.png in both drawable-ldpi and drawable-mdpi

8. Recompile the app using Apktool or Apkmanager….

9. Complete steps 4-8 with each apk you wish to show in the launcher….

10. Copy the edited apk files back to your Xperia Play, in a folder called changed… within that folder create another folder called permissions (this just makes it easier to find your correct files)…

11. Open the Zipsigner app, select the input file from the changed folder and select the signed out for the permissions folder. Make sure that under the key/mode auto-testkey is selected and click sign the file.

12. Repeat this process for each app

13. Reboot your Xperia play - this step is needed as android will notice that your are attempting to install an app which is the same as a previous installed app, only that the signatures don't match! By rebooting it will clear the remnants of those old files!

14. Open File Expert and go to the permissions folder and install your newly modified apps! They should now show in the launcher, if it doesn't kill the launcher app and reopen it!

15. (ROOT ONLY STEP) Go back to Titanium Backup and restore your app data only!

That's it, sit back and enjoy your launcher showing the apps you want! Oh, to remove the stock apps, simply back them up with Titanium Backup and then remove them... Open up the launcher and they will now be gone!
The Following 11 Users Say Thank You to deepestblue For This Useful Post: [ View ] Gift deepestblue Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes