Xserver chroot on TF700t - Asus Transformer TF700

I've been running kexecboot native Linux for a while now and this has been a side project of mine since bumping into Linux Deploy. I really wanted to run my Linux and have my Android too... So, I got tired of trying to get Linux to run on the Android frambuffer and went this route... This runs pretty fast on my tablet. Resources seem way lower than a vnc chroot. And running on an xserver has more advantages. This is only tested so far with an image file and LXDE (I will be trying a microsd directory install soon).
XFCE4 and microsd partition install running fine also.
Use gparted to partition your microsd.
I used a SanDisk Class 10 16gb UH-I (8.5mb/s write and 24.5mb/s read) partitioned to 12gb fat32, 4gb ext4
These are just the settings I used that worked first for me. Play around, you can't hurt anything...
Download/Install:
Linux Deploy, Xserver XSDL and Connectbot
Setup Linux Deploy:
-Goto settings update environment
-On main screen click the install icon (it is the little down arrow)
---Under Deploy:
-Select your distro
-Architecture - arm7hf
-Installation type - File or ext4 partition
-Installation Path - change path and or file name or microsd partition (ex /dev/block/mmcblk1p2 for 2nd partition on microsd)
-Image size - at least 2GB (default is 4GB)
-User name - pick one or leave it
-Select components - check all
-Desktop environment - LXDE
---Under Startup:
-Check ssh server and Custom mount points
---Under Action:
-Go back to the top and select install.
-After it finishes click Start
Setup Xserver XSDL:
-Home button out and start Xserver XSDL
-Click screen immediately and choose 1900x1136(native) and font 0.5
-For those without a dock you may need to click "Change device configuration" at the top
when it first starts
Setup Connectbot:
-Home button out and start Connectbot
-ssh: [email protected]
-password: changes
-export DISPLAY=:0
-startlxde
-Recent apps select Xserver XSDL
**Profit**
{
"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"
}

XSDL works fine with my symlinked Arch.

Running super fast from an ext4 partition on my sdcard...

sound?
workdowg said:
Running super fast from an ext4 partition on my sdcard...
Click to expand...
Click to collapse
Did you manage to make sound work?
I tried to install alsa, audio devices are present but do not work...

pinaz said:
Did you manage to make sound work?
I tried to install alsa, audio devices are present but do not work...
Click to expand...
Click to collapse
No... @_that may have.

workdowg said:
No... @_that may have.
Click to expand...
Click to collapse
No, I only tried apps like Gimp and LibreOffice.

Linux Deploy update
With the latest version of Linux Deploy, Connect Bot is not needed any more.
Just select the option "GUI - Allow startup graphical environment", on "Graphics Subsystem" select "X Window System", and then on "GUI Settings" set "Display" to 0 and "X Server Address" to localhost
Now first start XServer XSDL and then start the Linux Deploy service
BTW, I am trying XFCE desktop on Ubuntu Precise, it is really fast.
A good idea (if you use ubuntu and xfce) may be to install the package xubuntu-desktop (Linux Deploy makes a very basic installation of XFCE, even icons are completely missing!)
PROBLEMS WITH KEYBOARD LAYOUTS OTHER THAN "US" - SOLUTIONS
I have a dock with Italian keyboard and I had some problems, probably due to some XServer XSDL bugs.
I set "it" keyboard layout in XFCE settings, all keys are working correctly apart from two things (only using XServer XSDL, with other android apps I have no problem with the keyboard):
1) Keys " ' ? " and " - _ " are swapped
Solution:
edit /usr/share/X11/xkb/symbols/it and swap AE11 and AB10 codes in the "basic" section, in this way:
Code:
partial default alphanumeric_keys
xkb_symbols "basic" {
include "latin(type4)"
name[Group1]="Italian";
.........
key <[COLOR="Red"]AB10[/COLOR]> { [apostrophe, question, grave, questiondown ] };
.........
key <[COLOR="Red"]AE11[/COLOR]> { [ minus, underscore, dead_macron, division ] };
.........
include "level3(ralt_switch)"
};
I checked with Input event logger app, the problem is probably due to a bug in dock keyboard remapping by Android (I use CROMBI-KK with _that kernel, I do not know what part causes the problem)
The simpler workaround is to manually remap the keys in XServer XSDL: the Italian keyboard's "minus" key shoud be remapped to "SLASH" and Italian "apostrophe" to "MINUS" (in fact US-minus corresponds to IT-apostrophe, and US-slash to IT-minus)
2) the 102nd key is not working at all. ( It is the key at the right of the left-SHIFT key, that in the Italian keyboard layout corresponds to the " < > " key)
It is a problem of XServer XSDL, because if I check key press events in X with the following command:
Code:
xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
all keys work except for the 102nd key, while if I check key press events from the input device, in this way:
Code:
evtest /dev/input/event1
the 102nd key works.
Solution:
We need a little workaround, because it seems that XServer XSDL does not "see" the 102nd key at all.
First, install some stuff
Code:
sudo apt-get install inputlirc lirc input-tools xautomation
Then create a file .lircrc in your home directory with the following content:
Code:
begin
prog = irexec
remote = /dev/input/event1
button = KEY_102ND
config = xte 'str <'
repeat = 0
end
begin
prog = irexec
remote = /dev/input/event1
button = SHIFT_KEY_102ND
config = xte 'str >'
repeat = 0
end
then execute the following commands
Code:
sudo inputlircd -c -m 0 /dev/input/event1
irexec -d
You may put the above code in a script that starts automatically with the X session (in XFCE, see Applications Menu->Settings->Sessions and Startup)
Note that the "irexec -d" part must be executed from within the X session by the X session user, so you cannot use a Custom Script in Linux Deploy (which executes commands as root outside the X session)
So it is simpler to use an autostart script within XFCE
Hope that this may help also other people, in fact XServer XSDL officially supports only US Keyboards, so I guess that also keyboard layouts other than the Italian one may be affected
Cheers, and happy 2015!
EDIT:
It is definitively an XServer XSDL bug. I tried to connect a wireless Italian keyboard and I got the same problems as with the asus dock keyboards (apostrophe and minus keys swapped, 102nd key not working)

Custom mount points
(I use CROMBI_KK, but I guess the following applies also to other ROMs)
To access internal and external sdcards, usbdisks etc with read-write permission one has to correctly set custom mount points in Linux Deploy. I was using /storage/sdcard0, /storage/sdcard1 but it is not correct, you get only read permissions with normal user (rw only with root).
The right mount points are (in CROMBI_KK)
/data/media/0 (for internal SD)
/mnt/media_rw/sdcard1 (for external MicroSD)
/mnt/media_rw/sdcard2 (for external SD in dock)
/mnt/media_rw/usbdisk0 (for Usb disk in dock)
In other ROMs mount point may change, you can check with a mount command from terminal within android (avoid fuse mounts and search for "real" mounts)
LITTLE TRICK:
When you start Linux Deploy service, it can only mount already mounted sdcards and usbdisks, if you insert a new sdcard after having started Linux Deploy, you cannot see it automatically from Linux.
However, you just have to click again on "Start" in Linux Deploy, it will skip already started services and mount only the missing sdcard(s) or usbdisk

keyboard dock
_that said:
No, I only tried apps like Gimp and LibreOffice.
Click to expand...
Click to collapse
See my previous posts, I have almost managed to configure everything for office use (including printing, excluding sound...), I am quite satisfied because it is reasonably fast and usable, but one important part is missing: esc, del and function keys.
XServer XSDL can remap them but it does not help much: it seems that the following keys are not intercepted normally but seem to be handled specially by CM 11/CROMBI KK:
TOGGLE_(WIFI, BT, TOUCHPAD) , BRIGHTNESS_(UP, DOWN, AUTO), CAMERA, EXPLORER, SETTINGS, POWER
So even with remapping, when I try to press the key corresponding to F1, I get an F1 event on the chrooted linux but also a toggle-wifi event on Android, when I press F2 I get F2 on linux and toggle-bluetooth on android, and so on...
Even using shift/ctrl/alt/fn+ dock special keys, CM11/CROMBI-KK intercepts them as if no shift/ctrl/alt/fn is used.
Other people experienced the same problem, see here:
http://forum.cyanogenmod.org/topic/83065-how-to-re-map-keyboard-dock-layout-for-custom-keymap/
I guess I have to stop some service in CM11/CROMBI KK that handles special keys, any idea about which one I have to kill? @_that?

pinaz said:
but one important part is missing: esc, del and function keys.
Click to expand...
Click to collapse
Try playing with the kernel level function key remapping that I added in my kernel:
http://forum.xda-developers.com/showpost.php?p=40168242&postcount=3
If you're not using my kernel, you need to extract the patch that implements this feature from my kernel on github and compile your own.

_that said:
Try playing with the kernel level function key remapping that I added in my kernel:
http://forum.xda-developers.com/showpost.php?p=40168242&postcount=3
If you're not using my kernel, you need to extract the patch that implements this feature from my kernel on github and compile your own.
Click to expand...
Click to collapse
Great! It works!
I can write parameters even from inside the chrooted environment.
Now I only have to change remapping of function keys done by XServer XSDL in order to avoid "double" remapping of the same key, and I am done
Thank you!
_that's Kernel key remapping function works perfectly, I can use the following commands (in Android terminal or within the chrooted environment, as root in both cases) to enable Esc, Del, Ins keys, and to use special keys as Function keys without needing to press Alt/Alt Gr:
Code:
echo 3 > /sys/module/asusdec/parameters/key_flags
The problem is XServer XSDL.
Problem 1:
Xserver XSDL sees Esc, Del and Ins keys (corresponding to Back, Lock, Volume Mute dock keys) as if they were the same key, that in the default XServer XSDL config is mapped to 'Unknown'.
So even if you try to remap them, you can choose only one option for ALL of them.
Solution:
Do not touch XServer XSDL default key mapping settings .
Follow my previous post, point 2, and add to the $HOME/.lircrc config file the following lines:
Code:
begin
prog = irexec
remote = /dev/input/event1
button = KEY_ESC
config = xte 'key Escape'
repeat = 0
end
begin
prog = irexec
remote = /dev/input/event1
button = KEY_DELETE
config = xte 'key Delete'
repeat = 0
end
begin
prog = irexec
remote = /dev/input/event1
button = KEY_INSERT
config = xte 'key Insert'
repeat = 0
end
It is a problem of android kbd mapping, see next posts
Problem 2:
With _that's kernel key remapping functions, function keys (with no alt/Alt gr) and dock's special keys (with Alt/Alt Gr) are different key events, however XServer XSDL sees them as the same event, so you cannot remap them differently.
If you use function keys in your chrooted linux GUI, everithing is fine.
If you try to use dock's special keys (with Alt/Alt Gr to toggle wifi, bluetooth, adjust brightness etc.) you get the special key event AND the function key event at the same time.
So if you press Alt/AltGr+ToggleWifi you toggle wifi AND press F1 at the same time, so you may see the help window of the program you are using. And so on...
Quite annoying....
Solution
none found at the moment, I guess it would be necessary to modify XServer XSDL code.
Simply do not try use dock special keys (with Alt/AltGr) when you are inside your chrooted linux GUI
Anyway, thanks @_that!

@_that:
I chatted with @pelya , see my comments on github:
https://github.com/pelya/commandergenius/issues/40#issuecomment-69906349
it seems to be a problem of your kernel-level keyboard remapping function: it sends correct Scancodes but wrong keycodes (always 0) for "fake" ESC, DEL and INS keys (checked in android with input event logger app) see my next post
https://github.com/pelya/commandergenius/issues/40#issuecomment-69908886
keycode and scancode swap for keys SLASH (Italian kbd: minus) and MINUS (IT kbd: apostrophe) may be a problem of the kernel remapping function or of CM11-CROMBI-KK, needs to be investigated

pinaz said:
@_that:
I chatted with @pelya , see my comments on github:
https://github.com/pelya/commandergenius/issues/40#issuecomment-69906349
it seems to be a problem of your kernel-level keyboard remapping function: it sends correct Scancodes but wrong keycodes (always 0) for "fake" ESC, DEL and INS keys (checked in android with input event logger app)
Click to expand...
Click to collapse
Thanks for your research so far! The kernel sends only one set of codes, those defined in linux/input.h, through the event interface. The keycodes you're seeing come from Android and it looks like you need to copy some lines from /system/usr/keylayout/Generic.kl to asusdec.kl.

_that said:
Thanks for your research so far! The kernel sends only one set of codes, those defined in linux/input.h, through the event interface. The keycodes you're seeing come from Android and it looks like you need to copy some lines from /system/usr/keylayout/Generic.kl to asusdec.kl.
Click to expand...
Click to collapse
You're right, thanks!
I solved the esc-ins-del problem in the following way
In Android terminal:
Code:
su
mount -o remount,rw /system
nano /system/usr/keylayout/asusdec.kl
then I added at the end
Code:
key 1 ESCAPE WAKE_DROPPED
key 110 INSERT WAKE_DROPPED
key 111 FORWARD_DEL WAKE_DROPPED
then
Code:
mount -o remount,ro /system
reboot
---------- Post added at 10:26 AM ---------- Previous post was at 10:17 AM ----------
pinaz said:
https://github.com/pelya/commandergenius/issues/40#issuecomment-69908886
keycode and scancode swap for keys SLASH (Italian kbd: minus) and MINUS (IT kbd: apostrophe) may be a problem of the kernel remapping function or of CM11-CROMBI-KK, needs to be investigated
Click to expand...
Click to collapse
@_that : the swap between the MINUS and SLASH keys (respectively, apostrophe and minus in Italian keyboards) seems to be a problem at the kernel level.
I looked here:
http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html#ss1.4
The correct scancode for US MINUS key is #0c (12) while for US SLASH key is #35 (53)
If I use @pelya 's input logger app, I get swapped scancodes (12 when I press US-SLASH/IT-minus, and 53 when I press US-MINUS/It-apostrophe, while it should be the other way round).
I did not notice it before because I was confused (in Italian kbd minus=US-SLASH, and apostrophe=US-MINUS, I saw KEY MINUS in the logger app when I was pressing It-minus and I thought it was OK, but it was not, I should see KEY SLASH instead!).
So I guess that it is something at the kernel level. @_that?
P.S. The same problem (swap of scancodes 12 and 53) happens also with an external wireless keyboard, so it is not a problem related to the asus dock kbd

pinaz said:
The correct scancode for US MINUS key is #0c (12) while for US SLASH key is #35 (53)
Click to expand...
Click to collapse
These are exactly the codes that I get when I run evtest, which operates directly on the kernel's event interface.
The key near the right Shift key ("/" on US keyboards, "-" on my German one) sends keycode 53 (KEY_SLASH).
The key next to 0 in the top row ("-" on US keyboards, "ß" on my German one) sends keycode 12 (KEY_MINUS).
The same happens on my PC.

_that said:
These are exactly the codes that I get when I run evtest, which operates directly on the kernel's event interface.
The key near the right Shift key ("/" on US keyboards, "-" on my German one) sends keycode 53 (KEY_SLASH).
The key next to 0 in the top row ("-" on US keyboards, "ß" on my German one) sends keycode 12 (KEY_MINUS).
The same happens on my PC.
Click to expand...
Click to collapse
mmm
I am not an expert in such kind of things
Do you think it is a problem of Asus hardware? Why am I getting wrong codes both on dock kbd and on external kbd?
(A simple workaround in my case is to use key remapping function in XServer XSDL, but I would like to solve the problem)

pinaz said:
Do you think it is a problem of Asus hardware? Why am I getting wrong codes both on dock kbd and on external kbd?
(A simple workaround in my case is to use key remapping function in XServer XSDL, but I would like to solve the problem)
Click to expand...
Click to collapse
No, the hardware works fine, and the kernel works correctly too - according to your own log output you're getting the correct scancodes:
Italian Kbd Apostrophe key: Keycode 76 KEYCODE_SLASH Scancode 12
Italan Kbd minus key: keycode 69 KEYCODE_MINUS Scancode 53
Click to expand...
Click to collapse

_that said:
No, the hardware works fine, and the kernel works correctly too - according to your own log output you're getting the correct scancodes:
Click to expand...
Click to collapse
You're right!
The fact that IT-MINUS corresponds to US-SLASH and not to US-MINUS was confusing me, sorry.
I repeated the tests having in mind the corresponding US keys, if I press US-MINUS I get 12, and if I press US-SLASH I get 53.
So it may be a problem of XServer XSDL.
I will check with @pelya
Thanks!
Alberto

Related

Linux boots on my Htc Vox!

Hi,
I was looking for info about linux ports of the htc vox (found nothing, do you know if there's anyone trying it already?) I got myself booting linux on my vox using simply haret and the linux image from the linwizard project... oh, the keypad works too, but keys are completely wrong mapped, and some simply dump error. but you get to the login screen and doesn't get stucked at all
It would be really really nice to get linux working fully on this phone... until then, here is the photo!
Excellent work. Would you mind posting some more information on how you were able to boot the kernel from haReT?
Hi!
Go here: http://sourceforge.net/project/showfiles.php?group_id=174107&package_id=199577
And download the file linwizard-0.1.0-r1.tar. Decompress that file into \Storage Card, and then decompress the initrd.bz2 file into the same folder (the initrd is in the Tar file too). Run haret from the same directory and after hitting "run", you will be booting a 7mb linux image. Oh! forgot to say, you have USB Ethernet too, so you can play a little bit more
Your SD card partition is detected, so why do you run off the ramdisk ?
Simply because I got the file directly from sourceforge and I didn't touch anything (yet), but as soon as I can I'll try to make something (I guess with gpe) after remapping the keyboard...
By now, X window works too, and even with the keypad mappings wrong, if you write "fooz" and press J (J is the Enter key) twice, you will get to the shell, there you may launch X window system.
Good work from the linux wizard project!
Android?
This leads to the answer...
Could we dream about booting Android on the VOX, using a custom kernel?
We can dream. It's a linux kernel, so licensing rules apply and it will be completely open source. Problem is, finding somebody willing to hack on it long enough to make it useable.
Excellent work, finally something new and exciting.
About Android... too soon for that. I'm more concerned by now of building a root filesystem with a graphic environment with more than a simple xterm, find information or some source for a kernel driver for the wifi (tnetw1251), another one for the TI 6300 Bluetooth controller, clean the kernel patches I've found, and build the gsm module (omap 850 and 730 cpus are pretty much the same except for the RF -850 has edge, 730 hasn't).
There's lots and lots of work to do before even trying to make Android show a bootscreen in my opinion...
Any help would be appreciated. By now, I have the kernel source, the patches for the omap 850, a root filesystem I didn't have time to try (it should work more or less) yet, the gsm kernel module source, and a bit of documentation. But I'm missing lot's of things (like a real good gpio dump wich my haret doesn't want to do), more info about the other hardware on the HTC... lots and lots of things...
Gpe Working out of the box too!
Hi, just wanted to say... Gpe is running! Well, sort of.. it hangs up a bit, keys still don't work, gsm doesn't work, I think sound doesn't work either...but hey, it's better than nothing, isn't it?
anyone knows how to remap keyboard??? if we get that working we got a shot ot this...
and anyone got usb ethernet working? i got vista and its asking for driver "ethernet handheld"
startx works too...
the acx100 project might have some infoez for patching together a 1251 driver.
@thor202ro
I do know, more or less, how to remap the keyboard, but I don't know wich keys are connected where, that's what we have to find out!
And from the usb networking, it works from linux. With the IP stored in the default.txt file, I got ssh'd onto the htc at first try. I would recommend you use linux for these things, not windows. And if you use windows, I would recommend you to use XP not vista, before you do any other thing...
you can download an easy to use livesystem from http://www.ubuntu.com
i got linux on my laptop no problem...
as for the keys we need something like "showkey"
Explanation
showkey - Examine the scancodes and keycodes sent by the keyboard. Options are -s (show scancodes) -k (show keycodes, default) -m (show keymap). This program outputs key values that the user presses on the keyboard. The program terminates when no keys are pressed for 10 seconds.
o and if you what to restart to wm without removing the bat "reboot" does the job
First, sorry for my english, wich is not as good as I'd want...
Yes, that's more or less what I think, but in a different way. I think the problem is in the kernel. See, this kernel is designed for a HTC Wizard. And this PDA has a quite different keyboard mapping, so some keys are missing in the layout, some do nothing, and some dump a kernel message, and I think what I must change is in here:
linux-2.6.16.27/arch/arm/mach-omap1/board-htcwizard.c
+ KEY(0,0,KEY_RECORD),
+ KEY(0,1,KEY_CAMERA),
+ KEY(0,2,KEY_PHONE),
+ KEY(0,3,KEY_VOLUMEUP),
+ KEY(0,4,KEY_F2),
+ KEY(0,5,KEY_MAIL),
+ KEY(0,6,KEY_DIRECTORY),
+ KEY(1,0,KEY_MENU),
+ KEY(1,1,KEY_COMMA),
+ KEY(1,2,KEY_M),
+ KEY(1,3,KEY_K),
+ KEY(1,4,KEY_OK),
+ KEY(1,5,KEY_I),
+ KEY(1,6,KEY_U),
+ KEY(2,0,KEY_RED), // FIX ME
+ KEY(2,1,KEY_TAB),
+ KEY(2,2,KEY_N),
+ KEY(2,3,KEY_J),
+ KEY(2,4,KEY_ENTER),
+ KEY(2,5,KEY_H),
+ KEY(2,6,KEY_Z),
+ KEY(3,0,KEY_SPACE),
+ KEY(3,1,KEY_L),
+ KEY(3,2,KEY_B),
+ KEY(3,3,KEY_V),
I think this is completely wrong... at least for my phone. But, my haret doesn't deal too well with it (maybe it's because of the cooked rom), and it looses connection once a while, and cannot get to debug where the keys are...
Workin' on it!
and how are going to edit those ... those dont look linke key codes at all... there got to be an config file somewhere...
There's the problem. And with that, the other problem:
Welcome, this is HaRET 0.5.1 running on WindowsCE v5.2
Minimal virtual address: 00010000, maximal virtual address: 7FFFFFFF
Detected machine Generic TI OMAP/OMAP850 (Plat='SmartPhone' OEM='HTC_S710')
CPU is ARM ARM arch 5TEJ stepping 3 running in system mode
Enter 'HELP' for a short command summary.
HaRET(1)# dump gpio
line 1: No dumper gpio available, see HELP DUMP for a list
So, it doesn't work. Tried with versions 0.5.0 and 0.5.1. Didn't find anything newer than that, and I don't know how to do it in another way...any ideas?
you can try watch GPIOS 10
and look here for haret builds http://www.handhelds.org/~koconnor/haret/
it seems like dump gpio is not present in curent builds anymore...
i cant get ssh to connect it asks for password i tryed passwd to se password didnt help....
There's no password on that build, just use root as the username, press enter when asked for the passowrd, you're in.
~ $ cat proc/bus/input/handlers [J
N: Number=0 Name=kbd
N: Number=1 Name=mousedev Minor=32
~ $
~ $ cat proc/bus/input/handlers [J d[16D
~ $ cat proc/bus/input/devices [J
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="omap-keypad"
P: Phys=
S: Sysfs=/class/input/input0
H: Handlers=kbd
B: EV=3
B: KEY=6400 1 0 0 0 0 84100000 280 8400800 c0000 0 1e0ff07f d3ffc000
i think he uses kbd to map keys
but thers a bigger problem how do we make the sistem rw.... not just read only?

Can you change the keyboard alt-modifier chars?

Well, I am currently fooling around with my ADP1 and the one thing that bothers me the most is the fact that the keyboard isnt that well suited for me as Norwegian characters arent easily accessible (I need to hold a in order to get å, etc). I was just wondering if its possible to change what the alt-modifier chars do? (alt+k returns a " for example). I would love to have it as I have on my Touch Pro, where Fn + certain keys give me my norwegian letters
Thanks!
you can write your own key layout map by modifying existing english one.
tell me, if you are interested in and i can guide you
I might be interested in this as well... Depends on how hard it is to do!
Thanks,
Christopher
Here is the thing:
You should take qwerty.kcm file
http://android.git.kernel.org/?p=pl...b_plain;f=emulator/keymaps/qwerty.kcm;hb=HEAD
which is a text file needed to generate key layout.
This file is actually not exact from G1 keyboard, because some meta-symbols are from another key layout.
If you open it, you can find 7 columns like this:
Code:
F 'F' '3' 'f' 'F' '[' '['
The first and the second tells you what key is being considered.
Forth - what symbole would be produced, when you press the key
Fifth - the same, but with _shift_
Sixth - the same, but with _alt_
So what you need to do, is to edit certain column and add symbol you need.
For example both x and alt+x produce the same char 'x', so you can change alt+'x' on whatever you want.
The best way is to enter a Unicode code for you symbols, if they are not covered with ASCII. Based on this:
http://www.fiskeklubben.org/charcters/digitized.html
you should use 00E6 for æ. In this file it should be typed as 0x00E6
When you insert character you need and adjust some other characters, you can send this layout to me and I will generate binary file for layout, which you can use on your G1
Well, it should be easier than it seems to be.
hmm, looking at the qwerty.kcm file, it doesnt all make sense. Take x for example. Fn+x should give x, as you said.. but in the .kcm file, x is displayed like this:
X 'X' '9' 'x' 'X' '8' 0xEF00
Where the the FN-coloumn shows an 8 instead of x. Any idea why?
That is because I don't have layout file for G1.
This file is for some common android device, and fn-keys (or you can call it alt-keys) differs.
So first we need to modify it in order to match with real G1 keyboard.
There is also qwerty2.kcm file
http://android.git.kernel.org/?p=pl..._plain;f=emulator/keymaps/qwerty2.kcm;hb=HEAD
may be it is closer to real G1, but anyway does not match 100%
Ah, will take some time to edit it to match the G1. Il work on it though! What do I do with the binary layout after you're done though?
Thanks for the help
You should backup your G1 layout file and replace with new.
Ive made this one, Not 100% sure its fully correct, but it should do the trick!
I compiled it (though I have to change euro and pound symbols into unicode).
Code:
R 'R' '7' 'r' 'R' 0x00A3 0x20AC
S 'S' '7' 's' 'S' '|' 0x00DF
T 'T' '8' 't' 'T' 0x20AC 0x00A3
I tried it with emulator, seems to work fine.
The idea is: to replace /system/usr/keychars/trout-keypad-v3.kcm.bin with new file.
Here are the details:
I do not write exact instruction, hope you realize how to log into device and copy files.
Now, log to your device. Be sure you have system in rw mode.
otherwise you have to remount:
#mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
navigate to /system/usr/keychars/
#cd /system/usr/keychars/
if you type ls you can see a whole bunch of files, I recommend to backup them all.
if you have busybox installed (if you don't, you'll have to do it manually by dd if= of=)
Code:
#cd /system/usr/keychars/
#mkdir backup
#busybox cp * ./backup/
now you need to replace a file trout-keypad-v3.kcm.bin with attached
Changes should affect newly started applications and it should take some time to affect already running (other words you have to type a lot into them in order they run garbage collector and reload keylayout)
Other thing, if your phone is not US G1 your system may be using other file to read layout (not trout-keypad-v3.kcm.bin ). You can check it if you type getevent:
Code:
# getevent
add device 1: /dev/input/event4
name: "compass"
add device 2: /dev/input/event3
name: "trout-nav"
could not get driver version for /dev/input/mouse1, Not a typewriter
add device 3: /dev/input/event2
name: "trout-keypad-v3"
add device 4: /dev/input/event1
name: "synaptics-rmi-touchscreen"
could not get driver version for /dev/input/mouse0, Not a typewriter
could not get driver version for /dev/input/mice, Not a typewriter
add device 5: /dev/input/event0
name: "h2w headset"
As you can see mine using
Code:
add device 3: /dev/input/event2
name: "trout-keypad-v3"
Finally, if you'll succeed, we can write a fancy guide for other people.
WARN: if you mess up badly with layouts you probably won't be able to start telnetd from G1 keyboard and other stuff like this.
So be sure you can login to your G1 from pc with root access and revert changes. I am using JF 1.3, so I can log in via adb shell with root any time from my pc.
Thanks for the guide! I have a question regarding the qwerty file though. What about the keys on the G1's keyboard that is not in the qwerty file? Such as the @-key?
Untouchab1e said:
Thanks for the guide! I have a question regarding the qwerty file though. What about the keys on the G1's keyboard that is not in the qwerty file? Such as the @-key?
Click to expand...
Click to collapse
I don't know, what would happen if you do not map all keys (probably it will yield an error upon certain key or just give nothing), but @ is present in your layout:
Code:
AT '@' '@' '@' '@' '@' 0x2022
I have a question please.
Usualy double click on the up arrow key change the keyboard layout to full upper case, is there any way to set that the double clicking on it will change the layout to other language and not upper case?
I understood that there is a difficult with changing the layout, maybe that may be a nice solution at least for some of us.
zrubi
I don't think there is a strait forward way to do it by now.
But soon (Feb 2009 I think) T-Mobile will introduce G1 to some European countries other then GB, so Google have to develope some easy way to change layouts by this time.
worry said:
zrubi
I don't think there is a strait forward way to do it by now.
But soon (Feb 2009 I think) T-Mobile will introduce G1 to some European countries other then GB, so Google have to develope some easy way to change layouts by this time.
Click to expand...
Click to collapse
Hi!
worry, first of all, thank you for all your research and work on keyboard layout. I've been following your research here and on russian forums.
I've also investigated this topic a bit and found the following following property described at http://www.kandroid.org/android_pdk/keymaps_keyboard_input.html as the one which would allow to switch the layout dynamically without kcm file substitution, but unfortunately it does NOT work.
setprop android.keychar.trout-keypad-v3 /system/usr/keychars/qwerty_ru.kcm.bin
Do you have any new information on this topic?
Do you happen to know how French and German keyboard layout switch is implemented (if there is any switching at all)?
Thank you!
i wanna change my @ button to a /
This is incredible! One step closer to be able to switch keyboard layouts on G1.
Thank you, guys!
How can I change the characters which's showed when I hold a char on keyboard ? (for an example : hold "A" and see)
And how can I creat a new type rule ? For an example I type double "A" an it become "Â", and if type triple "A" , it will return "AAA" and creat an option to on/off this feature ?
worry said:
...you can send this layout to me and I will generate binary file for layout, which you can use on your G1
Click to expand...
Click to collapse
So how exactly does one generate the binary file? I'm eager to know so I wouldn't need to ask people to do that for me when trying out layouts
Does anyone have the .kcm (not .kcm.bin) file for US G1 or ADP? (I guess it's trout-keypad-v3.kcm) or know where I can find it?
/Mats

[TUTORIAL] External keyboard remapping [3.0+]

Disclaimer
This short tutorial is based on my own research regarding missing keyboard layout mapping in stock Honeycomb/ICS Android for my Motorola XOOM. It is not intended to be a complete description of the Android input system, please refer to the official documentation for more information. This text should suffice for anyone with a basic knowledge about IT Anyway, if you break something, 'aint my fault. Won't take any responsibilities for YOUR actions.
Requirements
- rooted Android 3.0+ device (3.0, 3.1, 3.2, 4.0)
- text editor
- external keyboard to play with
Background stuff
(simplified, no bashing )
Keyboard (connected to any device) sends key codes to the target device. Key codes are just plain numbers, eg. if you press the "A" key on the keyboard, the computer reads "30" number. Since "30" is quite difficult to remember as being the "A" button, it is much more handy to describe keycodes as char codes: in the target software we get a KEY_A instead of 30.
Android uses two files for keyboard key-to-output mapping: .kl (key layout) and .kcm (key character map).
*.kl file describes the mapping between real keyboard codes to their virtual values, eg. 30 => KEY_A.
*.kcm file converts char codes to key events (KEY_A pressed? Send character "a". Shift + KEY_A? Send character "A", etc.)
So if you connect an external keyboard (USB, BT, Ir?) to your Android device, you get the following chain:
Code:
[keyboard] => [kl] => [kcm] => [application]
All devices (well, most of them) can be identified by VID (Vendor ID) and PID (product ID). VID and PID are 4 hex symbols each.
Android by default uses /system/usr/keylayout/Generic.kl and /system/usr/keychars/Generic.kcm for keyboard handling. If you look into /system/usr/keylayout/ and /system/usr/keychars/ you may find some more keymaps, including something like Vendor_xxxx_Product_xxxx.* Those files are used for specific devices, eg. Vendor_045e_Product_028e.kl is used for XBox 360 controller. When you connect the keyboard, Android checks the peripherial device VID and PID and looks for matching kl and/or kcm. If there is no matching file found, Generic.kl/Generic.kcm is used instead (disjoint -> you may have a specific kl and generic kcm, generic kl and specific kcm, etc.).
You may get the PID/VID of your external keyboard under for example Windows (in device manager [devmgmt.msc] find your keyboard and check its details [properties->details], for example HID\VID_046D&PID_C312\6&26DA469B&0&0000 => Vendor_046d_Product_C312). So if you would like to prepare a keymap for my USB Logitech keyboard, you will have to provide me with Vendor_046d_Product_C312.[kl|kcm] files
Both KCM and KL files are encoded in ANSI -> no special (national) characters allowed except for 'classic' set! If you want to include any national or extra character, you need to use their unicode hex values in \uXXXX variant. See http://www.tamasoft.co.jp/en/general-info/unicode.html for a huge list of unicode characters.
Getting hands dirty
- pull Generic.kcm from your device via adb:
Code:
adb pull /system/usr/keychars/Generic.kcm
- open it with Notepad++
- scroll through the blahblah about not modifying the file to the section with
Code:
key A {
label: 'A'
- this is where your work starts!
In general the map is composed as fillows:
Code:
# comment starts with a hash
key [keycode] {
label: '[label]'
base: '[key without any modifiers]'
[modifier]: '[key with modifier]'
[modifier]+[modifier]: '[key with both modifiers]'
[modifier],[modifier]: '[key with any of listed modifiers]'
[modifier]: fallback [magic key] # read below
[modifier],[modifier]: none
}
Modifiers can be: ralt, lalt, alt (right/left ALT, any ALT), rshift, lshift, shift (right/left SHIFT, any SHIFT), rctrl, lctrl, ctrl (left/right CTRL, any CTRL), capslock (no right CAPSLOCK on the kb, sorry ), rmeta, lmeta, meta (right/left WIN key, any WIN key). There are probably more, but didn't encounter any...
So, let's make the A key work like on Polish (Programmer) keyboard layout (namely a, A, ą, Ą letters):
Code:
key A {
label: 'A'
base: 'a'
shift, capslock: 'A'
ralt: '\u0105'
shift+ralt, capslock+ralt: '\u0104'
lalt, meta: none # ctrl omitted - ctrl+a does something...
}
Polish letters "ą" and "Ą" have their unicode values of 0x0105 and 0x0104 respectively, thus in order to have them available via right alt + A, we use ralt modifier and shift/capslock ralt modifier. Please note, that it is necessary to have 'shift' modifier for capital A.
Code:
fallback [i]magic key[/i]
is used to map certain key combinations to other commands ("hardware buttons"), such as HOME, SEARCH, MENU, APP_SWITCH, etc. Thus if for example you would like to have lalt+tab for app switching you would have to use the following:
Code:
key TAB {
label: '\t'
base: '\t'
lalt: fallback APP_SWITCH # alt + tab :)
ralt, meta: none
}
And now a Windows+D for desktop shortcut:
Code:
key D {
label: 'D'
base: 'd'
shift, capslock: 'D'
meta: fallback HOME # show desktop
alt: none
}
In short
- in most cases the Generic.kl file is ok, there is no need to prepare .kl for a common keyboard
- either edit Generic.kcm or get VID/PID of your keyboard and prepare a key layout for your language and push it to /system/usr/keychars/
Hints
- backup your Generic.kcm file!
- try to be as specific as possible if you do not use a combination, map it into 'none' section; when you map ralt, don't include alt in 'none', include lalt instead. Remember, that some key combinations have special meanings (ctrl+d, ctrl+c, ctrl+v, etc), and it is better not to include them in your map.
- backup your layout - I lost a lot of time re-creating my keymap after ROM upgrade (symbolic link is a better idea!)
- look through the entire Generic.kcm file - there are a lot of fancy key combinations, for example ESCAPE key can !by default! handle MENU, BACK and HOME keys!
- possible fallback keys are listed in .kl file
- use logcat! You can spot information about external input device and a note about applied KCM/KL files
Finally
Hit "thanks" if you find it helpful. If you prepare a good (national) key layout, please share it!
For Polish national characters we can use "Polska Klawiatura Programisty V2" it works very well with external keyboard on MoPho with 2.3.
thanks for the information. I couldnt find the the Android ICS/Honeycomb virtual key for task switcher..do you know what name is that Task switcher virtual key ?
Hi, I am a newbie with android....
I modify the kcm file to (spanish layout, Generic to Vendor both attached):
An I can't make it work, maybe:
Something is missing?
Errors in the kcm file?
Any advice would be appreciated :crying:
I am away from my PC, but:
1) run Terminal Emulator before connecting the external keyboard
2) enter superuser mode (su)
3) launch logcat (logcat)
4) launch another Terminal Emulator window
5) enter superuser mode (su)
6) connect external keyboard
7) break logcat feed
8) launch dmesg (dmesg) in other window
9) check logcat and dmesg outputs looking for errors
I'm on vacation till next Sunday. I will help you directly once I'm back
Sent from my Galaxy Nexus using Tapatalk 2
Thanks for the help:
Here are fragments of:
dmesg
Start called p = df8e3820
starting connect time
DWC_OTG : [tcc_set_vbus] vbus_state:1
usb 1-1: new low speed USB device number using dwc_otg
usb 1-1: device v1241 p1503 is not supported
input: USB Keyboard as /devices/platform/dwc_otg.0/usb1/1-1/1-1:1.0/input/input5
Click to expand...
Click to collapse
logcat
D/EventHub( 1114): No input device configuration file found for device ' USB Keyboard'.
E/KeyCharacterMap( 1114): /system/usr/keychars/Generic.kcm:454: Malformed character literal.
E/KeyCharacterMap( 1114): /system/usr/keychars/Generic.kcm:454: Invalid character literal for key.
Click to expand...
Click to collapse
I will check line 454 and see what I can do.
UPDATE
So I checked the 454 lien an a 'u' was missing, "\00xx" to "\u00xx".
I use the droidedit pro (1.15.2, and god the save file doesn't work unless root mode is enabled), changed in the ext_sd version use the terminal and copy then I connect the keyboard and it work, oh yeah it simply works (just a fu..ing 'u' for 22kb file)
Anyway thanks for the tip it really, REALLY help me :highfive: :highfive: :good: :good:
Thanks for this, will come in handy.
Hi everyone! Need some help with character map modding for Jelly Bean. I need to assign multiple letters to one button, e.g. "A" for single tap and "[" for double tap (just an example, don't mention).
What I found on source.android.com:
http://source.android.com/tech/input/key-character-map-files.html said:
The following keyboard types are recognized:
...
PREDICTIVE: A keyboard with all the letters, but with more than one letter per key.
This type of keyboard is generally designed for thumb typing.
Corresponds to KeyCharacterMap.PREDICTIVE.
Click to expand...
Click to collapse
Seems like the one thing I need, but I haven't found any syntax explanations or charmap examples for that layout type. Neither on AOSP pages, nor via Google. If your device uses such keymap type or you just know the syntax, post here examples, or attach kcm files. Any hint is good.
Android 4.2.2 - Virtual
Hi
Many thanks for this guides.
On my device Virtual.kcm is used (Acer A1-811, android 4.2.2)
Obviously it is nice to modify some file, rather than to pay 2$ for some application to do such mappings to right characters.
Regards
Logitech K400
Not sure if this goes here, but I have a Logitech K400 keyboard and it has some "special" keys, like the music player key.
What I want to do is to change the default player that opens when pressing that key, in my case it would be Poweramp.
The keyboard also has some other keys on the function keys, and when pressed some of them just are letters, want to edit this too.
There is also a "lock pc" key that opens S Planner.
I hope someone knows what I mean and can help me.
Mapping an external keyboard
In attempting to re-map an external keyboard, i have succesfully found and edited the P1_keyboard.kl file for instance changing the function of the voice search button from performing that function to performing an "Enter" or typing a letter "B" . However what i am trying to do is to use that button to do a combination of Both Letter B and then ENTER, i have tried "+" space etc but with no luck... Is this possible to do in any way?
kcm file has no effect
I create this file for the logitech K810
/system/usr/keylayout/Vendor_046d_Product_b319.kl
This successfully remaps keys.
However creating and editing this has no effect:
/system/usr/keychars/Vendor_046d_Product_b319.kcm
The generic behavior also does not match Generic.kcm
One example is Alt-Tab which switches actually switches applications on my device. It is not mentioned anywhere in anything in /system/usr. Redefining
Alt-Tab in the kcm file has no effect.
I am running KitKat on a Galaxy Note 10.1 2014.
file permissions
injola said:
I create this file for the logitech K810
/system/usr/keylayout/Vendor_046d_Product_b319.kl
This successfully remaps keys.
However creating and editing this has no effect:
/system/usr/keychars/Vendor_046d_Product_b319.kcm
The generic behavior also does not match Generic.kcm
One example is Alt-Tab which switches actually switches applications on my device. It is not mentioned anywhere in anything in /system/usr. Redefining
Alt-Tab in the kcm file has no effect.
I am running KitKat on a Galaxy Note 10.1 2014.
Click to expand...
Click to collapse
Just a guess, are the file permission set appropriately? (chmod 644 /system/usr/keychars/*.kcm)
Ctrl+SPACE does not work
On my nexus7 2012 4.4.4, chroot debian wheezy is running.
When I use emacs with Apple Wireless Keyboard (JIS).
Ctrl-SPACE does not allow me to set mark,
although keep pressing them for about one second just makes it work.
(but keep pressing makes flickering "Mark activated", "Mark deactivated"...)
In the kcm file, CTRL+SPACE is specified as "fallback LANGUAGE_SWITCH".
I tried changing it to none, or commenting out the line, but these doesn't affect.
I also used keytest.apk to inspect the behavior.
It seems just when CTRL+SPACE is pressed, no event happens...?
Does anyone know how to make Ctrl+SPACE (without keep pressing) function as setting mark ?
thank you in advance.
Genius luxepad 9100 keyboard
Hi i have this keyboard and android 4.2.2 i want the keyboard with spanish layout without pay an app, i want to choose the language on the system. Thanks in advance
Keycodes not recognised
Hi there,
I have a problem where I can't remap a key because it's not showing any keycode.
That is: standard keys like A, B, C, etc are ok: I can see their scan code and change it if I want to, but I don't.
Keys like Volume_up, play_pause, etc I would like to have them changed, but I cannot as I can't see any scan code when I press them.
I know all keys work as I tested the remote on windows and it works properly, and I can see keycodes there (but they are not the same as in android, so I can't use windows' keycodes)
Thank you if you can help
enter to send message
hello everyone! does anyone solve question about ENTER key to sending message insdeat of new line command? combination of buttons not works too for the sending messages....
android 4.4.2 + universal external keyboard (with comand buttons)
Toggle Languages
Thanks for this helpful and specific tutorial. :good:
I am trying to map keys for Urdu language. :angel:
My question is, will it work properly with lollipop?
Will it be able to toggle between language.
...
Thanks in advance for you kind information
_TB_TB_ said:
Disclaimer
- rooted Android 3.0+ device (3.0, 3.1, 3.2, 4.0)
Click to expand...
Click to collapse
Hi!
Is there any way to replace kcm without loosing your warranty?
Code:
adb push move /system/usr/
push: move/keychars/Virtual.kcm -> /system/usr/keychars/Virtual.kcm
failed to copy 'move/keychars/Virtual.kcm' to '/system/usr/keychars/Virtual.kcm': Read-only file system
Should I change permissions to put back onto system/usr?

[TOOL] ADB-Overlay [2.2.2.0 - .Net 6]

Heyho together,
after my P9-Lite and P10-Lite toolkit i thought, it's time to build a more generic version. Here it is, the ADB-Overlay!
The main point of this project is to serve a GUI for ADB. Currently, there is a File-Explorer, Remote-Desktop, Shell interface and APK installer implemented. You can also READ the contacts if your device is rooted and has sqlite3 installed. But a picture tells more as 1000 words... So here is a preview of what you'll get.
{
"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"
}
But anyways, i'm not responsible for any damage done to your device! For example, if you delete some files/folders on root lvl etc.
Component Info
Remote-Desktop:
Left-Click = Touch
Right-Click = Swipe with duration
The keyboard is nearly fully supported, i have written a kind of WPF -> Android key-mapper. So even combos like SHIFT+A-Z, SHIFT+0-9, ALT+A-Z and ALT+0-9 should work. The base for the key-mapping is a 102 keys keyboard with en-GB or de-DE layout. If you have another setup, some keys may on other positions.
The screenshots will be created under "ADB-Overlay\Screenshots\Screenshot.yyyy-MM-dd_HHmmss.(bmp | gif | jpg | png | tiff | wmp)".
-
If the device is booted in the recovery, the Remote-Desktop is only a viewer, because the recoveries doesn't support "input tap x y" nor "input keyevent XXX".
Shell:
The input box supports CTRL-A-Z, so you'll have the ability to send for example CTRL+C to stop a remote process. If you want use Copy & Paste onto the input box, use the Right-Click menu.
Tested OS
Win 7 | 8 | 8.1 | 10 | 11 (32Bit/64Bit in VM-Ware)
Win 7 | 8 | 8.1 | 10 | 11 (64Bit Native)
Tested Devices
Android Emulator some Versions (min. 2.x) in AVD
Android x86
HTC Sensation -/ XE (non-/rooted)
HTC One M9 (non-/rooted)
Huawei P9 Lite (VNS-L21, 22, 23, 31, etc.) (non-/rooted)
Huawei P10 Lite (WAS-LX1A, etc.) (non-/rooted)
Huawei Mate 9 (THX to @Tecalote)
Huawei Mate 10 Lite (THX to @Chisetdel31260)
Huawei P9 (EVA-al10) (THX to @reynard1)
Sony Xperia X (THX to @FoxTheLegend)
Pixel 4 (THX to @squabbi)
Requirements
Android: min. 2.x
Platform: x86/x64 (Windows)
Frameworks: min. .NET 6 / .NET 6 Desktop Runtime x86/x64
(Installed ADB/Fastboot driver)
Download
Mirror: See attachments
Mirror #1: My FTP [USR/PW=ADB-Overlay]
Mirror #2: GoogleDrive
Mirror #3: Dropbox
Mirror #4: Mega
DO NOT MIRROR MY FILES! DO NOT COPY MY THREADS!
Bug-Tracker
If you can't use the SDK-Updater or the Version is 0.0, just close the ADB-Overlay delete the "platform-tools" directory and restart the ADB-Overlay.
If the device won't connect via W-/Lan, check which version of android you are running... the latest version "SP2A.220505.002, May 2022" seems to break "Developer settings -> USB-Debugging -> Debug over W-/Lan"... To get it working anyways, just open a cmd prompt in the "platform-tools" folder, connect your device via USB and execute the following command: "adb tcpip 12345" (or some other port). After that, you should be able to connect your device via W-/Lan.
App Freeze
If the ADB-Overlay freezes during startup or by connecting a rooted device, the solution is to update the su binary. I encountered this problem yesterday on an older device running Android N. After an update to Magisk Canary [build 21005] the problem was solved.
Changelog
DD.MM.YYYY | (A) = Added | (C) = Changed | (D) = Deleted | (F) = Fixed | (R) = Recoded | (U) Updated
----------------------------------------------------------------------------------------------------------------------------------------------------
30.04.2022 [2.2.2.0]
(F) The SDK updater.
27.04.2022 [2.2.1.0]
(F) A freeze which occured on some FTP-Servers which doesn't implement RFC 959 properly.
11.04.2022 [2.2.0.0]
(U) General improvements in terms of speed and connectivity.
(U) The FTP config is now AES-256 encrypted for better security.
29.11.2021 [2.1.0.0]
(U) To .Net 6
(U) General improvements in terms of speed and connectivity.
25.07.2021 [2.0.2.0]
(A) ADB-Sideload
(U) ADB and Fastboot binaries.
(F) Some transfer issues (Binary <-> Socket)
(F) The platform-tools updater.
12.01.2021 [2.0.1.0]
(F) All freezes on the Tree-/ListView.
(A) ColumnHeader sorting on the Explorer and Apk-Manager ListView.
(A) Sort options for all header not only Name, Size, Date and Type.
(C) Sorting happens now in the background (So no more freezes here too.).
.-Older changes-.
12.12.2020 [2.0.0.0 - .Net 5]
Switched to .Net 5.0
(F) FTP-Updater timeout issue
(C) Brotli compression to .Net native
17.09.2020 [1.18.46.0]
(A) sendrecv_v2 for Android 11
(A) Brotli compression for file transfers on Android 11
29.03.2020 [1.17.46.0]
(A) Cut (via Context-Menu and "Ctrl+X")
(A) Copy (by default and via Drag'n'Drop by holding "Ctrl" during drop)
(A) Move (via Drag'n'Drop by holding "Shift" during drop)
(NOTE: Move is now enabled for on-device, device-to-device, local-to-device and device-to-local transfers.)
(C) The copy window, it will now display "Copy" or "Move" depending on the current operation.
16.03.2020 [1.16.46.2]
(F) The updater buttons, now they are also disabled during an download/check.
15.03.2020 [1.16.46.1]
(F) File/Folder interaction with those which contains "\s _ - ' , * & ~ | < > ( ) [ ] { }" in their names.
07.03.2020 [1.16.46.0]
(C) The synchronous IO to fully asynchronous IO.
(A) The Edit-Window, this will temporary download the file and open it locally in an application defined for this file type or with the "OpenAs" dialog.
(C) The UI, buttons which can't be used are now "grayed out".
12.02.2020 [1.15.46.1]
(F) The re-connection bug on the FTP-View. (Which also caused the updater to fail.)
(F) The (2 sec) freezes after copy/delete/tar.
(C) The info bar, added the modify date.
31.01.2020 [1.14.46.0]
(F/A) The timestamps for access, changed, modify.
(C) The "Properties Window", added the mentioned fields and resized the height a bit.
(A) Create File on the FTP-View.
30.12.2019 [1.13.46.0]
(F) The FTP TLS/SSL problem, now all procedures (implicit/explicit) should work without problems. (I tested this the last days with multiple servers, also the proxy's socks4/a|5 should now work with TLS/SSL.)
(U) All 3 explorers, they relay now on an shared generic base explorer which implements most of the features for all 3 views. So it's guaranteed that all views will behave the same.
(U) All 3 explorer views, changed the spacing's and the "edit textbox" (on rename) a bit, so that they look a bit more like the default explorer.
(A) IComparable<T> and IEquatable<T> to all List-/TreeViewItems so you get a pre-sort during item parsing. (I thought it would work a bit nicer, but hey, now it's implemented^^)
(R) Optimized the item (file/folder) parser for both Android & FTP.
18.12.2019 [1.12.46.1]
(F) The broken SDK-Updater, where you saw in the log file a "BindingException".
(F) The "SocketException" on app close. Reason for this was, that i disposed the "DeviceMonitor" after i killed the adb-server, but the monitor tried to check in some cases (10 sec refresh rate) for changes, after the server was already down.
(A) The "remount" option for mounts to the properties window. (You'll get also a little warning, each time you attempt to remount a mount point.)
(C) Resized the properties and the updater windows a bit.
17.12.2019 [1.11.46.0]
(F) The remote desktop for 16-Bit devices.
(R) Root detection
(R) Mount detection (added support for Android 2.x)
(R) The properties view, as mentioned, there is now a more valuable overview.
14.12.2019 [1.10.46.0]
(A) A version banner to the title bar.
(R) Nearly the whole caching logic inside the local ,Android and FTP explorer.
(R) The mount ([Device]) overview, now you'll see all mounts returned from "mount" and the assigned "df" data, if available. (The next build will include a more valuable overview in the PropertiesWindow. Like the mount options etc.)
(R) The remote desktop, i moved the "color correction" inside the pixel-buffer copy process. This will save a lot of time and boost the FPS in my TWRP up to 80++ per sec.. (That was so much, that .Net even couldn't dispose the sockets so fast as i requested a new one... This ended in an waiting queue overflow... So i decided to limit the FPS to 30-40 this is enough to have a clean view.) - Also NOTE: BOOTED IN ANDROID, WILL DECREASE THE FPS TO 2-3 DEPENDING ON THE RESOLUTION OF YOUR DEVICE! THE ONLY SOLUTION FOR THIS IS, START ADB WITH ROOT RIGHTS. (I added a internal switch, which will detect if adb runs as root, if so, i don't relay on the frame-buffer-service of adb. Instead, i use the bare metal (/sys/class/graphics/fb0/) to get the correct buffer values and then i read directly from "/dev/graphics/fb0".) AGAIN, NOTE: THIS WILL NOT RAISE THE FPS UP TO 80++, BUT THE FPS WILL INCREASE UP TO 15-25.
11.12.2019 [1.9.46.1] (HotFix)
(A) The mistakenly removed overwrite protection on item rename. (Android)
(R) The Copy & Delete view, the media-scanner, if activated, will now only run once at the end of an copy or delete action.
(R) Sym-/Directory/File detection, there was in rare cases a wrong detection where a SymDirectory was treated as an SymFile.
(F) The "Create New Textfile" action. (Android)
10.12.2019 [1.9.46.0]
(F) An ArgumentNullException which was raised during "mount" parsing. (On the "device" view.)
(F) The renaming issue, where you got, "The element couldn't be renamed!", if the name hasn't changed.
(A) Windows shortcuts to the TreeView of the Windows explorer. (Even the original one hasn't that feature )
(A) Hiding the ".lnk" extension on any Windows shortcut.
(A) Internal auto updates to the remote explorers (Android/FTP). So you have a kind of "pseudo" FileSystemWatcher.
(A) The re-sorting of the items after an rename action.
(D) Some code duplication. (Saved all together ~12 kb)
(R) Unnecessary refreshes and replaced them with internal cache logic's.
02.12.2019 [1.8.46.0]
(F) An ObjectDisposedException which was sometimes raised after symlink parsing and/or file transfers.
(C) The channeling on the ADBSocket, from an ConcurrentDictionary to an simple array with locks, this increased the transfer speed.
(U) The dlls to the latest versions.
24.07.2019 [1.7.46.0]
(R) The config files, both, the config.xml and the config.ftp.xml got an structure update. The old/current config files will be migrated to the latest version. So there should be no data loss in any way.
(A) A version banner to the Android and FTP view
(C) The adb directory from "ADB-Overlay\adb" to "ADB-Overlay\platform-tools"
(A) The SDK-Updater
(A) Auto-SDK-Update - If activated, this will check once every 24h for an update, but only on startup of the ADB-Overlay. (NO Tasks or something)
Info
The updater will only check "https://dl.google.com/android/repository/repository-11.xml". This XML gets downloaded and parsed, if the "platform-tools" version is newer as the used one, you'll get an popup which offers the download for the latest version.
The Auto-SDK-Update is by default disabled.
28.06.2019 [1.6.46.0]
(F) A memory leak which occurred by removing a device (Android View -> Closing an tab)
(F) A memory leak which occurred by removing a server (FTP View -> Closing an tab)
(R) Improved the directory parsing speed
(A) A progress bar to the copy window (green during transfer and on completion | red on failure or cancellation)
04.06.2019 [1.5.46.0]
(C) The versioning:
1 = Major
5 = Minor
46 = Framework Version (4.6)
0 = Hotfix
(A) A few speed improvements to the Remote-Desktop.
(A) The updater/-menu
(A) Auto-Update - If activated, this will check once every 24h for an update, but only on startup of the ADB-Overlay. (NO Tasks or something)
Info
The updater will only check my FTP for a ".version" file. This gets downloaded and parsed, if the version is newer as the used one, you'll get an popup which offers the download for the latest version. (NO logs and NO telemetry!)
The Auto-Update is by default disabled.
28.05.2019 [0.0.0.5]
(A) The "APK Manager" to the Android -> Tools menu
(A) {<-} & {->} buttons to the addressbar
(A) The "Install" option to the remote explorer -> ListViewItem context menu (only shown if the item is a apk)
(R) Added the missing options to the APK Installer (e.g. Downgrade, Test-Package, etc.)
(R) Optimized the "symlink" parsing
01.05.2019 [0.0.0.4]
(F) An exception which was raised after you tried to open any "Tool" on an disconnected device.
(A) A Battery Monitor to the Android -> Tools menu
29.04.2019 [0.0.0.3]
(A) Remote-Viewer when booted in the recovery
(A) A screenshot format selector (bmp | gif | jpg | png | tiff | wmp) to the Remote-Desktop
(A) A color correction switch to the Remote-Desktop
(A) Links to the German forum post
20.04.2019 [0.0.0.2]
(F) An issue during item renaming - Reason was maybe the switch from .NET 4 to .NET 4.6, seems the UI updates on textboxes are no longer only on focus got/lost, instead they are now after any change.
(A) Contextmenu (Listview) -> New -> Text Document
(A) Replacements for "New Directory", "Group (New)", "Server (New)" to the german language, so you get now after such an action the correct "Neuer Ordner", "Neue Gruppe", "Neuer Server".
(C) The FTP Copy/Delete action, you can now close the control connection and leave only those windows open until they are done. Both, the Copy and Delete action using now their own connection which is no longer bound to the control connection.
(C) Moved the "Keep Alive" checkbox (FTP -> Servermanager -> Account) to FTP -> Servermanager -> Connection
13.04.2019 [0.0.0.1]
Initial release
Great job. my huawei mate 10 lite is recognized. currently my smartphone is on rom original stock rne - l21c432b340 emui 8.0 not rooted. and my PC is a windows 7 64.
Works for my Xperia X - and thanks for your help!
I'm flattered to be in your contacts screenshot I was still using your prototype you had sent to me years ago!
Works very well on my Pixel 4!
squabbi said:
I'm flattered to be in your contacts screenshot I was still using your prototype you had sent to me years ago!
Works very well on my Pixel 4!
Click to expand...
Click to collapse
Hey Bro
long time not seen. Hehe yeah the good old Multi-Explorer ;p - Still using it my self, it's more or less my playground before i implement things in this tool.
If you want and have some spare time we can modify this beauty. I also reworked nearly the whole AndroidCtrl.dll, there you have now solid filestreams, strongly typed FilesystemInfos (Like the one from the .NET fw) and lots of other handy stuff. Like framebuffer access in Android and recovery mode. I also implemented a ADBridge class which is an instanced wrapper for the 2 static ADB classes (binary/socket).
Best Regards,
Sebastian
this is what im looking for a while
Thank you very much
here is some suggestion
1.better ui
2.edit build prop in the realtime
btw my phone is Huawei P9(eva-al10) rooted android 8.0 work very well
k1ll3r8e said:
Hey Bro
long time not seen. Hehe yeah the good old Multi-Explorer ;p - Still using it my self, it's more or less my playground before i implement things in this tool.
If you want and have some spare time we can modify this beauty. I also reworked nearly the whole AndroidCtrl.dll, there you have now solid filestreams, strongly typed FilesystemInfos (Like the one from the .NET fw) and lots of other handy stuff. Like framebuffer access in Android and recovery mode. I also implemented a ADBridge class which is an instanced wrapper for the 2 static ADB classes (binary/socket).
Best Regards,
Sebastian
Click to expand...
Click to collapse
Sounds great! I'm looking to get back into toolkit making later this year, I'm keen to see the improvments to your library! :good:
Great job. we can navigate and copy files efficiently.
Only one thing is missing. Why not keep file timestamp for last access and modifie dates? or let us choose the option to keep it or not.
skyrail01 said:
Great job. we can navigate and copy files efficiently.
Only one thing is missing. Why not keep file timestamp for last access and modifie dates? or let us choose the option to keep it or not.
Click to expand...
Click to collapse
Heyho,
which Android version are you using and on which action (pull/push) does the timestamps get lost?
Normally i preserve the timestamps but on some Android versions the "timestamp" field in the ADB-Protocol is ignored.
Maybe i can set the timestamps on an other way, but therefore i need to know the version.
Regards,
Sebastian
PS:
Some code where i set the timestamps
Upload
Code:
public void Close(DateTime fileCreationTime)
{
if (_ch?.IsConnected ?? false)
{
if (CanWrite)
{
int o = 0, w;
byte[] d = new byte[8];
d.SetUInt32LE((UInt32)SyncCmd.DONE, 0);
d.SetUInt32LE(ToUnixTime(fileCreationTime), 4);
//...
}
_ch.Close();
}
}
Download
Code:
//...
using (FileStream dfs = destination.Open(FileMode.Create, FileAccess.Write))
{
using (AFileStream sfs = OpenRead())
{
sfs.CopyTo(dfs, DMAX, msg, cancellationToken);
ct = sfs.CreationTime;
}
}
//...
if (msg.State == TransferState.Done)
{
destination.CreationTime = ct;
transferEventHandler?.Invoke(Client.ID, new FileTransferEventArgs(Client.ID, msg));
return true;
}
//...
Thank you really great program keep it up
Hey,
I am operating under lineageOS 16 on Galaxy S5 (klte), using adb 1.0.39 on windows 10 64-bits, either via wifi or usb connect.
I check file dates under Windows, in console mode with far manager (M: last write time, C: creation time, A: last access time).
I am using linux command ls -l under adb shell from Windows command line to list files pushed to Android.
When pushing files from Windows to Android, only M is preserved, with a 2 hours offset (ES file explorer tells it is modified date) Maybe daylight issue or bad timezone.
When pulling files from Android, only C is preserved
When I pull back to Windows, files pushed to Android, all original date is lost.
But I am pretty sure we can preserve last access, modified and creation date as I could see Adbexplorer (another project) pull files keeping M and A (adb pull -a).
Hope I give you enough details.
k1ll3r8e said:
Heyho,
which Android version are you using and on which action (pull/push) does the timestamps get lost?
Normally i preserve the timestamps but on some Android versions the "timestamp" field in the ADB-Protocol is ignored.
Maybe i can set the timestamps on an other way, but therefore i need to know the version.
Regards,
Sebastian
PS:
Some code where i set the timestamps
Upload
Code:
public void Close(DateTime fileCreationTime)
{
if (_ch?.IsConnected ?? false)
{
if (CanWrite)
{
int o = 0, w;
byte[] d = new byte[8];
d.SetUInt32LE((UInt32)SyncCmd.DONE, 0);
d.SetUInt32LE(ToUnixTime(fileCreationTime), 4);
//...
}
_ch.Close();
}
}
Download
Code:
//...
using (FileStream dfs = destination.Open(FileMode.Create, FileAccess.Write))
{
using (AFileStream sfs = OpenRead())
{
sfs.CopyTo(dfs, DMAX, msg, cancellationToken);
ct = sfs.CreationTime;
}
}
//...
if (msg.State == TransferState.Done)
{
destination.CreationTime = ct;
transferEventHandler?.Invoke(Client.ID, new FileTransferEventArgs(Client.ID, msg));
return true;
}
//...
Click to expand...
Click to collapse
skyrail01 said:
Hey,
I am operating under lineageOS 16 on Galaxy S5 (klte), using adb 1.0.39 on windows 10 64-bits, either via wifi or usb connect.
I check file dates under Windows, in console mode with far manager (M: last write time, C: creation time, A: last access time).
I am using linux command ls -l under adb shell from Windows command line to list files pushed to Android.
When pushing files from Windows to Android, only M is preserved, with a 2 hours offset (ES file explorer tells it is modified date) Maybe daylight issue or bad timezone.
When pulling files from Android, only C is preserved
When I pull back to Windows, files pushed to Android, all original date is lost.
But I am pretty sure we can preserve last access, modified and creation date as I could see Adbexplorer (another project) pull files keeping M and A (adb pull -a).
Hope I give you enough details.
Click to expand...
Click to collapse
Heyho,
THX for that info, i'll check the "adbd" source which LOS uses, maybe there is the prob. According to "adb pull -a" i'll also have a look at the adb source, because i think they do some "touch" stuff. Because the ADB-Protocol it self only supports creation/last modified time. In the source is a another "struct" for "STA2" (stat 2) command. But i have never seen a adb binary which supports this. (All binaries use the "STAT" command.)
EDIT 1:
Just checked the adb source again, seems they changed it a bit...
(This is the current STAT (v1) header)
Code:
# cmd name STAT or STA2 // 4 bytes
st->st_mode = msg.stat_v1.mode; // 4 bytes
st->st_size = msg.stat_v1.size; // 4 bytes
st->st_ctime = msg.stat_v1.mtime; // 4 bytes
st->st_mtime = msg.stat_v1.mtime; // 4 bytes
My HTC-One M9, Sensation, VM-Ware (Kitkat - Nougat) none of them has a 20 byte header. ALL of them return a 16 byte header.
Code:
CMD // 4 bytes
Mode // 4 bytes
Size // 4 bytes
CTime // 4 bytes
So it seems the protocol is highly inconsistent... I'll check how much time gets lost by calling touch on each file, because, currently i open a sync channel via an smart-socket, transfer the file and read all data provided by the protocol header. This is really fast, but if i have to spin up each time another channel to get a shell for the touch, this will increase the time each copy needs. Because, a shell depending on the version (v1, v2), has a lot checks you need to perform, specially the shell_v2 because it's like a ssh protocol.
EDIT 2:
Just for completeness, i'm pretty sure your device also sends only a 16 byte header for the stat v1 command, because:
(This is a cut of my implemented "Stat(byte[] bytes)" class)
Code:
if (c == (uint)SyncCmd.STA2 && bytes.Length >= 72)
{
ID = SyncCmd.STA2;
Error = bytes.GetUInt32LE(4);
Dev = bytes.GetUInt64LE(8);
INode = bytes.GetUInt64LE(16);
Mode = bytes.GetUInt32LE(24);
NLink = bytes.GetUInt32LE(28);
UID = bytes.GetUInt32LE(32);
GID = bytes.GetUInt32LE(36);
Size = bytes.GetUInt64LE(40);
ATime = bytes.GetInt64LE(48);
MTime = bytes.GetInt64LE(56);
CTime = bytes.GetInt64LE(64);
}
else if (c == (uint)SyncCmd.STAT && bytes.Length == 16)
{
ID = SyncCmd.STAT;
Mode = bytes.GetUInt32LE(4);
Size = bytes.GetUInt32LE(8);
CTime = bytes.GetUInt32LE(12);
}
As you can see, the both structures differ in there field order, if your device would send a 20 byte header, the test (bytes.Length == 16) wouldn't match. And you couldn't download a file.
EDIT 3:
After playing a while with "stat" and "touch" on some Android versions, i decided to rely on those functions. The next build should restore and write the correct timestamps.
EDIT 4:
Well, setting timestamps on the SD-Card doesn't work, also, setting timestamps on the "internal" SD-Card doesn't work either. Seems that it's related to the underlying FS. If i try to set the timestamp on an ext4 partition, it works. So it doesn't make sense to rewrite the push/pull functions because the return of touch for 99% of the time will be "touch: '/sdcard/TWRP/test.pdf': Operation not permitted". So it's simply a time waste during the copy procedure. BUT, i'll implement it at least for the download, so u'll get the correct timestamps on Windows.
EDIT 5:
Added a screenshot of the new "Properties Window" which also proves that the download timestamps are now correct.
(Btw. C doesn't mean created - it means changed)
Code:
stat /sdcard
File: `/sdcard' -> `/storage/self/primary'
Size: 21 Blocks: 0 IO Blocks: 512 symbolic link
Device: 1h/1d Inode: 4432 Links: 1
Access: (777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 1970-01-01 01:00:00.000000000
Modify: 1970-01-01 01:00:00.000000000
Change: 1970-01-01 01:00:00.360063176
Little update about the "creation time". After a bit research i found this post on Stack Exchange, there is explained that the so called "birth time" is stored since ext4 as part of the INode field. But it seems you need a special version of "stat" to read this info, it's called "statx". But so far i could see, Android doesn't support this feature, maybe some kernel does but it seems that it's more the rare case.
Regards,
Sebastian
Thanks for the update!
I was wondering what could be causing a small delay in copying files over, once the progress finishes, the transfer dialog remains frozen for a 1-2 seconds. I'm copying over a photo, so around 2MB.
squabbi said:
Thanks for the update!
I was wondering what could be causing a small delay in copying files over, once the progress finishes, the transfer dialog remains frozen for a 1-2 seconds. I'm copying over a photo, so around 2MB.
Click to expand...
Click to collapse
Heyho ,
yup i still working on it. It seems that the "Task.Delay()" isn't performed inside the Task itself, instead it's executed on the main thread. The reason for the freeze is, that i try to show the last result, otherwise the copy window would close immediately after the last element and you couldn't see if it's transferred or not. So i keep it like windows, wait 1,5-2,5 sec before closing the window.
The delay you might feel extremely is the "Media-Scanner". It runs on the end of each copy/delete action, the reason for this is, that files pushed/copied by adb are not reported to the MTP interface. So you couldn't see those files if you connect your device after such an adb copy via MTP. Also files/folders deleted by adb are also not reported to the MTP interface. So you will see those elements via MTP if you don't perform manually the "Media-Scanner" lookup. - But if you work only with adb for example, you could turn the "Media-Scanner" off. All device based explorers and of course adb will see those files/folders at any times. (But if you need those files/folders for exchange you should keep the "Media-Scanner" on )
EDIT:
This is executed for every file which is copied/pushed/deleted.
Code:
_adb.Device.Manager.ActivityManager.Broadcast("android.intent.action.MEDIA_SCANNER_SCAN_FILE", "-a", string.Concat("-d 'file://", remotePath, "' > /dev/null"));
EDIT 2 (a bit off-topic):
You could also simply use the "Media-Scanner" with my AndroidCtrl.dll. The calls are:
Code:
//"_adb" is a instance of "ADBClient"
_adb.Device.IO.MediaScanner.CreateScanList(string remoteDirectory, MediaScanMode mode);
_adb.Device.IO.MediaScanner.CreateScanList(string remoteDirectory, MediaScanMode mode, CancellationToken cancellationToken);
_adb.Device.IO.MediaScanner.CreateScanList(string remoteDirectory, IList<string> files, MediaScanMode mode, CancellationToken cancellationToken);
_adb.Device.IO.MediaScanner.ScanDirectory(string remotePath, MediaScanMode mode);
_adb.Device.IO.MediaScanner.ScanDirectory(string remotePath, MediaScanMode mode, CancellationToken cancellationToken);
_adb.Device.IO.MediaScanner.ScanDirectory(IEnumerable<string> remotePaths, MediaScanMode mode);
_adb.Device.IO.MediaScanner.ScanDirectory(IEnumerable<string> remotePaths, MediaScanMode mode, CancellationToken cancellationToken);
_adb.Device.IO.MediaScanner.ScanFile(string remotePath, MediaScanMode mode);
_adb.Device.IO.MediaScanner.ScanFile(IEnumerable<string> remotePaths, MediaScanMode mode);
_adb.Device.IO.MediaScanner.ScanFile(IEnumerable<string> remotePaths, MediaScanMode mode, CancellationToken cancellationToken);
_adb.Device.IO.MediaScanner.ScanObject(ITransferMessage message, MediaScanMode mode);
EDIT 3:
Found the bad boy, seems "Task.Delay()" only works when used in "async" context. Now the "freeze" is gone, you can move the window until it vanishes. So, in the next update those "freezes" are gone.
---
Little Update:
@squabbi
The next update includes a little editor as suggested by @reynard1. A screenshot can be found as attachment.
Regards,
Sebastian
k1ll3r8e said:
**snip**
EDIT 3:
Found the bad boy, seems "Task.Delay()" only works when used in "async" context. Now the "freeze" is gone, you can move the window until it vanishes. So, in the next update those "freezes" are gone.
---
Little Update:
@squabbi
The next update includes a little editor as suggested by @reynard1. A screenshot can be found as attachment.
Regards,
Sebastian
Click to expand...
Click to collapse
Woohoo! Thanks for digging into it! I'm glad you found the culprit haha.
Looking forward to that editor feature! Do you know if it's possible to integrate with Windows Explorer? It's probably a little harder, but something like how WinSCP can drag files from the remote to a local Explorer window.
If that's a little difficult, would this be possible to implement? If I drag and drop a folder/file onto the local pane, it will change directory (and highlight the file if a file was dragged onto the local pane). Just to make it easier to work with folders I have already open.
Still using Windows 7?
squabbi said:
Woohoo! Thanks for digging into it! I'm glad you found the culprit haha.
Looking forward to that editor feature! Do you know if it's possible to integrate with Windows Explorer? It's probably a little harder, but something like how WinSCP can drag files from the remote to a local Explorer window.
If that's a little difficult, would this be possible to implement? If I drag and drop a folder/file onto the local pane, it will change directory (and highlight the file if a file was dragged onto the local pane). Just to make it easier to work with folders I have already open.
Still using Windows 7?
Click to expand...
Click to collapse
Heyho
Yes its definatly possible, we need to use the so called "VirtualFileDataObject". I tried to implement it some time ago, but doesn't worked as expected. But i'll give it another try.
-
Yup, i still use Win 7 as my main system, but i have some VMs running, like my Debian server which serves the documentation and some test sites for my php projects, a few Android x86 Versions and of course a legit Win10 installation to test If everything works.
*Never change a running system! - Currently my main hdd has a uptime of 2689 days with 216 restarts, i think that tells a lot *
---
Little Update:
As the screenshot shows, the editor is working fine so far. (Added also a few more controls.) The only problem i still have is, that if ADB doesn't run as root you can't edit for example the "build.prop". Because ADB can't write the file directly back, so i need to build a kind of "tmp" file. The next problem will be, that you (the user) have to remount the mount point, before you start editing those "root" and "write protected" files. There is also a problem with "binary" files, because the "RichTextBox" screws up when it gets "binary to ASCII/UTF8" transformed data, which ends in an app freeze... So i have to check on some way if the stream contains really text-data, the file extension doesn't help here much because, you know, linux uses also a lot of txt files without any extension.
Update 2:
Just got the "binary" files running... With a super BIG drawback, 248 kb (4069 rows) text results in 269,364 mb memory utilization by the "RichTextBox". - The prob here is, that the ADB filestream doesn't support seek, so i need to load the whole doc in one, which is quiet to much for the "RichTextBox"...
Update 3:
Soo, i wrote a kind of paging for the "RichTextBox" which works so far really nice, at least when it comes to the memory (even during scrolling, with free running wheel, only 15 - 27 mb increase), there is now a fixed amount of rows (40) which will be shown, all other rows are hidden from the "RichTextBox". This opens a few new issues^^ - Currently there is no selection possible which goes beyond the 40 rows. Also insert and delete are a little challenge because, i need to "overwrite" the default behavior with the some "PreviewKeyDown/etc." events... - Looks all a bit hacky, but lets see if it works in the end.
Update 4:
Well, the "RichTextBox" is out of the race^^ - It triggers events more or less random instead when you expect it, it removes blank lines (for example you have 3x "\n", this gets wrapped to 1x "\n") and the best, you remove "\r" during stream reading and the RTB adds it again, also random (some paragraphs get an "\r" some not). Editing text in a solid way without losing something isn't possible with this thing... So i'll try the "TextBox".
Last Update before release:
So, after testing the "RichTextBox" and "TextBox" i ask myself why those controls are there^^. Both can't edit text with more than a few hundert lines, the "TextBox" is at least much better as the "RichTextBox" but it also screws up when i comes to more as 250 kb text. So the "Editor" will be one of your installed applications. I add a little tool window, which offers the temporary download to the windows temp folder, after that i launch the windows "OpenAs" dialog that you can choose the editor you want. Also, i'll attach a "FileSystemWatcher" to the file that the upload automatically happens when you press save in your editor.
Little Info:
It take a few more days for the "edit" update, because i started also to implement the TAP pattern, this increased for example the download speed by factor 6. But to implement it the right way, i have to rewrite a lot of code in the AndroidCtrl.dll and AndroidCtrlUI.dll.
Regards,
Sebastian
k1ll3r8e said:
Heyho
Yes its definatly possible, we need to use the so called "VirtualFileDataObject". I tried to implement it some time ago, but doesn't worked as expected. But i'll give it another try.
-
Yup, i still use Win 7 as my main system, but i have some VMs running, like my Debian server which serves the documentation and some test sites for my php projects, a few Android x86 Versions and of course a legit Win10 installation to test If everything works.
*Never change a running system! - Currently my main hdd has a uptime of 2689 days with 216 restarts, i think that tells a lot *
** snip **
Click to expand...
Click to collapse
That'll be great to see haha, and that does make sense keeping your system as is, if it works, it works.
Thanks for your hard work in checking out what's best for the new edit function. Maybe there's a library out there that can implement a text viewer better? I'm not familiar with WPF libraries, or how many there are.
squabbi said:
That'll be great to see haha, and that does make sense keeping your system as is, if it works, it works.
Thanks for your hard work in checking out what's best for the new edit function. Maybe there's a library out there that can implement a text viewer better? I'm not familiar with WPF libraries, or how many there are.
Click to expand...
Click to collapse
Heyho,
i have had a look on Avalon Texteditor but on StackOverflow is also a discussion about how to open a file bigger than 20 mb. It seems WPF is not that great for such things. I found also another one, written by a lonely dev like me , but it's not maintained since 7 years. So the best way might be, open a installed App which is well designed for that purpose.
A bit off-topic
I nearly finished the TAP implementation for the AndroidCtrl.dll, so far it brought a great speed increase. Also, it consumes less CPU time, for example the remote desktop uses only 3-7% on an Intel I5 with 32 GB memory (but up to 36% on an single-core Intel Pentium M with 1,5 Ghz and 1 GB memory - my old well working Laptop, also with Win7 ). So you might be happy to see all the new "real async" overloads in the lib. (I implemented all from scratch, so there is NO Task.Run() or Task.StartNew() in those functions.)
Edit:
Soo, after a few horrible days, the TAP pattern is now fully integrated! But there is still a little issue with the Remote-Desktop recovery viewer. It seems that everything got a speed boost except the recovery viewer, the viewer is currently nearly 4x slower as before... After i fixed this last problem, i'll release the new asynchronous version.
Regards,
Sebastian

No virtual keyboard when BT gamepad connected on Andorid 12

I have Samsung S10 with Android 12
When I connect bluetooth gamepad, it gets recognized as "Physical keyboard" (gamepad is VR BOX)
When I enter in SCUMMVM (gaming app), it has a hud on screen shortcut key (HUD)to call a onscreen keyboard (needed in some games). If a bluetooth gamepad is connected, the shortcut key doesn't work and I can't call the onscreen keyboard. Under "Physical keyboard" options I have turned on "show on-screen keyboard" but it didn't help.
I've read that in past people had simmilar problems with other gamepads on older andorid phones and that the solution was to go to Android settings and "select your default keyboard. (physical or virtual)" but I don't have that option.
Any idea how to solve this problem?
The root problem is that the USB HID report descriptors in your little handheld are written incorrectly.
It's reporting that it can send the alphabet (specifically "Q").
Me? I'd fix the problem by reverse engineering the device.
The next possibility is to use a custom /system/usr/idc/Vendor...idc to make it clear that this is not a qwerty
The last possibility (and the one you probably want) is in Settings > System > Languages & input > Physical keyboard > Keyboard assistance > Show virtual keyboard.
You can load my UsbMode.apk (in the sig) and see that your handheld is identified as a qwerty.
Renate said:
The root problem is that the USB HID report descriptors in your little handheld are written incorrectly.
It's reporting that it can send the alphabet (specifically "Q").
Me? I'd fix the problem by reverse engineering the device.
The next possibility is to use a custom /system/usr/idc/Vendor...idc to make it clear that this is not a qwerty
The last possibility (and the one you probably want) is in Settings > System > Languages & input > Physical keyboard > Keyboard assistance > Show virtual keyboard.
You can load my UsbMode.apk (in the sig) and see that your handheld is identified as a qwerty.
Click to expand...
Click to collapse
Thanks for your answer
As I've mentioned before "Show virtual keyboard" doesn't work. I can see the on screen button that would call the virtual keyboard but it doesn't work if the gamepad is connected
I'm interested in solution to use custom Vendor.idc or to reverse engineer the device but I'm a noob to do it myself. I've went to /system/usr/idc/ dir and can see 4 .idc files where in the files, it says that two are form "Sony DS4...", and two are for "Google Reference RCU Remote" - none seams that belongs to the "no name" gamepad device I'm using? There are bunch of other .idc files but also no one seams to belong to the device...
Here's the paste from the Google RCU device:
1st file:
# Input Device Configuration file for Google Reference RCU Remote.
#
# Basic Parameters
# Due to a memory error on early prototypes of the reference remote control
# the VID/PID is mapped to 248a/8266 instead of 0957/0001
keyboard.layout = Vendor_0957_Product_0001
keyboard.doNotWakeByDefault = 1
audio.mic = 1
2nd file:
# Input Device Configuration file for Google Reference RCU Remote.
#
# Basic Parameters
keyboard.layout = Vendor_0957_Product_0001
keyboard.doNotWakeByDefault = 1
audio.mic = 1
Any help?
This gamepad I'm trying to use is pretty neat to play games by one hand which is great on mobile as you can hold device in one hand and gamepad in other so it would be great to hack it if to also be able to show keyboard on keypress demand if it is possible
Try the UsbMode.apk. Also, does a little boxed "A" appear on the status bar when the remote is active?
First, with the remote active, identify the VID/PID of your device
Code:
$ logcat|grep btif
bt_btif : bta_hh_co_send_hid_info: vendor_id = 0x291a, product_id = 0x8502, // something like this
^C
Could you do me a favor (just for my own interest)?
Code:
$ cd /sys/bus/hid/devices
$ cd whatever // there's only one directory here, named ????:VID#:PID#:????
$ cp report_descriptor /sdcard/descript.img
$ ^D
C:\>adb pull /sdcard/descript.img
Hmm, it looks like there is no option in idc. You'll have to make a keylayout file.
Please use the UsbMode.apk and write down what all the buttons do.
There's not that many. I just need the Android names, you don't need to say which button on the remote it is.

Categories

Resources