Thursday, October 25, 2012

Install Busybox for Jellyebean

1. Download files:

http://www.busybox.net/downloads/binaries/1.19.0/busybox-armv6l

2. Create dir

$ mkdir -p META-INF/com/google/android/
$ mkdir -p system/bin/busybox

You should get something like this...
.

├── META-INF
│   └── com
│       └── google
│           └── android
│               ├── update-binary
│               └── updater-script
└── system
    └── bin
        └── busybox

3. Move the file, you need 'update-binary', updater-script from other update.zip
$ mv busybox-armv6l busybox/system/bin/busybox

4. Update the updater-script with content below :
ui_print("Busybox 1.19.0 for Android 2.0-4.1 arm");
ui_print("Mounting system...");
run_program("/sbin/busybox", "mount", "/system");
ui_print("Deleting old files...");
delete("/system/bin/busybox","/system/xbin/busybox");
ui_print("Copying files...");
package_extract_dir("system", "/system");
ui_print("Fixing permissions...");
set_perm(0, 0, 06755, "/system/bin/busybox");
ui_print("Symlinking...");
symlink("/system/bin/busybox", "/system/xbin/busybox");
ui_print("Unmounting system...");
run_program("/sbin/busybox", "umount", "/system");
ui_print("Installation complete!");


5. Zip & Signed
$ keytool -genkey -v -alias mw_apk_signed_key -keyalg RSA -keysize 2048 -validity 10000 -keystore .keystore

$ jarsigner -verbose -keystore .keystore busybox.zip mw_apk_signed_key
Enter Passphrase for keystore: 
   adding: META-INF/MANIFEST.MF
   adding: META-INF/MW_APK_S.SF
   adding: META-INF/MW_APK_S.RSA
   adding: system/bin/
  signing: system/bin/busybox


6. Install
$ adb push busybox.zip /sdcard/
$ adb reboot recovery

Install the busybox.zip from recovery....