[MOD] Hack Samsung MultiWindow Framework

Kashamalaga

Senior Member
Dec 16, 2011
207
935
133
Málaga
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.
Here is all the info until now. Few days i go i received my new device N7100
 

Kashamalaga

Senior Member
Dec 16, 2011
207
935
133
Málaga
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
 

Attachments

Kashamalaga

Senior Member
Dec 16, 2011
207
935
133
Málaga
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
res\layout\status_bar_multi_window_arrange.xml
res\layout\status_bar_multi_window_list.xml
I found some interesting info about how the system reads and class our apps.
 

Attachments

Last edited:

LegendK95

Inactive Recognized Developer
Nov 3, 2011
1,546
4,377
153
Jerusalem
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 :p.

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)
 
  • Like
Reactions: Reb0rn

clemson91

Senior Member
Feb 17, 2012
215
81
0
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.
 

Lennyuk

Inactive Recognized Developer
Jan 26, 2010
6,273
1,743
0
Essex, England
www.villainrom.co.uk
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.
 
Last edited:

Lennyuk

Inactive Recognized Developer
Jan 26, 2010
6,273
1,743
0
Essex, England
www.villainrom.co.uk
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.
 

grgsiocl

Senior Member
Nov 9, 2009
2,891
4,546
0
Kurnool, Andhra Pradesh
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.
i dont know about VRTHEME, but in alliance ROM using ROm customizer app, one can flash the theme with *.xml files as well
 
  • Like
Reactions: prasadnaidu66

eitama

Senior Member
Sep 18, 2010
625
202
0
Hod Hasharon
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.
 

Lennyuk

Inactive Recognized Developer
Jan 26, 2010
6,273
1,743
0
Essex, England
www.villainrom.co.uk
i dont know about VRTHEME, but in alliance ROM using ROm customizer app, one can flash the theme with *.xml files as well
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.
 
  • Like
Reactions: Kiahnlliya

Stavr0s91i

Senior Member
Jul 3, 2010
221
669
0
Nicosia
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.
 
  • Like
Reactions: blorro

stesteste

Senior Member
Apr 12, 2011
1,209
317
0
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
Hope its got xda app most used here probably ...thx

Sent from my GT-N7100 using xda premium
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone