Editing the Xperia Play (slide open) app - Xperia Play Themes and Apps
See Post 21 for guide on how to add modify your apps to appear in the launcher....
Orignal post below...
Hi,
Ok, it really annoyed me that when I flipped open the game pad I could only see the apps Sony Erricson allowed.... I have made some progress on this front, just not a 100% working fix yet
I'm not an expect, so please don't flame me if this is useless info!
Here goes the instructions....
I will warn those who have little skill in editing files this is not for you!
Here is how I added Solitare (free app from the android market) as a test to the Xperia Play Launcher....
First browse to
data/data/com.sonyericsson.semcsuite/databases
copy the to content.db file to your computer
edit the content.db
with SQLite (which you can download for free)
The info you need to edit is under browse data in SQLite, you need the pkg name of the app you want to include inside, as well as the full name of the app you are inserting… I simply replaced an app I wasn't bothered about in the launcher, my assumption would be that you can insert more by following the numbering convention used!
In the cover column you need to use -1 as the cover name and false under the menu...
then save the file
Now reboot the phone open the xperia play app, click on more games…. Then copy over the file…. I copied over the file while on more games….
Then kill the app in the settings (in mine shows as Android System), finally reopen the app and the added applications will show!
You then have the added apps you want in the launcher
Here is a screenshot of the added solitaire app as a test:
imageshack.us/photo/my-images/821/screenshot2zm.png
The big problem I have found so far is that the app very frequently ovewrites the .db For example on reboot or sometimes randomly, so at the moment it's not an actual fix...
I have attempted making the file read only but this crashes the app on opening...
But progress is progress any ideas moving forward? It would be nice to be able to slide open your play and see a bunch of emulators
Chris
AndroHero said:
Look in the database.db file in /data/data/com.sonyericsson.semcsuite/database
Sent from my R800i using Tapatalk
Click to expand...
Click to collapse
i told them all they needed to edit the database.db but no1 beleved me lol
AndroHero said:
i told them all they needed to edit the database.db but no1 beleved me lol
Click to expand...
Click to collapse
Just found your old thread, damn could have been here sooner! Oh, well progress still made
So much better knowing I can slide open my play and see all my emulators!
I've found out that once you get the hacked.db file on the play and get it to open correctly provide you press the home button and not the back button then it stays put Hopefully it should stay in place unless I accidently quit the app or need to reboot!
Still not a permanant fix, but close enough until we figure out how to stop the app replacing the edited file!
Here are two new screenshots completed with emulators hehe
imageshack.us/photo/my-images/853/screenshotye.png/
imageshack.us/photo/my-images/200/screenshot1kv.png/
The only downside is that the app blows up the icon of the edited in app, so it looks a bit pixelated - but I really don't care about that!
Chris
deepestblue said:
Just found your old thread, damn could have been here sooner! Oh, well progress still made
So much better knowing I can slide open my play and see all my emulators!
I've found out that once you get the hacked.db file on the play and get it to open correctly provide you press the home button and not the back button then it stays put Hopefully it should stay in place unless I accidently quit the app or need to reboot!
Still not a permanant fix, but close enough until we figure out how to stop the app replacing the edited file!
Here are two new screenshots completed with emulators hehe
imageshack.us/photo/my-images/853/screenshotye.png/
imageshack.us/photo/my-images/200/screenshot1kv.png/
The only downside is that the app blows up the icon of the edited in app, so it looks a bit pixelated - but I really don't care about that!
Chris
Click to expand...
Click to collapse
that looks really cool maybe a line in one of the .xml files can be changed in the .apk to get it to read from a diffrent (modded) file, then it dosent matter if it rewrites the database.db file
Could the whole db edition be done through an app?
Yes, we know, this is nothing new. We've already known about this for weeks. The problem of course is that it has to be populated manually. We've been searching for a way to do this automatically just by looking at how it works and doing what needs to be done to tell it "hey, I should be on this list" whenever it rebuilds the database.
Well so far good news, the xperia play app has yet to overwrite the file, so I guess leaving it the app open and not quiting, is possibly a very good temporary solution.
AndroHero said:
that looks really cool maybe a line in one of the .xml files can be changed in the .apk to get it to read from a diffrent (modded) file, then it dosent matter if it rewrites the database.db file
Click to expand...
Click to collapse
Unfortunately, after taking a look at the xml files no joy
There doesn't seem to be any reffrence to writing to the .db or that location...
Within the apk, there is a searchable.xml file though where the app is asking to search. So, possibly changing this so it searches for something else? hmm
The problem is if you change it to something else then I assume it would create a blank .db file! LOL But this might be a way forward... Feel free to take a look at the included xml file of the launcher here:
mediafire.com/?2eqtw1f0358omp2
Logseman said:
Could the whole db edition be done through an app?
Click to expand...
Click to collapse
Probably, if someone wanted to create such an app... But editing the .db file is not so hard, provided you are not wanting to change things all the time! I'd write up step by step instructions, so it should be fairly easy...
The problem at the moment is that it is not a full solution to our problem...
zerojay said:
Yes, we know, this is nothing new. We've already known about this for weeks. The problem of course is that it has to be populated manually. We've been searching for a way to do this automatically just by looking at how it works and doing what needs to be done to tell it "hey, I should be on this list" whenever it rebuilds the database.
Click to expand...
Click to collapse
I've had a scan though the past posts, and yes your right the .db file was known about for weeks... But unfortunately not followed though, no one actually attempted to edit the .db file nor get the edited file to work or at least not that I can see.... It's a shame really as we could have been here sooner...
Actually, I have an idea of how the app decides what should go into the database... I believe it is rather simple how the app works... The app will search installed apk, then my assumption would be that it would look at the AndroidManifest.xml of said installed apps for an xperiaplayoptimized_content tag.
An xperiaplayoptimized_content tag can be seen in the AndoridManifest.xml of two free apps on the market Cyberlords - Arcology, Happy Vikings.... I've not checked any other apps from the market, but please check more - maybe I'm wrong .
The problem is if this is how the app works and is needed in every app, it would mean adding to evey app we wanted to be included in the launcher and removing from every app we did not want to appear in the launcher, sigh...
I suppose if someone wants they could check this for certain by adding an xperiaplayoptimized_content tag to an app or removing the tag from an app and seeing what happens...
So, I'm thinking three possible options? Unless any can think of any further solutions?
a) Change how the Xperia Play app searches - possibly by editing the searchable.xml file - although I'm not sure what to change the search to?
b) Add the xperiaplayoptimized_content tag to every maifest of every app we want included - that's also, assuming xperiaplayoptimized_content is the correct tag!
c) Leave things as they are - you just lose the changed .db file on reboot or when you close the application by mistake. Perhaps even a simple app to replace .db file when this happens?
Sigh, so much work/effort for something simple - damn you Sony Erricson! LOL
Chris
Hurray, it works
Added this line:
Code:
<meta-data android:name="xperiaplayoptimized_content" android:resource="@drawable/icon" />
right before:
Code:
</application>
you can probably use the @drawable to make it any icon you want.
The happy viking game uses a resolution of 170*170 I believe.
Now is there anyone with the skills to have the android manifests modified of allready installed apps with a nice menu where you could select wich app you want to have the line added to the manifest? If that's possible at all.
Edit: updated the app I use for testing stuff so it shows up in the game launcher: http://forum.xda-developers.com/showthread.php?p=14451093#post14451093
svenk919 said:
Hurray, it works
Added this line:
Code:
<meta-data android:name="xperiaplayoptimized_content" android:resource="@drawable/icon" />
right before:
Code:
</application>
you can probably use the @drawable to make it any icon you want.
The happy viking game uses a resolution of 170*170 I believe.
Now is there anyone with the skills to have the android manifests modified of allready installed apps with a nice menu where you could select wich app you want to have the line added to the manifest? If that's possible at all.
Edit: updated the app I use for testing stuff so it shows up in the game launcher: http://forum.xda-developers.com/showthread.php?p=14451093#post14451093
Click to expand...
Click to collapse
Great work , just tested your app! Awesome we now know for certain that xperiaplayoptimized_content is the correct tag...
Ageed it needs someone skilled - but an app that acutally modifies the manifests already installed apps is far beyond what I can do
As you say I'm not even sure such a feat is possible?
An alternative may be to decompile your apps and recompile them... Apktool, should do the trick...
code.google.com/p/android-apktool/
Hmm, tempting... I think I might have a go with one app, see how long it takes to decompile, edit and recompile an app!
deepestblue said:
Great work , just tested your app! Awesome we now know for certain that xperiaplayoptimized_content is the correct tag...
Ageed it needs someone skilled - but an app that acutally modifies the manifests already installed apps is far beyond what I can do
As you say I'm not even sure such a feat is possible?
An alternative may be to decompile your apps and recompile them... Apktool, should do the trick...
code.google.com/p/android-apktool/
Hmm, tempting... I think I might have a go with one app, see how long it takes to decompile, edit and recompile an app!
Click to expand...
Click to collapse
Maybe an app along the lines of ninjamorph but more dedicated to editing the android mainifest
Sent from my R800i using Tapatalk
AndroHero said:
Maybe an app along the lines of ninjamorph but more dedicated to editing the android mainifest
Sent from my R800i using Tapatalk
Click to expand...
Click to collapse
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....
deepestblue said:
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....
Click to expand...
Click to collapse
If it isnt too much trouble,could you please post the step by step process. I would greatly appreciate it.
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.
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" />
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>
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.
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.
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.
svenk919 said:
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.
Click to expand...
Click to collapse
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>
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>
Related
noob question: how to call an app in the manifest.xml file
I think I'm more ignorant on developing than a stone... I just have some Matlab skills. What I'm looking for is to modify the manifest file of a lockscreen (five points lockscreen for MIUI) to make it launch the apps I want. This is the original code: Code: <EndPoint x="108" y="404" w="10" h="10"> <Intent action="android.intent.action.MAIN" package="com.miui.camera" class="com.miui.camera.Camera"/> <ReachedState> <Image x="60" y="376" src="reached_camera.png"/> </ReachedState> <Path tolerance="300"> <Position x="193" y="515" /> <Position x="108" y="404" /> </Path> </EndPoint> I know I have to modify this line: <Intent action="android.intent.action.MAIN" package="com.miui.camera" class="com.miui.camera.Camera"/> but I don't know how to refer to the apps I want. Is there any Guide or sort of list which could help me with that? I've found some threads about this lockscreen and there were also one in which the developer could make changes on demand. Although, as I'm still not sure about what I would like to put in there (could be google maps, whatsapp, "new sms" etc...), I'd like to try many different solutions without asking everytime... Could you give some advices? Thx ps: I attached the mtz of the lockscreen
[REQ] Hack App to show Hidden Setting
I was wondering if someone could tweak this app to show a hidden setting, I've looked into several XML files in this APK and I can see that in the Global Settings the setting to Enable 3G/4G but when you use the program and go into the settings it is hidden, the Disable HD Purchase warning does show. I'm hoping if someone can tweak this and re-sign the APK I can use it to view videos over cell connection! Thanks for you help default_settings.xml <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen android:id="@id/PreferenceScreen" xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceCategory android:title="@string/settings_general_section" android:key="general_settings"> <CheckBoxPreference android:title="@string/bypass_hd_notice" android:key="bypass_HD_Notice" android:summary="@string/bypass_hd_summary" /> <CheckBoxPreference android:title="@string/bypass_wifi_notice" android:key="bypass_Wifi_Notice" android:summary="@string/bypass_wifi_summary" /> </PreferenceCategory> <PreferenceCategory android:title="@string/settings_info_section"> <Preference android:enabled="false" android:title="@string/deviceID" android:key="deviceID" /> <Preference android:enabled="false" android:title="@string/version_notice" android:key="buildNum" android:summary="unknown" /> </PreferenceCategory> <PreferenceCategory android:title="@string/settings_account_section" android:key="account_settings" /> </PreferenceScreen>
No such luck huh? well can anyone give me any hints as to how to make this happen? Is anyone looking into it?
ive been looking into this too, there seems to be a lot of hidden settings on the app, havent had much luck though.
[MOD] Hack Samsung MultiWindow Framework
Lennyuk said: So it seems that only certain apps work with multi-screen and it is not just samsung apps. Here I plan (with your help) to create a difinitive list of all apps that will work. I have already noticed that some apps allow themselves to be splitscreened even when they do not appear in that list e.g. official twitter app. Some apps you will find when you press the edit button, you can then drag them to the main list, or remove ones you do not use. Samsung Apps - ChatON - Email - Gallery - Internet - Messaging - S-Note - Video Player Google Apps - Chrome - Gmail - Maps - Talk - Youtube Third Party Apps - Facebook - Official Twitter app - Polaris (Viewer) Note: you will need to be using Samsung stock keyboard to benefit from typing when on multi-screen mode, otherwise your keyboard will cover the entire bottom screen. Click to expand... Click to collapse Here is all the info until now. Few days i go i received my new device N7100
Hello, ¡I just found some a nice surprise! looking at running services, finally found that com.sec.android.app.FlashBarService its how control what app get listed in our whilelist apps to keep it on multiwindows. XML info its saved at: /data/data/com.sec.android.app.FlashBarService\shared_prefs/flash_bar_list.xml Code: <?xml version='1.0' encoding='utf-8' standalone='yes' ?> <map> <int name="com.sec.chaton.HomeActivity" value="1" /> <int name="com.google.android.apps.chrome.Main" value="2" /> <int name="com.android.email.activity.Welcome" value="3" /> <int name="com.sec.android.gallery3d.app.Gallery" value="4" /> <int name="com.facebook.katana.LoginActivity" value="5" /> <int name="com.google.android.gm.ConversationListActivityGmail" value="6" /> <int name="com.google.android.talk.SigningInActivity" value="7" /> <int name="com.android.browser.BrowserActivity" value="8" /> <int name="com.google.android.maps.MapsActivity" value="9" /> <int name="com.android.mms.ui.ConversationComposer" value="10" /> <int name="com.twitter.android.StartActivity" value="11" /> <int name="com.infraware.filemanager.FmFileTreeListActivity" value="12" /> <int name="com.sec.android.app.videoplayer.activity.MainTab" value="13" /> <int name="com.google.android.youtube.app.honeycomb.Shell$HomeActivity" value="14" /> <int name="NUM_APP_IN_FILE" value="15" /> <boolean name="FILE_SAVE" value="true" /> </map> After deoxing flashbarservice and jar it ive got the clear sources! Thats whats im going to share here! Our interesting right now its allow to give new apps in the whitelist, i tried to manage a few things, like dont allow write, not autosave, and adding by myself my some of this functions in FlashBarInfo.java must to be retouched. I need some sleep maybe tomorrow finally i can bypass the filters! Regards, Kasha
Nice job
Today im back at home, after the missrate searching over the frameservice from the multiwindow, everytime cfg files are changed, instead no write permission or whatever so i think that we have more troubles doing on this part. Searching for a while a found the first idea. Look at the SystemUI & framework! SystemUI/com\android\systemui\multiwindow is our folder. MultiWindowControlPanel.java MultiWindowListPanel.java MultiWindowReflector.java RunningTasksLoader$1$1.java RunningTasksLoader$1.java RunningTasksLoader.java SplitPanelView$1.java SplitPanelView$2.java SplitPanelView$3.java SplitPanelView$4.java SplitPanelView.java Utilities.java Click to expand... Click to collapse res\layout\status_bar_multi_window_arrange.xml res\layout\status_bar_multi_window_list.xml Click to expand... Click to collapse I found some interesting info about how the system reads and class our apps.
As I said on the previous thread in the general section: After looking around a bit, I have collected enough info about this. If I ever get a note 2 (which I'm thinking about), I am sure I can give the user the ability to add apps to the multiwindow bar. But only if . Anyway, I honestly wish good luck to everyone trying this . PS. has anyone tried adding a package name into the string array, inside arrays.xml? for example, the package name of skype, add it in the bottom, install skype and see if it appears. (It should) Click to expand... Click to collapse
Man I wish I could help, but I don't even have my Note 2 yet, or well the knowledge of how to do it. I wish y'all the best of luck, I know this hack for multi-window will blow up once it's finally released in the US, Canada, etc. Thanks for the time.
adding apps to the list is as easy as adding a new package name to the arrays.xml in framework-res.apk Paul o'Brien (Modaco) posted a pic on twitter yesterday as proof of concept, he had plume and a game, subway surfers, running in multi-screen. What we really need now is to think of the best way to handle this so that we can easily have all the apps people would want in the list: 1) one way would be to make a list of apps people use and build one giant xml list, this is not ideal but would work. 2) another way would be to have some sort of app to rebuild the xml file based on your installed apps at that time 3) the best way will be to remove the check itself completely, or point the check somewhere else so we can make a local list say on the sd card.
I hope so bad, that someone can manage it. Would be awesome and it doesn't seem to be much complicated.
Well I did just toy with the idea of making a quick dirty VRTheme update.zip to change the xml file to a new list of pre-defined items. Then I remembered that the xml we need to edit is in /res/values/arrays.xml VRTheme cannot update /values/ files as the apk needs to be decompiled and recompiled to edit these, no one has come up with a way to do this via an update-script yet. So that quick fix is out the window.
Lennyuk said: Well I did just toy with the idea of making a quick dirty VRTheme update.zip to change the xml file to a new list of pre-defined items. Then I remembered that the xml we need to edit is in /res/values/arrays.xml VRTheme cannot update /values/ files as the apk needs to be decompiled and recompiled to edit these, no one has come up with a way to do this via an update-script yet. So that quick fix is out the window. Click to expand... Click to collapse i dont know about VRTHEME, but in alliance ROM using ROm customizer app, one can flash the theme with *.xml files as well
I'm reading this thread and I can't wait to dive into dalvik and try to hack this. Tonight I am getting my note 2, and I hope to learn lots by exploring this hack. Have messed around with XMLs and decompile/recompile, also some dalvik but not much.
Paul O'Brien has managed to allow all apps to be shown, not sure what he has done yet to allow this, he said its not finished so we won't know for sure until he is happy with it and releases it, but is certainly a positive start.
grgsiocl said: i dont know about VRTHEME, but in alliance ROM using ROm customizer app, one can flash the theme with *.xml files as well Click to expand... Click to collapse APK's generally have lots of xml files, some are editable and visible if you just open the apk up as if it was a .zip, these can be changed by the methods there are availiable to do via update.zip (VRTheme or people who have since copied this idea). some of them are hidden until you decompile the app these are generally the files in /values/. In the case here the xml we want to edit is in /values/ so there is no existing way an update.zip could edit these.
Hi guys.I will try and help.dont have anytime on my hands these days..very slow internet as my dorms use wireless connection.I have stopped a few other mods on the Note II for about a week now including a rom i was going to upload.. Tonight i will sit down and have a look at whats given in this thread and i can try and update the list with the most popular apps around,and maybe compile a simple app in C++ that can simply add apps to the xml list without you having to open it .well will see.
I have made a new framework-res.apk with a handful of apps that I use (no games, not much point). I will make it into an update.zip and upload it soon. this is not a perfect fix as obviously you will only have the apps I added to the list but it might keep some of you going until we get a real fix
Look out for some pretty major news from Modaco later about this split-screen feature too
Lennyuk said: Look out for some pretty major news from Modaco later about this split-screen feature too Click to expand... Click to collapse Where can we follow modaco?
My mod is here - http://forum.xda-developers.com/showthread.php?t=1939780 You can follow modaco at Modaco.com or on twitter @paulobrien and @modaco
Lennyuk said: I have made a new framework-res.apk with a handful of apps that I use (no games, not much point). I will make it into an update.zip and upload it soon. this is not a perfect fix as obviously you will only have the apps I added to the list but it might keep some of you going until we get a real fix Click to expand... Click to collapse Hope its got xda app most used here probably ...thx Sent from my GT-N7100 using xda premium
stesteste said: Hope its got xda app most used here probably ...thx Sent from my GT-N7100 using xda premium Click to expand... Click to collapse sorry, I forgot about that, I added tapatalk but not xda's version
[MOD][HOW-TO] Add an item to Settings
You mainly see these kinds of things in AOSP ROMs, but I'll teach you guys how to add a "Tweaks" option to the Settings app. Some people know how to do this, others don't. In the spirit of making a better community, here's the how-to. I'll be using the MIUI batterybar by PvyParts as the example. So, to add the MIUI batterybar to Settings, follow the following steps: Note: You must have already made your ROM compatible with the batterybar mod for it to work. This guide just teaches you how to add things to it. Also, this guide works only if you have a tweaks app such as the batterybar, quickpanel settings, etc so make sure you have those apps installed. [*]Decompile SecSettings.apk (I use Apk Manager) [*]Navigate to /res/xml/settings_headers.xml Add Code: <header android:title="@string/header_category_rom_mods" /> <header android:icon="@drawable/ic_settings_batterybar" android:id="@id/batterybar_settings" android:title="@string/batterybar_settings"> <intent android:targetPackage="com.pvy.battbar.settings" android:action="android.intent.action.MAIN" android:targetClass="com.pvy.battbar.settings.options" /> </header> below Code: <header android:icon="@drawable/ic_settings_more" android:id="@id/wireless_settings" android:title="@string/more_settings" android:fragment="com.android.settings.WirelessSettings" android:breadCrumbTitle="@string/wireless_networks_settings_title" /> It'll look like this when finished: Code: <header android:icon="@drawable/ic_settings_more" android:id="@id/wireless_settings" android:title="@string/more_settings" android:fragment="com.android.settings.WirelessSettings" android:breadCrumbTitle="@string/wireless_networks_settings_title" /> [COLOR="SeaGreen"] <header android:title="@string/header_category_rom_mods" /> <header android:icon="@drawable/ic_settings_batterybar" android:id="@id/batterybar_settings" android:title="@string/batterybar_settings"> <intent android:targetPackage="com.pvy.battbar.settings" android:action="android.intent.action.MAIN" android:targetClass="com.pvy.battbar.settings.options" /> </header>[/COLOR] [*]Navigate to /res/values/strings.xml Scroll to the bottom of the file and add Code: <string name="header_category_rom_mods">ROM Control</string> <string name="batterybar_settings">Battery Bar</string> right above Code: </resources> It'll look like this when finished (You can name "ROM Control" and "Battery Bar" to whatever you want): Code: [COLOR="SeaGreen"]<string name="header_category_rom_mods">ROM Control</string> <string name="batterybar_settings">Battery Bar</string>[/COLOR] </resources> [*]Navigate to /res/values/public.xml This is the tricky part. You will have to assign unique IDs to each mod. Additionally, you will need to assign a "drawable" type (for the picture) and a "string" type (for the name). This is what my code looks like (the red part is the unique ID (you can use mine as long as they don't conflict with any ID in your public.xml)): At line 797: Code: <public type="drawable" name="ic_settings_batterybar" id="[COLOR="Red"]0x7f0203e2[/COLOR]" /> At line 4871: Code: <public type="string" name="batterybar_settings" id="0x7f090e3a" />" id="[COLOR="red"]0x7f0203e2[/COLOR]" /> At line 4869: Code: <public type="string" name="header_category_rom_mods" id="[COLOR="red"]0x7f090e38[/COLOR]" /> [*]Navigate to /res/values/ids.xml Scroll to the bottom of the file and add: Code: <item type="id" name="batterybar_settings">false</item> right above Code: </resources> [*]Recompile SecSettings.apk and push it to your phone.
Awesome, great write up! A little trick I learned that will allow you to not worry about finding a unique ID for res/public is let the system generate one for you Add your lines to strings first and nothing else, then re-compile. Then immediately decompile the one you just built. Sounds confusing i know, but.........Now when you open up res/public the lines you just added to strings will have automatically populated with thier own unique ID and you never had to do anything. Try it Much easier than trying to figure out which HEX ID isnt used, whats in range, or whats next. :good:
Interesting, I used to wonder how you guys add things like that...
Didact74 said: Awesome, great write up! A little trick I learned that will allow you to not worry about finding a unique ID for res/public is let the system generate one for you Add your lines to strings first and nothing else, then re-compile. Then immediately decompile the one you just built. Sounds confusing i know, but.........Now when you open up res/public the lines you just added to strings will have automatically populated with thier own unique ID and you never had to do anything. Try it Much easier than trying to figure out which HEX ID isnt used, whats in range, or whats next. :good: Click to expand... Click to collapse So you're saying do step three first, then step two and then step 4? Sent from my SCH-I535 using xda app-developers app
Twisted politiks said: So you're saying do step three first, then step two and then step 4? Sent from my SCH-I535 using xda app-developers app Click to expand... Click to collapse Crap, I am sorry if it was confusing. I didn't want to muddle up PM's thread. I would stick to his instructions if you don't quite follow what I was saying. It was meant for those that spend a lot of time running through code. Basically you can skip the part of adding IDs to res/public because once you add your info to strings the recompile process auto generates the IDs for you. If this confuses you just stick to PMs instructions. : )
收件人: [MOD][HOW-TO] Add an item to Settings I will try it .thx Sent from my HTC X515d using xda premium
[HELP] Modding CM7 Torch to provide a toggle-shortcut
Hey Guys, I am currently running the latest CM7.2 nightly by maniac103 on my Motorola Defy. CM7 usually has a special modified Nexus One Torch integrated, whose packagename is "net.cactii.flash2". As I would like to assign a torch-toggle to a slider in widgetlocker, I need the torch-app to provide a shortcut/activity since it only offers a toggle-widget. I am talking about the app-specific shortcuts not the shortcuts that directly link to an app. EDIT: The reason why I haven't put this in Q&A is that this is hopefully going to be a mod, so it may save the mods some time for not needing to push it to another forum... I may have already found out that the receiver the torch uses is called "net.cactii.flash2.TorchSwitch" and the intent it expects is "net.cactii.flash2.TOGGLE_FLASHLIGHT". I am not sure though, if I got this whole Intent-/Receiver-thingy right... Any corrections are appreciated. From this tutorial I have learnt, that apps provide these shortcut-entries in their AndroidManifest.xml. I should be able to modify, recompile and sign this apk. I just don't know exactly, how I have to add this to the AndroidManifest.xml in terms of syntax and language. That's where I need help... EDIT: Here's the code of the AndroidManifest.xml for quick review: Code: <?xml version="1.0" encoding="utf-8"?> <manifest android:versionCode="10" android:versionName="2.3.7" package="net.cactii.flash2" xmlns:android="http://schemas.android.com/apk/res/android"> <application android:label="@string/app_name" android:icon="@drawable/icon"> <activity android:label="@string/app_name" android:name=".MainActivity" android:launchMode="singleTask" android:screenOrientation="portrait"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".WidgetOptionsActivity"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" /> </intent-filter> </activity> <receiver android:label="Torch" android:name="TorchWidgetProvider"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> <action android:name="net.cactii.flash2.TORCH_STATE_CHANGED" /> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/appwidget_info" /> </receiver> <service android:name=".TorchService" android:enabled="true" /> <receiver android:label="@string/app_name" android:name="TorchSwitch" android:enabled="true"> <intent-filter> <action android:name="net.cactii.flash2.TOGGLE_FLASHLIGHT" /> </intent-filter> </receiver> </application> <uses-feature android:name="android.hardware.camera" /> <uses-feature android:name="android.hardware.camera.flash" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.WRITE_SETTINGS" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> </manifest> Before you tell me now, that I should use a different flashlight-app: I was already using TeslaLED which runs well with WidgetLocker. However, the in-built torch offers a high brightness-mode that I want to use. Additionally, TeslaLED always needs 2-3 seconds to activate the flashlight, unlike Torch, which usually toggles instantly... I have appended the torch-apk, as well as the AndroidManifest.xml I want to modify. Here is an additional link (from another dev), which shows shortly, how the torch app works together with a statusbar-toggle, if that helps in any way... Summary of what is needed: A mod for net.cactii.flash2's AndroidManifest.xml which provides a high brightness flashlight toggle-shortcut If you potentially know how to write this short piece of code and you just want to know how android handles these shortcuts, please read this tutorial. It's very short and helpful. EDIT: It seems that we have to modify the app as well, not just the AndroidManifest.xml, because it would place a shortcut in the menu, but Torch wouldn't know what to do when I select this item. Feel free to post your ideas and/or corrections EDIT: Alternatively we could try to make Torch listen to TeslaLED's intents, but I think that would be more sophisticated and could lead to problems, when both apps are installed... Thanks for any help in advance! Greetz, Unr3aL67
Unr3aL67 said: "net.cactii.flash2.TOGGLE_FLASHLIGHT" Click to expand... Click to collapse thanks! I used this line in Tasker with Send Intent to toggle Torch on my CM10.2.
Gawis said: thanks! I used this line in Tasker with Send Intent to toggle Torch on my CM10.2. Click to expand... Click to collapse Okay, I'm using tasker to make a widget via power toggles... I used the same line in tasker, and it works great! Here's what I'm wondering now... In power toggles, with regular toggles, you can have the icon change colors, say it would be green when the flashlight is on, and gray when off... Obviously you can't do that by just sending the intent, so anyone have any ideas about how to do this? I know power toggles uses Tesla by default, but I don't like the delay.. Torch is on immediately, so thats what I want to use. Any ideas would be greatly appreciated!
Gawis said: thanks! I used this line in Tasker with Send Intent to toggle Torch on my CM10.2. Click to expand... Click to collapse Okay, I figured it out... The following task, paired with power toggles, works great! The button is off when the light is off, and the button is in the "Active" state when the light is on.. For mine its Gray when the light is off, and Green when the light is on.... If %Toggle ~ 1 Send Intent Action net.cactii.flash2.TOGGLE_FLASHLIGHT Variable Set Name %Toggle To 0 Else Send Intent Action net.cactii.flash2.TOGGLE_FLASHLIGHT Variable Set Name %Toggle To 1 End If Modify PowerToggle state Configuration Set current toggle to off If %Toggle ~ 0 Modify PowerToggle state Configuration Set current toggle to on If %Toggle ~ 1 Hope this helps someone figure this out! LOL! If it helped you, please thumbs up... Too busy to be on XDA all the time....