Well, I just sat down and decided to finally figure out how to map ALL of Zenonia 3's controls to a gamepad ,a PhoneJoy pad to be exact, but this should work for any gamepad/wiimote etc. as long as you have enough buttons. These controls may or may not work for Zenonia 1, however they do NOT work for Zenonia 2. The walking directions and attack button work on Zenonia 2, however nothing else does.
Anyway, here are the controls:
Up: W
Down: S
Left: A
Right: D
Menu/Start: Del. (Delete key)
Attack: Enter or Y
Switch Hotbar/Hot Keys: G
Hotbar Slot 1: 1
Hotbar Slot 2: 3
Hotbar Slot 3: , (Comma key)
Hotbar Slot 4: 9
Hotbar Slot 5: T
Hotbar Slot 6: N
I believe that's all of them, IF I missed something or if something is wrong let me know. Hope this helps some people out.
P.S. There are alternative ways to map the directional buttons, one using numbers (2, 4, 6, and 8 I believe) and another one using letters (not WASD), however I didn't bother finding out the exact mapping.
thank you! was just slowly mapping those ... always setting buttons to different keys to find out what is what ... then i got tired of it and searched a bit and found your thread. Saved me quite some time ^^
Trying to find out the controls for illusia now
Up: W
Down: S
Left: A
Right: D
Menu/Start: Del
Attack: Enter
Jump: Space
Hotbar Slot 1: 7 (left box top left)
Hotbar Slot 2: 9 (left box top right)
Hotbar Slot 5: 0 ( right box top left)
That's all I was able to find. I can't seem to find the keys for the other 5 quickslots, if they even exist
Zenonia 4
Since Zenonia 4 is out I haven't seen any posts about key mappings for it. So I went ahead and found them myself.
Up: W
Down: S
Left: A
Right: D
Menu/Start: Del. (Delete key)
Attack: Enter(and several others)
Switch Hotbar/Hot Keys: G
Hot keys: 1,3,7,9
Pretty much the same thing as Zenonia 3 except the hotkeys. Tested this with Wiimote and it works perfect.
First tutorial ever... so bear with me...
I am writing how I got true analog on n64oid with a sixaxis ps3 controller, while also using the c-buttons. This configuration works perfectly for Mario and Zelda, but not Goldeneye.
I originally had a problem where when I wanted to use true analog in N64oid, I couldn't use the D-pad. This is how I fixed it.
Firstly, I'd like to say that Sixaxis Pair Tool did not work at all on my Windows 8 x64 computer. Therefore, I installed Motioninjoy and followed this well written tutorial:
http : // www . motioninjoy . com / wiki / en / install / latest
Until I got to the "Getting it working - Bluetooth mode" step. Instead, I entered a "Custom MAC," my phone's "Local Bluetooth Address." I had to enter the MAC in reverse. For example, my phone said something like "00:15:83:4f:6c:b0," and I entered "b0.6c.83.4f.6c.b0"
Take note that I replaced the colons with periods. Then I pressed "Pair now." I then unplugged my phone from my computer and followed the instructions from inside the Sixaxis Controller apk on my phone.
To get Sixaxis Controller 0.5.4 to work with Pure Analog, I went into Sixaxis Controller's Preferences, Gamepad Settings. I checked "Enable Gamepad." Then I went into Edit Mappings. I realized that I had to change the D-pad buttons to values other than what the analog was set to, becuase in n64oid, the left analog registers as the D-pad. Also, I realized that an N64 doesn't use buttons like L3, R3, L2, R2, Square, Circle, and Select.
Therefore, I changed:
Up: L2
Right: R2
Down: Y
Left: X
I left everything else as default.
I wanted the C-buttons to function as the D-pad on my ps3 controller. Therefore, in N64oid, I think I pressed R3 for all four d-pad buttons and I mapped controller 1 as:
D-pad Left: Unknown 106 <--Again, the D-pad buttons can be any button on the controller you won't use; I used R3 for all the buttons.
D-pad Right: Unknown 106
D-pad Up: Unknown 106
D-pad Down: Unknown 106
C-left: Button X
C-Right: Button R2
C-Up: Button L2
C-Down: Button Y
Start: Button Start
Button A: Button B
Button B: Button A
L trigger: Unknown 106 <--Who uses the L trigger. I've always used the z-trigger; Therefore, I pressed R3 for the L trigger as well.
R trigger: Button R1
Z trigger: Button L1
Analog Left: DPAD left
Analog Right: DPAD Right
Analog Up: DPAD Up
Analog Down: DPAD Down
As a result, I have full analog support on N64oid. I can finally walk as Mario and controlling Link is PERFECT!
Also, my appologies if this post is in the wrong section.
I play n64 on my phone a fair bit so an optimum solution would be nice. I will give what you have said a try.
Currently my set up is to have the analogues using the touch emulation for both the n64 analogue and c-buttons.
like this:
{
"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"
}
I can't stand the touchscreen's simulated controller. I purchased an iControlPad, but its analog nubs are worse than the PSP's analog nubs.
I might consider purchasing the Fling Mini though! It provides feedback to the touchscreen.
I can tell you that using the ps3 controller with full analog support with the phone feels PERFECT.
Also, there are two ways that I found where you can attach your phone to your ps3 controller similar to the way the icontrolpad attaches to your phone. One way was as simple as using a PS3 controller keyboard and mounting the phone to the keyboard with sticky tack. The other way was posted here on xda-developers where a guy made a 3d model in solidworks and a 3d printing website prints the holder for 30 bucks. The guy who made the 3d model doesn't get paid for the purchases.
What is wrong with mapping the analogue to the touchscreen? (I do make the on screen buttons invisible when playing)
Currently I have DIY-ed a phone mount onto my contoller using some cardboard! I am considering using a rubber phone case and a couple of thin long hinges in my newer 'prototype' for a more refined look
You can also use the right analog stick as the C buttons by mapping the 'Right Analog x-axis' and 'Right Analog y-axis' to 'Disabled' in the Sixaxis Controller app. They will now fall back to keyboard emulation, so you can set the IME to Sixaxis Controller and map them as keys in the emulator.
dmnchief001 said:
First tutorial ever... so bear with me...
I am writing how I got true analog on n64oid with a sixaxis ps3 controller, while also using the c-buttons. This configuration works perfectly for Mario and Zelda, but not Goldeneye.
I originally had a problem where when I wanted to use true analog in N64oid, I couldn't use the D-pad. This is how I fixed it.
Firstly, I'd like to say that Sixaxis Pair Tool did not work at all on my Windows 8 x64 computer. Therefore, I installed Motioninjoy and followed this well written tutorial:
http : // www . motioninjoy . com / wiki / en / install / latest
Until I got to the "Getting it working - Bluetooth mode" step. Instead, I entered a "Custom MAC," my phone's "Local Bluetooth Address." I had to enter the MAC in reverse. For example, my phone said something like "00:15:83:4f:6c:b0," and I entered "b0.6c.83.4f.6c.b0"
Take note that I replaced the colons with periods. Then I pressed "Pair now." I then unplugged my phone from my computer and followed the instructions from inside the Sixaxis Controller apk on my phone.
To get Sixaxis Controller 0.5.4 to work with Pure Analog, I went into Sixaxis Controller's Preferences, Gamepad Settings. I checked "Enable Gamepad." Then I went into Edit Mappings. I realized that I had to change the D-pad buttons to values other than what the analog was set to, becuase in n64oid, the left analog registers as the D-pad. Also, I realized that an N64 doesn't use buttons like L3, R3, L2, R2, Square, Circle, and Select.
Therefore, I changed:
Up: L2
Right: R2
Down: Y
Left: X
I left everything else as default.
I wanted the C-buttons to function as the D-pad on my ps3 controller. Therefore, in N64oid, I think I pressed R3 for all four d-pad buttons and I mapped controller 1 as:
D-pad Left: Unknown 106 <--Again, the D-pad buttons can be any button on the controller you won't use; I used R3 for all the buttons.
D-pad Right: Unknown 106
D-pad Up: Unknown 106
D-pad Down: Unknown 106
C-left: Button X
C-Right: Button R2
C-Up: Button L2
C-Down: Button Y
Start: Button Start
Button A: Button B
Button B: Button A
L trigger: Unknown 106 <--Who uses the L trigger. I've always used the z-trigger; Therefore, I pressed R3 for the L trigger as well.
R trigger: Button R1
Z trigger: Button L1
Analog Left: DPAD left
Analog Right: DPAD Right
Analog Up: DPAD Up
Analog Down: DPAD Down
As a result, I have full analog support on N64oid. I can finally walk as Mario and controlling Link is PERFECT!
Also, my appologies if this post is in the wrong section.
Click to expand...
Click to collapse
Will these mappings work with BT/USB joystick center???
please need to know . thanks !
I fin I can't play songs on the Ocarina in Zelda for some reason when doing this. Is annoying as I have to switch to another ocntroller just for that. Grr!
Thanks
Sent from my PC36100 using Tapatalk 2
My x button keeps activating my phones back button! Help! I fixed this with my wiimote but I don't know what to do with the six axis. Says x is 3 but its actually the back button...
ARPwizard said:
My x button keeps activating my phones back button! Help! I fixed this with my wiimote but I don't know what to do with the six axis. Says x is 3 but its actually the back button...
Click to expand...
Click to collapse
im having this problem too! on some emulators it wont even let me map the button im pressing on the controller because the phone registers it as BACK and backs me out of the key map screen. any solution to this????
scammer12 said:
im having this problem too! on some emulators it wont even let me map the button im pressing on the controller because the phone registers it as BACK and backs me out of the key map screen. any solution to this????
Click to expand...
Click to collapse
anyone????????????
c button mapping to right analog stick... done deal.
hey. this is my first post on this forum. i had to help people out with this problem, as i too, had problems figuring this out.
here's how to set the c buttons to your right analog stick for use in n64oid.
this is what i found after a whole crapload of searching... this dude is awesome. and saved me from going nuts trying to figure it out myself.
this if from a guy named zachary. he wrote this on nov 1st of this year. thanks zach.
heres the site its from. hope this complies with your rules, xda dudes.
------scrach that... cant post links yet. oh well. at least i can still get the message across.
"After a ton of tinkering
I finally got everything to work perfectly in N64oid. I even got the C buttons to link up to the right analog stick up down left right which was a massive relief.
You need to go into Gamepad Setting> Edit Mappings> Disable Right Analog X and Y's. ------(x and y axis is what he means)
Then go to Keyboard Emulation> Key Mappings> 1st> Edit> Analog 2 L R U D, put in something like U I O P. ------(L-left, R-right etc... U I O P-letters on the keyboard)
Plug in a keyboard via USB OTG. ------(or connect a bluetooth keyboard... im assuming that would work too. if not please correct me)
Head over to N64oid> Settings> Input > Key Mappings> "> and in C- L R U D, put in your U I O P. Voila! Enjoy!" ------(by "put in" he means press the u, i, o, and p buttons on the keyboard into the corresponding c-left, c-right, c-up, c-down key maps)
one thing he didnt mention is you have to have the "Use input method" box checked in n64oid for it to recognize the right analog stick as the "U I O P" (or c-l, c-r, c-u, c-d) buttons. the "use input method" option is in the "other settings" menu of n64oid.
i hope this helps anyone who has been frustrated with this issue. im off now... gotta play some zelda on my s3. (;
my xperia s
my xperia s haven't enought energy to use some gamepad :|
Where do you download N64oid? I cannot find it in the play store
Blackmart or aptoide
Sent from my PC36100 using Tapatalk 2
Cant get n64oid to recognize second ps3 controller. HELP
I cannot for the life of me get 2 ps3 controllers set up with N64oid. I have 1 working great but I cant get my N64oid to recognize the second controller even though it shows #2 on the controller itself. It just acts like a #1 controller. I am using Sixaxis. I REALLY want to play mario kart against someone. Please help.
OneZeroEight said:
hey. this is my first post on this forum. i had to help people out with this problem, as i too, had problems figuring this out.
here's how to set the c buttons to your right analog stick for use in n64oid.
this is what i found after a whole crapload of searching... this dude is awesome. and saved me from going nuts trying to figure it out myself.
this if from a guy named zachary. he wrote this on nov 1st of this year. thanks zach.
heres the site its from. hope this complies with your rules, xda dudes.
------scrach that... cant post links yet. oh well. at least i can still get the message across.
"After a ton of tinkering
I finally got everything to work perfectly in N64oid. I even got the C buttons to link up to the right analog stick up down left right which was a massive relief.
You need to go into Gamepad Setting> Edit Mappings> Disable Right Analog X and Y's. ------(x and y axis is what he means)
Then go to Keyboard Emulation> Key Mappings> 1st> Edit> Analog 2 L R U D, put in something like U I O P. ------(L-left, R-right etc... U I O P-letters on the keyboard)
Plug in a keyboard via USB OTG. ------(or connect a bluetooth keyboard... im assuming that would work too. if not please correct me)
Head over to N64oid> Settings> Input > Key Mappings> "> and in C- L R U D, put in your U I O P. Voila! Enjoy!" ------(by "put in" he means press the u, i, o, and p buttons on the keyboard into the corresponding c-left, c-right, c-up, c-down key maps)
one thing he didnt mention is you have to have the "Use input method" box checked in n64oid for it to recognize the right analog stick as the "U I O P" (or c-l, c-r, c-u, c-d) buttons. the "use input method" option is in the "other settings" menu of n64oid.
i hope this helps anyone who has been frustrated with this issue. im off now... gotta play some zelda on my s3. (;
Click to expand...
Click to collapse
Would of been good if you uploaded your profile
Yes, please upload profile for your fellow xda'ers
Sent from my PC36100 using Tapatalk 2
Right analog stick for C-buttons via USB OTG
Hello!
I am currently trying to figure out how to configure the right analog stick from a PS3 controller to use as the c buttons. I am connecting it via USB OTG. I had everything else working except for the right analog stick. I read the forums that it works if you use the Sixaxis Controller app but I DO NOT want to root my device (Galaxy Note 2). I am assuming there is a way to do this effectively without having to root the device and to use the controller with the OTG cable. I would gladly appreciate any help!
jay_magica said:
Hello!
I am currently trying to figure out how to configure the right analog stick from a PS3 controller to use as the c buttons. I am connecting it via USB OTG. I had everything else working except for the right analog stick. I read the forums that it works if you use the Sixaxis Controller app but I DO NOT want to root my device (Galaxy Note 2). I am assuming there is a way to do this effectively without having to root the device and to use the controller with the OTG cable. I would gladly appreciate any help!
Click to expand...
Click to collapse
sixaxis will not work without root, how did you get this far?
I'm trying to use a gamepad with my Galaxy S3. I've tried both a wireless Xbox 360 controller, and a wired original Xbox controller. They both have the same problem, which is the trigger axes are too noisy, and it is impossible to manually map axes to functions in games that require it, like Dead Trigger or SG: Shadowgun. I try to map a button? Nope, instantly mapped to right trigger! Try to map the left stick to the move function? Nope, also instantly mapped to the right trigger! Holding down the right trigger, or the left trigger, nothing seems to fix it. This happens on BOTH controllers, on BOTH games. So this is clearly a problem with android; it doesn't map deadzones.
So far, I've tried Pokejoy's USB/BT Joy Gold IME, GameKeyboard, Tincore Keymapper, and a couple other gamepad IME apps. None of them have given me what I want, which is to add a deadzone to the existing gamepad driver. I don't want to map the gamepad to the touchscreen to fool the game, because my games already support gamepads out of the box.
And I know for a fact it is POSSIBLE to get these controllers working, because the SuperGNES snes emulator app works great with both controllers, and maps the move function to the left stick just fine, without interference from the noisy triggers.
Any suggestions?
annnnnybody? This is really bugging me. I've seen so many videos of people using their xbox 360 controllers on their Androids, but it is impossible for me, because I can't remap the axes in the games, because they are instantly assigned to the trigger axis, because it is too noisy and has no dead zone! I need a way to force a dead zone on my gamepad!
Not to mention it is completely impossible to search for answers to my question on XDA or Google, because the assholes that made Shadowgun decided to release a sequel called "SG: Deadzone", so as soon as you search for "gamepad android deadzone", all you get are people looking to use their gamepad on that freakin game.
Well I fixed the issue myself. After some digging, it seems the axis mapping for gamepads is stored in /system/usr/keylayout/*.kl files. To figure out which file my gamepad was using, I read the logcat. It was using generic.kl. The axis mappings are at the bottom, after all the keyboard stuff.
I replaced this:
Code:
# Joystick and game controller axes.
# Axes that are not mapped will be assigned generic axis numbers by the input subsystem.
axis 0x00 X
axis 0x01 Y
axis 0x02 Z
axis 0x03 RX
axis 0x04 RY
axis 0x05 RZ
axis 0x06 THROTTLE
axis 0x07 RUDDER
axis 0x08 WHEEL
axis 0x09 GAS
axis 0x0a BRAKE
axis 0x10 HAT_X
axis 0x11 HAT_Y
with this, stolen from Vendor_045e_Product_028e.kl, which is the KL file for the Xbox 360 Wired USB controller:
Code:
# Left and right stick.
# The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd.
# This confuses applications that rely on the flat value because the joystick actually
# settles in a flat range of +/- 4096 or so.
axis 0x00 X flat 4096
axis 0x01 Y flat 4096
axis 0x03 Z flat 4096
axis 0x04 RZ flat 4096
# Triggers.
axis 0x02 LTRIGGER
axis 0x05 RTRIGGER
# Hat.
axis 0x10 HAT_X
axis 0x11 HAT_Y
Even though I am using an original xbox controller and not an xbox 360 controller, the axis mappings were consistent, and this change alone fixed my issue. The default mappings in games were now useable, and I was able to remap axes without them being instantly assigned to the trigger axis.
I also learned that the "flat" value is the size of the deadzone. As the comments suggest, the default of 128 is too small, but their replacement of 4096 is, in my opinion, way too large. I settled on 1024 for my flat values, and it is a perfectly sized deadzone.
Note that I had to do this to get my wireless xbox 360 controller working too, because it was ALSO assigned to 'generic.kl'.
same problem
I also has the same problem, don't know whether use the IME can solve. trying
O MY GOD!
I have also same problems whit my OnePlus One (whit CM11s) and two Xbox360 Wired USB Controller buyed from Gamestop..... i have two of this:
https://www.gamestop.it/Xbox360/Games/20390/controller-wired-black-xbox-360
It's perfectly working and correctly assigned when i attach to my OPO using a OTG Cable... but i have try to use whit two games:
*** On Reckless Racing 3 ****
The controller working good.... but when the analog stick it's on center the car tends to skid a little to the left...... nothing serious but cause some problems
*** I have also try this to use with Little Big Adventure ***
Like upper problems but in this case the games it's unplayabe...... my character keeps making lateral movements to the left
Usually i used this same Controllers on windows 7.... here it's present a tools to make a calibration and some games have the option to set the DeadZone center area for resolve this problems but on Android i never found a APP to obtain a similar things.
Now i have found this thread and i have some question:
When i attach my controller on my OnePlus One.... how i can know what file it's been used or it's been loaded ?!?!? I have watched in the folder and i have so much file .kl and i don't know what it's the exact .kl i need to edit or similar things.... someone can help or explain this ?
moeburn said:
Well I fixed the issue myself. After some digging, it seems the axis mapping for gamepads is stored in /system/usr/keylayout/*.kl files. To figure out which file my gamepad was using, I read the logcat. It was using generic.kl. The axis mappings are at the bottom, after all the keyboard stuff.
I replaced this:
Code:
# Joystick and game controller axes.
# Axes that are not mapped will be assigned generic axis numbers by the input subsystem.
axis 0x00 X
axis 0x01 Y
axis 0x02 Z
axis 0x03 RX
axis 0x04 RY
axis 0x05 RZ
axis 0x06 THROTTLE
axis 0x07 RUDDER
axis 0x08 WHEEL
axis 0x09 GAS
axis 0x0a BRAKE
axis 0x10 HAT_X
axis 0x11 HAT_Y
with this, stolen from Vendor_045e_Product_028e.kl, which is the KL file for the Xbox 360 Wired USB controller:
Code:
# Left and right stick.
# The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd.
# This confuses applications that rely on the flat value because the joystick actually
# settles in a flat range of +/- 4096 or so.
axis 0x00 X flat 4096
axis 0x01 Y flat 4096
axis 0x03 Z flat 4096
axis 0x04 RZ flat 4096
# Triggers.
axis 0x02 LTRIGGER
axis 0x05 RTRIGGER
# Hat.
axis 0x10 HAT_X
axis 0x11 HAT_Y
Even though I am using an original xbox controller and not an xbox 360 controller, the axis mappings were consistent, and this change alone fixed my issue. The default mappings in games were now useable, and I was able to remap axes without them being instantly assigned to the trigger axis.
I also learned that the "flat" value is the size of the deadzone. As the comments suggest, the default of 128 is too small, but their replacement of 4096 is, in my opinion, way too large. I settled on 1024 for my flat values, and it is a perfectly sized deadzone.
Note that I had to do this to get my wireless xbox 360 controller working too, because it was ALSO assigned to 'generic.kl'.
Click to expand...
Click to collapse
I need to be quoted and i need you help! How i can know what's the exact KL using my device when i attach my xbox controller !?!??!
I have read the logcat using a terminal emulator and i can find nothing inside it.... you can help me ?!??!?
---------- Post added at 07:02 PM ---------- Previous post was at 06:09 PM ----------
Sorry Mod....... but i need to make another consecutive reply but i have found a solution here:
http://forum.xda-developers.com/showpost.php?p=58239101&postcount=16
If someone want at this point you can join this my 3 reply......
In ye olde day we had u-boot as the last bit before loading an Android image.
If you had access to the UART on the SoC you could hook a terminal and hit any key to pause the loading.
Then you had a simple command line interface with access to low-level diagnostics and selection of boot options.
Nowadays we have abl (formerly aboot).
There doesn't seem to be a lot of source code floating around for this.
If you have Qualcomm's SecureBoot (or other equivalent) you can't modify abl easily.
Recently I did a deep dive into the abl for the Onyx Poke3 ereader, which is fortunately not SecureBoot.
Between disassembling and patching I got a fairly good idea of what it's doing.
While there may not be any direct applicability to other models there might be some hints here.
The first thing is that the key detection is not built on ASCII, but VT-100 control/escape sequences.
Only five keys are directly noticed.
Code:
Keyboard Hex Chars Value
--------------------- -------------- ------- -----
Arrow up 0x1b 0x5b 0x41 Esc [ A 0x01
Arrow down 0x1b 0x5b 0x42 Esc [ B 0x02
Arrow right 0x1b 0x5b 0x43 Esc [ C 0x03
Arrow left 0x1b 0x5b 0x44 Esc [ D 0x04
Backspace (as VT-100) 0x7f 0x08
Backspace (as ASCII) 0x08 nope
The values are seen in the terminal under "KeyPress".
In fact three of the KeyPresses are ignored and two are synonyms.
Either Arrow down or Backspace (as 0x7f) are the only things recognized.
If either is hit after the abl boots, the abl will pause for up to 10 seconds.
There is a strange key read function that gets a key but will not return for 100 mS even if a character is available.
If 100 Arrow/Backspace (+1 for the initial "stopper") are received the abl will boot to recovery.
If 50 to 99 Arrow/Backspace (+1 for the inital "stopper") are received the abl will boot to EDL mode.
You're probably saying, "Well if I have open access to the UART, I can just hit the EDL mode test points."
Yup, in many cases.
Now comes the wrinkle with this key stuff.
If you reboot your device and just hit and hold the Arrow/Backspace key down there's a buffer that will fill up and you will get >100 and it will go to recovery.
If you try to get to EDL manually by hitting a key 50 times you will fail if there is any gap of 1/10 of a second.
Plus, it only starts counting at a particular point.
So I wrote a little utility that listens to the log output, waits for the right spot and injects 60 or 110 Backspaces (0x7f).
Code:
C:\>abltest /r com3
Listening...
Starting
Jabbering...
Detecting...
Going to recovery!
Done
C:\>abltest com3
Listening...
Starting
Jabbering...
Detecting...
Going to EDL mode!
Done
FInally, there is separate detection for the power button being held.
The loading will pause for this then detect five presses of the power button to go to recovery.
This device has no volume/other buttons, so these are the only possibilities.
Has anybody seen this style? Or any other style?
Renate said:
In ye olde day we had u-boot as the last bit before loading an Android image.
If you had access to the UART on the SoC you could hook a terminal and hit any key to pause the loading.
Then you had a simple command line interface with access to low-level diagnostics and selection of boot options.
Nowadays we have abl (formerly aboot).
There doesn't seem to be a lot of source code floating around for this.
If you have Qualcomm's SecureBoot (or other equivalent) you can't modify abl easily.
Recently I did a deep dive into the abl for the Onyx Poke3 ereader, which is fortunately not SecureBoot.
Between disassembling and patching I got a fairly good idea of what it's doing.
While there may not be any direct applicability to other models there might be some hints here.
The first thing is that the key detection is not built on ASCII, but VT-100 control/escape sequences.
Only five keys are directly noticed.
Code:
Keyboard Hex Chars Value
--------------------- -------------- ------- -----
Arrow up 0x1b 0x5b 0x41 Esc [ A 0x01
Arrow down 0x1b 0x5b 0x42 Esc [ B 0x02
Arrow right 0x1b 0x5b 0x43 Esc [ C 0x03
Arrow left 0x1b 0x5b 0x44 Esc [ D 0x04
Backspace (as VT-100) 0x7f 0x08
Backspace (as ASCII) 0x08 nope
The values are seen in the terminal under "KeyPress".
In fact three of the KeyPresses are ignored and two are synonyms.
Either Arrow down or Backspace (as 0x7f) are the only things recognized.
If either is hit after the abl boots, the abl will pause for up to 10 seconds.
There is a strange key read function that gets a key but will not return for 100 mS even if a character is available.
If 100 Arrow/Backspace (+1 for the initial "stopper") are received the abl will boot to recovery.
If 50 to 99 Arrow/Backspace (+1 for the inital "stopper") are received the abl will boot to EDL mode.
You're probably saying, "Well if I have open access to the UART, I can just hit the EDL mode test points."
Yup, in many cases.
Now comes the wrinkle with this key stuff.
If you reboot your device and just hit and hold the Arrow/Backspace key down there's a buffer that will fill up and you will get >100 and it will go to recovery.
If you try to get to EDL manually by hitting a key 50 times you will fail if there is any gap of 1/10 of a second.
Plus, it only starts counting at a particular point.
So I wrote a little utility that listens to the log output, waits for the right spot and injects 60 or 110 Backspaces (0x7f).
Code:
C:\>abltest /r com3
Listening...
Starting
Jabbering...
Detecting...
Going to recovery!
Done
C:\>abltest com3
Listening...
Starting
Jabbering...
Detecting...
Going to EDL mode!
Done
FInally, there is separate detection for the power button being held.
The loading will pause for this then detect five presses of the power button to go to recovery.
This device has no volume/other buttons, so these are the only possibilities.
Has anybody seen this style? Or any other style?
Click to expand...
Click to collapse
the program is awesome! if the motherboard logic level is 3v3, you can use a respberry pi pico to set a pin to high and low (button) in a loop once the log output on uart bus is detected
$cronos_ said:
the program is awesome! if the motherboard logic level is 3v3, you can use a respberry pi pico to set a pin to high and low (button) in a loop once the log output on uart bus is detected
Click to expand...
Click to collapse
Most processors today use I/O voltages of less than 3.3 V. 1.8V is pretty typical.
What I was saying above was based on the abl on my device. I'm pretty sure there is a lot of variety there.
You'd have to hook up a USB UART to your own device to see how relevent that is.
You can use a RPi Pico, RPi Zero, Arduino Leonardo or another Android as a USB peripheral to control an Android.
For instance, with a broken touch screen it would be very difficult with a mouse to activate a swipe pattern since a mouse is by definition relative. A digitizer could work if you knew the scaling.
Here's something I did with one Android to login swipe another Android:
https://forum.xda-developers.com/t/accessing-my-phone-with-a-dead-screen.4542763/post-88013171
Renate said:
Most processors today use I/O voltages of less than 3.3 V. 1.8V is pretty typical.
What I was saying above was based on the abl on my device. I'm pretty sure there is a lot of variety there.
You'd have to hook up a USB UART to your own device to see how relevent that is.
You can use a RPi Pico, RPi Zero, Arduino Leonardo or another Android as a USB peripheral to control an Android.
For instance, with a broken touch screen it would be very difficult with a mouse to activate a swipe pattern since a mouse is by definition relative. A digitizer could work if you knew the scaling.
Here's something I did with one Android to login swipe another Android:
https://forum.xda-developers.com/t/accessing-my-phone-with-a-dead-screen.4542763/post-88013171
Click to expand...
Click to collapse
oh ok, so i would need a logic level shifter?
$cronos_ said:
oh ok, so i would need a logic level shifter?
Click to expand...
Click to collapse
You'd need either a level shifter or a USB UART that works at that voltage.
Here's one USB UART that has selectable logic level: https://www.amazon.com/DSD-TECH-SH-U09C5-Converter-Support/dp/B07WX2DSVB
And a photo of one level shifter I threw together for 1.8V to 3.3V to use with a 3.3V USB UART.
Renate said:
You'd need either a level shifter or a USB UART that works at that voltage.
Here's one USB UART that has selectable logic level: https://www.amazon.com/DSD-TECH-SH-U09C5-Converter-Support/dp/B07WX2DSVB
And a photo of one level shifter I threw together for 1.8V to 3.3V to use with a 3.3V USB UART.
Click to expand...
Click to collapse
Yooo i have the dsd tech one