Guest AcerDroid Posted February 3, 2010 Report Posted February 3, 2010 (edited) Hello people! After getting busy for my Thesis project, I read all the threads about "at least" booting a compiled kernel and we are unfortunate to do so. Maybe you are asking why I do not read the kernel source instead but here it is: I can't finish the download because of a very slow connection and the maximum speed of it was like 2kb/s. And also, I have no time to research how to do what I need because of school projects so please help me out. I can reverse engineer the kernel just give me a hint what we need to change in the touch input code. /* coord[0]: finger1, coord[1]: finger2 */ coord[0][0] = buf[0] + (buf[4]*256); coord[0][1] = buf[1] + (buf[5]*256); coord[1][0] = buf[2] + (buf[6]*256); coord[1][1] = buf[3] + (buf[7]*256); pressed = (coord[0][0]||coord[0][1]) ? 1 : 0; finger2_pressed = (coord[1][0]||coord[1][1]) ? 1: 0; if (!finger2_pressed) { /* No multitouch -- force width to zero */; width = 0; x = coord[0][0]; y = coord[0][1]; } else { /* (x,y) coords for multitouch are at midpt between fingers */ x = (coord[0][0] + coord[1][0]) / 2; y = (coord[0][1] + coord[1][1]) / 2; /* Report the width according to the abs distance of x-axis */ width = abs((coord[0][0] - coord[1][0])); } Give me also what lines of code are needed to enable 1GHz in our Acer. I will unpack my boot.img again then alter some machine codes and let's all hope we can get this done. I think the probability of success in this operation would be 25% only IF the code needs to have more lines cuz I can only alter some machine codes but aren't able to insert a new code without available space in the binary. Edited February 3, 2010 by AcerDroid
Guest Acer A1 Posted February 3, 2010 Report Posted February 3, 2010 (edited) ;) 沙发 (Sofa) Edited February 3, 2010 by Acer A1
Guest three_pineapples Posted February 3, 2010 Report Posted February 3, 2010 Is this going to be multi touch for a 2.1 build? There is no way to get multi touch on Android 1.6. It's not a matter of the driver not supporting multitouch. Android has no facility to handle the input from 2 touches. Look at these lines of code: /* coord[0]: finger1, coord[1]: finger2 */ coord[0][0] = buf[0] + (buf[4]*256); coord[0][1] = buf[1] + (buf[5]*256); coord[1][0] = buf[2] + (buf[6]*256); coord[1][1] = buf[3] + (buf[7]*256); pressed = (coord[0][0]||coord[0][1]) ? 1 : 0; finger2_pressed = (coord[1][0]||coord[1][1]) ? 1: 0; if (!finger2_pressed) { /* No multitouch -- force width to zero */; width = 0; x = coord[0][0]; y = coord[0][1]; } else { /* (x,y) coords for multitouch are at midpt between fingers */ x = (coord[0][0] + coord[1][0]) / 2; y = (coord[0][1] + coord[1][1]) / 2; /* Report the width according to the abs distance of x-axis */ width = abs((coord[0][0] - coord[1][0])); } if ( pressed ) { input_report_abs(h353_data->input, ABS_X, x ); input_report_abs(h353_data->input, ABS_Y, y ); } input_report_abs(h353_data->input, ABS_TOOL_WIDTH, width); input_report_key(h353_data->input, BTN_TOUCH, pressed ); input_sync(h353_data->input); You can see from the last 7 lines that the driver reports the x-y position to something else (i have no idea what this is). But unless it can handle receiving two x-y coordinates, we just can't have multi touch. P.S. Yes it reports the "width" or the distance between two touches, but this is not useful since we only have the length of the vector between the two touches, not the direction one touch is in relation to the other (again, no way to pass this information to the rest of android)
Guest Roter_Flieger Posted February 3, 2010 Report Posted February 3, 2010 Android has no facility to handle the input from 2 touches. This is correct so far. Look at these lines of code: *code snipped* You can see from the last 7 lines that the driver reports the x-y position to something else (i have no idea what this is). But unless it can handle receiving two x-y coordinates, we just can't have multi touch. This, however, is not. We are talking about the Linux kernel here and that is very well capable of handling a second (even a third, a fourth, a fifth...) touch. Diff is attached, compiles perfectly. Don't know if it works though. Still: this only enables the kernel to handle multi-touch input from the touch screen. The rest of Android, that sits on top of the kernel also needs to fetch this information from the input layer and handle it properly, which it possibly will not with Donut.liquid_multitouch.zip
Guest Nkx Posted February 3, 2010 Report Posted February 3, 2010 (edited) This is correct so far. This, however, is not. We are talking about the Linux kernel here and that is very well capable of handling a second (even a third, a fourth, a fifth...) touch. Diff is attached, compiles perfectly. Don't know if it works though. Still: this only enables the kernel to handle multi-touch input from the touch screen. The rest of Android, that sits on top of the kernel also needs to fetch this information from the input layer and handle it properly, which it possibly will not with Donut. That won't work. First you need to enable BTN_2 to use it. Take a look at __init h353vl01_register_input, it only registers BTN_TOUCH Second, you need to read this. Also, take a look at the synaptics driver, it has multitouch support. Edited February 3, 2010 by Nkx
Guest Uxian Posted February 3, 2010 Report Posted February 3, 2010 Still: this only enables the kernel to handle multi-touch input from the touch screen. The rest of Android, that sits on top of the kernel also needs to fetch this information from the input layer and handle it properly, which it possibly will not with Donut. Going back about a year when Luke Hutchison was working on multitouch for the G1 he posted some detailed information on modifications he made to the Dalvik VM without any need to modify the kernel by hijacking some unused fields in the MotionEvent class. It's going back to before Cupcake and obviously a different kernel but maybe it can be of some help... http://openhandsetmagazine.com/2009/01/the...-on-android-g1/
Guest Nkx Posted February 3, 2010 Report Posted February 3, 2010 (edited) Going back about a year when Luke Hutchison was working on multitouch for the G1 he posted some detailed information on modifications he made to the Dalvik VM without any need to modify the kernel by hijacking some unused fields in the MotionEvent class. It's going back to before Cupcake and obviously a different kernel but maybe it can be of some help... http://openhandsetmagazine.com/2009/01/the...-on-android-g1/ The G1 has a synaptics touchscreen that already has multitouch support in the driver, that's why no kernel modifications were necessary. Edited February 3, 2010 by Nkx
Guest three_pineapples Posted February 3, 2010 Report Posted February 3, 2010 Ok, so it is possible to modify the kernel to support multi touch. But Android 1.6 cannot support multi touch. Maybe there is some form of hack to get multi touch events available to programs, but the the program has to be aware of this hack. I can think of a couple of other possibilities of the top of my head, but none seem realistic. Until someone comes up with a concrete plan on how multi touch events are going to be communicated to existing programs that support multi-touch on android 2.x, the whole concept proposed here is pointless.
Guest Roter_Flieger Posted February 3, 2010 Report Posted February 3, 2010 That won't work. Never said it will. As I stated in another thread, I have no device to test it and the input layer is unknown territory to me. This was just an example that it can be done. ;) Second, you need to read this. Thanks for the link. By the way: as we all know (or not), the HTC Hero (at least the European edition) actually can handle multi-touch in its Sense-based browser. And the Hero runs Android 1.5 Cupcake...
Guest erto90 Posted February 3, 2010 Report Posted February 3, 2010 andorid 1.6 alias donut can handle multitouch is onyl a question of drivers.... hts has inserted some custom drivers on cupcake to get multitouch on theyr htc hero..then..
Guest AcerDroid Posted February 4, 2010 Report Posted February 4, 2010 I think other guys out there have eventually making the kernel source close to possible booting. Therefore this plan should be forgotten ;)
Guest 7G HK Posted March 14, 2010 Report Posted March 14, 2010 where to download?? Hey dude, do you really understand what this thread about?
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now