Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,739,332 Members 52,224 Now Online
XDA Developers Android and Mobile Development Forum

I need help with developing our app

Tip us?
 
kennyx13
Old
#1  
Senior Member - OP
Thanks Meter 17
Posts: 108
Join Date: Nov 2012
Default I need help with developing our app

I am working with a partner in developing an app that would go in between the apps and basically control it in order to show a uniform control of the pixels. Basically what we are trying to do is have pixel level control of the display regardless of the content on the phone.

My Questions are:

1. Does the smartphone developer API provide access to the frame buffer of the display, which can be modified for each frame that is displayed on the screen?

2. Does the smartphone have enough time to run a 2D filter on each frame before it gets displayed? Will the phone processor be fast enough that you can filter each image and still keep up with the output frame rate (e.g. 30 frames per second). Each calculation that will need to be calculated takes time for the processor to calculate, but how much? Can the phone do all of the calculations it will need to under 1/30 seconds AND keep up with normal app processing without affecting the overall frame rate. Much of this is based on the software that is developed to solve the problem, so the real question really isn't "Does the phone have enough real time," but rather " is the phone fast enough to handle a garden variety 2D convolution on top of everything it already does".

3. Will this level of control be achievable without root to be able to reach more people with unrooted devices or is this achievable only by root level permissions.

I do hope I am in the right area to post this very important question in the the development process. We need to get this sorted out first before we can begin programming.
All the help would be very much appreciated. Thanks xda!
 
broodplank1337
Old
(Last edited by broodplank1337; 21st March 2014 at 02:07 PM.)
#2  
broodplank1337's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 9904
Posts: 4,923
Join Date: Nov 2011
Location: Nijmegen

 
DONATE TO ME
Quote:
Originally Posted by kennyx13 View Post
I am working with a partner in developing an app that would go in between the apps and basically control it in order to show a uniform control of the pixels. Basically what we are trying to do is have pixel level control of the display regardless of the content on the phone.

My Questions are:

1. Does the smartphone developer API provide access to the frame buffer of the display, which can be modified for each frame that is displayed on the screen?

2. Does the smartphone have enough time to run a 2D filter on each frame before it gets displayed? Will the phone processor be fast enough that you can filter each image and still keep up with the output frame rate (e.g. 30 frames per second). Each calculation that will need to be calculated takes time for the processor to calculate, but how much? Can the phone do all of the calculations it will need to under 1/30 seconds AND keep up with normal app processing without affecting the overall frame rate. Much of this is based on the software that is developed to solve the problem, so the real question really isn't "Does the phone have enough real time," but rather " is the phone fast enough to handle a garden variety 2D convolution on top of everything it already does".

3. Will this level of control be achievable without root to be able to reach more people with unrooted devices or is this achievable only by root level permissions.

I do hope I am in the right area to post this very important question in the the development process. We need to get this sorted out first before we can begin programming.
All the help would be very much appreciated. Thanks xda!
1. I believe you're looking for "/dev/graphics/fb0" (goes up to fb3) thats the raw framebuffer.
and yes this is normally managed by the kernel (guess it's faster)

2. Simple answer is NO it does not (at least I think), I think the phone cannot manage to do such as heavy task and remain the same fps. if you build in double/tripple buffering it may differ. framebuffers is not android strongest feature xd, I think it may freeze your device, but I'm not sure. I dont have much experience in MSMFB (look it up in the kernel, how they did it)

3. not sure, but most likely root only, if you want to access it you need to chmod it to 666 atleast to access it from an app.

Code:
Select Code
root@jfltexx:/dev/graphics # ls -la 
crw-rw---- system   graphics  29,   0 2014-03-21 13:06 fb0
crw-rw---- system   graphics  29,   1 2014-03-21 13:06 fb1
crw-rw---- system   graphics  29,   2 2014-03-21 13:06 fb2
crw-rw---- system   graphics  29,   3 2014-03-21 13:06 fb3
lrwxrwxrwx root     root              2014-03-21 13:06 hdmi -> /dev/graphics/fb1
links to check out that will probably help you:
https://code.google.com/p/android-fb2png/
https://code.google.com/p/fastdroid-vnc/



hope my info helps a bit







like for example there is not even a chance you can record the screen through reading framebuffers. some adb
Device: Samsung Galaxy S4 (i9505)

Latest Development:
 

Roms:
AOSP v4.4.4 (KTU84P) from source for I9505 (Github)
- Cleanest ROM available for i9505. along with up-to-date stock kernel, also forms a perfect base for ROM developers.

Apps:
Galaxy S4 Glove Mode App (Playstore link)
- Do you want the Glove Mode of the S4 but your ROM doesn't support it? Use this app to enable/disable it easily.

Latest Scraps:
Proprietary Lib Cleaner / Silent proprietary libs / Live Thermal Monitor / GIT Conflict Fixer

Projects in development:
 

broodROM KitKat "Aiming for perfection"
- Custom ROM with really high standards, more info soon

For sources you can visit my Github. Or take a look at all my projects

The Following User Says Thank You to broodplank1337 For This Useful Post: [ Click to Expand ]
 
kennyx13
Old
#3  
Senior Member - OP
Thanks Meter 17
Posts: 108
Join Date: Nov 2012
Quote:
Originally Posted by broodplank1337 View Post
1. I believe you're looking for "/dev/graphics/fb0" (goes up to fb3) thats the raw framebuffer.
and yes this is normally managed by the kernel (guess it's faster)

2. Simple answer is NO it does not (at least I think), I think the phone cannot manage to do such as heavy task and remain the same fps. if you build in double/tripple buffering it may differ. framebuffers is not android strongest feature xd, I think it may freeze your device, but I'm not sure. I dont have much experience in MSMFB (look it up in the kernel, how they did it)

3. not sure, but most likely root only, if you want to access it you need to chmod it to 666 atleast to access it from an app.

Code:
Select Code
root@jfltexx:/dev/graphics # ls -la 
crw-rw---- system   graphics  29,   0 2014-03-21 13:06 fb0
crw-rw---- system   graphics  29,   1 2014-03-21 13:06 fb1
crw-rw---- system   graphics  29,   2 2014-03-21 13:06 fb2
crw-rw---- system   graphics  29,   3 2014-03-21 13:06 fb3
lrwxrwxrwx root     root              2014-03-21 13:06 hdmi -> /dev/graphics/fb1
links to check out that will probably help you:
https://code.google.com/p/android-fb2png/
https://code.google.com/p/fastdroid-vnc/



hope my info helps a bit







like for example there is not even a chance you can record the screen through reading framebuffers. some adb
Thank you soo much for the info. All the info will really help a lot. It is always good to hear from what more experienced devs know. Thank you thank you thank you!
The Following User Says Thank You to kennyx13 For This Useful Post: [ Click to Expand ]
 
broodplank1337
Old
#4  
broodplank1337's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 9904
Posts: 4,923
Join Date: Nov 2011
Location: Nijmegen

 
DONATE TO ME
Quote:
Originally Posted by kennyx13 View Post
Thank you soo much for the info. All the info will really help a lot. It is always good to hear from what more experienced devs know. Thank you thank you thank you!
You're very welcome, even though I'm also not experienced with this subject, I always share the things I DO know (Which can help people sometimes), rather then the things I don't know (those questions go to stackexchange.com (tip). And if the info I gave you is not 100% correct, some other dev may correct it and I will learn from it as well. Sharing info is always a win-win at this forums.

Good luck on your poject.
Device: Samsung Galaxy S4 (i9505)

Latest Development:
 

Roms:
AOSP v4.4.4 (KTU84P) from source for I9505 (Github)
- Cleanest ROM available for i9505. along with up-to-date stock kernel, also forms a perfect base for ROM developers.

Apps:
Galaxy S4 Glove Mode App (Playstore link)
- Do you want the Glove Mode of the S4 but your ROM doesn't support it? Use this app to enable/disable it easily.

Latest Scraps:
Proprietary Lib Cleaner / Silent proprietary libs / Live Thermal Monitor / GIT Conflict Fixer

Projects in development:
 

broodROM KitKat "Aiming for perfection"
- Custom ROM with really high standards, more info soon

For sources you can visit my Github. Or take a look at all my projects

 
kennyx13
Old
#5  
Senior Member - OP
Thanks Meter 17
Posts: 108
Join Date: Nov 2012
Quote:
Originally Posted by broodplank1337 View Post
1. I believe you're looking for "/dev/graphics/fb0" (goes up to fb3) thats the raw framebuffer.
and yes this is normally managed by the kernel (guess it's faster)

2. Simple answer is NO it does not (at least I think), I think the phone cannot manage to do such as heavy task and remain the same fps. if you build in double/tripple buffering it may differ. framebuffers is not android strongest feature xd, I think it may freeze your device, but I'm not sure. I dont have much experience in MSMFB (look it up in the kernel, how they did it)

3. not sure, but most likely root only, if you want to access it you need to chmod it to 666 atleast to access it from an app.

Code:
Select Code
root@jfltexx:/dev/graphics # ls -la 
crw-rw---- system   graphics  29,   0 2014-03-21 13:06 fb0
crw-rw---- system   graphics  29,   1 2014-03-21 13:06 fb1
crw-rw---- system   graphics  29,   2 2014-03-21 13:06 fb2
crw-rw---- system   graphics  29,   3 2014-03-21 13:06 fb3
lrwxrwxrwx root     root              2014-03-21 13:06 hdmi -> /dev/graphics/fb1
links to check out that will probably help you:
https://code.google.com/p/android-fb2png/
https://code.google.com/p/fastdroid-vnc/



hope my info helps a bit







like for example there is not even a chance you can record the screen through reading framebuffers. some adb
I have a follow up question, I hope you can answer them too.

Is it possible to install kernel modules on an android phone if it hasn't been rooted?

Given the Linux kernel I'm fairly certain it's not possible, but it is possible that Android has made changes that don't exactly follow the Linux convention. It may be a dumb question, but it would be good to confirm absolutely.
 
broodplank1337
Old
#6  
broodplank1337's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 9904
Posts: 4,923
Join Date: Nov 2011
Location: Nijmegen

 
DONATE TO ME
Quote:
Originally Posted by kennyx13 View Post
I have a follow up question, I hope you can answer them too.

Is it possible to install kernel modules on an android phone if it hasn't been rooted?

Given the Linux kernel I'm fairly certain it's not possible, but it is possible that Android has made changes that don't exactly follow the Linux convention. It may be a dumb question, but it would be good to confirm absolutely.
There is a an option actually, but it's not the easiest one. the only way of getting the modules inside a non-rooted rom is to make a custom odin image, you need to dump the current /system folder, make the adjustments and repack it, then flash it in odin along with the boot.img and you should be fine.
There is a topic in this forum that describes how to make one
Device: Samsung Galaxy S4 (i9505)

Latest Development:
 

Roms:
AOSP v4.4.4 (KTU84P) from source for I9505 (Github)
- Cleanest ROM available for i9505. along with up-to-date stock kernel, also forms a perfect base for ROM developers.

Apps:
Galaxy S4 Glove Mode App (Playstore link)
- Do you want the Glove Mode of the S4 but your ROM doesn't support it? Use this app to enable/disable it easily.

Latest Scraps:
Proprietary Lib Cleaner / Silent proprietary libs / Live Thermal Monitor / GIT Conflict Fixer

Projects in development:
 

broodROM KitKat "Aiming for perfection"
- Custom ROM with really high standards, more info soon

For sources you can visit my Github. Or take a look at all my projects

The Following 2 Users Say Thank You to broodplank1337 For This Useful Post: [ Click to Expand ]
 
kennyx13
Old
#7  
Senior Member - OP
Thanks Meter 17
Posts: 108
Join Date: Nov 2012
Quote:
Originally Posted by broodplank1337 View Post
There is a an option actually, but it's not the easiest one. the only way of getting the modules inside a non-rooted rom is to make a custom odin image, you need to dump the current /system folder, make the adjustments and repack it, then flash it in odin along with the boot.img and you should be fine.
There is a topic in this forum that describes how to make one
Again brood, thanks soo much for the very very good answers. it will definitely help us out.

The Following 2 Users Say Thank You to kennyx13 For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes