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

Beatsleigher

Senior Member
Oct 30, 2011
1,112
585
0
23
County of Osnabrück, Lower Saxony, Germany
Not at all, it's open source project. Just make sure you credit the author and link to the project ;)

Sent from my HTC One X using xda premium
Will do! Thanks man :)

---------- Post added at 07:10 PM ---------- Previous post was at 06:17 PM ----------

Quick question. I'm making an executable program, and of course it'll be uploaded to Github, but I need to know which license it uses. Thanks.

CyanogenModded Very China-like, from my Samsung Galaxy S III

LG Familyguy59/Beatsleigher
 

Whiskey103

Senior Moderator / Member Advocate Admin / DC / RT
Staff member
Jun 6, 2009
10,009
20,429
263
43
Tell me, I’m lost . . .
www.whiskey103.nl
Will do! Thanks man :)

---------- Post added at 07:10 PM ---------- Previous post was at 06:17 PM ----------

Quick question. I'm making an executable program, and of course it'll be uploaded to Github, but I need to know which license it uses. Thanks.

CyanogenModded Very China-like, from my Samsung Galaxy S III

LG Familyguy59/Beatsleigher
GNU GPL v2
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

http://code.google.com/p/android-fb2png/
It's all there.



Sent from my HTC One X using xda premium
 

VivaErBetis

Senior Member
Nov 26, 2006
1,155
925
148
Madrid (Spain)
Thank you very much. I can confirm that it works in a LG Nexus 4 with recovery TWRP 2.5.0.0.

The first time I run the script it shown a kind of error during "mount /data", but it works anyways:
Code:
********************************************
*                                          *
*      ADB-Screenshot Util                 *
*      Boot into Recovery                  *
*      Plug In USB Cable                   *
*      Enjoy ;)                            *
*                                          *
********************************************

Presione una tecla para continuar . . .
shell mount /data
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
mount: mounting /dev/block/mmcblk0p23 on /data failed: Device or resource busy
Mounting /data Done!
.
push fb2png /data/local/
2030 KB/s (0 bytes in 259910.000s)
Pushing fb2png to /data/local Done!
.
shell chmod 755 /data/local/fb2png
Setting permissions on fb2png Done!
.
shell /data/local/fb2png /data/local/fbdump.png
         bpp : 32
        size : 3932160
       width : 768
      height : 1280
 ARGB offset : 0 24 16 8
 ARGB length : 8 8 8 8
Framebuffer Pixel Format: 4
Saved to /data/local/fbdump.png
Taking Screenshot by running fb2png Done!
.
pull /data/local/fbdump.png
1890 KB/s (0 bytes in 30240.000s)
Pulling fbdump.png into adb folder Done!
.
********************************************
*                                          *
* You will find screenshot in adb folder   *
* named as fbdump.png                      *
*                                          *
********************************************

Presione una tecla para continuar . . .
Any following run of the script doesn't show any error:
Code:
********************************************
*                                          *
*      ADB-Screenshot Util                 *
*      Boot into Recovery                  *
*      Plug In USB Cable                   *
*      Enjoy ;)                            *
*                                          *
********************************************

Presione una tecla para continuar . . .
shell mount /data
Mounting /data Done!
.
push fb2png /data/local/
3248 KB/s (0 bytes in 259910.000s)
Pushing fb2png to /data/local Done!
...
Thanks and best regards.
 

Attachments

  • Like
Reactions: Whiskey103

Whiskey103

Senior Moderator / Member Advocate Admin / DC / RT
Staff member
Jun 6, 2009
10,009
20,429
263
43
Tell me, I’m lost . . .
www.whiskey103.nl
Hi
I don't have the same result (see attached). Where is the adb folder and do we have to run adb.exe?
You can try to manually mount data and/or system in recovery
Everything you need should be in the extracted screenshot folder.
Sometimes there is that "device busy" error yes.
Not sure why it happens though.

Sent from my HTC One X using xda premium
 

Patrics83

Inactive Recognized Developer
Feb 19, 2010
5,620
8,223
0
Gothenburg
You can try to manually mount data and/or system in recovery
Everything you need should be in the extracted screenshot folder.
Sometimes there is that "device busy" error yes.
Not sure why it happens though.

Sent from my HTC One X using xda premium
Device or recourse is busy happens if you try to mount an already mounted partition.

Really nothing to care about :)

Sent from my HTC One X
 

Primokorn

Recognized Contributor / Themer
Nov 17, 2012
11,409
7,668
253
If you aren't trying this one a One X i have no idea.
As stated above it works on a lot of different devices just not all.
Seeing your signature i think its not compatible with Galaxy Note
OK I'll ask a friend to try on his own Note II. Too bad...:crying:
 

VivaErBetis

Senior Member
Nov 26, 2006
1,155
925
148
Madrid (Spain)
I've a little suggestion. As every time the script is executed the tool fb2png is pushed to the device and the screenshot is taken, I should add two actions before pulling the screenshot, in order to delete the temporary files from device:

adb shell rm /data/local/fb2png
adb shell rm /data/local/fbdump.png

Best regards.
 

Whiskey103

Senior Moderator / Member Advocate Admin / DC / RT
Staff member
Jun 6, 2009
10,009
20,429
263
43
Tell me, I’m lost . . .
www.whiskey103.nl
I've a little suggestion. As every time the script is executed the tool fb2png is pushed to the device and the screenshot is taken, I should add two actions before pulling the screenshot, in order to delete the temporary files from device:

adb shell rm /data/local/fb2png
adb shell rm /data/local/fbdump.png

Best regards.
Yea, thought about something already, like check if it's already there etc.
But figured it wasn't a big deal anyway.

Ow well, can't harm either huh... Will add the removal.
Cleanup AFTER the png is pulled ;)

Edit: added cleanup to the script.

Code:
echo shell rm /data/local/fb2png
echo shell rm /data/local/fbdump.png
adb shell rm /data/local/fb2png
adb shell rm /data/local/fbdump.png
echo Removing tempfiles, Cleaning Done!
 
Last edited:
  • Like
Reactions: VivaErBetis

EVOuser94

Senior Member
Aug 6, 2012
1,404
665
0
Bloomsdale
Yea, thought about something already, like check if it's already there etc.
But figured it wasn't a big deal anyway.

Ow well, can't harm either huh... Will add the removal.
Cleanup AFTER the png is pulled ;)

Edit: added cleanup to the script.

Code:
echo shell rm /data/local/fb2png
echo shell rm /data/local/fbdump.png
adb shell rm /data/local/fb2png
adb shell rm /data/local/fbdump.png
echo Removing tempfiles, Cleaning Done!
Hey whiskey I would suggest a pause so that people can actually get to see the png image and save it to pc or whatever before it is deleted, currently you don't have a Pause!

Sent from my EVO using xda premium
 

VivaErBetis

Senior Member
Nov 26, 2006
1,155
925
148
Madrid (Spain)
Hey whiskey I would suggest a pause so that people can actually get to see the png image and save it to pc or whatever before it is deleted, currently you don't have a Pause!
The cleaning is done only in the device, after the file was pulled to the PC, using this command:
adb pull /data/local/fbdump.png

So png image is in the PC already.

However there is something that should be improved, and is the possibility of autorename fbdump.png file on PC side in order to not overwrite it with every execution of the tool.
 

Whiskey103

Senior Moderator / Member Advocate Admin / DC / RT
Staff member
Jun 6, 2009
10,009
20,429
263
43
Tell me, I’m lost . . .
www.whiskey103.nl
The cleaning is done only in the device, after the file was pulled to the PC, using this command:
adb pull /data/local/fbdump.png

So png image is in the PC already.

However there is something that should be improved, and is the possibility of autorename fbdump.png file on PC side in order to not overwrite it with every execution of the tool.
Well the way I see it, it's a tool to get the screenshot from the device.
Once it is on your pc it's up to you to rename it.
It's a screenshot util, not a picture manager huh ;)

Sent from my HTC One X using xda premium
 
  • Like
Reactions: VivaErBetis

Whiskey103

Senior Moderator / Member Advocate Admin / DC / RT
Staff member
Jun 6, 2009
10,009
20,429
263
43
Tell me, I’m lost . . .
www.whiskey103.nl
Ok... I'll try to remember to rename every screenshot taken, before taking another... Too difficult for me because I'm an user... :silly:
Ow well, I will try to come up with something.
Might get some unforseen help from Patrics83 but can't promise anything though.


Sent from my HTC One X using xda premium
 
  • Like
Reactions: VivaErBetis
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone