Search This Blog

Showing posts with label crap software. Show all posts
Showing posts with label crap software. Show all posts

Configuring zRAM on the Sony Xperia Play with FreeXperia Zeus

If you have unlocked your Xperia Play and installed FreeXperia (+CyanogenMod  9.1) then you will quickly discover that enabling zRAM via the Performance settings has no effect whatsoever.





















I have reported this as a bug but the project team seem more interested in burying their head in the sand so you won't get any help at all from them. I even asked for help on the +FreeXperia +Google+ page but I gave up on asking for any help from anyone there a long time ago.

The provided Linux kernel definitely does have zRAM enabled.

# ll /dev/block/zram*
brw-------    1 root         root          253,   0 Sep 10 13:10 /dev/block/zram0

The problem lies within the UI to configure it. No scripts seem to be created or executed so either the option is a stub or it is simply broken.

Initially I decided to use SetXperia which, again, proves that the kernel part is fine, but SetXperia remains in RAM all the time, and even in the notification area. I just don't see the point in that.

It can't be that difficult to enable zRAM, right?

Using the Ubuntu zram-config package it was fairly easy to work out what was needed and hence create a script.

#!/system/bin/sh

SWAPPINESS="35"
TAG="zram-config"

log -p i -t $TAG "Setting vm.swappiness to $SWAPPINESS"
logwrapper sysctl -w vm.swappiness=$SWAPPINESS
log -p i -t $TAG "Done."

log -p i -t $TAG "Setting up zram"
echo 75497472 > /sys/block/zram0/disksize
logwrapper mkswap /dev/block/zram0
logwrapper swapon /dev/block/zram0
log -p i -t $TAG "Done."

log -p i -t $TAG "All done."

I dropped this script into /data/local/userinit.d/zram-config (remember to set +x on the script).

All the log and logwrapper stuff is obviously to send details to the log. It probably doesn't work as the script is run before Android is loaded. Indeed, I've never seen anything using logcat unless it's run manually. They are not needed for the script to work.

vm.swappiness is set to 60 by default. You shouldn't change that unless you know what you're doing. In my case sysctl -w vm.swappiness=35 does this. I could not find a config file for sysctl (such as /etc/sysctl.conf) as is the case for most Linux distributions.

The Ubuntu script sets up the amount of zRAM based on the amount of RAM and creates separate devices based on the number of cores, which makes sense because it's a generic script to be used on a vast array of machines including, recently, mobile platforms. There's no real need to do that unless you plan on dropping the script on a variety of different devices. You should decide for yourself how much zRAM you want to configure.

echo 75497472 > /sys/block/zram0/disksize sets my zRAM device to 75 MB.

mkswap /dev/block/zram0 sets up the device as a swap device, as you would with any normal swap.

swapon /dev/block/zram0 enables the swap.

This can, of course, be used with any device that has zRAM enabled in the kernel.

# uname -a
Linux localhost 2.6.32.9-FXP #1 PREEMPT Fri Apr 19 17:37:58 EEST 2013 armv7l GNU/Linux

I recommend installing ZRAM Status from the Play Store so that you can see that your zRAM is being used, along with some interesting, nerdy statistics.




Remember that you will need to reboot your device (or run the script manually) to enable zRAM the first time.

TVCatchup for Android - don't bother

I have this problem when trying to stream the TVCatchup RTSP stream on my Android phone.

I was informed that an Android app is currently under development, so I thought I would give it a go, see if it makes any difference.

I did explain what the problem was, but the "developer" failed to tell me that it would make no difference, but I had to find that out for myself.

The first thing I noticed once installed on my phone was that it consumed a ridiculous amount of internal storage, despite the fact it was installed on my SD card.

For reasons unknown, by neither the development team nor I, the data used was over 2MB and the cache another 2MB. My internal storage reduced by 7MB and I still have no idea why, and neither do they.

The result? Well, I had to uninstall it as the internal memory is very restricted on my phone.

The uninstaller immediately crashed and caused my phone to reboot. On boot it was obvious that the phone believed that the app had been removed but only 4MB of internal storage had been recovered, and this was probably because I had the good sense to clear the stored data and cache.

I reported this on the feedback forum with a clear explanation of what had happened. In fact, the explanation above should be adequate, so it would be impossible for anyone with any knowledge of computing to be puzzled as to how I have come to the conclusion that the fault is with their software.

The first reply was from TVC_Colwal who copy-and-pasted some nonsense from a Wiki site about installing apps onto an SD card, despite the fact I had already explained what I had done. I had to repeat myself.

The second reply was from legoUK who told me that I was wrong, because the app is only around 1MB in size. I could not believe the stupidity of these people. This was the second time my original post had been ignored. I made it very clear in my reply that this person clearly doesn't know anything about .apk files nor the Android system.

The third reply was TVC_Colwal telling me that legoUK was the developer, I was rude, and that they were trying to help me. There are three things wrong with that statement.
  1. Neither of these clowns bothered reading my original post, or understood what I was saying.
  2. I was providing THEM with feedback, and at no point did they try to understand or discover what was causing the runaway waste of storage due to THEIR application. I was helping them and they have the cheek to claim the reverse is true!
  3. I consider it rude to completely ignore what you've been told, or just fob someone off with some Wiki rubbish that they clearly don't understand.
The solution? There wasn't one. I wasn't going to get any help from Dumpty and Numpty so I had to go out hunting myself. I found this very useful page about what can and can't be cleaned up, and from there I figured out how to remove all the shite that came bundled with my latest firmware update, saving a significant amount of space. Unfortunately I never found out what damage had been done by the awful TVCatchup software. I'm guessing fsck didn't find anything either as the space was never freed.

As for the app itself?

Well, on web pages TVCatchup.com first plays an advertisement before showing you the channel. On mobile RTSP though, they did not do this. It is possible, both through RTSP and on the mobile web page, but I doubt they have any idea how to do this.

The first improvement I noticed was that there was a brief TV guide included, to show you what's on Now and Next. Very handy, although I would recommend this app from TVGuide.co.uk.

This was the only improvement, things got worse from this point on.

The video, when it starts playing over RTSP (yes, there is no point in this app at all), is intentionally orientated incorrectly so that a banner can be continually shown. So, not only does the video not fit the screen, they can now show you even more advertisements continually. Ever wished you had more advertising on TV? Well now you can!

And that is it. Literally. The app is clearly a way for TVCatchup so show more adverts, and serves no other purpose. There is this but... well, just look at it.

Advantages:
  • A Now and Next TV guide, although there is much better out there.

Disadvantages:
  • The app will bugger your internal storage.
  • The developers have no idea what they're doing.
  • The screen is not watchable.
  • There are more advertisements.

Don't bother.

[Update]

In response to this post, their Twitter twit, who types like a teenage girl, responded:









This shows exactly what kind of people work there, lol.
My profile on StackExchange