Intuition says I'm not likely to get an answer to this, but let's give it a shot.
Perfect Viewer allows for hardware key mapping, but the default KeyEvent numbers are wrong (up right is 98, down right is 97, up left is 96, down left is 95). No problem there, since I found the (presumably) correct numbers here. The real problem is, I can't edit the keys. When I go into the edit dialogue and the keyboard pops up, the number keys all have minds of their own (pressing 0-9 results in KeyEvent number 7-16 appearing; I can't input the numbers I want to).
So, is there another way to change my Perfect Viewer settings to map the right keys? Thanks!
/bump
(I didn't see that it's not allowed...?)
Its on my list to install and mess around with on my new glow. So I'll have some answer for you sooner than later just not now
Last time I set it up I remember there were nook specific hardware keys available in its key list.
Got around to it eventually....
I can confirm the last version that works on android 2.1 (v1.9.2.2) has a bug where keyboard input using number is screwed in a strange pattern so modifying numerical fields is not possible. Also reassigning touch functions menu does not work.
So we do it manually. The data is a in a xml file you can below
Code:
/data/data/com.rookiestudio.perfectviewer/shared_prefs/perfect_viewer_settings.xml
Now you can change these several ways all require a root enable app. you can adb pull the file off, modify, adb push back. You can use an app like es file explorer to navigate to the file and use esnote editor to edit the file on the NST (enable root explorer in settings). Both of these methods will mess up the permissions on the file.
I strongly suggest before editing either with an adb shell
Code:
ls -l /data/data/com.rookiestudio.perfectviewer/shared_prefs/perfect_viewer_settings.xml
or use details view with esfileexplorer to make a note of the <owner>.<group> and file permissions. In my case looks like this (app number will be different on your own system!):
Code:
-rw-rw---- app_41 app_41 6574 2013-12-21 21:21 perfect_viewer_settings.xml
Personally I edited the file on my pc after using adb
First make sure perfect viewer is not running.
Code:
adb pull /data/data/com.rookiestudio.perfectviewer/shared_prefs/perfect_viewer_settings.xml c:\temp\perfect_viewer_settings.xml
<EDIT FILE>
Code:
adb push c:\temp\perfect_viewer_settings.xml /data/data/com.rookiestudio.perfectviewer/shared_prefs/perfect_viewer_settings.xml
[change app_41 to match whatever it should be!]
Code:
adb shell chown app_41.app_41 /data/data/com.rookiestudio.perfectviewer/shared_prefs/perfect_viewer_settings.xml
adb shell chmod 660 /data/data/com.rookiestudio.perfectviewer/shared_prefs/perfect_viewer_settings.xml
What you wanted with changing the hardware keys did not work. I expect its because nookmodmanager has remapped them.
What I did find had the desired affect in my case was swapping these values as someone else suggested few years ago.
Code:
<int name="LeftFunction" value="5" />
<int name="RightFunction" value="6" />
Either way you can tinker around. If you do mess the file up say with two hardware keys with same value perfect viewer auto returns file to default.
Related
ive been trying to connect my stowaway bluetooth keyboard with the nexus one using the following guide:
http://i-miss-erin.blogspot.com/2009/09/connect-bluetooth-keyboard-in-android.html
I can push the files to my phone. when i get to actually using the commands, i get a persmission denied error from adb shell. My phone is rooted, and i have tried this with enomthers 1.51 and cyanogens 5.0 beta 4. interestingly, the permission denied error while using cyanogen's rom only comes about when using the hidd --connect command. im assuming this is because cyanogens rom has hcitool and hciconfig built in, which leads me to believe that im doing something wrong when copying the files over in adb.
Here it is with cyanogens rom. with enomthers, i get permission denied with any of the three commands.
Code:
# hciconfig
hciconfig
hci0: Type: UART
BD Address: 00:23:76:79:14:E0 ACL MTU: 1021:7 SCO MTU: 64
UP RUNNING PSCAN
RX bytes:2325 acl:45 sco:0 events:70 errors:0
TX bytes:2537 acl:11 sco:0 commands:54 errors:0
# hcitool dev
hcitool dev
Devices:
hci0 00:23:76:79:14:E0
# hcitool scan
hcitool scan
Scanning ...
00:19:15:32:31:B2 Think Outside Keyboard=
# hidd --connect 00:19:15:32:31:B2
hidd --connect 00:19:15:32:31:B2
hidd: permission denied
what gives?
same here, except that hciconfig, even after running the terminal as root, gives the same permission denied return. i had this running perfectly on my g1, but my nexus isnt playing along as nicely...
any ideas, people?
thanks!
SOLVED!!!!
googling around, i came across the following:
as root ucan change permissions on any file with chmod, for ex. with chmod 744 'file name' root woulld have read, write, and execute permissions on the file.
so... i mounted the filesystem as rw, then chmod 777, like in that bluetooth keyboard tutorial, then cd'ed into system/xbin, and chmod 744 the three relevant files.
and BOOM!
up and running, no problems!
YAY!!!
and now, to avoid all that pesky command line nonsense each time you want to hook up your keyboard, just install Command Executor from the Market, and, as root, have it run hidd --connect [keyboard address here]. it prefills from the last time you use it, so if you only have the one keyboard, you are set!
just make sure bluetooth is on and your keyboard in in discovery mode before you execute the command...
and if you have more than one bluetooth keyboard, install Inserty, and have the various addresses prefilled as one of the Inserty templates!
grins!
berish said:
and now, to avoid all that pesky command line nonsense each time you want to hook up your keyboard, just install Command Executor from the Market, and, as root, have it run hidd --connect [keyboard address here]. it prefills from the last time you use it, so if you only have the one keyboard, you are set!
just make sure bluetooth is on and your keyboard in in discovery mode before you execute the command...
and if you have more than one bluetooth keyboard, install Inserty, and have the various addresses prefilled as one of the Inserty templates!
grins!
Click to expand...
Click to collapse
Thanks a lot, i figured it out a while ago, forgot to post here. I actually use GScript Lite right now, and make a nice little shortcut on the screen for connecting with the keyboard. it works quite well for something thats not official
cool, i'll check that out.
one thing i was wondering, when using it with my freedom folding keyboard, occasionally a key gets 'stuck'. i have yet to try it with my rocketfish keyboard, but do you see any instances of this?
so i tried the rocketfish, and its terrible. its completely unusable. every fourth key sticks and i end up with four lines of the letter g in the middle of my document. and when i try to backspace to delete all that extraneous letterage, the backspace key gets 'stuck' and erases everything there. needless to say, i didnt use it very long.
i didnt have this problem with my g1, and im using the same three files - any idea whats going on? could it have something to do with the fact that i ran the chmod 744 command on these files?
any ideas would be welcome...
thanks!
I dont know man. my iGo Stowaway works perfectly. as in. everything works. i also noticed that there are button combinations that you can use to, for example, go to the Home screen.
help please!
i'm a noob with a google ion running CM 5
even after i run the "mount -o remount -t yaffs2 /dev/block/mtdblock3 /system" command, every time i try anything to system/xbin ("chmod 744 /system/xbin") i get the error "chmod: /system/xbin: Read-only file system"
i also get the same "hidd: permission denied" error
i also wasnt able to push the 3 files (hciconfig, hcitool, hidd) to system/xbin because of the read only error...
any help would be appreciated!
i'm trying to use my iGo Stowaway with my phone
For me with my Nexus One and a Stowaway ThinkOutside Keyboard it works like a charme.
But...
I have a German keyboard layout printed on my keys, but I get the English keyboard layout when I press a key, for example if I press Z I get a Y. And there are no special chars like ä,ö,ü.
Is there any way to change the keyboard layout using hidd on Android?
RESOLVED
Dear developers,
I need to make send hardware button work for the menu, because the long press windows make me crazy recalling the current applications instead to give me the real useful menu for the app I use.
I currently use desire on hd2. So searching in the previous posts I found that I can change /system/usr/keylayout/qwerty.kl
No way, I opened Astro, did not change and save the modifications. Then I tried to download a terminal emulator. Do not give me #, but I thought was normal reading other posts(the phone is already rooted) so I tried chown and chmod, but I do not what I have to write to do the trick of edit with ASTRO the 2 lines I need to put the menu (for the apps) in SEND hw button. Furthermore trying using $ ls -latr I discovered that the qwerty.kl is a link that refer to etc/keymap directory. So I tried to use ASTRO to edit the file but also if tell me save, there are not modification, simply the file is not edited.
resolved --> I HAD TO COPY IN SDCARD THE FILE QWERTY BEFORE to MODIFY WITH ASTRO, no need of chmod && Chown
Hi Guys,
i want to change my Android ID in /data/data/android.provider.settings/databases/settings.db
Normaly there is only this file in that folder, so i can use "SQlite Database Browser" to change the id.
Now, in some roms there is also a setting.db-wal file in which this id is, but i cant open it with this tool. It seems to be compressed or somethink like this.
If i use "Android ID Changer" the ROM doesnt boot...
So, how i can change the Android ID in these ROMs?
thanks
no input for me?
Hi,
In my Eclair tablet it is in 3 places:
/data/data/com.android.providers.settings/databases/settings.db
table [secure] android_id as a 16 character hex
table [gservices] android_id as a decimal of the hex
/data/data/com.google.android.googleapps/databases/gls.db
table [meta] androidId as a decimal of the hex
I understand that it may be in:
/data/data/com.google.android.gfs/databases/gservices.db
as well but I don't have that database on my tablet.
All the best ...
Nigel.
Make sure and backup your /data/data/com.android.providers.settings/databases/settings.db file
Then in ADB type the following:
su
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
sqlite> insert into secure (’name’, ‘value’ ) values (’android_id’,'DEVICE_ID_GOES_HERE’);
sqlite> .exit
Reboot
thanks guys,
thats what i normaly do, i change the value in the database.db, but in some ROMs there are not this information, insteat in database-wal.db, but this db i cant open with the sqlite tool.
e.g. in the actual Cyagenmod ROM there is this database-wal.db file, which i cant change.
paid app tested in that scenario
https://play.google.com/store/apps/details?id=com.vcastroi.changeid
manually
if you copy all 3 files using adb and then open it on your pc using a sqlite utility and then push all 3 file back and fix the files permissions
The Lenovo Thinkpad Tablet's keyboard folio is a neat little accessory but there is one issue that drives me nuts. (Beside the loss of the USB port). and that is that the Ctrl key also activates the menu (any menu).
So whenever one tries to do a copy and paste using the usual Ctrl + C and Ctrl + V keys, the menu (of the app you are working in) pops up.
Someone suggested to edit the Generic.kl file in /System/usr/keylayout directory and I did, but that didn't work. (Unless i did it wrong).
I'm at a loss. Would anyone have a suggestion on how to remap that key to only be a standard Ctrl and not menu key?
TS
Having the same issue.
But I'm using an external bluetooth keyboard: the logitech one, which was actually designed for the ipad.
I love it, its slim and very good quality keyboard.
Maybe some helpful links:
http://www.kandroid.org/online-pdk/guide/keymaps_keyboard_input.html
And this one has an explanation how this could be solved on a rooted thinkpad:
http://androidforums.com/ally-all-things-root/250271-re-map-key-keyboard.html
Ok, so I was able to remap some keys. Here is what I did.
The key layout files are stored in /system/usr/keylayout
The most important one seems to be Generic.kl which can be edited with a text editor, just use root explorer or the adb commands below. When I first tried my permissions were screwed up and I wrote the directions below but left them here in case they are helpful.
----------
(I edited gpio-keys.kl thinking it controlled the hard keys but it had no effect). While running the Thinkpad it seems as though I was unable to edit these files but I did get things to work using adb while booted into recovery. Here are the steps I took:
First reboot into ClockworkMod Recovery and plug in your thinkpad to your PC via USB
In CWR select Mounts and Storage then Select Mount /system (otherwise it seems adb can't access your system files)
On your computer run cmd and type adb devices (you should see a device listed, if not go check out the ADB setup guide). Now enter the following commands:
adb remount
adb pull /system/usr/keylayout/Generic.kl
This will copy the Generic.kl file to your current directory (you can see it in the command prompt, typically it is C:\Users\[Your Username]\
Browse to the file make a copy of the unedited version and save your backup somewhere and then edit Generic.kl in a txt editor (I like Notepad++)
I changed key 150 EXPLORER to say key 150 MENU, which makes the browser key open the menu instead of your web browser.
After you made your changes save it and then use the following ADB commands to push it back and set the permissions:
adb push Generic.kl /system/usr/keylayout/
adb shell
chmod 644 /system/usr/keylayout/Generic.kl
chown system.system /system/usr/keylayout/Generic.kl
exit
adb reboot
Now your keys should be remapped!
Just thought I'd add this to skip all the ADB and do it right on the tablet:
ES File Explorer (with root permission and /system writeable checked in settings)
Navigate to file, click, choose text, choose ES Note Editor, edit the file as needed, choose save when prompted.
You can change permissions with ES as well.
I like that it automatically makes a *.bak file of whatever you edit and save.
Those are the same steps I did, but it didn't work for me even after a reboot.
And although I did a backup of the existing generic.kl file, I think I may have overwritten it. So I'm going to have to go in search of a fresh one.
TS
After rooting my NST, I'm having trouble with the keyboard. It has no period key, and without a period, I can't give my email address.
To try to solve the problem I installed a different keyboard - first I tried go keyboard but could not enable it, next I tried the Swiftkey x keyboard from Amazon Apps but had same problem - installs but I cannot choose the new keyboard over the native NST one. I used the choose methods according to instructions for the new keyboard.
I also tried the long press on a text enter box but that only gave the native NST keyboard without a period key. Also tried uninstalling the keyboard app, the copy/pasting it to system/app and using Nook Color Tools 'choose keyboard', but the only keyboard available is the 'android' keyboard, the new keyboard is not a choice.
Does anyone know what to do?
Also, can't search with Market - tried reinstalling vending.apk but didn't help. The search box appears, and I can enter text, but no results appear.
See in the lower right hand corner of the Android soft keyboard?
There is a question mark with two dots under it.
The bottom is a period when unshifted, the top is a question mark when shifted.
Thanks! Now it isn't that important to download a new keyboard, although I wonder why I can't get them to work.
Bob
Oh, sorry, I missed the second part.
You have to enable the keyboards that you put in.
If you have a replacement Settings.apk it might be in there under "Language & keyboard".
The code is actually in the stock Settings.apk, but they disabled it.
To do it manually, first, figure out what is the exact name of the keyboard service.
For instance GoKeyboard is com.jb.gokeyboard/.GoKeyboard
Then use sqlite3 either on the Nook or your desktop to enable it.
Code:
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
sqlite3 settings.db
update secure set value='com.android.inputmethod.latin/.LatinIME:com.jb.gokeyboard/.GoKeyboard' where name='enabled_input_methods';
update secure set value='com.jb.gokeyboard/.GoKeyboard' where name='default_input_method';
.q
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
Thanks Renate,
Please bear with me with my elementary questions; I'm not a programmer and so do not have much experience with command line programs.
I've downloaded to my pc the most recent sqlite.zip, unzipped it, and ran the sqlite.exe to see what happens: a cmd window opens and is ready for line entries.
I think what you are then saying is to use adb wireless to retrieve a file from the nook, change it using sqlite on the pc, and then return it to the android.
But will sqlite be able to see the file because it will not be placed in the sqlite folder by adb?
You should already be good friends with the command line on every device.
Don't start sqlite3 out of the the blue.
Open an "MS-DOS" window, also known as a command shell.
From Windows, that's a <WindowsKey> & <R>, then type cmd.exe
Pick any directory you like.
Pull settings.db
Run sqlite3 as above in the same window.
If you put sqlite3 somewhere else, the command may look like:
Code:
E:\Where\Did\I\Put\The\Darn\Thing\sqlite3.exe settings.db
Do the SQL commands.
Push settings.db
Thanks again Renate. I have used the cmd on Windows and have a slight familiarity with it, so I'll experiment a bit and see what happens. First, I think it best to backup the nook in case of problems.
bobcdy said:
Also, can't search with Market - tried reinstalling vending.apk but didn't help. The search box appears, and I can enter text, but no results appear.
Click to expand...
Click to collapse
That is a common problem, install SearchMarket, it will do the search and bring up Market.
--
Unfortunately I still have problems with the go keyboard, and this time it is completely my fault. Following Renate's instructions about sqlite3, I was able to install the free version of the keyboard, but hated the ads that came with it. My mistake was in uninstalling the ad-ridden version when I think I should have replaced the it with my other version. After unstalling it, I tried installing the new version but was unable to do so - I've tried everything I can do to install it. Rebooted - reinstalled. No luck. Deleted the old version from the system/ap folder using root explorer, then tried reinstalling - again no luck. Tried repeating the sqlite commands - nope! etc.
Is there any way to install the new version, or it it too late?
I do have a backup made with noogie/roadkil's Disk Image and Windows xp so I could restore that image but I'd prefer not to do this.