Hello,
This is an update to a mod I previously posted in the T-Mobile Note 3 forums, that will allow you to open any apps you want with Air Command.
This mod assumes that you have working knowledge of how to decompile/recompile apk and jar files. If you do not know how to do so, there are several threads on XDA that will teach you. This is not one of them.
This mod is for Kit-Kat only. Lollipop version will be up tomorrow, and will appear in the second post.
Did you make a backup? Good....
The file we are primarily going to be working with is services.jar, found in /system/framework, so go ahead and pull yours from your phone, and decompile it.
Once you have it decompiled, download the attached file, navigate to /com/android/server/smartclip/ in your decompiled services.jar, and replace the existing SpenGestureManagerService.smali with the one you just downloaded.
Now, open that file and scroll all the way to the bottom, where you will see this:
Each :pswitch in that array corresponds to one of the Air Command functions. By default, they are as follows:
:pswitch_43 = ACTION MEMO
:pswitch_b7 = SCRAP BOOKER
:pswitch_120 = SCREEN WRITE
:pswitch_19d = S-FINDER
:pswitch_1f8 = PEN WINDOW
In order to use different apps, you must find the internal package name of the app that you want to use, and the default activity of the app. These can be found by decompiling said app, and looking at the AndroidManifest file.
Once you have both of those, search the new SPenGestureManagerService.smali for "YOUR_APP_NAME1" and "YOUR_APP_ACTIVITY1" and replace them with the package name and activity name, respectively.
Repeat this for any additional apps you wish to use, searching instead for "YOUR_APP_NAME2" and "YOUR_APP_ACTIVITY2". I have included these up to "YOUR_APP_NAME5" and "YOUR_APP_ACTIVITY5" for the sake of convenience.
Now, back to that array...
For every custom app you add, you must replace one of the existing :pswitch numbers. For the first app, that you added the package name and activity for above, you will use:
For the second,
And so on, up to
You can use any combination of the original :pswitches and custom ones, in any order you wish, but you cannot add any more than 5.
Once you have finished making any changes, recompile your services.jar, push it back to your device, and enjoy!
To change the icons, so they match the new apps, decompile your framework-res.apk, and go to res/drawable-xxhdpi. The icons will all begin with "airbutton_global_icon". Simply find the one(s)
corresponding to the app(s) you've changed, and edit it however you want. Just be sure to keep the file name the same.
To change the text that appears when you hover over the icon in Air Command, go to your decompiled framework-res.apk
and open res/values/strings.xml. Locate the one(s) you want to change, change the content of the string(s), save, recompile, push to system/priv-app, set permissions, and reboot.
***Note: You may have to change them in res/values-en-rUS/strings.xml also.
This is an update to a mod I previously posted in the T-Mobile Note 3 forums, that will allow you to open any apps you want with Air Command.
This mod assumes that you have working knowledge of how to decompile/recompile apk and jar files. If you do not know how to do so, there are several threads on XDA that will teach you. This is not one of them.
This mod is for Kit-Kat only. Lollipop version will be up tomorrow, and will appear in the second post.
***Before proceeding any further, MAKE A BACKUP***
***I am not responsible for any loss of data or damaged devices***
***resulting from this mod.***
***I am not responsible for any loss of data or damaged devices***
***resulting from this mod.***
Did you make a backup? Good....
The file we are primarily going to be working with is services.jar, found in /system/framework, so go ahead and pull yours from your phone, and decompile it.
Once you have it decompiled, download the attached file, navigate to /com/android/server/smartclip/ in your decompiled services.jar, and replace the existing SpenGestureManagerService.smali with the one you just downloaded.
Now, open that file and scroll all the way to the bottom, where you will see this:
Code:
:pswitch_data_234
.packed-switch 0x0
:pswitch_43
:pswitch_b7
:pswitch_120
:pswitch_19d
:pswitch_1f8
.end packed-switch
.end method:pswitch_43 = ACTION MEMO
:pswitch_b7 = SCRAP BOOKER
:pswitch_120 = SCREEN WRITE
:pswitch_19d = S-FINDER
:pswitch_1f8 = PEN WINDOW
In order to use different apps, you must find the internal package name of the app that you want to use, and the default activity of the app. These can be found by decompiling said app, and looking at the AndroidManifest file.
Once you have both of those, search the new SPenGestureManagerService.smali for "YOUR_APP_NAME1" and "YOUR_APP_ACTIVITY1" and replace them with the package name and activity name, respectively.
Repeat this for any additional apps you wish to use, searching instead for "YOUR_APP_NAME2" and "YOUR_APP_ACTIVITY2". I have included these up to "YOUR_APP_NAME5" and "YOUR_APP_ACTIVITY5" for the sake of convenience.
Now, back to that array...
For every custom app you add, you must replace one of the existing :pswitch numbers. For the first app, that you added the package name and activity for above, you will use:
Code:
:pswitch_ms1Code:
:pswitch_ms2Code:
:pswitch_ms5Once you have finished making any changes, recompile your services.jar, push it back to your device, and enjoy!
To change the icons, so they match the new apps, decompile your framework-res.apk, and go to res/drawable-xxhdpi. The icons will all begin with "airbutton_global_icon". Simply find the one(s)
corresponding to the app(s) you've changed, and edit it however you want. Just be sure to keep the file name the same.
To change the text that appears when you hover over the icon in Air Command, go to your decompiled framework-res.apk
and open res/values/strings.xml. Locate the one(s) you want to change, change the content of the string(s), save, recompile, push to system/priv-app, set permissions, and reboot.
***Note: You may have to change them in res/values-en-rUS/strings.xml also.
Aucun commentaire:
Enregistrer un commentaire