Mar 26

Annoying crapware on Java Updates (a.k.a. Ask.com toolbar)

Tired of this annoying ask.com toolbar being installed every time Java gets updated?

Here’s the solution:

Open a notepad, copy-and-paste this code and save it on a file called “disable_java_sponsors.reg”.

 

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft]
"SPONSORS"="DISABLE"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft]
"SPONSORS"="DISABLE"

 

Then double-click on the new file, answer “yes” to the question about merging the registry and say bye to these annoying crapware. Next time you update Java, the ask.com bar (and eventually all other sponsored tools) should be disabled and not installed.

Click here to download disable_java_sponsors.reg.

Thanks to Danilko Roascio for his solution on superuser.com.

 

 

Permanent link to this article: https://www.studiofuga.com/2013/03/26/annoying-crapware-on-java-updates-a-k-a-ask-com-toolbar/

Feb 27

Building AllWinner Android Firmwares

Foreword

This is a work-in-progress post. I'll periodically update this page with new informations, tweaks and tools, because I wanted a single page to collect all the valuable informations about this theme. 

Introduction

The AllWinner A10 platform is a relatively new System-on-chip (SoC) product developed by a Chinese Company. His strength point is certainly the low cost compared to computation power and peripheral integration.

The A10 SoC is based on Cortex-A8 ARM core, and provides a Mali-400 GPU on chip.

Another very interesting point about the A10 based products, is that since the SoC has an hardwired primary bootloader, they are practically unbrickable, that makes the A10-based tablet a great base for tablet hackers.

There are many A10 based tablet on the market. The most famous on the European and Italian Market is the Mediacom product line, like the 702 and the 932i.

On the other hand, as usual from many android manufacturer (despite Android openness), the kernel and Android sources hasn't yet been officially released, and only "leaked" version are available on many unofficial repository.

Actually, the most complete Android version is Gingerbread (2.3.6); there's also an IceCream Sandwich version (4.0.3), but last time I checked, it wasn't compilable.

Flashing tools and procedure

Let's start from the flashing procedure, it should be the latest phase, but I prefer to start from the easier part; also because I think it's better to familiarize with this procedure, that you can try with the official, stock, firmwares, and then proceed with the more complex phases, that is: Unpacking and Re-Packing the firmwares, and Customizations.

There are two tools that can be used to flash the tablet: the Livesuit and the PhoenixUsbPro or PhoenixCard.

Almost everybody on the net is using Livesuit, because the Phoneix tool requires one more key file; also the Livesuit is easy to use, but the Phoenix tool can flash up to 200 or so devices at one time.

The Livesuit can be downloaded from here:

– Version 1.07

Note that Livesuit is only in chinese, fortunately after having used it for the first time, it's easy to use and remember the commands.

The first icon selects the IMG file you'll flash on the tablet, while the last one shuts down the livesuit.

[warning]Note that this icon is the only way to cleanly exit from livesuit, using the close command will close the program but will not shutdown all the process, so you’ll not be able to restart it a second time, without shutting down it from the Windows task manager.[/warning]

First, select the image with the first icon.

Then, power off the tablet, then keep presses the "Volume up" button and insert the USB cable. Then press and release the power button for 5-6 times until Windows will have detected the new device.

The first time Windows will install the drivers.

Then Livesuit will ask you if you want to format the entire partitions. This will erase the entire flash memory, so if you haven't a recent backup, say no.

But note that formatting the partitions will give you a completely clean and functional tablet, so you'll maybe want to format it.

[warning]In any case, remember to make and check a backup of your data (/sdcard/)! You always may have a non-functional  device, so you are warned![/warning]

After 3 or 4 minute, an empty (!) message box will tell you that the process is completed.

Creating the firmware

The firmware must be created by using the "kitchen" suite.

It's a set of programs and scripts that automatically unpack and repack the img file onto the different partition images.

Every android installation is composed by 6 partitions on the internal flash memory:

  1. Bootloader: this is the second program that is executed when you power up or reset your device. The first is an internal bootloader that can't be written.
  2. Kernel: this is the main linux kernel, and is executed after the bootloader
  3. Recovery Kernel: this kernel is executed when the bootloader is executed in "recovery" mode. This allow the tablet to be recovered if the main kernel or installation is broken, malfunctioning or erased
  4. Rootfs, the main Android installation. This partition is mounted in the /system/ directory of your tablet, and contains all the main programs, libraries and drivers
  5. Cache: this partition is used by dalvik (the Java Virtual Machine that Android uses) to compile the applications and allows each app to be loaded without being recompiled, so executing very fast
  6. Userdata: This is where you, the user, put all your data and applications. It's mounted by Android in /sdcard/, and is called "the external sdcard" even if it resides inside the internal flash memory.

From now on, I suppose that you'll copy your files in a different subdirectory for each partition, so when I'll write to copy a file in "boot/linux/", this means that it will be into the linux directory of the boot image/partition. Or, root/system/app will be the system/app directory from the root file system directory image.

Customizing the splash screens

There are 3 splash screen on the tablet image: The bootloader splash screen, the Kernel Splash Screen and the android Boot Animation.

These are three differents formats:

the boot is a 32bit Windows Bitmap image (BM8)

the Kernel is a raw, RGBA image, and

the Android is a zip file containing png or jpg images and a control file

The boot image can be created from a standard image by using Photoshop: Load the image, then save it as a 32 bit Windows Bitmap, without compression. You can't use ImageMagick, because the bmp3 filter only create a 24bit image, and there's no way to bypass this function. Even forcing "-depth 32" generate a BM6 file header (24bit).

The file must be saved in the bootfs archive

$ cp linux.bmp bootfs/linux/linux.bmp

The kernel image is a rgba raw file, and can be easily created by using ImageMagick; then copy it on the kernel

$ convert bootsplash.jpg initlogo.bgra
$ mv initlogo.rgba kernel/initlogo.rle

Note the .rle extension

[warning]dfighter1985 noted in a previous version of this post that the resulting image is “blueish”. We needed to apply a +180degree hue correction. Indeed the problem was with the channel ordering, that is BGRA for AllWinner, not RGBA as previously stated. The command line has been fixed. Thanks to dfighter1985 for the comment.[/warning]

The Android bootanimation is yet another different format.

The file, named bootanimation.zip and placed on the /system/media directory, is, as self-evident, a zip archive.

Inside the file, there must be a text file called desc.txt and a set of animation frames as png files inside one (or more) subdirectory.

The animation can include various subsequences. The most obvious is a single sequence repeated as a loop, but another common animation can include a first subsequence played only once, and a progress loop.

Each subsequence is put on a different directory, part0, part1, etc… The sequence is read "as is". So

Each file is named androidXXXX.png, with XXXX the frame number as 0000, 0001, 0002 and so on.

The desc.txt file describe the content and behavior of the animation:

$ cat bootanimation/desc.txt 
800 480 30
p 0 0 part0

The first line specifies: width and height of the frames and the desired framerate (frames per seconds)

The following lines define the animation subsequences: "p" identifies a subsequence, the first number is the repeat count (0 means "loop forever"), the second is the pause between subsequences, and the last string is the directory containing the subsequence.

Pack it as a zip file, pay attention not to include any subdirectory (the desc.txt file and all other part* directories must be in the root of the zip file), and save it in /system/media/bootanimation.zip.

Links

Livesuit, version 1.07

Kitchen

(to be continued here soon… stay tuned!)

Permanent link to this article: https://www.studiofuga.com/2013/02/27/building-allwinner-android-firmwares/

Feb 04

Qt Creator 2.6.2 hangs under Windows 8

What a bad surprise when, installing my new Windows 8 box, I found that I couldn’t compile any of my Qt Projects! I couldn’t even running an instance of Qt Creator 2.6.2, because when it tries to open the project file, it hangs with that stupid white window… “Qt Creator is not responding…”

Well, I tried the following: Installing a different MinGW version, Installing the new Qt5.0.1 library, modifying the projects files… nothing worked, though removing the QT+=xxx and the TARGET=yyy or the TEMPLATE=zzz lines makes sometime starting it.

Anyway, the obvious solution is to downgrade the Qt Creator version to 2.6.1, it seems to work well (at least: it opens the project correctly). You can download it from here.

I am not sure if the problem is on that version of Creator (that is built on Qt5) or in the Qt version itself, anyway if you are stuck, try downgrade the Creator to 2.6.1 (that is built on Qt 4.8.3).

Please share your experiences in the comments!

Permanent link to this article: https://www.studiofuga.com/2013/02/04/qt-creator-2-6-2-hangs-under-windows-8/

Jan 24

MacOS Mail.app slow… why? Ask iCloud!

In the last few months I maturated the idea to change my 4 years old Late 2008 MacBookPro. Though I upgraded it to 8Gb Ram thanks to the kit from OWC, opening and managing mail was painfully slow.

I didn’t experience a sudden deterioration of performance, but since I updated the OS to Mountain Lion, a slow and maybe continuous worsening.

So it was difficult for me to realize that something wasn’t going wrong, I was ascribing this to many programs I installed and removed, and to Mountain Lion itself.

Anyway, I decided to change the MBP.

While I was waiting it to arrive (and, incredibly, I am still waiting it to be delivered), I found that some other people is experiencing the same problem. Do a simple search on the apple forum to see.

Well, it seems that the problem is iCloud and the contact syncing.

I don’t know why this happens, I made some test but I wasn’t able to understand the source of the problem, other than the syncing with iCloud itself.

So if you are experiencing the same slowness with Mail (read: 3 or 4 seconds to open an already downloaded email), try this: open the System Preferences from the Apple menu, select iCloud and remove the checkmark from the “Contacts” item, as in the following picture.

iCloud settings in System Preferences

iCloud settings in System Preferences

(Sorry, the settings are in Italian. But the graphics are the same!)

Close the Mail, reopen it, and… tada! No more problems when opening mails! Now they opens promptly, as when you first bought your mac!

Now, in an ideal world, when I wouldn’t have the need to work today, I’d start a rant against Apple and his crappy iCloud service, and blablablablah… But that’s another day story…

Hope this helps, and stay tuned!

Permanent link to this article: https://www.studiofuga.com/2013/01/24/macos-mail-app-slow-why-ask-icloud/

Sep 29

Tech blog

Welcome to my tech blog.

Here you’ll enjoy articles about all the fields related to my work, especially Linux, Embedded systems, Programming, Software and Hardware design and Engineering.

All posts will be, hopefully, in English, some will be in Italian when the argument will suggest that only Italian people will have interest on that. Sorry guys 😉

If something isn’t clear, or if you feel that some should be corrected, please write me a comment. Comments are welcome, but due to spamming issues, they will be moderated.

Permanent link to this article: https://www.studiofuga.com/2012/09/29/tech-blog/

» Newer posts