yashsingh1/xdaforums huggingface dataset:
[EVO 4G Android Development] toastcfh:
no engineering SPL that i know of and no device in my hands to test exploits/holes on. so no i have no idea till i get a device and even then its not certain we will ever have root. all we can do is try. the eris went for 7-8 months without root and the only reason they got root was a engineering SPL leaked. so that said lets start praying now
[EVO 4G Android Development] Shidell:
If we were to place a .NBH on the SD card and try to flash from the bootloader, would that require a signature as well--or does the bootloader just look for a correctly-named NBH and opt to flash it?

If the bootloader only looks for the correct file name (and not signature), that'd work?
[EVO 4G Android Development] joeykrim:
sorry if these my comments arent organized, im dumping all my thoughts based on the post ive quoted. hopefully it will help guide us in the correct direction...

we have flash_image on the samsung moment and its great! the samsung moment doesnt have a fastboot mode so im only familar with this fastboot mode through research and guides posted online.

has anybody with the EVO tried the fastboot method yet?

EDIT: somebody posted the same questions a few minutes after me here - http://xdaforums.com/showthread.php?t=687365

i didnt see a flash_image in the /system/bin folder of the leaked system dump posted on here, did i miss it? do we have the flash_image binary for this phone or is the partition structure of the EVO the same as other HTC phones which flash_image is compiled for and we could use the same existing binary?

id be interested in finding some type of root exploit method...my initial observations from init.rc:

the system is first mounted as read/write and then mounted as read only, but the commands follow each other pretty closely, not sure we could sneak anything in that gap...

/data is also mounted by root and then in the next line changed ownership to system...

the method i used on the samsung moment to exploit root was two fold, the first part looks to exist here also as its used throughout android 2.1 implementations. in order for it to work though, we do need at least temporary write access to /system, even if its only once, in order to plant the exploit files.

i doubt my modified recovery from the samsung moment will run cuz im positive at least the kernels are diff, if not a whole lot more...do we know if any of the existing custom recovery's will run on the EVO?
[EVO 4G Android Development] toastcfh:
a custom recovery isnt a problem. we can compile that in minutes. we need to "a root exploit". giving us write access to system once we do that the rest is history. were not gonna be able to flash via fastboot unless we get a ENG SPL. if we get that we fastboot a recovery to the recovery partition and were set. so yeah that basically the only ways to get root. one with a EVO already could possibly try all previous exploits for other devices but i most likely they are patched by now.
[EVO 4G Android Development] mrjkwik:
hmm. seems like it would be in htc's best interest to "leak" the eng spl, you know, to sell more phones ;)
[EVO 4G Android Development] booyakasha:
Who has access to the eng spl? Hypothetically speaking of course, what are the chances that an HTC employee could attain this holy grail of rooting?
[EVO 4G Android Development] toastcfh:
if there was one in theory and most likely it would be an older spl and the way HTC does it is u cant flash a spl older then the one on the device.
[EVO 4G Android Development] kmartburrito:
Glad to see you here Toast!!!!! You're going to do great things for the Evo :D
[EVO 4G Android Development] djR3Z:
TOAST!!! Glad to see yo're gonna be devving for the EVO. Who else is coming over?
[EVO 4G Android Development] toastcfh:
Updated first post

source is confirmed working and has no know issues at the moment. please see first post.

thanx :D
[EVO 4G Android Development] chagio:
Thanks for your hard work. Bought you a cup of coffee :)
[EVO 4G Android Development] mytharak:
Re: {KERNEL-SOURCE} GoDmOdE-EVO-2.6.29 {Make Shift Kernel}

As deeply integrated as sense is, I'd be surprised if HTC fixed much of anything in a timely manner.

At least there's a custom kernel. That's a start. Can't wait for the public release of that root exploit.

-------------------------------------

Sent via the XDA Tapatalk App
[EVO 4G Android Development] geekykid:
im surprised i didnt see this thread sooner! let the compiling begin! :)
[EVO 4G Android Development] joeykrim:
i noticed the default toolchain in the Makefile is arm-eabi.

has anybody experimented with different toolchains or even different versions of the arm-eabi toolchain?
[EVO 4G Android Development] toastcfh:
I thought u and I went over this already. Buildroot. Doesn't optimize any better then what's in the makefile in the source. I think u just got lucky with the moment not having proper cpu optimization in the kernel source. In that event buildroot made up for Samsung's short comings. I don't think HTC overlooks that portion of device development and optimization.
[EVO 4G Android Development] joeykrim:
if we have already gone over this, i apologize for a redundant post/question. a quick separate searches for the words toolchain, buildroot and uClibc in the EVO development thread which didnt reveal any posts besides these. perhaps i missed it.

im very inclined to agree with you 100% on Samsung's lack of proper cpu optimizations. as I have no HTC android experience, only samsung android experience, its also good to know from your experience HTC doesn't produce the same quality of work as Samsung.

my intent wasn't to discredit your current methods but only to inquire if any other experiments had been made with other toolchains like uClibc. i wont get an EVO until the 4th and wont be able to do any type of experiment until at least then. i'd rather not duplicate efforts you've already made or put time into a dead end route which you've already explored. my goal is to work together with everybody, hence why i'd rather not duplicate what you've already done.

until HTC releases their kernel source, i plan on compiling and loading your kernel as soon as I get an EVO and root access. thanks for the thorough feedback and ill be sure to post up the results of any tinkering/experiments i undertake.
[EVO 4G Android Development] toastcfh:
I apologies i thought @zefie was u. He laid claim to his success with buildroot on the moment in discussions with me on Twitter about this very subject. He had linked me to ur site saying it was his work. So I assumed u were two in the same. My bad. Anyhow yeah I spent a day or two tweaking Flags in buildroot only to find out the optimization flags were already set as default in the kernel source. So all that was left is to hope buildroots method of shrinking the kernel size would show improvement. But it obviously didn't and it came to light that his performance issues with my kernel were nothing more then a lack of instruction following, that were stated in the first post. That said. I'm open to ideas of course and will give anything a shot. I gave him the option to produce results with my kernel as I failed to do so with buildroot. He never came through so I assumed this was the end of the buildroot voyage. But yeah if u can prove it to work I'm game for it.
[EVO 4G Android Development] Estimated Prophet:
I went through all the code and compared the epson and novatec stuff and cam to the same conclusion. The problem just has to be in the contents of the nov_init_seq structure. I've got an hour or so free, so I think I'll do some research on novatec panel initialization. Ugh, I can't wait until the weekend so that I can actually spend some real time on this. I need to code an exif editor for android too, because I can't find one anywhere. Stupid job getting in the way :P
[EVO 4G Android Development] AssassinsLament:
Here we go, now we understand the equation:

Thanks geyes!
[EVO 4G Android Development] AssassinsLament:
But then that means the default on the panel itself is already around 60hz.

Arghh... back to the drawing board.
[EVO 4G Android Development] kpkimmel:
i think estimated prophet is on the right track..
[EVO 4G Android Development] geyes30:
I put my display through a light sensor and oscilloscope and can confirm that the display is refreshing at 30Hz, not 60Hz. This means that either

1.) We are not using default mode here, and HTC actively changed something here; or

2) Somewhere after the command is put out, there is some sort of additional delay that is effected to delay the refresh.

I think the latter is more likely, given that the software (Quick System Info) is able to detect the refresh rate of 60Hz. I will see if I can take a 300fps video of the screen tomorrow to verify if the screen actually goes dark/blank in between frame refreshes.
[EVO 4G Android Development] Geniusdog254:
Thanks for the info. But where the hell do you have access to all this stuff?! Are you loaded, or do you work in the industry?
[EVO 4G Android Development] geyes30:
I work in a research lab and we do a little bit of optical engineering. But mostly I hack many things together using electronics components, and my oscilloscope is really a modified soundcard with some NI frontend. :D
[EVO 4G Android Development] Estimated Prophet:
Anybody wanna take their evo apart and find a square chip with a part number starting with NT :P If anybody actually does this, let us know what that part number is.

Edit: Actually, it could be rectangular. I was just basing this off of some other TFT LCD controllers that Novatek makes.
[EVO 4G Android Development] splink7007:
Does it matter what hardware rev or specific panel?

Edit: sorry meant to quote EP
[EVO 4G Android Development] regulator207:
I took a gander here: http://www.ifixit.com/Teardown/HTC-Evo-4G-Teardown/2979/2

but cant find anything relating to Novatek and/or epson or a chip with "NT"

would this chip be on the LCD itself or on the main board?
[EVO 4G Android Development] maejrep:
The code we started with was before the epson panel was introduced to the line of hardware revisions. We reverse engineered the board-panel file, and the mddi client driver, but didn't go into other areas of mddi, mdp, etc. So it's possible that they changed other stuff in those other areas of the code, in order to effect the 30fps cap (probably to fix the tearing issue), and since our kernel code from Incredible is outdated, we don't have those changes yet.
[EVO 4G Android Development] maejrep:
Or just "make supersonic_defconfig"
[EVO 4G Android Development] Geniusdog254:
I think we have the NT35582

Taken from here
[EVO 4G Android Development] ffolkes:
well here's an interesting discovery i just made. if you delete everything in the init array, it makes no difference - UNTIL you turn off/on the display.

my theory is, the firmware (radio) is setting the initial display init parameters, i mean think about it, how else could you get into the bootloader if the lcd was only inited from the kernel? the lcd turns on and functions long before boot.img comes into play.

but, there's still hope. because according to that pdf, and my little experiment above, the init settings are wiped when the display is turned off and uninited, and read from the kernel when turned back on. hence why my display won't turn on right now with an empty init.

moral of the story? always cycle the display when youre checking for changes.
[EVO 4G Android Development] AssassinsLament:
I've also disabled everything in the init string, so now it seems more unlikely that it's in the init.
[EVO 4G Android Development] Estimated Prophet:
Thanks. I'll give the datasheet a read.
[EVO 4G Android Development] Cicatrize:
Well, yes, that's why I was saying I don't think it's in the init array in the other thread. There's something else capping it.

It's just like a computer. You turn it on, and the graphics card automatically handles a default type of display and shows you the boot sequence on the display until the kernel is loaded and the drivers are active.

But it depends when the kernel is loaded...and I'm not sure when that is. During the animated boot screen? If so, then it's still possible it's in the init, but I still think that's unlikely.
[EVO 4G Android Development] Cicatrize:
^ Ignore my last post. It's not making sense. I worked like 10 hours today (on code) and came home to work on code for a few more hours and I'm feeling a little retarded.

Back to my little problem...what do I do with this stupid zImage I created? lol
[EVO 4G Android Development] davidlightle:
Just tossing a thought out there, following on Cicatrize's post. I would think (correct me if wrong), the panel driver is preloaded with default values (a "generic driver" of sorts) until the kernel can load the specific driver values (like a computer loading a video driver for the BIOS and boot sequence, prior to the OS's kernel loading the real driver).
[EVO 4G Android Development] maejrep:
That's close... It's not like a computer's display, which is probably just VESA compatible, and that's how BIOS knows a "basic" way to initialize it.

The radio does a full initialization of anything that is required to display at its correct resolution, and to fill the screen. It doesn't set any other advanced parameters, just enough to turn it on, set the backlight, and get it displaying.

The kernel begins right around the time that you see the white "HTC EVO 4G" screen, and it vibrates once. That vibrate is signaling that the bootloader is handing over to the linux kernel.
[EVO 4G Android Development] Cicatrize:
Oh, nice. Great info, maejrep. Thanks.
[EVO 4G Android Development] maejrep:
This kind of makes sense. It's easy to turn off the screen, it just turns off the backlight LED, that's all (panel_blank). Turning it back on (panel_unblank) involves turning on the backlight LED, but it also does two mddi client writes. The mddi client isn't well documented, so we don't know what those registers actually mean.
[EVO 4G Android Development] davidlightle:
Thank you, maejrep. I'm a little out of my league here but I have a keen interest in learning. Any quick link to a guide on how to build the android kernel and what to do with it just after that? (I have a general idea)

Also, was there something mentioned about the FPS earlier in the boot process (with fps2d) or am I thinking incorrectly? I was thinking I recalled something about higher than 30 FPS until the lock screen came up (maybe about the time the driver is initialized properly in the kernel, with the cap?).
[EVO 4G Android Development] AssassinsLament:
client_data->remote_write(client_data, 0x00, 0x2900);
msleep(100);
client_data->remote_write(client_data, 0x24, 0x5300);

(2900h) SET_DISPLAY_ON

(5300h) WRCTRLD (Write CTRL Display)

Cicatrize's document is x10000000000000000 helpful :)

With this document, we could essentially rewrite the whole driver. lol
[EVO 4G Android Development] Estimated Prophet:
Alright, I think this might be worth a shot if somebody wants to try it. I remember reading that the Epson was using SPI and that might be the reason there was no cap (because SPI isn't able to impose the cap, but the I2C can). Well, the line you've got commented as SPI_I2C_SEL is where that interface is chosen. Set it to 0 and it'll use SPI instead. I'm sure that's not all there is to it, but it might be a start.
[EVO 4G Android Development] Cicatrize:
k I hope I did this right. I just did:

fastboot boot zImage

That boots once with the built kernel, right?
[EVO 4G Android Development] AssassinsLament:
Sorry, lol it is originally at 0... I forgot to change it back before I copied it. As I tested that earlier.
[EVO 4G Android Development] daktah:
Doesnt boot when i flash

have to nandroid restore to use phone

rooted/unlocked
[EVO 4G Android Development] Estimated Prophet:
Yeah, that datasheet will be loads of help. This weekend, when I have more time, I'll read the whole thing and take a good look at the code and figure out exactly what everything is doing. Then comes the fun part. I think I might have to start drinking caffeine again :P
[EVO 4G Android Development] maejrep:
Yup, I don't know what I was thinking... thought it was a different interface for a second.

Anyway I just looked at the stock kernel (I've been working from the engineering kernel, which is a couple months old), and made some updates to the init seq tables for both epson and novatek panels. Neither change made a difference in behavior, but probably better to have the more recent values anyway.
[EVO 4G Android Development] AssassinsLament:
Thanks for all the time you and toast put into it!
[EVO 4G Android Development] kpkimmel:
Don't know if this helps...but I run fps2d then lock screen then unlock and the fps is at 60 fps and doesn't drop back to30..but does drop ..just wanted to share
[EVO 4G Android Development] maejrep:
What happens if you lock/unlock before starting fps2d? Or if you touch to restart the test after doing the unlock?
[EVO 4G Android Development] Cicatrize:
Man this compiling process is slow. I've done it twice so far and it's irritating. Is this what you guys do all the time testing fixes?

EDIT: Nevermind, I guess it merges stuff when you recompile or something. much faster second time lol
[EVO 4G Android Development] EtherealRemnant:
Really? What lock are you using? As soon as I unlock, it goes back to 30...
[EVO 4G Android Development] justinisyoung:
oh, this was discovered awhile ago. basically, unlocking the screen removes the 30fps cap ONLY while the screen is off. once you turn the screen back on, the cap comes back and fps2d will start getting ~30 fps again. i think he just meant the average didn't drop back down to 30 because while the screen was off, it was higher.
[EVO 4G Android Development] splink7007:
Yep, mine hit like over 80fps while in lock. Then slowly drops back to 30 after unlock.
[EVO 4G Android Development] Cicatrize:
SOmeone please answer my question about the kernel.

If I do "fastboot boot zimage" I boot once into the zImage I created, right?

I want to make sure I'm not wasting my time here...
[EVO 4G Android Development] AssassinsLament:
Yes, zImage is located in ./arch/arm/boot
[EVO 4G Android Development] Cicatrize:
K cool that's what I've been doing. I've made a couple changes and although nothing great has happened, I've achieved 31 fps in the Gears for Android app, and I've NEVER seen that app above 30. In fps2d, I see a lot more green spikes. It's actually peaking at around 30 and a bell curve down, including a lot of green in the 30-40 range. I think I'm making some sort of progress...or maybe it's just wishful thinking.
[EVO 4G Android Development] Estimated Prophet:
Well, it seems epson only makes one controller with mddi. It's the S1D13774, which some of you might be familiar with. This is the same one that was in the touch pro. I've found descriptions of all the registers in case anybody wants to compare the initialization sequences. I'll look through it and comment everything in the epson_init_seq struct tomorrow night. That is unless it's decided that the problem isn't in the init sequence. http://www.htc-linux.org/wiki/index.php?title=Epson_S1D13774

Epson's site was wrong. In their FAQ they only list that model in the question about controllers with MDDI. The hunt continues I guess, but after sleep and work.
[EVO 4G Android Development] th3_g00b:
kinda weird it doesnt list it on the side of the pics.....i figured it would be the chip standing out saying SAMSUNG but thats just a guess... >.>
[EVO 4G Android Development] cj10488:
I just sent off an email to the one of the developer contacts that I have for Sprint regarding the FPS cap. Its been a while since I have talked to him so I dont know if he is still working for sprint at this time or not. He is a credible source and responds truthfully.

You can check my post history on PPCgeeks and here if you like.

James
[EVO 4G Android Development] EVOdlyte:
so for some reason I applied this as an update and now its stuck on the white EVO 4g screen forever. I rebooted and nothing. I tried recovery and ADB using the recovery-windows.bat and nothing. I had to take the SD card out and change the name back to the hack to get recovery.

got into recovery reapplied the so called stock kernal but that didnt work either. then tried to recovery-windows.bat and it worked in windows CMD but not on fone.

then cleared all the caches and factory reset and applied supersonic to just get it back to square one. now it finally booted.

why woudnt it boot when I applied the kernal?
[EVO 4G Android Development] ffolkes:
i broke the 30fps barrier a while ago, but not nearly to the degree we're seeing on the epson ones (50+ fps). i can't get past 40/41fps.

i'm not sure how low we can take the timing values until the hardware starts to choke. and, obviously, we have to keep t2 big enough to fit everything in.
[EVO 4G Android Development] kpkimmel:
Sounds like its getting closer....like I said let me know if u want me to try kernels
[EVO 4G Android Development] geyes30:
What settings for T2 did you use?
[EVO 4G Android Development] ffolkes:
i've tried tons of things, setting the porch (VPA) to zero or setting it to 9 shows no difference.

i've got t2 to 240, but it didn't seem any faster than 256. 230 breaks the sync, and it's all garbled.
[EVO 4G Android Development] geyes30:
Can you try 1024 and see what fps you get? I have some theories and I would like to see if it works. :D
[EVO 4G Android Development] ffolkes:
i tried 1023 hours ago, it just is a black screen. same with 0 or 1.
[EVO 4G Android Development] geyes30:
Are you able to give me a few data points, relating fps to the T2 value?
[EVO 4G Android Development] ffolkes:
i can try, but the thing is we have no way of knowing an absolute fps value - it's just an average.

340 = 30fps

320 = 31fps

256 = 38 or 39

250 = same

240 = same
[EVO 4G Android Development] geyes30:
Maybe somewhere in the 600 range will be cool. :D
[EVO 4G Android Development] AssassinsLament:
Tried your additions and still capped, the printk's also report 30fps on max.
[EVO 4G Android Development] ffolkes:
leaving everything default (that's to say not specifically setting anything else) with 600, i get 33fps.

i dont understand how setting the delay *higher* can increase frame rate. :/
[EVO 4G Android Development] mherald81:
I am interested in trying this kernel out, but I am unsure exactly how to apply it. I have my EVO rooted via toast's method.

Thanks.
[EVO 4G Android Development] kpkimmel:
They would have to zip it then you just install via recov method
[EVO 4G Android Development] AssassinsLament:
What is your VPA at to get 33fps? I've tried a lot and I can't break 30.
[EVO 4G Android Development] timgt:
He said he has gotten up to 40/41fps, we need to know HOW?
[EVO 4G Android Development] ffolkes:
by setting T2 to 250, or 240, i haven't tried lower since 230 and below loses sync.

setting vpa to 0, or 1, or just leaving it blank result in the same fps.

i don't understand how it's possible though. assuming the values being set by default are those in the table of pg 260, that would mean about 286 would be the smallest T2 could be. but 290 gets me like 34fps, and as i said above, 250 to about 40fps.
[EVO 4G Android Development] AssassinsLament:
{0xb100, 0x01}, // VPA
{0xb101, 0x00}, // T2
{0xb102, 0xfa}, // T2

Like this? I'd just like to break through 30 for starters. lol.
[EVO 4G Android Development] ffolkes:
that looks right. it just occurred to me, i've taken out everything that i can in the init, so it looks like this:

struct reg_val_pair nov_init_seq[] = {

/* power stuff */
{0xc000, 0x86},
{0xc001, 0x00},
{0xc002, 0x86},
{0xc003, 0x00},
{0xc100, 0x40},
{0xc200, 0x02},
{0xc202, 0x32},

/* timing stuff */
//{0xb100, 0x01}, // VPA
{0xb101, 0x00}, //T2
{0xb102, 0xfa}, //T2
//{0xb103, 0x02}, //T3
/*{0xb104, 0x10}, //T4
{0xb105, 0x04}, //T5
{0xb106, 0x04}, //T5P
{0xb107, 0x25}, //T6
{0xb108, 0x00}, //T8
{0xb109, 0x00}, //T9*/

{0x3500, 0x00}, // SET_TEAR_ON
{0x1100, 0x0}, // EXIT_SLEEP_MODE (sleep out)

{REG_WAIT, 120},
};