[SIZE="4']Note : I'm just sharing the work of the XDA Member.Here's a little introduction by him :[/SIZE]
Quote:
Originally Posted by makers_mark (Post 50029759) This is a tool to capture screenshots while in Recovery or the Aroma Installer. One big problem people are having when trying to capture screenshots in recovery is the extra framebuffer info that is tacked on to the end of each pixel row. Through a lot of digging and not finding too much information on it, I've finally found a way to determine what dimensions to use for, I believe, all android devices. Fb2png is a great program, but unfortunately it only works with framebuffers that don't have a stride. FFmpeg is what I use here. That is a major problem with fb2png but it seems like it would be an easy thing to fix. The only thing to get it working, besides some random pixel formats maybe, is taking care of this stride. I found that if you divide your width, for the nexus 7 2013 it's 1200, by 32, your stride will equal the value to add to 1200 to go up and make it evenly divisible by 32, that is your stride. Look at a bunch of resolutions and the width; the short side, think portrait mode; is usually evenly divisible by 32. Not all the time though, like the case of the Nexus 7 2013, Nexus 5 with 1080, and many more devices nowadays, AND those are the devices fb2png gives distorted screenshots with. Maybe @Phil3759 knows how to fix this for fb2png. By the way the Nexus 5's stride is 8 1080/32 = 33 with a remainder of 24. 32-24 = 8 Anyways I made this batch script that takes into account your stride, if you have one. If your width is 768 for example, you won't have one because 32 goes into 768 an even 24 times. Instructions: Download the RS_all.rar file Extract it to a new folder. You will have the programs FFmpeg & ADB. Two .dll files for ADB. And the batch script RUNrs.bat I assume you have your ADB drivers squared away. Reboot into your recovery. Run RUNrs.bat and it will ask you for you screen width in pixels, and your height. Input them. It will then pull your framebuffer and make a bunch of viewable pngs with different pixel formats. Don't close the program or anything, but go look in the folder you unzipped everything, and go through the images until you find one that is exactly like you screen, don't settle for close. Look at the filename of the one, and input that into the next prompt for your pixel format. If I get any feedback I will change the first set of pixel formats to more common ones only, then some rarer ones if the first set didn't work. Feel free to run 'ffmpeg -pix_fmts' and put in any of the other input-able pixel formats when you are asked to select which one you want to use. Your set from there, all of that will be saved into settings.cfg. If you change your recovery, you may have to clear the settings. You can do so easily in the program, or you can just delete settings.cfg Same thing if you try a different device. I am severely limited in devices to test. But I'd like to find a universal way with all android devices to pull the screen resolution from the phone/tablet and.. - add a check for the framebuffer in /dev/fb0 instead of just /dev/graphics/fb0. For now, if you get errors and it won't pull the framebuffer. Just change the code in the batch, two different places, from 'adb pull /dev/graphics/fb0 frmbfr' to 'adb pull /dev/fb0 frmbfr' - make folders for screenshots to go into, and also a temp folder that gets deleted, for the pixel format test images. - add the double frame buffer, two images. I have already done it, but am a little baffled as some devices seem to have six; or at least room for six raw fb0 <single ones in fb0 I do need to thank @Whiskey103 for his work over here. And I promise this is the last time I'll mention you, lol :good: Here is the batch script. |
Aucun commentaire:
Enregistrer un commentaire