Android slow


27 posts   Page 1 of 2   1, 2
by fykos » Mon Feb 04, 2013 5:25 pm
Hello, I have a RaspberryPi that works seamlessly with Raspbian "wheezy". But with android 2 or 4 (gingerbread image) keeps crashing too, is very slow, can not even move. I leave just connected the HDMI and USB keyboard. What can it be? Thank you.
Posts: 5
Joined: Mon Feb 04, 2013 5:11 pm
by jamesh » Mon Feb 04, 2013 5:54 pm
Android is not accelerated by the GPU at this stage, which is pretty essential to get any sort of performance out of it.
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11651
Joined: Sat Jul 30, 2011 7:41 pm
by fykos » Mon Feb 04, 2013 6:55 pm
jamesh wrote:Android is not accelerated by the GPU at this stage, which is pretty essential to get any sort of performance out of it.


How Do I Activate from the GPU acceleration?
Posts: 5
Joined: Mon Feb 04, 2013 5:11 pm
by ghans » Mon Feb 04, 2013 7:02 pm
You can't. There is an internal build by Broadcom ,
which they might release , at their own discretion.

The "community" builds are being worked on , but they
are doing it in their free time. Check the Android Pi Wiki or
their IRC Channel.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4480
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by duCin0 » Mon Feb 04, 2013 8:01 pm
jamesh wrote:Android is not accelerated by the GPU at this stage, which is pretty essential to get any sort of performance out of it.


That doesn't really answer the question though. The GUI stack as found in Raspbian isn't accelerated either. Yet it's faster (i.e., it works), despite all the X11 overhead and comparably bloated libs and toolkits.

Android before Honeycomb only uses limited HW acceleration. 2.* should have acceptable performance even with SW rendering only (at least on small resolutions), given that other comparably specked devices run Android just fine, with, as mentioned, very limited HW support.

I can only speculate, I'm not familiar with the razdroid code but the answer could be that their SW compositor isn't optimized at all because pretty much nobody ever used it:
"Android has always used some hardware accelerated drawing. Since before 1.0 all window compositing to the display has been done with hardware."
Interesting read: https://plus.google.com/105051985738280 ... FXDCz8x93s

It could also be down to some differences in the Android vs raspi kernels.
Posts: 2
Joined: Mon Feb 04, 2013 6:58 pm
by jamesh » Mon Feb 04, 2013 8:22 pm
duCin0 wrote:
jamesh wrote:Android is not accelerated by the GPU at this stage, which is pretty essential to get any sort of performance out of it.


That doesn't really answer the question though. The GUI stack as found in Raspbian isn't accelerated either. Yet it's faster (i.e., it works), despite all the X11 overhead and comparably bloated libs and toolkits.

Android before Honeycomb only uses limited HW acceleration. 2.* should have acceptable performance even with SW rendering only (at least on small resolutions), given that other comparably specked devices run Android just fine, with, as mentioned, very limited HW support.

I can only speculate, I'm not familiar with the razdroid code but the answer could be that their SW compositor isn't optimized at all because pretty much nobody ever used it:
"Android has always used some hardware accelerated drawing. Since before 1.0 all window compositing to the display has been done with hardware."
Interesting read: https://plus.google.com/105051985738280 ... FXDCz8x93s

It could also be down to some differences in the Android vs raspi kernels.


Well, I think you have answered your own question with your speculation. Latest versions of Android need HW acceleration as the compositing and 3D tasks are really quite intensive, and a 700Mhz CPU isnt up to the job.
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11651
Joined: Sat Jul 30, 2011 7:41 pm
by fykos » Tue Feb 05, 2013 4:54 pm
What I could see the link posted by duCin0 is that really the reason for this slowness is via hardware acceleration.
I wonder what can be done to improve?
Posts: 5
Joined: Mon Feb 04, 2013 5:11 pm
by 4thdwarflord » Sun Feb 10, 2013 1:18 pm
haven't broadcom released the gpu drivers?
Posts: 142
Joined: Mon Dec 03, 2012 4:26 pm
Location: Deep in the mines of Moria
by ghans » Sun Feb 10, 2013 1:35 pm
They have , but Android needs still some other parts to work with the GPU.
For example a so-called gralloc module.
All in all it is simply a big task to get Android hardware-accelerated. Mobile phone
manufacturers an simply pay a horde of developers to do this over some months , the Razdroid guys can't.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4480
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by CoolApps » Mon Feb 11, 2013 4:01 pm
ghans wrote:They have , but Android needs still some other parts to work with the GPU.
For example a so-called gralloc module.
All in all it is simply a big task to get Android hardware-accelerated. Mobile phone
manufacturers an simply pay a horde of developers to do this over some months , the Razdroid guys can't.


ghans

You got to remember that the gralloc module can mess up on stock Android on Android devices has that causes visual artifacts.
Also custom roms do not always take that long and also you do not need too much Android developers to do the job.
Android, web, linux, windows and scripting developer
Download Page: caftp.3owl.com
Posts: 21
Joined: Thu Nov 22, 2012 8:43 pm
by ghans » Mon Feb 11, 2013 4:32 pm
AFAIK custom ROMs always rely on the fact that the
manufacturer did the work of GPU acceleration.
And every serious mobile phone manufacturer does that.
Then you can simply copy binaries from the original
firmware.

That is completely different if the device was never a mobile
phone , but has powerful GPU and display capabilities.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4480
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by CoolApps » Tue Feb 12, 2013 4:13 pm
ghans wrote:AFAIK custom ROMs always rely on the fact that the
manufacturer did the work of GPU acceleration.
And every serious mobile phone manufacturer does that.
Then you can simply copy binaries from the original
firmware.

That is completely different if the device was never a mobile
phone , but has powerful GPU and display capabilities.

ghans

The thing is that the Raspberry Pi has More RAM then by phone and it has Armv6, same has The Raspberry Pi.
The only problem is the kernel modules and the hardware acceleration which will require the Broadcom VideoCore IV driver.

On Android the libs use .so file extensions while the kernel modules use .ko
Android, web, linux, windows and scripting developer
Download Page: caftp.3owl.com
Posts: 21
Joined: Thu Nov 22, 2012 8:43 pm
by Warg » Tue Feb 12, 2013 6:11 pm
CoolApps wrote:Also custom roms do not always take that long and also you do not need too much Android developers to do the job.

Not to be rude or anything, but this project is far more than just a custom ROM. This is actually PORTING Android onto a new device, which involves a whole bunch of coding as opposed to making a custom ROM where most of the 'dirty work' has already been done by the OEM.

CoolApps wrote:The only problem is [...] the hardware acceleration which will require the Broadcom VideoCore IV driver.

Yes, and we DO currently have a non-accelerated Android port available for the public, thus I fail to see your point here.


For anyone else that feels like questioning the time it takes to get this working 100%:
I am merely a man. One man. If some part of this project takes too long, it's because I have other obligations. Want to change that? Start paying me so that I can ditch everything else and spend time doing this for you all. The main other thing that could change the speed is if more people get involved in the coding aspect of the project. As stated, I am just one man.

</rant>
Warg
Posts: 20
Joined: Thu Jul 05, 2012 8:47 pm
Location: Sweden
by Hofie » Tue Feb 12, 2013 11:49 pm
Paying, that sounds fair. Kick Starter Project?
Posts: 23
Joined: Mon Jun 11, 2012 10:09 pm
by MrSlacker » Wed Feb 13, 2013 7:37 pm
Hofie wrote:Paying, that sounds fair. Kick Starter Project?


Man, you guy's sure do miss a point. I don't think Warg is gonna be able to quit his job(or school?) and dedicate all his free time to the effort based off a kick starter project. $5, 10 or even $50 here and there wouldn't cut it for me, i'm sure it wont for him. I guess the funds could be used to bring coders over here and there. I think a better option would be to try and get a project submited to GSOC.

For those making blind suggestions. Wanna know how you can help? It's simple, fork the source and help code. Can't do that? Well then you're gonna have to be patient and stop nagging. If you look at the project on github you can see the progress.

Warg, I applaude you're efforts! I've been watching the github for awhile and from what I can gather it looks really close to having something tangible! Kudos.
Posts: 2
Joined: Wed Feb 13, 2013 6:51 pm
by Warg » Wed Feb 13, 2013 10:52 pm
I wish this forum had a 'like'-function so that I could like the above post. MrSlacker, you really got the point I was trying to make.
Posts: 20
Joined: Thu Jul 05, 2012 8:47 pm
Location: Sweden
by 6677 » Sun Feb 24, 2013 2:07 pm
Warg has kindly decided to do this in his own free time. He has no obligations to do it but has anyway.

Peoples bitching and moaning does not speed up the process in any way.
Posts: 382
Joined: Wed Mar 14, 2012 9:23 pm
by jamesh » Sun Feb 24, 2013 3:59 pm
6677 wrote:Warg has kindly decided to do this in his own free time. He has no obligations to do it but has anyway.

Peoples bitching and moaning does not speed up the process in any way.


Odd how so many people don't realise that.....and in fact, it can slow things down!
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11651
Joined: Sat Jul 30, 2011 7:41 pm
by kaikeraut » Wed May 28, 2014 11:35 am
Any updates on this post.?
Posts: 30
Joined: Tue Apr 29, 2014 8:18 am
by fruitoftheloom » Wed May 28, 2014 3:02 pm
viewtopic.php?f=73&t=78012

Not a hope till hell freezes over......
IS THERE AN ECHO IN HERE ?
Posts: 1445
Joined: Tue Mar 25, 2014 12:40 pm
Location: Bognor Regis UK
by Joe Schmoe » Wed May 28, 2014 3:43 pm
Has anyone, ever, anywhere given a REASON why they want Android on the PI, other than either "because it would be kewl" or "because it is always better to have more choices (OSes) available" ?

I don't think I've ever seen one.

And, in fact, all the Android whiners just keep asking for Android, not explaining why they want it.

Or am I just missing something obvious? I really don't see any reason to have it; if you want Android, you know where to find it.

Edited to add two comments regarding the discussion of "netflix" which arose below:

    1) If we ever get past the technical and legal issues that would allow us to view Netflix on the Pi, it would certainly apply equally well to regular Linux as to Android. I.e., Android would not be the magic bullet to getting Netflix working.

    2) As illustration of this, note that the Roku, which is based on the same SOC as the Pi, can (obviously) display Netflix, so it is clearly possible for this SOC to display Netflix - and they (the Roku) obviously aren't running Android.
Last edited by Joe Schmoe on Thu May 29, 2014 12:44 pm, edited 1 time in total.
Never answer the question you are asked. Rather, answer the question you wish you had been asked.

- Robert S. McNamara - quoted in "Fog of War" -
Posts: 2605
Joined: Sun Jan 15, 2012 1:11 pm
by mikerr » Wed May 28, 2014 4:41 pm
One reason: netflix
Got a Pi Camera? View it in my android app - Raspicam Remote ! No software required on the pi
User avatar
Posts: 1204
Joined: Thu Jan 12, 2012 12:46 pm
Location: NorthWest, UK
by fruitoftheloom » Wed May 28, 2014 5:42 pm
mikerr wrote:One reason: netflix


Will NetFlix work on devices not Google Certified and do not therefore have Google Play Store ??

NetFlex are very strict with DRM !!
Last edited by fruitoftheloom on Wed May 28, 2014 5:45 pm, edited 1 time in total.
IS THERE AN ECHO IN HERE ?
Posts: 1445
Joined: Tue Mar 25, 2014 12:40 pm
Location: Bognor Regis UK
by Douglas6 » Wed May 28, 2014 5:44 pm
mikerr wrote:One reason: netflix


That just begs the question :)
User avatar
Posts: 926
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL
by jamesh » Wed May 28, 2014 6:49 pm
fruitoftheloom wrote:
mikerr wrote:One reason: netflix


Will NetFlix work on devices not Google Certified and do not therefore have Google Play Store ??

NetFlex are very strict with DRM !!


That's the big issue. I cannot see Netflix working without the required GPU support for DRM, which would not be available. (YMMV, just my opinion)

Any other use cases for Android?
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11651
Joined: Sat Jul 30, 2011 7:41 pm