5,594,386 Members 37,490 Now Online
XDA Developers Android and Mobile Development Forum

[TOOL][SCRIPT]*** Easy ADB solution for screenshots in recovery HTC ONE X ***

Tip us?
 
Whiskey103
Old
(Last edited by Whiskey103; 8th September 2013 at 07:43 PM.)
#1  
Whiskey103's Avatar
Forum Moderator / Recognized Developer Recognized Themer - OP
Thanks Meter 10655
Posts: 6,762
Join Date: Jun 2010
Location: Euphorie's arms :)
Default [TOOL][SCRIPT]*** Easy ADB solution for screenshots in recovery HTC ONE X ***

Oke seeing we kinda lost the possibility to use DDMS for screenshots in recovery on latest HTC Devices.
There had to be another way to do this so after few hours of google and making a few bat tests here it is.


I made a zipp (easy run me bat included) containing all the stuff needed to make screenshots in recovery.
Basically its easy and it makes use of files from this open source project http://code.google.com/p/android-fb2png/ by Kyan He
I did not write fb2png, my little script is just using it to make the shots.


Extract it and run the screenshot_run_me bat file.

All the bat does is running the following commands
Code:
@@echo off
cls
echo.
echo   ******************************************************
echo   *                                                    *
echo   *           ADB-Screenshot from Recovery             *
echo   *                                                    *
echo   *     Original idea: Kyan He                         *
echo   * code.google.com/p/android-fb2png                   *
echo   *                                                    *
echo   *     Script: Whiskey103                             *
echo   * forum.xda-developers.com/showthread.php?p=40260716 *
echo   *                                                    *
echo   *     Script update: Korbeny                         *
echo   *                                                    *
echo   *     ADB version: 1.0.31  (August 2013)             *
echo   *                                                    *
echo   *     Instructions:                                  *
echo   *       - Boot into recovery                         *
echo   *       - Plug in USB cable                          *
echo   *         When ready press a key to continue         *
echo   *                                                    *
echo   ******************************************************
echo.
pause
cls
adb devices
goto option
:option
cls
echo.
echo.
echo.
echo   1.- Make a screenshot
echo   2.- Exit
echo.
set /p choice=Type the number of your choice  
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='1' goto screenshot
if '%choice%'=='2' goto exit
cls
echo.
echo.
echo.
echo    "%choice%" is not a valid option. Please try again
echo.
echo.
pause
goto option
:screenshot
cls
adb shell mount /data
adb push fb2png /data/local/
adb push dump /data/local/
adb shell chmod 755 /data/local/fb2png
adb shell chmod 755 /data/local/dump
adb shell /data/local/dump
adb pull /data/local/ScreenShots
adb shell rm /data/local/fb2png
adb shell rm /data/local/dump
adb shell rm -r /data/local/ScreenShots
echo.
echo.
echo   ******************************************************
echo   *                                                    *
echo   * The screenshot was taken successfully              *
echo   *                                                    *
echo   ******************************************************
echo.
echo.
adb shell sync
adb shell umount /data
pause
goto option
:exit
cls
echo.
echo.
echo.
echo   ******************************************************
echo   *                                                    *
echo   * The screenshots are stored in the ADB folder       *
echo   * named as Screenshot_date_time.png                  *
echo   *                                                    *
echo   ******************************************************
echo.
echo.
pause
exit
But its very useful for example TWRP Themers to show their work without the hassle of using a camcorder or other cam.
Or making screenshots in Aroma, posting recovery script errors, Aroma guides etc. etc.




Screenshots are now named/tagged with timestamps huge thx to @Patrics83 (RomCleaner author and scripting expert)
Updated script for making multiple screenshots in one cmd session thanks to @korbeny.

Quote:
Originally Posted by Sneakyghost View Post
Maybe for future reference: if you want to decipher what settings to use to decode your Fb0, Gimp's file open dialogue is a huge help as it has some sliders to play with values while it displays the changes in realtime. @Behold_this pointed that out to me while i was searching for the right settings to shoot screenies of the older twrp (using rgb565). Later finding out about what RGB8888 means to ffmpeg was a hitch then when TWRP updated to the new pxl format.

See my pains here: DarkViper TWRP Theme (qHD) using this as a little advertiser too, maybe someone wants to grab my theme and port it to your resolution...

And here is a few output samples
 


















Disclaimer: Everybody can use my work without asking permission, all my stuff comes with a "sharing is caring" xda philosophy licence... just credits would be nice
The Following 74 Users Say Thank You to Whiskey103 For This Useful Post: [ Click to Expand ]
 
Patrics83
Old
(Last edited by Patrics83; 14th April 2013 at 06:51 AM.)
#2  
Patrics83's Avatar
Recognized Developer
Thanks Meter 7850
Posts: 5,476
Join Date: Feb 2010
Location: Gothenburg

 
DONATE TO ME
Holy macaroni!

Nice work mate! :thumbup::thumbup:

Works perfect on my HTC One X

Sent from my HTC One X
The Following 2 Users Say Thank You to Patrics83 For This Useful Post: [ Click to Expand ]
 
EVOuser94
Old
#3  
EVOuser94's Avatar
Senior Member
Thanks Meter 215
Posts: 400
Join Date: Aug 2012
Location: Bloomsdale

 
DONATE TO ME
How does this work!? I'm not able to get this to work with my HTC EVO 4G LTE, it says that the fb2png doesn't exist....

Code:
***********************************************
*
* ADB-Screenshot Util
* If in Recovery: Mount System
* Plug In USB Cable
* Enjoy ;)
*
***********************************************

Press any key to continue . . .
push fb2png /data/local/
failed to copy 'fb2png' to '/data/local/': Is a directory
.
shell chmod 755 /data/local/fb2png
chmod: /data/local/fb2png: No such file or directory
.
shell /data/local/fb2png /data/local/fbdump.png
/sbin/sh: /data/local/fb2png: not found
.
pull /data/local/fbdump.png
remote object '/data/local/fbdump.png' does not exist
.
***********************************************
*
* You will find screenshot in adb folder
* named as fbdump.png
*
***********************************************

Press any key to continue . . .
If I have helped you hit the "Thanks" Button, I appreciate it!
Don't Forget to check out my 720x1280[TWRP] THEMES


Phone: HTC EVO 4G LTE
ROM: MeanBean
Recovery: TWRP 2.5.0.0 - Hand Drawn Theme
S-Off Method: Dirty Racun S-Off
 
Euphorie
Old
#4  
Euphorie's Avatar
Senior Member
Thanks Meter 962
Posts: 534
Join Date: Feb 2011
Location: Everywhere i am needed :)

 
DONATE TO ME
I remember you told me that it works yeeears ago
Not bad
 
Whiskey103
Old
#5  
Whiskey103's Avatar
Forum Moderator / Recognized Developer Recognized Themer - OP
Thanks Meter 10655
Posts: 6,762
Join Date: Jun 2010
Location: Euphorie's arms :)
Quote:
Originally Posted by EVOuser94 View Post
How does this work!? I'm not able to get this to work with my HTC EVO 4G LTE, it says that the fb2png doesn't exist....

Code:
***********************************************
*
* ADB-Screenshot Util
* If in Recovery: Mount System
* Plug In USB Cable
* Enjoy ;)
*
***********************************************

Press any key to continue . . .
push fb2png /data/local/
failed to copy 'fb2png' to '/data/local/': Is a directory
.
shell chmod 755 /data/local/fb2png
chmod: /data/local/fb2png: No such file or directory
.
shell /data/local/fb2png /data/local/fbdump.png
/sbin/sh: /data/local/fb2png: not found
.
pull /data/local/fbdump.png
remote object '/data/local/fbdump.png' does not exist
.
***********************************************
*
* You will find screenshot in adb folder
* named as fbdump.png
*
***********************************************

Press any key to continue . . .
Hum, works for me on One X, can't think of a reason why it wouldn't work on other devices.
You get some specific error?

Sent from my HTC One X using xda premium
 
EVOuser94
Old
#6  
EVOuser94's Avatar
Senior Member
Thanks Meter 215
Posts: 400
Join Date: Aug 2012
Location: Bloomsdale

 
DONATE TO ME
I'm going to try a few things then get back at you. them are the only errors that I have as of yet.
If I have helped you hit the "Thanks" Button, I appreciate it!
Don't Forget to check out my 720x1280[TWRP] THEMES


Phone: HTC EVO 4G LTE
ROM: MeanBean
Recovery: TWRP 2.5.0.0 - Hand Drawn Theme
S-Off Method: Dirty Racun S-Off
The Following User Says Thank You to EVOuser94 For This Useful Post: [ Click to Expand ]
 
Whiskey103
Old
#7  
Whiskey103's Avatar
Forum Moderator / Recognized Developer Recognized Themer - OP
Thanks Meter 10655
Posts: 6,762
Join Date: Jun 2010
Location: Euphorie's arms :)
Quote:
Originally Posted by Euphorie View Post
I remember you told me that it works yeeears ago
Not bad
well DDMS from the android sdk worked for ages... just as of late google/htc decided to not support it in custom recovery.
so we got stuck with ugly screenshots of recovery themes.
Or it was a double work thingy.. port your theme into a device that had DDMS support and take shots there
 
EVOuser94
Old
#8  
EVOuser94's Avatar
Senior Member
Thanks Meter 215
Posts: 400
Join Date: Aug 2012
Location: Bloomsdale

 
DONATE TO ME
Quote:
Originally Posted by EVOuser94 View Post
I'm going to try a few things then get back at you. them are the only errors that I have as of yet.
Well I was able to get it to work, but the picture is not working correctly any ideas?
Click image for larger version

Name:	uploadfromtaptalk1365891484039.jpg
Views:	855
Size:	76.2 KB
ID:	1881757

Sent from my EVO using xda premium
If I have helped you hit the "Thanks" Button, I appreciate it!
Don't Forget to check out my 720x1280[TWRP] THEMES


Phone: HTC EVO 4G LTE
ROM: MeanBean
Recovery: TWRP 2.5.0.0 - Hand Drawn Theme
S-Off Method: Dirty Racun S-Off
 
Whiskey103
Old
#9  
Whiskey103's Avatar
Forum Moderator / Recognized Developer Recognized Themer - OP
Thanks Meter 10655
Posts: 6,762
Join Date: Jun 2010
Location: Euphorie's arms :)
Quote:
Originally Posted by EVOuser94 View Post
Well I was able to get it to work, but the picture is not working correctly any ideas?
Attachment 1881757

Sent from my EVO using xda premium
can you try this version?

https://www.dropbox.com/s/1d5p00y0qp00nh1/fb2png-0.0.2

just rename it into fb2png and replace the old version.
 
migascalp
Old
#10  
Senior Member
Thanks Meter 55
Posts: 157
Join Date: Aug 2006
Work great! thank
But,I have manually mounted /data
why you not use command "adb shell mount /data" in your script?

The Following 2 Users Say Thank You to migascalp For This Useful Post: [ Click to Expand ]
Tags
adb, fb2png, recovery, screenshot
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes