FORUMS
Remove All Ads from XDA
Honor 7x
Win an Honor 7X!

[GUIDE] Enabling Apps for Pen Window without ROOT

337 posts
Thanks Meter: 5,905
 
By xperiacle, Inactive Recognized Developer on 26th October 2013, 10:35 PM
Thread Closed Email Thread
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" />
                <category android:name="com.samsung.android.intent.category.PENWINDOW_LAUNCHER" />                
            </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" />
                <category android:name="com.samsung.android.intent.category.PENWINDOW_LAUNCHER" />                
            </intent-filter>
        </activity>
        <meta-data android:name="com.samsung.android.sdk.multiwindow.penwindow.enable" android:value="true" />
    </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.
The Following 10 Users Say Thank You to xperiacle For This Useful Post: [ View ] Gift xperiacle Ad-Free
 
 
26th October 2013, 10:43 PM |#2  
soloilmeglio's Avatar
Senior Member
Flag Rome
Thanks Meter: 10,370
 
Donate to Me
More
Great news for all non-rooted gn3 eh eh.... great work as always

Inviato dal mio SM-N9005 utilizzando Tapatalk
The Following 2 Users Say Thank You to soloilmeglio For This Useful Post: [ View ] Gift soloilmeglio Ad-Free
27th October 2013, 06:53 PM |#3  
Senior Member
Thanks Meter: 164
 
More
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?)
28th October 2013, 12:47 AM |#4  
Member
Thanks Meter: 0
 
More
Thanks, it works
28th October 2013, 11:40 AM |#5  
Senior Member
Thanks Meter: 164
 
More
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

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

But thanks anyway 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
28th October 2013, 10:20 PM |#6  
Amdathlonuk's Avatar
Senior Member
Flag Abergavenny
Thanks Meter: 50
 
More
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....
29th October 2013, 11:05 AM |#7  
Senior Member
Thanks Meter: 164
 
More
Quote:
Originally Posted by Amdathlonuk

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

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
30th October 2013, 02:43 AM |#8  
Senior Member
Thanks Meter: 156
 
More
Add the red string under penwindow tweak and you unlock Multiwindows too

Quote:

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

Quote:

<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

Quote:

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

Quote:

<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" />

The Following User Says Thank You to erlos For This Useful Post: [ View ] Gift erlos Ad-Free
30th October 2013, 11:23 AM |#9  
Senior Member
Thanks Meter: 8
 
More
Quote:
Originally Posted by erlos

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



---------- 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

would anything of this work with Waze?
30th October 2013, 11:28 AM |#10  
Senior Member
Thanks Meter: 156
 
More
Quote:
Originally Posted by valtersboze

would anything of this work with Waze?

?????
I did Not understand...
This is OLD tips on note 1

Inviato dal mio SM-N9005 utilizzando Tapatalk
30th October 2013, 01:52 PM |#11  
Senior Member
Thanks Meter: 8
 
More
Quote:
Originally Posted by erlos

?????
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.
Thread Closed Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes