Binary translation is used by Intel based Android devices in order to run apps that are uses native ARM code. This is good for compatibility but bad for performance as native x86 code in the app would be a better solution.
So how can one tell if an app uses binary translation instead of native x86 code? Well, first you must have an Intel based Android device like the Asus Fonepad or this would be rather pointless. Second you need to have a way to read the android logs. I use the command logcat but there are also apps that can be used for this.
Luckily the Asus Fonepad includes a busybox binary that has the "grep" command built in. That saves a lot of time and I'm using an adb shell connection and this command "logcat | busybox grep houdini".
shell@android:/ $ logcat | busybox grep houdini
logcat | busybox grep houdini
D/houdini (11555): [11555] Loading library(version: 3.1.3.43168 RELEASE)... successfully.
Here we can see that an app with PID 11555 has activated libhoudini.so which is the lib that does the ARM to x86 binary translation.
So let's find out what app is using PID 11555 (once again I use grep to save some time).
shell@android:/ $ ps | busybox grep 11555
ps | busybox grep 11555
u0_a117 11555 128 1034944 45356 ffffffff 00000000 S com.spotify.mobile.android.service
It turns out Spotify uses native code but only includes ARM code.
Showing posts with label busybox. Show all posts
Showing posts with label busybox. Show all posts
Monday, May 20, 2013
Friday, April 13, 2012
Part 3 - How to get the most out of the Hama Internet TV Box - Installing Busybox
As you remember from Part 2 we had to use "cat" instead of "cp" to copy files because the default Android installation lacks a lot of useful command line tools. Now it's time to change that so that future modifications will be a bit easier to perform.
For this I used this Busybox installer.
(Busybox is single binary file that contains many other common linux/unix commands and it's often used in embedded systems instead of using a separate binary for each command.)
But first we need to prepare the file system because there are no /system/xbin folder on the Hama Internet TV Box.
- Start Terminal Emulator and make yourself root. ("su" command).
- Run the "mount" command without any parameters and check which partition is mounted on /system (on my device it is /dev/block/mmcblk0p2 and likely it is the same for you)
- Remount /system as read-write with "mount -o rw,remount /dev/block/mmcblk0p2 /system"
- Create the /system/xbin folder with "mkdir /system/xbin".
- Install and run the Busybox installer from Google Play using the default settings (just push "install").
What will happen is that the busybox installer will install busybox into /system/xbin and create lots of symlinks for common linux/unix commands. (type "ls -l /system/xbin" to see what the installer added to your system)
We will use "cp" command and the busybox version of the "mount" command in the next part when we will make Google Play "see more" apps as compatible with our box.
Disclaimer: This operation will most likely void your warranty and is done completely at your own risk.
Subscribe to:
Posts (Atom)
