[GUIDE] Enabling Apps for Pen Window without ROOT

Status
Not open for further replies.
Search This thread

xperiacle

Inactive Recognized Developer
Nov 12, 2012
337
5,861
Hello Friends,

Just want to share another GUIDE/MOD this time for NON-ROOT users - ENABLING Apps for PEN Window without Root.

Without root, the only way to add more apps for Pen Window is modifying the app yourself or getting developers to add pen window support to their apps. But it involves a bit of knowledge in decompiling, editing, recompiling and resigning apps with apktool, jarsigner or some similar tool like Apk Manager, Apk Multitool and a lot others. I won't go into a tutorial about decompilation. I was a noob once and I did my best to search and learn about this stuff so if you are interested then a few google or xda search would give you tons of links on how to decompile/recompile apk files.

TOOLS:

1. Knowledge of modding apk files
2. ApkManager or other similar tools
3. Notepad++ or something similar

GUIDE:

1. Decompile apk file using ApkManager or your tool of choice.
2. Open the AndroidManifest.xml file of the decompiled apk file using Notepad++ or your editor of choice. Below is a sample AndroidManifest.xml file.

Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="mobi.xperiacle.PenWindowTest"
    android:versionCode="1"
    android:versionName="1.0" >
    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="17" />
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="mobi.xperiacle.PenWindowTest.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
		<category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

3. Look for the acivity which has "<category android:name="android.intent.category.LAUNCHER" />"
and add "<category android:name="com.samsung.android.intent.category.PENWINDOW_LAUNCHER" />" below it.
Below is the same AndroidManifest.xml above with the change highlighted in RED.

Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="mobi.xperiacle.PenWindowTest"
    android:versionCode="1"
    android:versionName="1.0" >
    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="17" />
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="mobi.xperiacle.PenWindowTest.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
		<category android:name="android.intent.category.LAUNCHER" />
                [COLOR="Red"]<category android:name="com.samsung.android.intent.category.PENWINDOW_LAUNCHER" />[/COLOR]                
            </intent-filter>
        </activity>
    </application>
</manifest>

4. Look for "</application>" which is the closing tag of the <application...> node. Then add
"<meta-data android:name="com.samsung.android.sdk.multiwindow.penwindow.enable" android:value="true" />" above it. Below is the same AndroidManifest.xml file above with the all changes in RED.

Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="mobi.xperiacle.PenWindowTest"
    android:versionCode="1"
    android:versionName="1.0" >
    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="17" />
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="mobi.xperiacle.PenWindowTest.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
		<category android:name="android.intent.category.LAUNCHER" />
                [COLOR="Red"]<category android:name="com.samsung.android.intent.category.PENWINDOW_LAUNCHER" />[/COLOR]                
            </intent-filter>
        </activity>
        [COLOR="Red"]<meta-data android:name="com.samsung.android.sdk.multiwindow.penwindow.enable" android:value="true" />[/COLOR]
    </application>
</manifest>

5. Recompile and Resign apk file and push to your phone. If you are using ApkManager that is all done in one go with option 14 while phone is connected.

6. Have FUN! A COFFEE would be Nice. he he :)


THANKS to @soloilmeglio for testing and making sure it works before I write and share this guide.
 
Last edited:

Spere

Senior Member
Aug 7, 2013
479
170
So is it possible for you to do an app that automaticly does the magic?

Like some drag and drop .apk to make it work on penwindow (and why not in multiwindow too?)
 

Spere

Senior Member
Aug 7, 2013
479
170
I got it work only in one app (tried for ~5 apps)

Dunno if the problem is using APK Multi-Tool instead of ApkManager? And I believe problem is in .apk or tool.. Not in your guide :p

And why I can't find those lines already in app that has multiwindow, pen window or both already? How those are made then? :eek:

But thanks anyway :p very useful guide

ps. Didn't try to only add pen window, but multiwindow too at same time

Sent from my SM-N9005 using XDA Premium HD app
 

Amdathlonuk

Senior Member
May 10, 2009
948
45
Abergavenny
Oh man this is such great news..... if I knew how to decompile and recompile apks.

I've downloaded the tool but it's way above my knowledge.

Will wait to see if some-one can design an app to do it automatically as I'm NOT rooting my N3.... :)
 

Spere

Senior Member
Aug 7, 2013
479
170
Oh man this is such great news..... if I knew how to decompile and recompile apks.

I've downloaded the tool but it's way above my knowledge.

Will wait to see if some-one can design an app to do it automatically as I'm NOT rooting my N3.... :)

It's not that hard really, it took a while for me but even I managed to make it work :p

If you got Java JDK and ADB installed (Google how to install if not)
Google APK Multi-Tool, you'll find a link to some topic on XDA where is download link (and instructions how to use it)

When you got all ready and multi tool running, type 24 and enter, choose your apk file (if you have that apk on computer and moved to Multi-Tool apk edit folder) and enter again. Then type 9 and enter to decompile, go to projects folder and edit AndroidManifest.xml. Then delete that app from your phone if already installed, connect your phone to pc using USB cable and then type 15 in Multi-Tool and hit enter. Now it should compile, sign and install that app to your phone, if everything went right.

Sorry for messy message but I'm at work. Ask if somethings not clear to you :)

Sent from my SM-N9005 using XDA Premium HD app
 

erlos

Senior Member
Oct 24, 2012
250
150
Add the red string under penwindow tweak and you unlock Multiwindows too ;)

<category android:name="com.samsung.android.intent.category.PENWINDOW_LAUNCHER" />
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />

<meta-data android:name="com.samsung.android.sdk.multiwindow.penwindow.enable" android:value="true" />
<uses-library required="false" name="com.sec.android.app.multiwindow" />
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:value="598.0dip" />


---------- Post added at 01:43 AM ---------- Previous post was at 01:42 AM ----------

Add the red string under penwindow tweak and you unlock Multiwindows too ;)

<category android:name="com.samsung.android.intent.category.PENWINDOW_LAUNCHER" />
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />

<meta-data android:name="com.samsung.android.sdk.multiwindow.penwindow.enable" android:value="true" />
<uses-library required="false" name="com.sec.android.app.multiwindow" />
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:value="598.0dip" />
 
  • Like
Reactions: Shadowsong

valtersboze

Senior Member
Jan 6, 2012
106
8
?????
I did Not understand...
This is OLD tips on note 1

before i spend hours trying to figure out the apk tool - i wanted to ask if anyone has applied the penwindow/multiwindow tags to Waze apk and if it works. In city driving waze is critical to be open but it is waste of screen real estate to see just waze. i would like whatsapp or music apps open and visible too.
 

Dewdropkorn

New member
Nov 7, 2013
4
0
What apps have you all tested this on? I'd like to try it on a confirmed app. I did this with one app already and the app runs normally but it is not showing up in my pen window list when I bring it up. I also tried setting it up for multiwindows but I don't know how to test that feature. Is there a way to bring up multiwindows without having to do it automatically? For example if I'm browsing on chrome and I want to pull up a dictionary app in the second window, is that possible and if so how?
 

Spere

Senior Member
Aug 7, 2013
479
170
What apps have you all tested this on? I'd like to try it on a confirmed app. I did this with one app already and the app runs normally but it is not showing up in my pen window list when I bring it up. I also tried setting it up for multiwindows but I don't know how to test that feature. Is there a way to bring up multiwindows without having to do it automatically? For example if I'm browsing on chrome and I want to pull up a dictionary app in the second window, is that possible and if so how?

Allright..

If you made it right, app should show in penwindow menu and for multiwindow in the list when you open "multiwindow bar"

What program you used for editing .apk?

I did it this way (some apps still didn't work, but not sure why is that)

I downloaded APK Multi-Tool from bottom of first post http://xdaforums.com/showthread.php?t=695701

Then: Enter 24 (Set current project) --> 9 (Decompile apk) --> Then I deleted the app from my phone --> Edited the AndroidManifest.xml --> 15 (compile apk / sign apk / install apk)
Now it install the app to phone


Okay then, there is typos in all post in this topic that should enable penwindow (at least didn't work for me before I corrected them)
If you watch close to (example those at first post) they got SPACE between "." and "P" --> "...category.(SPACE HERE)PENWINDOW..."
Same for another line "...multiwindow.(SPACE HERE)penwindow.enable"
APK Multi-Tool gave error to log and app didn't work before those SPACEs were removed.

Hmm.. When I was writing this post, I noticed that SPACE came there in post preview even it really wasn't in post?
It did same when I tried to put those lines in quote tags, so why is that?
Only way to get that one "automatic space" away from line was to put it in code tags

So try copying these to AndroidManifest.xml to enable both Penwindow and Multiwindow

Code:
<category android:name="com.samsung.android.intent.category.PENWINDOW_LAUNCHER" />
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />

Code:
<meta-data android:name="com.samsung.android.sdk.multiwindow.penwindow.enable" android:value="true" />
<uses-library required="false" name="com.sec.android.app.multiwindow" />
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_ SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_ SIZE_H" android:value="598.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_ SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_ SIZE_H" android:value="598.0dip" />
 

Dewdropkorn

New member
Nov 7, 2013
4
0
Allright..

If you made it right, app should show in penwindow menu and for multiwindow in the list when you open "multiwindow bar"

What program you used for editing .apk?

I did it this way (some apps still didn't work, but not sure why is that)

I downloaded APK Multi-Tool from bottom of first post http://xdaforums.com/showthread.php?t=695701

Then: Enter 24 (Set current project) --> 9 (Decompile apk) --> Then I deleted the app from my phone --> Edited the AndroidManifest.xml --> 15 (compile apk / sign apk / install apk)
Now it install the app to phone


Okay then, there is typos in all post in this topic that should enable penwindow (at least didn't work for me before I corrected them)
If you watch close to (example those at first post) they got SPACE between "." and "P" --> "...category.(SPACE HERE)PENWINDOW..."
Same for another line "...multiwindow.(SPACE HERE)penwindow.enable"
APK Multi-Tool gave error to log and app didn't work before those SPACEs were removed.

Hmm.. When I was writing this post, I noticed that SPACE came there in post preview even it really wasn't in post?
It did same when I tried to put those lines in quote tags, so why is that?
Only way to get that one "automatic space" away from line was to put it in code tags

So try copying these to AndroidManifest.xml to enable both Penwindow and Multiwindow

Code:
<category android:name="com.samsung.android.intent.category.PENWINDOW_LAUNCHER" />
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />

Code:
<meta-data android:name="com.samsung.android.sdk.multiwindow.penwindow.enable" android:value="true" />
<uses-library required="false" name="com.sec.android.app.multiwindow" />
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_ SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_ SIZE_H" android:value="598.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_ SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_ SIZE_H" android:value="598.0dip" />

That's exactly what my problem was. Fixing the spaces caused the app to show up for both my Penwindow and my multiwindow. Thank you so much. I don't have the luxury of rooting and this was exactly what I needed for doing what I need for this phone for.:good:
 

Spere

Senior Member
Aug 7, 2013
479
170
That's exactly what my problem was. Fixing the spaces caused the app to show up for both my Penwindow and my multiwindow. Thank you so much. I don't have the luxury of rooting and this was exactly what I needed for doing what I need for this phone for.:good:

Nice to hear it works :)

Sent from my SM-N9005 using XDA Premium HD app
 

Dewdropkorn

New member
Nov 7, 2013
4
0
Has anyone done this with Spotify? I've successfully modded about 6 apps now but the .apk I recompiled and signed for Spotify has "parsing" errors when I try to installing it. Anyone else with better luck?
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    Hello Friends,

    Just want to share another GUIDE/MOD this time for NON-ROOT users - ENABLING Apps for PEN Window without Root.

    Without root, the only way to add more apps for Pen Window is modifying the app yourself or getting developers to add pen window support to their apps. But it involves a bit of knowledge in decompiling, editing, recompiling and resigning apps with apktool, jarsigner or some similar tool like Apk Manager, Apk Multitool and a lot others. I won't go into a tutorial about decompilation. I was a noob once and I did my best to search and learn about this stuff so if you are interested then a few google or xda search would give you tons of links on how to decompile/recompile apk files.

    TOOLS:

    1. Knowledge of modding apk files
    2. ApkManager or other similar tools
    3. Notepad++ or something similar

    GUIDE:

    1. Decompile apk file using ApkManager or your tool of choice.
    2. Open the AndroidManifest.xml file of the decompiled apk file using Notepad++ or your editor of choice. Below is a sample AndroidManifest.xml file.

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="mobi.xperiacle.PenWindowTest"
        android:versionCode="1"
        android:versionName="1.0" >
        <uses-sdk
            android:minSdkVersion="16"
            android:targetSdkVersion="17" />
        <application
            android:allowBackup="true"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name"
            android:theme="@style/AppTheme" >
            <activity
                android:name="mobi.xperiacle.PenWindowTest.MainActivity"
                android:label="@string/app_name" >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    		<category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
        </application>
    </manifest>

    3. Look for the acivity which has "<category android:name="android.intent.category.LAUNCHER" />"
    and add "<category android:name="com.samsung.android.intent.category.PENWINDOW_LAUNCHER" />" below it.
    Below is the same AndroidManifest.xml above with the change highlighted in RED.

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="mobi.xperiacle.PenWindowTest"
        android:versionCode="1"
        android:versionName="1.0" >
        <uses-sdk
            android:minSdkVersion="16"
            android:targetSdkVersion="17" />
        <application
            android:allowBackup="true"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name"
            android:theme="@style/AppTheme" >
            <activity
                android:name="mobi.xperiacle.PenWindowTest.MainActivity"
                android:label="@string/app_name" >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    		<category android:name="android.intent.category.LAUNCHER" />
                    [COLOR="Red"]<category android:name="com.samsung.android.intent.category.PENWINDOW_LAUNCHER" />[/COLOR]                
                </intent-filter>
            </activity>
        </application>
    </manifest>

    4. Look for "</application>" which is the closing tag of the <application...> node. Then add
    "<meta-data android:name="com.samsung.android.sdk.multiwindow.penwindow.enable" android:value="true" />" above it. Below is the same AndroidManifest.xml file above with the all changes in RED.

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="mobi.xperiacle.PenWindowTest"
        android:versionCode="1"
        android:versionName="1.0" >
        <uses-sdk
            android:minSdkVersion="16"
            android:targetSdkVersion="17" />
        <application
            android:allowBackup="true"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name"
            android:theme="@style/AppTheme" >
            <activity
                android:name="mobi.xperiacle.PenWindowTest.MainActivity"
                android:label="@string/app_name" >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    		<category android:name="android.intent.category.LAUNCHER" />
                    [COLOR="Red"]<category android:name="com.samsung.android.intent.category.PENWINDOW_LAUNCHER" />[/COLOR]                
                </intent-filter>
            </activity>
            [COLOR="Red"]<meta-data android:name="com.samsung.android.sdk.multiwindow.penwindow.enable" android:value="true" />[/COLOR]
        </application>
    </manifest>

    5. Recompile and Resign apk file and push to your phone. If you are using ApkManager that is all done in one go with option 14 while phone is connected.

    6. Have FUN! A COFFEE would be Nice. he he :)


    THANKS to @soloilmeglio for testing and making sure it works before I write and share this guide.
    2
    Great news for all non-rooted gn3 eh eh.... great work as always ;)

    Inviato dal mio SM-N9005 utilizzando Tapatalk
    2
    What apps have you all tested this on? I'd like to try it on a confirmed app. I did this with one app already and the app runs normally but it is not showing up in my pen window list when I bring it up. I also tried setting it up for multiwindows but I don't know how to test that feature. Is there a way to bring up multiwindows without having to do it automatically? For example if I'm browsing on chrome and I want to pull up a dictionary app in the second window, is that possible and if so how?

    Allright..

    If you made it right, app should show in penwindow menu and for multiwindow in the list when you open "multiwindow bar"

    What program you used for editing .apk?

    I did it this way (some apps still didn't work, but not sure why is that)

    I downloaded APK Multi-Tool from bottom of first post http://xdaforums.com/showthread.php?t=695701

    Then: Enter 24 (Set current project) --> 9 (Decompile apk) --> Then I deleted the app from my phone --> Edited the AndroidManifest.xml --> 15 (compile apk / sign apk / install apk)
    Now it install the app to phone


    Okay then, there is typos in all post in this topic that should enable penwindow (at least didn't work for me before I corrected them)
    If you watch close to (example those at first post) they got SPACE between "." and "P" --> "...category.(SPACE HERE)PENWINDOW..."
    Same for another line "...multiwindow.(SPACE HERE)penwindow.enable"
    APK Multi-Tool gave error to log and app didn't work before those SPACEs were removed.

    Hmm.. When I was writing this post, I noticed that SPACE came there in post preview even it really wasn't in post?
    It did same when I tried to put those lines in quote tags, so why is that?
    Only way to get that one "automatic space" away from line was to put it in code tags

    So try copying these to AndroidManifest.xml to enable both Penwindow and Multiwindow

    Code:
    <category android:name="com.samsung.android.intent.category.PENWINDOW_LAUNCHER" />
    <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />

    Code:
    <meta-data android:name="com.samsung.android.sdk.multiwindow.penwindow.enable" android:value="true" />
    <uses-library required="false" name="com.sec.android.app.multiwindow" />
    <meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
    <meta-data android:name="com.sec.android.multiwindow.DEFAULT_ SIZE_W" android:value="632.0dip" />
    <meta-data android:name="com.sec.android.multiwindow.DEFAULT_ SIZE_H" android:value="598.0dip" />
    <meta-data android:name="com.sec.android.multiwindow.MINIMUM_ SIZE_W" android:value="632.0dip" />
    <meta-data android:name="com.sec.android.multiwindow.MINIMUM_ SIZE_H" android:value="598.0dip" />
    1
    Add the red string under penwindow tweak and you unlock Multiwindows too ;)

    <category android:name="com.samsung.android.intent.category.PENWINDOW_LAUNCHER" />
    <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />

    <meta-data android:name="com.samsung.android.sdk.multiwindow.penwindow.enable" android:value="true" />
    <uses-library required="false" name="com.sec.android.app.multiwindow" />
    <meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
    <meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632.0dip" />
    <meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598.0dip" />
    <meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:value="632.0dip" />
    <meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:value="598.0dip" />


    ---------- Post added at 01:43 AM ---------- Previous post was at 01:42 AM ----------

    Add the red string under penwindow tweak and you unlock Multiwindows too ;)

    <category android:name="com.samsung.android.intent.category.PENWINDOW_LAUNCHER" />
    <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />

    <meta-data android:name="com.samsung.android.sdk.multiwindow.penwindow.enable" android:value="true" />
    <uses-library required="false" name="com.sec.android.app.multiwindow" />
    <meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
    <meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632.0dip" />
    <meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598.0dip" />
    <meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:value="632.0dip" />
    <meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:value="598.0dip" />
    1
    itworks thanks