Coder Social home page Coder Social logo

android-fb2png's Introduction

android-fb2png

Capture framebuffer of Android and save it in png format.

Features

  • Run CLI on both PC and Mobile side.
  • Support both emulator and device.
  • API can be easily embedded into c code.

Getting started

PC Side

Download prebuilt version adb_screenshoot from here: http://code.google.com/p/android-fb2png/downloads/

Capture Android's screen and save it into the current working directory.

adb_screenshoot

Device Side

Download prebuilt version fb2png from here: http://code.google.com/p/android-fb2png/downloads/

Push to device/emulator and grant execute permission

adb push fb2png /data/local/
adb shell chmod 755 /data/local/fb2png

Capture screen and save to /data/local/fbdump.png

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

Pull the screenshot back

adb pull /data/local/fbdump.png

Then you can view it with your favorite image viewer

android-fb2png's People

Contributors

cybertk avatar mckael avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-fb2png's Issues

Compiler error

What steps will reproduce the problem?
1. Put all in file as mention in source inside jni folder of android project 
2. Execute ndk-build inside jni location  
3. It is showing compilation error as :-

C:\Workspace\examples\fb2png\jni>ndk-build
Android NDK: Trying to define local module 'fb2png' in C:/Workspace/RAPC-final25
/fb2png//jni/Android.mk.
Android NDK: But this module was already defined by C:/Workspace/RAPC-final25/fb
2png//jni/Android.mk.
E:/installer/NDK/android-ndk-r8/build/core/build-module.mk:34: *** Android NDK:
Aborting.    .  Stop.

The code should be compile successfully on ndk build for jni. 

Original issue reported on code.google.com by [email protected] on 31 May 2012 at 12:02

  • Merged into: #2

Colors are changed in the screenshots

What steps will reproduce the problem?
1. Reds are Blue.
2. Take a screenshot, view screenshot, reds are blue
3. Hardware is Nook Color running CM7

What is the expected output? What do you see instead?
Screenshot is good other than the color change

See screenshot for details, note the angrybirds icons.

Original issue reported on code.google.com by [email protected] on 13 May 2011 at 3:21

Attachments:

Pull Request

Please pull from
https://code.google.com/r/mikaelberthe-fb2png

- Support for devices using padding (Nexus 5, Galaxy S4, Xperia Z...)
- Support for multiple buffers (autodetect + command line switch)
- Misc. fixes (e.g. issue #7)

Original issue reported on code.google.com by [email protected] on 23 Mar 2014 at 6:36

Memroy leakage with fb struct

What steps will reproduce the problem?

1. call get_device_fb() to obtain fb struct
2. in fb_save_png(), the fb->data does not be free and will cause memory leak


Original issue reported on code.google.com by [email protected] on 25 Apr 2013 at 3:25

Not working in MIUI 4.1.2

It's not working in MIUI 4.1.2. When is run fb2png, showing "saved to 
/data/local/fbdump.png/", but i can't find any png in /data/local/ directory. 
Please fix it, thanks advanced.


Original issue reported on code.google.com by [email protected] on 24 Dec 2013 at 3:57

Pull request

Please pull from
https://code.google.com/r/mikaelberthe-fb2png

There are a few fixes, and support for ABGR8888 pixel format (used e.g. by 
Nexus 4 devices).

Original issue reported on code.google.com by [email protected] on 31 Mar 2013 at 9:25

build fb2png for androoid-ndk jni

What steps will reproduce the problem?
1. Download git source of fb2png (on Windows 7 platform) 
2. Without modifying any file compile it with android-ndk for build .SO file 
use with android-jni.
3. Its gives errors undefined reference for png_create_write_struct in 
img_process.c file

What is the expected output? What do you see instead?
Expected output is build fb2png-jni.so file and I got error while compiling on 
android-ndk. 

What version of the product are you using? On what operating system?
fb2png latest version from git, Windows7 operating system.

Please provide any additional information below.
I am trying to build fb2png for android-jni but I didn't get any success. 
Whether I am doing any mistake in build fb2png for android.
Please help me.


Thanks,
Joyy



Original issue reported on code.google.com by [email protected] on 22 Jan 2012 at 10:46

png is wrong

I downloaded the fb2png and execute

cd /data/local
./fb2png fbdump.png

and I got the output

root@android:/data/local # ./fb2png fbdump.png
./fb2png fbdump.png
         bpp : 4
       width : 1080
      height : 1920
       pixel : 8294400
    r_offset : 24
    g_offset : 16
    b_offset : 8
    a_offset : 0
    r_length : 8
    g_length : 8
    b_length : 8
    a_length : 8
OKAY

after that I pulled the fbdump.png and look, but it seems png not convert right.

My phone is ZTE v988,

Issue while compiling the ndk sources .

What steps will reproduce the problem?
1. while compiling the ndk sources i have faced some undefined reference issues 
.
2.
3.

What is the expected output? What do you see instead?
need to get the .so files using the ndk sources But getting issue . 

What version of the product are you using? On what operating system?
latest version which is available in the downloads list . 

Please provide any additional information below.
Have added the issue  as below . Please advice me to come out of this issue. 

 /cygdrive/d/Android_NDK/android-ndk-r5/ndk-build
ompile thumb  : fb2png <= fb2png.c
ompile thumb  : fb2png <= img_process.c
ompile thumb  : fb2png <= fb.c
xecutable     : fb2png
:/RAJESH-ANDROID/Rajesh-workspace/ZT/obj/local/armeabi/objs/fb2png/img_process.o
: In function `save_png':
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:182: undefined reference 
to `png_create_write_struct'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:188: undefined reference 
to `png_create_info_struct'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:192: undefined reference 
to `png_set_write_fn'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:193: undefined reference 
to `png_set_IHDR'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:208: undefined reference 
to `png_set_bKGD'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:209: undefined reference 
to `png_write_info'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:211: undefined reference 
to `png_write_image'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:212: undefined reference 
to `png_write_end'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:214: undefined reference 
to `png_destroy_write_struct'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/obj/local/armeabi/objs/fb2png/img_process.o
: In function `stdio_write_func':
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:132: undefined reference 
to `png_get_io_ptr'
ollect2: ld returned 1 exit status
ake: *** 
[/cygdrive/D/RAJESH-ANDROID/Rajesh-workspace/ZT/obj/local/armeabi/fb2png] Error 
1 

Original issue reported on code.google.com by [email protected] on 4 Sep 2012 at 12:00

  • Merged into: #2

Not working with TWRP on VS980

What steps will reproduce the problem?
1. follow Quick Start guide here, line for line

What is the expected output? What do you see instead?
Im not sure, it hasnt worked yet...

I see:

noah@noah-Ideapad-Z560 ~/Desktop/TWRP SCREENSHOT $ adb shell /data/local/fb2png 
/data/local/fbdump.png
Segmentation fault
noah@noah-Ideapad-Z560 ~/Desktop/TWRP SCREENSHOT $

What version of the product are you using? On what operating system?
Using current release as of 1-28-14
Linux Mint 16

Original issue reported on code.google.com by [email protected] on 29 Jan 2014 at 4:53

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.