"n" button hacking - Nook Touch General

I've seen miscellaneous info around on the common task of repurposing the "n" button. I'd like to see a concise rundown of ways to hack it.
The "n" button is a scancode 102 that normally gets mapped to keycode 3 with /system/usr/keylayout/gpio-keys.kl
Keycode 3 in intercepted by the interceptKeyTi method of PhoneWindowManager in /system/framework/android.policy.jar
Keycode 3 is handled directly without using any intents.
It's not easy to hack a key to give an intent. You have CALL_BUTTTON, CAMERA_BUTTON & MEDIA_BUTTON. I haven't managed to catch them. The easy one to hack is SEARCH_LONG_PRESS.
You can easily change gpio-keys.kl to key 102 SEARCH
A normal press will bring up the default Nook search. A long press will generate an intent. All you have to do is insert another intent filter in your favorite app.
Code:
<intent-filter>
<action android:name="android.intent.action.SEARCH_LONG_PRESS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
I have this running on my ADW Launcher and I uninstalled Button Savior.
Personally, I prefer hacking to installing yet another app just to do one thing. I would like to come up with a solution for a dedicated action for the "n" key.
Any thoughts?

If you use NookTouchTools this allows you to remap the buttons/quicknav etc without all the hassle.

GabrialDestruir said:
... without all the hassle.
Click to expand...
Click to collapse
Well, I'd really like to learn things, not just load another app.
So how exactly do the Tools work? Do they need to have another process just to listen for a keycode and translate it to an intent?

Renate NST said:
Well, I'd really like to learn things, not just load another app.
So how exactly do the Tools work? Do they need to have another process just to listen for a keycode and translate it to an intent?
Click to expand...
Click to collapse
It uses modification of various .jar files
XorZone said:
* Patched android.policy.jar:
*** Injected home button code from AOSP, with configuration check between goto home and b&n quicknav toggle
*** Fixed recent apps dialog with configuration check to launch recent apps dialog or configured app launch
* Patched services.jar
*** "Reading now" button check for configured launch value (possible values: Home, Back, Menu, Search, Long Search, Custom App, B&N default)
*** All quicknav buttons configurable and will load icons (once, onCreate) possible values same as above.
* ActivityPicker - B&N removed default activity (usually in Settings.apk) to serve ACTION_PICK_ACTIVITY requests, so I added it back to the app and now able to add shortcuts/edit doc shortcuts in Launcher Pro...
* Configuration - All above configurable values stored in Settings.System so both system jars and Conf app can access it.
* Clear dalvik-cache button
Click to expand...
Click to collapse

Thanks, Gabrial. I had read through this entire thread before and it had left me confused. 10 pages of talking about changing the UI and not a single screenshot? I'm still not sure how an activity picker or a recent apps dialog looks like. Heck, I'm not even sure what additional things you get in Settings. Is there even a tree list of what people should have?
Yes, I do have a penchant for doing things the hard way. I like things lean and mean. If I knew how to inject code into jars I would just have fixed android.policy.jar and left it at that. My main need was a way to globally get back to my launcher desktop without onscreen controls (like Button Savior).

Renate NST said:
Thanks, Gabrial. I had read through this entire thread before and it had left me confused. 10 pages of talking about changing the UI and not a single screenshot? I'm still not sure how an activity picker or a recent apps dialog looks like. Heck, I'm not even sure what additional things you get in Settings. Is there even a tree list of what people should have?
Yes, I do have a penchant for doing things the hard way. I like things lean and mean. If I knew how to inject code into jars I would just have fixed android.policy.jar and left it at that. My main need was a way to globally get back to my launcher desktop without onscreen controls (like Button Savior).
Click to expand...
Click to collapse
Well said
I'd try to ask Nook Color forums too...

Well, I finally learned how to hack compiled Java code.
Now, I've got a simple press the "n" and it goes directly to your desktop.
It required just a bit of editing of android.policy.jar
Why would anyone want "QuickNav"?
It's not part of Android anywhere, it's just something B&N put in.

Sometimes I use library...

brendan10211 said:
Sometimes I use library...
Click to expand...
Click to collapse
You can drag the stock Library icon onto your desktop.
You can even put the stock Home or Shop there also.

I also use it to force refresh, but XorZone just made that soo

Renate NST said:
Well, I finally learned how to hack compiled Java code.
Now, I've got a simple press the "n" and it goes directly to your desktop.
It required just a bit of editing of android.policy.jar
Why would anyone want "QuickNav"?
It's not part of Android anywhere, it's just something B&N put in.
Click to expand...
Click to collapse
Hi,
I, same as you, like to modify my Nook as little as possible. In case of a future software upgrade, I would like to know what to change back before applying it.
Of course, I know I can just save the partitions (internal disk) and restore it as needed, but I would like to not need to do this.
Right now, I modified the gpio file for Search and created my own Launcher (base on Home Sample code in Android SDK).
Still, I don't like the need for Long Press on Search.
Could you please post the links which shows how to hack the android.policy.jar?
Maybe, if I don't ask too much, your edits to it?
Thanks!

Renate NST said:
[...] Why would anyone want "QuickNav"?
It's not part of Android anywhere, it's just something B&N put in.
Click to expand...
Click to collapse
Mainly because I don't like every device looking like an iPhone wannabe with a grid of icons. I like the reader focus with apps secondary. I do wish the QuickNav could be fully customized, including icons, easily.

bobstro said:
Mainly because I don't like every device looking like an iPhone wannabe with a grid of icons.
Click to expand...
Click to collapse
Mmm, Ok. Still, I don't like having to do three taps to do a non-book activity.
"n", then [launcher select] gets me anywhere.
The "currently reading" icon gets me back to my book.
I'm not fond of icons at all and have considered a list-oriented launcher,
but the fact remains that visually locking onto an icon is quicker.
That's why the QuickNav has icons on it.

Renate NST said:
Mmm, Ok. Still, I don't like having to do three taps to do a non-book activity.
Click to expand...
Click to collapse
There are only a few apps I use regularly on the NST, so I've just remapped the QuickNav buttons using Xor's NookTouch Tools to launch them directly: Library, maildroid, astrid tasks, calendar pad and dropsync. I find it quicker than pulling up a full launcher.
It's definitely a personal preference thing. I rather like that the NST isn't trying to be an iDevice. There's a minimalist 'Zen' to it I like.
I know you don't like additional software, but you can take it a step further using Folder Organizer. I set it to show items in the Notification menu, then show the "Starred items" and "Applications" menus in the Notification menu. You can launch apps and submenus this way, and also shortcuts, which can be handy to have 2 clicks away.
"n", then [launcher select] gets me anywhere.
The "currently reading" icon gets me back to my book.
Click to expand...
Click to collapse
For me, it's:
"n" then run my top 5 most often used apps directly from QuickNav (2 taps)
or tap Notification->app for regularly used (still 2 taps)
or at worst, Notification->Menu->app for stuff I don't use regularly (3 taps)
This give me progressively more focused listof apps. At no point do I have to go through a launcher, thus avoiding the dreaded iPhone-wannabe look. I never use a launcher except for maintenance tasks.
I'm not fond of icons at all and have considered a list-oriented launcher, but the fact remains that visually locking onto an icon is quicker. That's why the QuickNav has icons on it.
Click to expand...
Click to collapse
Folder Organizer does essentially what you've described. You can change the folder display to show:
icons with text
icons only
list with icon and text
list with text only.
I don't recall which features are available in the free version, but I like to toss a few bucks to developers when I can, so happily paid the few bucks for the full version.
Unfortunately, NookTouch Tools only allows you to set the 'n' key to show QuickNav or not. If it allowed setting it to launch a shortcut, you could pull up a nice targeted list of apps directly, thus bypassing the 5 item limit of QuickNav.

bobstro said:
Unfortunately, NookTouch Tools only allows you to set the 'n' key to show QuickNav or not.
Click to expand...
Click to collapse
Although I have no experience with any of the Tools, I presume that they
(like my mod) just generate an android.intent.category.HOME/android.intent.action.MAIN
Most "home-based" apps should already have this as a filtered intent.
You should be able to easily select one of them as the default.
Using specific "shortcuts" defeats the purpose of the Android intents system.

Renate NST said:
[...] Using specific "shortcuts" defeats the purpose of the Android intents system.
Click to expand...
Click to collapse
Does it have to be one or the other exclusively? For a basic launcher, pulling up the main app is sufficient. Other programs, such as Folder Organizer, provide shortcuts to user-defined categories, so I could have a subset of all available apps appear rather than a full launcher. Various readers provide shortcuts to books, and so on. Sometimes you don't want/need the full program.

Looks like they have the new Nook 1.1.5 OSS released: http://images.barnesandnoble.com/PResources/download/Nook/source-code/nook2_1-1-5.tgz
The "n" button is used turn the light on and off I think with long presses.
I pre-ordered mine already so will see when it arrives how it works.

Related

[APP][Feb 12, 2009] X1BC (X1 Button Controller) v1.1 Released

X1BC v1.1
X1 Button Controller
Feb 12, 2009
By Jonathan King​
Description
This program is released open source. Contact me if you would like a copy of the source. The program is capable of capturing both short and long presses of panel key, ok key, L/R softkeys, up/down volume keys, and the win key on the slide out KB. The camera half and full press can also be captured and fully configured for short and long half press, as well as short and long full press. Also, the camera key will be ignored while the camera program is open. Capturing each key is all optional. They can be switched by the registry keys detailed in the next post. By default, if the reg keys are not there, none are captured. You can capture the long press only, short and long press, or leave the key alone. Fn key presses are also detected for A, S, D, F, G, Z, X, C, and V keys. Registry strings are used to specify what happens when the key is pressed. You can choose to open execute anything from a program exe to a mortscript to an mp3. You may also configure it to send a character or special key. This allows maximum flexibility.
The program can also make the win key or tab key a ctrl key. There are two modes of operation for each key. For the win key: Short press mode (short press to enable ctrl then press a letter), Long press mode (press letter while holding ctrl). With the tab key, it is still possible to send a tab character: Short press mode (short press to enable ctrl then press a letter; long press sends tab chr), Long press mode (press letter while holding ctrl; short press sends tab chr).
The program also supports vibrate feedback for a press and hold event. The duration is configurable or this can be disabled. Also configurable is the duration you must hold a key for the long press to occur.
To start the key hook, just launch X1BC.exe. If it is already running, launching X1BC.exe again will end the program and restore the keys to default.
Notes
While the panel key is captured, on the ROM I run with no panels installed I still get a popup saying could not find panelmanager.exe. I am not sure what would happen on a ROM with panels installed. To prevent this all together delete the whole registry key HKLM\Software\Sony Ericsson\PanelManager. You may want to back it up first but there is not harm in deleting it. You do need this key if you want to use panels though. But if you do use panels you dont want to remap the panel key anyway.
Capturing the win key on the slide out KB is tricky, but I think I have done it in a way that wont cause problems. It works well as a ctrl key and I havent had problems with it, but I still think the tab key makes a better ctrl key because it behaves like a regular key and is therefore easier to manipulate.
Disclaimer, use at your own risk. I have tested and debugged in the emulator and on my X1. I dont do anything that I think could really cause any harm or data loss. Has never crashed on me at any point during dev. The program does not make any changes to the system. It just runs in the background. If terminated everything works as it did before the program was started. Try it out.
Registry settings:
The following are DWORD values:
HKCU\SOFTWARE\JKing\X1BC\CapturePanel
HKCU\SOFTWARE\JKing\X1BC\CaptureOK
HKCU\SOFTWARE\JKing\X1BC\CaptureLeft
HKCU\SOFTWARE\JKing\X1BC\CaptureRight
HKCU\SOFTWARE\JKing\X1BC\CaptureVolumeUp
HKCU\SOFTWARE\JKing\X1BC\CaptureVolumeDown
HKCU\SOFTWARE\JKing\X1BC\CaptureLWIN
Here are the possible choices:
0 - Leave the key alone
1 - Capture long press only
3 - Capture long and short press
The default if the value does not exists is 0
The following is also a DWORD but the format is different:
HKCU\SOFTWARE\JKing\X1BC\CaptureCamera
The possible choices are:
0 - Leave the key alone
1 - Capture long and short for half press only
2 - Capture long and short for full press only
3 - Capture long and short for both half and full press
The default if the value does not exists is 0
The following are string values:
HKCU\SOFTWARE\JKing\X1BC\PanelShortAction
HKCU\SOFTWARE\JKing\X1BC\PanelLongAction
HKCU\SOFTWARE\JKing\X1BC\OKShortAction
HKCU\SOFTWARE\JKing\X1BC\OKLongAction
HKCU\SOFTWARE\JKing\X1BC\LeftShortAction
HKCU\SOFTWARE\JKing\X1BC\LeftLongAction
HKCU\SOFTWARE\JKing\X1BC\RightShortAction
HKCU\SOFTWARE\JKing\X1BC\RightLongAction
HKCU\SOFTWARE\JKing\X1BC\VolumeUpShortAction
HKCU\SOFTWARE\JKing\X1BC\VolumeUpLongAction
HKCU\SOFTWARE\JKing\X1BC\VolumeDownShortAction
HKCU\SOFTWARE\JKing\X1BC\VolumeDownLongAction
HKCU\SOFTWARE\JKing\X1BC\LWINShortAction
HKCU\SOFTWARE\JKing\X1BC\LWINLongAction
HKCU\SOFTWARE\JKing\X1BC\HalfCamShortAction
HKCU\SOFTWARE\JKing\X1BC\HalfCamLongAction
HKCU\SOFTWARE\JKing\X1BC\FullCamShortAction
HKCU\SOFTWARE\JKing\X1BC\FullCamLongAction
HKCU\SOFTWARE\JKing\X1BC\Fn_A_Action
HKCU\SOFTWARE\JKing\X1BC\Fn_S_Action
HKCU\SOFTWARE\JKing\X1BC\Fn_D_Action
HKCU\SOFTWARE\JKing\X1BC\Fn_F_Action
HKCU\SOFTWARE\JKing\X1BC\Fn_G_Action
HKCU\SOFTWARE\JKing\X1BC\Fn_Z_Action
HKCU\SOFTWARE\JKing\X1BC\Fn_X_Action
HKCU\SOFTWARE\JKing\X1BC\Fn_C_Action
HKCU\SOFTWARE\JKing\X1BC\Fn_V_Action
Each action key can be one of three types: Execution of a file, sending of a character, or sending of a special key.
To execute a file, the string should contain the full pathname of the file to run. This can be an exe, mscr, lnk, mp3, doc, whatever. Enclose the path and file name in quotes, followed by a space, then any parameters if you desire if it is an executable. For instance:
Code:
"\Program Files\App\My App.exe" -p
To send a character, the string must begin with a # symbol followed by the character to send. For instance, to send a "$" character, they value of the string should be:
Code:
#$
To send a special key, the string must begin with a & symbol followed by the identifier of the special key to send. Here are the special keys:
W - Windows key
R - Rotate screen
Q - Send left softkey event
E - Send right softkey event
What other special keys would you like?
For instance, to send a windows key event, they value of the string should be:
Code:
&W
The following are DWORD values:
HKCU\SOFTWARE\JKing\X1BC\LongKeyTimeout
Delay for long key press in milliseconds. The default if the value does not exists is 500.
HKCU\SOFTWARE\JKing\X1BC\LWINCtrlMode
Here are the possible choices:
0 - Do not use as ctrl
1 - Short press mode (short press to enable ctrl then press a letter)
2 - Long press mode (press letter while holding ctrl)
HKCU\SOFTWARE\JKing\X1BC\TabCtrlMode
Here are the possible choices:
0 - Do not use as ctrl
1 - Short press mode (short press to enable ctrl then press a letter; long press sends tab chr)
2 - Long press mode (press letter while holding ctrl; short press sends tab chr)
(Note, you may use either LWIN or TAB for ctrl. Not both at the same time. If both of these keys are non zero, the tab key will be used. I recommend the tab key. It is more reliable.)
HKCU\SOFTWARE\JKing\X1BC\SupportMultipleKeyHooks
Here are the possible choices:
0 - OFF
1 - ON
The default if the value does not exists is 0. (Please leave as 0 for now. It does not work.)
HKCU\SOFTWARE\JKing\X1BC\HoldFeedbackDuration
Duration of vibration feedback for a long key press. Set to zero to disable. The default if the value does not exists is 35.
HKCU\SOFTWARE\JKing\X1BC\LandscapeOrientation
Set which landscape orientation the "R" special key will switch to. Choices:
0 - Left handed (correct orientation for the keyboard)
1 - Right handed
The default if the value does not exists is 0.
Known Issues:
-Does not support multiple key hooks (not really a problem as this is an OS limitation but see this post for details)
-LWIN long ctrl mode does not work
Changelog:
v1.1 [2/12/09]
-Added special key (&R) for screen rotation
-Added special keys (&Q and &E) for left and right softkeys
-Fixed bug that cause crash if Fn key was assigned to non existent file
-Will now prevent camera app from opening if you reassign camera button
-Changed format of reg settings for camera button
v1.0 [2/11/09]
-Improved WIN ctrl key support
-Added tab key short and long ctrl modes and registry setting
-Added key hold vibration feedback and registry duration setting
-Added capability to capture fn keys. Registry settings added
-Added capability to send character strokes and special keys
-Added capability to capture half and full camera button press. Registry settings added
-Changed default registry values to reflect correct installation directory for other languages
v0.4 [1/10/09]
-Fixed bug that caused extra long key press in one circumstance
-Fixed bug that caused crash during startup if registry strings were not formatted correctly
-Added option and registry value to change long press timeout
-Added short ctrl key feature and registry option for feature
-Added option to allow other key hooks (doesnt yet actually work)
-Now released in CAB format; CAB presets all reg values and creates shortcuts in startup and start menu
-X1BC now ignores keys by default if reg values do not exist, rather than capturing by default
v0.3 [1/07/09]
-Added registry keys for key actions
-Program now performs key actions from settings
v0.2 [1/06/09]
-Simplified reg settings
-Removed all but "exiting" popup during startup and shutdown
-Rewrote key hook algorithm for better reliability
-Unwanted keys now released to system as set by preferences
Todo List:
-Support multiple key hooks
Downloads below. Please note, the cabs will overwrite existing registry settings. If you want to upgrade from previous version, back up the settings first or just replace the exe. The cabs also place a shortcut in startup and in the start menu.
nice!
would look forward for the program when it's officially released
Heh, nice one Jking. I think the best way to go is to somehow "merge" your app with Dande's. Dande doesn't want to create a UI and uses mortscript, where you use the - in my opinion easier - registry. From what I see so far, you both have the same app, written in a different way, with the biggest change being you using the winkey (which I like), and Dande using the tab key.
I'd like to see where this goes, keep up the good work!
All the Best JKingDev, sorry I can't help. I don't know programming.
The biggest shortcoming of the X1 is the lack of buttons for mapping to apps and task manager. I miss the ease of button mapping on my previous i780.
Looking forward to your end product!
Good idea. Looking forward to this app.
cheers
I would love to see an option that would allow these button's to be exposed in the list of assignable buttons in the Buttons Settings control panel (similar to how Tilt developers were able to add the PTT button to it) to allow regular action assignments to those buttons.
Very interested to see how this application turns out!
millercentral said:
I would love to see an option that would allow these button's to be exposed in the list of assignable buttons in the Buttons Settings control panel (similar to how Tilt developers were able to add the PTT button to it) to allow regular action assignments to those buttons.
Click to expand...
Click to collapse
Yeah, me too! But I guess this is on driver level, not sure though!
Edit: I take that back, I remember that AEButtonPlus is able to add virtual keys to that list. But I think you still have to run your application at all time in the background, not really giving an advantage to this. I might be wrong again though.
@JKingDev
I was sending you my code. Didn't expect you to be this impatient
From what I have experienced, using the keyboard hook, it is not possible to remap the panel and the symbol button. Usually you can stop their original functionality to work by returning -1 in the hook, but that doesn't work with panel and symbol. So, at least at first sight, it seems to be not possible to remap these buttons.
You could consider also using RegisterHotKey, which is officially supported by the SDK. Mort told me that he uses it with MortPlayer and it seems to be quite powerful too. Maybe the hook and RegisterHotKey together allow you to do more than just with the hook. I thought that, when you can't do it with the low level hook, there is no other way at all to do it, that's why I didn't even bother trying.
Since you already started a thread in the development phase, maybe you should tell us what you actually plan to implement so that people can tell you in advance what they like about your concept and what they don't. Kind of collecting requirements before coding - like software engineering should be (and not like I did it )
Edit: By the way, in the zip file I sent to you by mail, you can also find a text file which documents the button sequences I was interested in. Helped me a lot while implementing.
Angelusz said:
Dande doesn't want to create a UI and uses mortscript, where you use the - in my opinion easier - registry.
Click to expand...
Click to collapse
First of all, the registry is only some kind of global application configuration database (and a bad idea from microsoft if you ask me). The registry can only enable functionality that is implemented in an application. In contrary to that, MortScript allows you to implement functionality that my application doesn't.
Despite of being completely different things, I don't find fiddling in the registry easy nor secure, but that's another topic.
Ah, and no offense intended, alright
@Jking:
THANKS for this great idea !!
X1 is missing a dedicated REC key
I desperately need this function
One-touch key press to automatically start recording a voice note
Maybe your software will finally let me use my Xperia as a voice recorder
Thank you for all the support! I am glad there is interest in this. It is nice to give back to this great community. New test version. I rewrote the key hook algorithm to handle the win and softkeys in a smoother way. Shouldnt have any prolems now. Now, if you put in settings to not capture a it should be released to the system like normal. Also changed up the registry settings a little bit to streamline the code. Made note of the new format in the second post. Next step will be to actually perform user specified actions when keys are pressed. It will actually become useful.
For some reason, when I set the grab volume key settings to 0 and completely ignore them, they still dont do anything while X1BC.exe is running. I am not sure if this is my app doing this or AEBP screwing with me since I still have it installed. Does anyone else get this problem?
millercentral said:
I would love to see an option that would allow these button's to be exposed in the list of assignable buttons in the Buttons Settings control panel (similar to how Tilt developers were able to add the PTT button to it) to allow regular action assignments to those buttons.
Very interested to see how this application turns out!
Click to expand...
Click to collapse
I believe this can be done since AEBP does it but I am not sure how. I have a slight idea of what I think it does. It involves adding some registry keys then sending custom key codes. I will look into this after I have accomplished everything else I want with this app. Can't make any promises but I will try.
Dandie said:
Yeah, me too! But I guess this is on driver level, not sure though!
Edit: I take that back, I remember that AEButtonPlus is able to add virtual keys to that list. But I think you still have to run your application at all time in the background, not really giving an advantage to this. I might be wrong again though.
Click to expand...
Click to collapse
Yes I think you are correct on this. The only advantage is assigning special keys like <rotate screen> ect. Most of those things you can find exe's for or use a mortscript anyway though, and my app will allow you to specify any exe/mortscript/file to run/open anyway.
Dandie said:
@JKingDev
I was sending you my code. Didn't expect you to be this impatient
From what I have experienced, using the keyboard hook, it is not possible to remap the panel and the symbol button. Usually you can stop their original functionality to work by returning -1 in the hook, but that doesn't work with panel and symbol. So, at least at first sight, it seems to be not possible to remap these buttons.
You could consider also using RegisterHotKey, which is officially supported by the SDK. Mort told me that he uses it with MortPlayer and it seems to be quite powerful too. Maybe the hook and RegisterHotKey together allow you to do more than just with the hook. I thought that, when you can't do it with the low level hook, there is no other way at all to do it, that's why I didn't even bother trying.
Since you already started a thread in the development phase, maybe you should tell us what you actually plan to implement so that people can tell you in advance what they like about your concept and what they don't. Kind of collecting requirements before coding - like software engineering should be (and not like I did it )
Edit: By the way, in the zip file I sent to you by mail, you can also find a text file which documents the button sequences I was interested in. Helped me a lot while implementing.
Click to expand...
Click to collapse
Sorry for my impatience. I had lots of free time and was itching to put my coding skills to work. I have wanted to write a button mapper since I owned a mogul (on my 6700 i used pqzII to make the win key a ctrl mey; i missed this functionality) but I never got around to it.
About the panel key, a key hook is able to detect the panel key presses, but for some reason it is unable to prevent the system from detecting it too like it can for other keys. This is why the work around to delete the panel manager registry key is necessary. Once you do that, the system ignores the key. Hotkeys sounds like a good idea. As it is, it works for me. I can try hotkey later though to see if that works out better. Deleting the panel manager key is an easy work around though if you dont use panels.
Well as far as key functions, you will specify via registry key what file/program to open/run. It could be and exe, mortscript, mp3, whatever. I think that allows max flexibility. Run a program directly, or run a mortscript if you have something more complex you want the key to do. The same functionality as yours, the only difference is that this can also run an exe directly as opposed to writing a script to run the exe.
After that, I want to implement the win key as a ctrl ley. There will be four modes. 1.) Disable ctrl key: allow the ctrl key to be assigned for short and long presses like it is now. 2.) Short ctrl key: Short press + letter sends ctrl key while a long press is mappable like it is now. 3.) Hold ctrl key: Hold + press letter then release sends ctrl key, while short press is assignable to something else. 4.) Full ctrl key: both short and hold methods send ctrl key.
Next I will add FN+key combinations to be assignable the way the other keys are (run exe/script/open file).
After that it will be looking into the suggestions of others such as virtual app keys.
Dandie said:
First of all, the registry is only some kind of global application configuration database (and a bad idea from microsoft if you ask me). The registry can only enable functionality that is implemented in an application. In contrary to that, MortScript allows you to implement functionality that my application doesn't.
Despite of being completely different things, I don't find fiddling in the registry easy nor secure, but that's another topic.
Ah, and no offense intended, alright
Click to expand...
Click to collapse
The purpose of using the registry is not really to make things easier, it is just to make things configurable. You may choose what keys to trap and turn the ctrl key on or off. Mortscripts are very powerful and easy and I still give you the option of using them. But if all you want the key to do is launch a program, why launch a script just just launches a program? I give you the option to just launch that program directly.
New version 0.3. Now the keys are fully functional. The program is actually useful now. The registry keys to set for the key actions are detailed in the second post. All fully functional. I have stopped using AEButton plus now as X1BC does everything AEBP was doing. No more AEBP splash on boot. Now on to what AEBP doesnt do, ctrl key, fn keys, ect.
One caveat though. I figured out what the problem was with the volume keys. I use the HTC Blackstone volume control. It seems certain that HTC volume control as well as you tube, radio, ect use key hooks. Even if I tell my program to ignore the volume keys, pressing volume up will bring up the volume control but after that the volume keys wont change it. The reason why is that once HTC volume control pops up it sets a key hook to control the keys. If my app already has a key hook set, HTC VC will be unable to install its own hook, thus cannot grab the keys. I proved that HTC VC uses a key hook by closing X1BC, launching the VC, then trying to launch X1BC. My app reported as expected that it could not install the hook.
I noticed something very interesting a while ago though. I can launch X1BC even while AEBP is running and it will work. I didnt think much of it but now I realize that this is important. HTC VC works fine even if AEBP is running. AEBP certainly uses a key hook. I can launch AEBP first then launch X1BC. If I first launch X1BC then launch AEBP, AEBP wont work. I think this means that AEBP has some mechanism of supporting a second key hook. Probably the same way hookmgr works. I will try installing that and seeing if it makes the HTC programs and X1BC work together peacefully. Ultimately though, I want to give X1BC the capability to support another program setting a key hook. Not a big deal though. The HTC programs still work. Pressing a volume key brings up the volume control then you can control with your finger.
It is fully functional for mapping the hard keys now! Try it!
@JKingDev
I would still like to know what exactly you plan to build as the application, I mean featurewise. What features and maybe layout do you want the final application to have? It does really make sense to gather feature requests before starting the development of a complex software, otherwise people will always tell you what they would like to have changed. I think you would save quite a lot of implementation effort that way and you also could arrange your architecture a bit to the "final" structure of the application.
Dandie said:
First of all, the registry is only some kind of global application configuration database (and a bad idea from microsoft if you ask me). The registry can only enable functionality that is implemented in an application. In contrary to that, MortScript allows you to implement functionality that my application doesn't.
Despite of being completely different things, I don't find fiddling in the registry easy nor secure, but that's another topic.
Ah, and no offense intended, alright
Click to expand...
Click to collapse
None taken. I'm just trying to add some perspective here. This is a developers site - true. So you can expect some people to be able to work with mortscript - true. But, regardless of any other arguments, there's a lot of users who just don't grasp scripting like with mort's and/or cba to learn yet another language. It's really good to support mortscript, all I'm saying it's nice to have the "easier" and simpler options as well. I will probably get into mortscript soon, too - as soon as university loosens up.
Now, on this application itself - it's looking really good Jking, it would be lovely to have it support multiple keyhooks. Another feature I'd like to see is grasping software keys, like for instance when tapping the clock in TF3D. I'd like to be able to set what that does as well; e.g. remap it to an application or something. Same goes for calender etc. - is your current code able to support that too?
Keep up the great work, this one is starting to look like a keeper!!
(Although I like AEbuttonplus, I read/noticed some downsides about it and would rather replace it.)
Dandie said:
@JKingDev
I would still like to know what exactly you plan to build as the application, I mean featurewise. What features and maybe layout do you want the final application to have? It does really make sense to gather feature requests before starting the development of a complex software, otherwise people will always tell you what they would like to have changed. I think you would save quite a lot of implementation effort that way and you also could arrange your architecture a bit to the "final" structure of the application.
Click to expand...
Click to collapse
Dandie, I am not sure quite what you mean by this. I outlined all the features I plan to implement. The application is in its final structure, I am just still adding features. What more details did you want to know?
Angelusz said:
Now, on this application itself - it's looking really good Jking, it would be lovely to have it support multiple keyhooks. Another feature I'd like to see is grasping software keys, like for instance when tapping the clock in TF3D. I'd like to be able to set what that does as well; e.g. remap it to an application or something. Same goes for calender etc. - is your current code able to support that too?
Keep up the great work, this one is starting to look like a keeper!!
(Although I like AEbuttonplus, I read/noticed some downsides about it and would rather replace it.)
Click to expand...
Click to collapse
Thanks Angelusz. I don't believe that capturing things like tapping the clock in TF3D is possible though. Tapping software buttons does not generate a keyboard event. Only actual keys do. Therefore unless TF3D sends key events for some reason this would not be possible.
JKingDev said:
Dandie, I am not sure quite what you mean by this. I outlined all the features I plan to implement. The application is in its final structure, I am just still adding features. What more details did you want to know?
Click to expand...
Click to collapse
Oh, then I must have overlooked something. What configuration possibilities do you want to offer in your UI, what do you want to offer via registry configuration and what must be done via scripts or additional programs. E.g. what do you want to implement what a powerful program like AEButtonsPlus offers, what do you don't want to offer and what do you want to add to it to make it better. Starting a discussion like this would pop up many good ideas for a somewhat perfect application, you will see.
By the way, a software never is final - unless you declare it final, which basically means you stop the development.
JKingDev said:
Dandie, I am not sure quite what you mean by this. I outlined all the features I plan to implement. The application is in its final structure, I am just still adding features. What more details did you want to know?
Thanks Angelusz. I don't believe that capturing things like tapping the clock in TF3D is possible though. Tapping software buttons does not generate a keyboard event. Only actual keys do. Therefore unless TF3D sends key events for some reason this would not be possible.
Click to expand...
Click to collapse
I think you're right, I have however found a tool that allows me to remap the paths! http://forum.xda-developers.com/showthread.php?t=407777
Dandie said:
Oh, then I must have overlooked something. What configuration possibilities do you want to offer in your UI, what do you want to offer via registry configuration and what must be done via scripts or additional programs. E.g. what do you want to implement what a powerful program like AEButtonsPlus offers, what do you don't want to offer and what do you want to add to it to make it better. Starting a discussion like this would pop up many good ideas for a somewhat perfect application, you will see.
By the way, a software never is final - unless you declare it final, which basically means you stop the development.
Click to expand...
Click to collapse
Well I wasnt planning on making a UI unless people absolutely want to. All my settings are easily changeable in the registry. The second post outlines all the available options. When I add the ctrl key and fn keys there will be options for these too. There will also be an option to allow other key hooks if I get that working. Nothing must be done via scripts or other programs. Simply enter in the registry what file to run or open when the key is pressed. Everyone is free to make requests. There is one request to emulate virtual hard keys and I will try addressing that later. I am not trying to match AEBP. I did this a.) becausse AEBP is a bloated all purpose app; mine is tailor made for the X1, and much smaller and lighter; b.) AEBP costs money; c.) AEBP cannot create a ctrl key or grab FN keys; AEKM does, meaning purchasing another application. If there is something more you would like to see the app do let me know. Otherwise, I have laid out everything that is in the plan already.
Angelusz said:
I think you're right, I have however found a tool that allows me to remap the paths! http://forum.xda-developers.com/showthread.php?t=407777
Click to expand...
Click to collapse
Glad you got that worked out. I thought there would be something of this nature.
Hi JKingDev,
I have tired X1BC for only one button so far (long press ok button to switch to 2nd today). So far everything is working quite nicely.
With AEBP I was facing a significant battery capacity drainage this was for me the main reason to look out for another button mapper. At least in my configuration I was able to reproduce this battery problem (I had 3 buttons asigned with a double click function and the action menue). But this is reported allready (Touch HD forum, because it happens on the Touch HD as well). It is realy a pity, because AEBP is a great application and was the very 1st I was installing on a WM phone.
As long as there is no UI maybe you could do a presetting of all those reg key with a samll cab file? And fill the dword with "0" - I understand that than the key has just its standard behaviour.
Because than I just have to type "only" my individual settings (I am lazy - I know).
For making program starting easier I have the idea to create in the reg keys a path name to a standard link such as
"\Program Files\X1BC\OKLongAction.lnk"
Than I create a new link for the program I want to start, rename it to "OKLongAction.lnk" and overwrite with this new link the one in the standard directory.
This would allow to make changes without playing arround in the regestry all the time.
Best regards & Many thanks for this great tool!
dingolino
Registry settings:
The following are DWORD values:
HKCU\SOFTWARE\JKing\X1BC\CapturePanel
HKCU\SOFTWARE\JKing\X1BC\CaptureOK
HKCU\SOFTWARE\JKing\X1BC\CaptureLeft
HKCU\SOFTWARE\JKing\X1BC\CaptureRight
HKCU\SOFTWARE\JKing\X1BC\CaptureVolumeUp
HKCU\SOFTWARE\JKing\X1BC\CaptureVolumeDown
HKCU\SOFTWARE\JKing\X1BC\CaptureLWIN
Here are the possible choices:
0 - Leave the key alone
1 - Capture long press only
3 - Capture long and short press
The following are string values:
HKCU\SOFTWARE\JKing\X1BC\PanelShortAction
HKCU\SOFTWARE\JKing\X1BC\PanelLongAction
HKCU\SOFTWARE\JKing\X1BC\OKShortAction
HKCU\SOFTWARE\JKing\X1BC\OKLongAction
HKCU\SOFTWARE\JKing\X1BC\LeftShortAction
HKCU\SOFTWARE\JKing\X1BC\LeftLongAction
HKCU\SOFTWARE\JKing\X1BC\RightShortAction
HKCU\SOFTWARE\JKing\X1BC\RightLongAction
HKCU\SOFTWARE\JKing\X1BC\VolumeUpShortAction
HKCU\SOFTWARE\JKing\X1BC\VolumeUpLongAction
HKCU\SOFTWARE\JKing\X1BC\VolumeDownShortAction
HKCU\SOFTWARE\JKing\X1BC\VolumeDownLongAction
HKCU\SOFTWARE\JKing\X1BC\LWINShortAction
HKCU\SOFTWARE\JKing\X1BC\LWINLongAction

How to edit Home shortcuts in 1.5? (AnyCut won't)

Before 1.5, I used AnyCut to edit the length of my Home shortcuts. For example, "Power Manager Pro" is too long to fit in the icon space allotted. So I'd fire up AnyCut and shorten it to "Power" or something.
But 1.5 seems to have broken this ability: instead of getting a selection of shortcuts to edit, I just see a blank screen.
I asked in the #android channel last night, and someone said they helped write Home and that these were in a SQLite database.
If so, can I change them myself using some tool like SQLite Admin? I've looked for a database where it seems logical, i.e. /data/data/com.android.home and the like, but haven't found it yet.
You can try Bettercut maybe, which is an enhanced version of anycut. Or a Home app like dxtop, you can change names and icons on any shortcut. Sorry, don't know about the technical stuff, but it will work.
why dont you just make the shortcut with anycut and once it tells you to enter the name of it just chage it to what you want......
EX: long press home screen>shortcuts>anycut>activity>power manager pro>"change the name"power>ok and your done
xm0is3sx said:
EX: long press home screen>shortcuts>anycut>activity>power manager pro>"change the name"power>ok and your done
Click to expand...
Click to collapse
I hadn't thought of it that way. So I tried, but it would only create shortcuts if I didn't change their name. When I renamed them, nothing at all was put on the screen.
The problem seems to be that Cupcake changes where (and maybe how) the Home shortcuts are stored. Which breaks certain programs, Anycut in particular. But also, MyBackup had to be updated so it could again back up Home shortcuts in Cupcake phones (same went for the browser bookmarks, I think).
These shortcuts are in /data/data/com.android.launcher/databases/launcher.db in a SQLite database. Use a SQLite admin tool to look at table "Favorites", field "Title" -- this is where the names on the icons are stored.
The problem is, editing that file. It seems to be "in use", so you can't make edits or replace it (tried, failed). I guess I could try the sqlite3 tool included on the platform. But it's CLI/text only, and pretty obscure to me so far.

[WebTop]-[How To] Create shortcuts to custom phone actions on Webtop

I looked around and couldn't find a detailed guide on how to do this so I figured it out and decided to share..
Prerequisites:
Working Webtop
XFCE Desktop
or
AWN Manager
aLogcat > https://market.android.com/details?id=org.jtb.alogcat&hl=en
This is a simple proccess which will require you to use aLogcat to get the activity name of the item you want to launch and then simply make a new shortcut item on your launcher.
Getting our activity name:
Launch aLogcat
Hit the menu button on your phone
Select Filter
type "activityMan"
leave the option for regular expression unchecked
--Now that your application is logging and filtered you will see a window with alot of text. This is where we will be searching.
hit your menu button again
Select Clear
Now hit your home button and navigate to the icon you would like to be able to directly launch from your webtop and click it.
Go back to aLogcat
Hit the menu button on your phone.
Choose the pause option from ALogcat
***Now were going to search for the string we need to tell activity manager which activity to launch**
Look through your log for something that looks like this: "com.p1.chompsms/.activities.ConversationList" (this one will launch ChompSMS)
In my case the entire line looked like this: /ActivityManager( 1700): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.p1.chompsms/.activities.MainActivity bnds=[5,343][115,483] } from pid 3088
copy the string that comes after "cmp=" (bolded above)
Creating the shortcut
Depending on which interface you are using this will differ slightly:
For AWN Manager
Open AWN Manager
Choose Launchers
Click Add
Set your name description and Icon
For Command add the following: androidlauncher --action "android.intent.action.MAIN" --cmp "<TEXT THAT YOU COPIED ABOVE>"
For XFCE
Right click on the task bar.
Choose "Customize Panels"
Next to where it says Panel 1 hit the + button to create a new Panel.
**Select the new panel and edit its options**
Set it to Normal Width | Fixed position | And then select the position where you would like to see it on your screen.
Change icon size to suit your taste. (Tip, if you would like to use the icon for the application an easy way to get it is to Google "AppName icon" and then use Google's image search. Choose an icon that's somewhere near 96*96 (you can sort by size), save it and select it from the menu.
Now that we have created a shortcut / panel
Right click the new panel / Icon
Add new Items
Launcher
Set your name description and Icon
For Command add the following: androidlauncher --action "android.intent.action.MAIN" --cmp "<TEXT THAT YOU COPIED ABOVE>"
you now have a working shortcut that will pull up the app or activity in "Mobile view" on your webtop!
Yay.
If anyone knows any more tricks with this please let me know! I have been wondering if it is possible to tell the app to come up in full screen.
** if this helped you please remember to hit the thanks button (help a guy boost his newb cred) **
Thanks for this. You probably saved me a lot of time because I was going to try to figure out how to do this.
Have all the apps on the phone worked without problems?
Also, does the Entertainment App work thru XFCE Desktop without the Awn dock?
blingmaster said:
Thanks for this. You probably saved me a lot of time because I was going to try to figure out how to do this.
Have all the apps on the phone worked without problems?
Also, does the Entertainment App work thru XFCE Desktop without the Awn dock?
Click to expand...
Click to collapse
I haven't tested enough to say whether everything works or not. I also haven't eve used the entertainment center . This was one of the primary reasons why I was frustrated with the original webtop. They gave use the ability to launch only a couple of their apps rather than just creating a mechanism for us to select apps for shortcuts. This is something I may look into developing in the future.
Awesome work! I was just going to look at this today after looking at XFCE menu editing yesterday and BAM you already did it!
Too bad I broke my webtop somehow and had to start over this morning. I'm getting so practiced I could do it in my sleep!
Upon further thinking, you could probably just create a .desktop file like the other ones have and then it would automagically get put in the XFCE menu. Then it could be scripted and added into webtopscripts or something.
stewartsoda said:
Awesome work! I was just going to look at this today after looking at XFCE menu editing yesterday and BAM you already did it!
Too bad I broke my webtop somehow and had to start over this morning. I'm getting so practiced I could do it in my sleep!
Upon further thinking, you could probably just create a .desktop file like the other ones have and then it would automagically get put in the XFCE menu. Then it could be scripted and added into webtopscripts or something.
Click to expand...
Click to collapse
Last night was my first night with a working webtop, being able to quickly launch ChompSMS , or pandora on my mobile view was top priority for me. Now that I have that mostly handled I guess I need to move on to learning XFCE tweaks. I'm really glad this helped, I was really surprised that this wasn't already hashed out and detailed, but I was glad to finally be able to contribute something over here!
Hi nineismine,
Mind to provide me a little bit of extra info on the below? Thank you in advance.
(1) How to "remove" the pre-installed short-cut apps in mobile view? For example the "Messaging". I rather prefer to replace this with the "Text Messaging" by following your tutorial.
(2) How to "remove" the pre-installed short-cut apps in webtop view? For example, mine Atrix is Asia Retail version and it build-in with the "Motorola Video" app-tray which I have no idea how to "remove" it.
I herewith attached the screenshot on my stock webtop for your reference (the stock webtop do support screenshot feature and I learn this from this link: http://forum.xda-developers.com/showpost.php?p=17093665&postcount=3)
Edited:
I found my solution by installing the webtop2SD. My issue solved. Thanks.

[SOLVED] Minimalistic Text widgets help

See following post for workaround
I tracked down an old version of the app (2.6.2--extracted from one of the nooter project file zips) and installed it on my NST, hoping to create a simple date-day widget.
I must be daft. I cannot get a widget to display! I can go through the entire creation and customization process. I can "see" the preview result while in the settings section. But nothing appears on the home screen
I tried installing the same app on my little KitKat device and had no issues with the widget appearing on the home screen. This version of the app was surely known to work with the NST or else it would not have been included in the nooter package.
Does anyone have any experience with Minimalistic Test on the NST? I must be missing something. I have no problem adding other widgets.
Workaround
Whew! It's too bad there wasn't any chatter on the forum about working with this app. Maybe something in the newer NST firmwares just makes it mad, but whatever may be the case, here's what I did:
The last version for Eclair is 2.6.3. You can get it straight from the developer here: http://devmil.de/MT/MinimalisticText_2_6_3.apk
I did this on a system running FW 1.2.2 but I'm pretty sure this will apply to 1.2.1 also. Installation goes OK but apparently the file minimaltextprefs*.xml in /data/data/de.devmil.minimalitext/shared_pref is malformed in some way. Things just don't behave the way they should. While I floundered about I ended up installing the app on my little KitKat media player and then copied the minimaltextprefs*.xml file from that device and used it to replace the one on the NST. Voila! There is a number at the end of the file name and you can make the replacement file the same as the original file, but the number does change as you use the app. I have attached a zipped copy of the file I used below.
For me the best use of the widgets is with black text and no background. Unfortunately the opening settings screen of the app is black.... So if you use black text (the default is white) you will see nothing except a box for your widget. However, within the customization section there is a preview pane which lets you see what you've got.
One last--and the most important--thing. Supposedly when you've made changes the "back" button saves these. Not on the NST. Instead, while in the settings section (anywhere except the customization preview pane) if you tap the "menu" button one of the options that pops up at the bottom of the screen is "OK". That is how you save your changes. Using the "save" command at the end of the settings just places things in a file for later reference.
All this for a date-month-day text widget...... But you can do a lot more with the app, so maybe someday.
I want to thank @Devmil for providing the direct link to v. 2.6.3 and also for having patience with me while I tried to figure all this out.

The NSTG turns 10! Time for a makeover.

The impetus for my project was the purchase of a (surprise!) late production line NSTG with a flawless light-dispersing layer. And I thought...this deserves a rethink. Thanks to @Renate for help with the status bar background color and clock color. The rest is a combination of DesktopVisualizer, Simi Folder, Tasker apps (only 2), Minimalistic Text, a little judicious wallpaper design, and fooling with the framework-res.apk.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Features:
-glowlight instruction banner removed from screensaver image
-status bar background changed to white
-modernized "now reading", "back", and "menu" buttons
-date/greeting widget (updates automatically)
-weather widget (3 hr updates from data scraped at 3 am)
-"Now Reading" bookcover widget with reader "badge"
----image is automatic for non-DRM epubs, requires one button press for others
----image (whether automatic or manual) is possible to set as screensaver
----image is "smart", duplicating function of "reading now" button, and knowing which reader to open for which book (button also is now "smart")
-icons in dock are Simi folder shortcuts (except for drawer icon) and open groups of apps (stock reader, Kindle, EBookDroid, as an example)
-QuickTiles fully integrated
Edit: the current version now also supports PerfectViewer as a reader option
More screenshots below.
(YouTube insisted on muting the short segment featuring Ella Fitzgerald, if you can believe it...)
"How-to" guide begins in post #11
WHOA !!! Seriously ?
hahahahahaha ... LOVE IT !!!
What is this ? ... a concept yet to be realised or an actual working 'Neu Home' for our awesome little NSTG's ?
aiamuzz said:
WHOA !!! Seriously ?
hahahahahaha ... LOVE IT !!!
What is this ? ... a concept yet to be realised or an actual working 'Neu Home' for our awesome little NSTG's ?
Click to expand...
Click to collapse
It's a real thing. I've been using it for a few weeks, tracking down small issues. Think I've got them all. But...it's just ADW launcher dressed up with some nice features. The underlying B&N system remains.
nmyshkin said:
It's a real thing. I've been using it for a few weeks, tracking down small issues. Think I've got them all. But...it's just ADW launcher dressed up with some nice features. The underlying B&N system remains.
Click to expand...
Click to collapse
Excellent ... where is my Nook Manager SD Card !!!
When are you planning to release it for the public with the instructions set ? ... Look forward to it.
An NSTG specific ADW launcher ... Fantastic !!!
aiamuzz said:
When are you planning to release it for the public with the instructions set ? ... Look forward to it.
Click to expand...
Click to collapse
Mmm....not sure. I actually have not tried applying this to a second device. I'm sure I can do it, but there are a lot of moving parts. I need to try and simplify the process. I didn't actually think anyone else would be interested!
Probably some kind of of gradually increasing functions, like just the status bar change (easy). That's just an update of the framework-res.apk using CWM. Then add in the smart "reading now" button (without the bookcover widget). That's just a pair of apps in which I can disable all the widget stuff.
That, I think, would be doable by anyone. The rest really is window dressing. It suits me, but not all the elements may suit others. I need to look at the portability of the widgets. If that were possible it would simplify things a lot.
Edit: Well, some good news for a change. The widgets can be "exported" in a file and then read into a different device. So for people who want to duplicate any of the widgets they see on my screen (or use them as starting points), the path is smoother.
Anyway, that's my next "job".
Really good stuff. Wish I had another NST to experiment on, it's crazy what you can still do with them.
nmyshkin said:
The impetus for my project was the purchase of a (surprise!) late production line NSTG with a flawless light-dispersing layer.
Click to expand...
Click to collapse
Hey ... is there anyway to know if my NSTG is from a late production line ?
jun127 said:
Really good stuff. Wish I had another NST to experiment on, it's crazy what you can still do with them.
Click to expand...
Click to collapse
now i am getting impatient ... hope you are able to toss in a easy tutorial for us to try this !!!
aiamuzz said:
Hey ... is there anyway to know if my NSTG is from a late production line ?
Click to expand...
Click to collapse
Not to my knowledge. I've only ever read about the change in background color and beefing up of the dispersing layer in one place. They could have made it up, but there is no doubt about background "white" when I line up an NST, my new NSTG, and my older NSTG. There's a clear progression to a darker background.
Now there could simply be something wrong with my old NSTG that makes the background so dingy, but I don't think so.
aiamuzz said:
now i am getting impatient ... hope you are able to toss in a easy tutorial for us to try this !!!
Click to expand...
Click to collapse
I can't guarantee "easy", but it will be my usual "overly detailed"
How-to
Disclaimer: I am not responsible for anything odd you do to your NST/G. Make a backup.
"My habits protect my life, but they would assassinate you."--Mark Twain
For this reason my original instructions were very incremental and complex. I now think that was a bad idea.
I recently discovered a way to create CWM flashable zips of installed and configured apps. I thought this might vastly simplify recreating the "new UI" look. I think I was right. I also decided that it was better to install everything at first and then subtract (uninstall) stuff that you don't want, seeing as how there are so many moving pieces and lots of dependencies. You can decide if I was right.
STAGING
Note: you need a good file manager app on your device and may also need some kind of working gallery app (like QuickPic), depending on whether the activity picker recognizes your file manager app fully. I was able to get along with ES File Explorer.
1. Make a CWM card (https://forum.xda-developers.com/t/...od-based-recovery-fixed-backup-issue.1360994/), using either of the two SD card versions.
2. Download framework_newUI_CWM.zip and NST_newUI_CWM.zip. Copy these files onto the CWM card you have made.
Spoiler: What's in the zips?
framework_newUI_CWM.zip
/system/framework/framework-res.apk
/system/framework/services.jar
/system/framework/com.google.android.maps.jar
/system/etc/permissions/com.google.android.maps.xml
/data/local/fb2png
Changes to the framework-res.apk were needed to change the status bar to white and update the icons. This version also includes a few minor changes to address problems with invisible text in some apps. An update to services.jar was needed to change the clock to black text. This version of services.jar contains the patches needed for NookTouch ModManager. If you don't run NTMM, the patches are ignored. The two small "maps" files are dependencies for Tasker and any apps created with Tasker (such as NST UI, SetCover, NSTWeather and QuickTiles). These files don't do anything but if you ever want to install any of the other apps I have created with Tasker, their presence will save you a step.
The small binary file fb2png is a replacement for the malfunctioning /system/bin/screenshot. It converts the contents of the frame buffer into a graphics file with png format.
NST_newUI_CWM.zip
ADW Launcher (configured)
DesktopVisualizer
SimiFolder (sample folder configured)
Wallpaper Chooser
NST UI (dependency on MinimalisticText)
MinimalisticText (widgets pre-configured)
RotationLocker
QuickTiles (dependency on RotationLocker)
NSTWeather Widget (dependency on MinimalisticText)
So, it's pretty complicated and that's why I think this CWM method is best. In particular, MinimalisticText is difficult to install properly on the NST/G. Even following my own instructions it's hit-or-miss. This way you have a working version install with no effort. You can eventually uninstall things you are not going to use. Look for those tips in the instructions.
3. Download folders.zip. Inside the zip are two folders, media and sdcard. Copy the contents of the "media" folder to /media on your NST/G. If there is not already a "screensavers" folder in /media, create one and inside that create the folder "CurrentBookCover".
Next, copy the contents of the "sdcard" folder to /sdcard on your NST/G. If there is not already a "Pictures" folder in /sdcard, create one and inside that create the folder "Screenshots".
You now have everything you need to reproduce the UI shown in the first post.
INSTALLATION
1. Make a backup of your NST/G. Everything you are going to do is reversible, but it would be so much easier to just restore a backup if you decide you don't like the result.
2. Power down, remove your regular sdcard and replace it with the CWM card. Power up. Wait for CWM to pass the splash screen and display the first menu.
If you're not familiar with CWM, movement in the menu and item selection are controlled by hardware buttons:
upper left: previous menu, upper right: up, lower right: down, "n" button: select.
a. move down the menu to "install zip from sdcard". Press "n"
b. press "n" again ("choose zip from sdcard")
c. move to framework_newUI_CWM.zip and press "n"
d. move either up or down to confirm the file you want to flash and press "n"
Spoiler: I only want the updated Status Bar!!!
skip e,f,g and after the reboot is complete, delete all the "folder" content from both /media and /sdcard
e. again, select "choose zip from sdcard" (press "n")
f. move to NST_newUI_CWM.zip and press "n"
g. move either up or down to confirm the file you want to flash and press "n"
The screen gets a little mushed up with the menu after two flashes, but all you need is to get back to the beginning.
h. go back (upper left button) until the first item in the menu is "reboot system now"
i. remove the CWM sdcard and replace it with your usual sdcard, then press "n"
Chug, chug, chug... Boot may take a little longer because of replacing the framework-res.apk, but be patient.
THE DETAILS
1. Change Wallpaper (may have to do it twice for it to take effect). Tap on the Wallpaper Chooser app and navigate through the tiny print to /media/Wallpaper. There are three files. You want "NST UI Background_p.png". The other two files are for a smoother transition to landscape mode (handled by QuickTiles). If you never use your device in landscape mode you can design your own wallpaper to suit without making a version for landscape. The Wallpaper Changer app is sort of funky, but it gets the job done. If you have my Nook Settings app, there is a wallpaper setting under "Display", so you could delete Wallpaper Changer in that case.
2. Initialize NST UI by tapping on the icon. You are taken back to the home screen and get an SU permission prompt.
3. Use NTMM to assign NST UI to the status bar "reading now" button.
Spoiler: I only use the stock reader!!
In that case you do not need to assign the NST UI app to the "reading now" button. Everything else will function fine.
Also assign ADW Launcher to the "n" button.
Note: if you are not familiar with ADW Launcher, the three dots at the upper right corner of the app drawer screen are your friend. The first option allows you to hide apps from the drawer, the second to create additional tabs if you want to group apps. And it's a convenient place to access the App Manager.
4. Add BookCover widget (DesktopVisualizer), scale and position.
a. Long press on the home screen somewhere blank. You will see a dialog. Tap as needed to get to "Widgets."
b. Select a 4x4 Desktop Visualizer widget.
c. A place-holder for the widget appears somewhere on the home screen. Long-press until you can drag the image down to below "Now Reading". Then tap on it.
d. Tap on "Select Icon" (this will be the book cover image). Tap on "Image File". You'll see a selection of possible apps that might open such a file. In my case that was ES File Explorer. If nothing shows up that will allow you to navigate to /media/NowReading/NSTcover.png or select from a variety of images (with a gallery app like QuickPic) you will need to install something.
e. Tap on "Select Action". You will see options. We want to launch an app.
Note: if you would rather not have the book cover image repeat the function of the "reading now" button, select "None". In that case tapping on the book cover image will have no effect.
Select NST UI. This makes the widget active as a "button" which will open the "Now Reading" book.
f. To complete the setup of the widget, trash the Label and select "None" for the Touch Effect color. Then tap on OK.
g. You are now back on the home screen:
Long-press on the widget until you see the dialog open and select "Resize":
The best option for me was to move the bottom handle down a little. This gave an image that seemed to fit in the space and had the right aspect ratio. Compare with the screenshot in the first post. Of course you can position and size the image any way you want if you are developing your own design. When you select a book to read this temporary image will be replaced.
5. Getting a custom version of the SetCover app.
Spoiler: Why does this have to be so complicated????
I've really tried everything to simplify this but I've come up with nothing. The issue is with the appWidgetID and the manager hidden somewhere on the device. In order to manipulate the book cover widget via Tasker the widget ID# is required. This is no problem but there is no way to use a variable to carry this information. And...Desktop Visualizer seems to almost pick a random number for its widgets so there is no dependable way to know what your individual widget ID# for the book cover image will be until you create the widget. Desktop Visualizer has the "ability" to clear the widget from memory if you delete it (from the App Manager) but it only resets the ID# back to the value it started with (whatever it was) and that not 100% of the time (a reboot helps).
What this means is that each version of SetCover has to be custom made for your particular widget ID#. This is not a difficult thing for me to do--just a few changes in the code for your ID#--and I am happy to do it. But it does mean that if you accidentally delete the book cover widget, you may not be able to make a new one with the same ID# and thus will need a new version of the app.
a. Use a file manager to navigate to /data/data/jp.co.bii.androi.app.dskvzr/files.
Inside that folder there should be one file representing the book cover widget. The file name will be something like "conf_1.dat". Your widget ID# is the numeric part of the file name (so, "1", in the example shown). PM me with your widget ID# and I will send you a custom version of SetCover.
b. Install the app and initialize it by tapping on the icon. You are returned to the home screen and an SU permission prompt is generated. It also takes a screenshot (think of it as a test drive...).
c. Use NTMM to assign SetCover to the hardware button of your choice (for manual cover capture). Remember, automatic cover images are only generated for non-DRM epub files. Everything else requires one button press when the cover is displayed on the screen.
5. Create additional SimiFolders and arrange dock icons
Spoiler: I do not want SimiFolders. I am going to use single app icons!!!
Uninstall the SimiFolder app. If the sample SimiFolder icon (the "books") does not disappear from the dock area of the home screen, double-tap on it until the dialog appears and choose "Remove". Remember that ADW Launcher allows you to use custom icons on the home screen, so even if you use single app icons you can still customize for an overall uniform effect if you want. To change the icon, double-tap on an app icon and choose "edit" from the dialog that appears.
I've provided one sample SimiFolder (the "books") so that setup of additional folders is simplified (if you like my choices...). Here's how to make additional ones.
a. Tap on the SimiFolder icon in the app drawer. Just a useful tidbit before we go on: the "Applications" section lists your apps, as you might guess. But there is an option in there for changing the app icon. I did this with the stock Library app in the sample "Reader" folder. So, tap on "Folder" and then "Add Folder". Give the folder a name and select the type of folder ("Combined").
Finally, to keep things simple for now, you can skip all the tedious configuration by choosing to "Copy settings from Folder". In this case, the sample "Readers" folder I provided. Save before going on.
b. To add apps to the new folder, tap on it and then on "Add".
This takes you to a screen with all your apps. Check the ones you want. You can choose to order the apps manually or let the app arrange them ("Sorting", back on the previous screen).
c. To get the new SimiFolder to appear on the home screen (in the dock) you need to use DesktopVisualizer. Long-press on an empty area of the home screen to bring up the ADW dialog:
Use the dialog options that follow to navigate to /media/Icons and select the icon of your choice (you can add/design your own, of course).
You would choose your own folder, of course. Then you are back to the home screen and you can drag your new SimiFolder shortcut down to the dock and arrange as you like.
6. Add Greeting widget (MinimalisticText)
Spoiler: I do not want the Greeting widget!!!
This requires a special version of the NST UI app with the widget control parts removed. Uninstall the existing NST UI app and install NST UI_no_widget. Initialize the app by tapping on the icon and grant SuperUser permission. If you also do not want the Weather widget, you can uninstall MinimalisticText and delete /sdcard/Fonts as well as /sdcard/MinimalisticTextPreferences
a. Long-press on the home screen somewhere and add a Widget. You want MinimalisticText 5x1 Horizontal. This takes you to the app itself where you enter the name for the widget. Use the name as shown.
b. Scroll to the very end of Settings until you see Save/Restore. Choose "Restore" and select "Greeting". This reads in the widget as I have created it so you don't have to go through all the setup.
c. DO NOT USE either the back arrow or back button at this point!! You'll have to start all over again. Instead, scroll back through Settings to find "Custom Layout". You can now see the "innards" of the widget. You want the last item which will allow you to type in your name.
d. NOW use the back button (status bar) twice to dismiss the keyboard and close the editing screen. To save any changes to a widget of any kind, ALWAYS use the menu button (status bar) followed by a tap on "OK" at the bottom. MinimalisticText closes and you are back at the home screen.
e. Resize and position as before with the book cover image (see post #1). For me, pulling down on the bottom a little put the widget in the correct vertical position.
7. Add Weather widget (MinimalisticText)
Spoiler: I do not want the Weather widget!!!
Uninstall the NST Weather app. Delete the NSTWeather folder from your sdcard. From /sdcard/Fonts folder, delete weathericons.ttf
If you want to have the Weather widget, you will need to get a free API from Open Weather Maps. For more information, see the original app post. You don't need to go through the whole widget-building process. Once you have the API and your geocoordinates, tap on the app icon and fill in the Settings information. The rest is more or less automatic. You will receive a notification when the data has been processed and the app is "widget-ready". Then you follow the procedure for the Greeting widget (the size is Horizontal 4x2), but name it "Weather" and read in the configuration for that widget. There's nothing else to do but position the widget properly on the home screen. If your location is not showing up correctly for some reason, you can go into the widget settings (Layout>CustomLayout) and replace the Location variable with static text. Message me for additional help.
8. Configure QuickTiles
Spoiler: I do not want QuickTiles!!!
Be aware that if you ever use your device in landscape mode the static elements of the home screen wallpaper provided will be improperly positioned. This special version of QuickTiles (2.3) contains sufficient code to swap wallpapers during screen orientation changes. If that's not an issue for you, uninstall the QuickTiles app and delete /sdcard/Qtiles. If you never use your device in landscape (or always change from within an app like EBookDroid or PerfectViewer) you can also uninstall RotationLocker.
Tap on the app icon to initialize. By default, only the WiFi tile is set. You should read more about how the app works and how to set up additional tiles in the original app post. Some functions may require the presence of additional apps. RotationLocker is a dependency so whether you actually use that particular tile, the app must remain installed if you want to run QuickTiles.
Just in case...
If you have deleted some apps and later change your mind, it would be a shame to have to go back to the CWM zip and flash all over again. For that reason I've posted copies (or links to copies) of the main "optional" apps. Note that MinimalisticText comes as a CWM-flashable zip because it is so difficult to get a working install by just installing the app.
Desktop Visualizer
Minimalistic Text
Simi Folder
QuickTiles 2.3 (custom for this UI)
@nmyshkin ... thanks for the instruction set ...
nmyshkin said:
I can't guarantee "easy", but it will be my usual "overly detailed"
Click to expand...
Click to collapse
agreed ... your instruction sets are comprehensive and detailed !!!
quite a bit of understanding and tinkering needed ... will try and get back i i like it ... currently my NSTG is an a state of ZEN ... thanks to your masterpiece of the RN button with my custom menu ... Its like i've already achived nirvana ... my mind is ONE with this current version(only cos of your RN Menu app) !!!

Categories

Resources