02/10/2014, 03:01 PM
AndroidChroot v1.0.0 (beta)
System Requirements: webOS 2.x, Pre3
Description: run android inside card
To begin, there are some comments, which you should consider before you start installing AndroidChroot on your HP Pre3.
- This will void the warranty.
- This is a beta release of the software. This means that you may encounter various errors. You are responsible, if something goes wrong.
- This version of Android CyanogenMod 7.
1. Download necessary files.
Download and install the Palm Novacom on your computer. You can download it by installing the webOS SDK. This package runs on Windows, OS X or Linux. You can also use Universal Novacom Installer to install Novacom.
Novacom is needed for a trial boot on the Pre3 with the Android kernel. If you are sure it is working correctly (you have tested it before), you can skip this step and install the bootloader (bootr-nofob) or replace the stock kernel (not recommended).
Download root.tar.gz, data.tar.gz, system.tar.gz, uImage.android(or UberKernel version uImage.android, but you need uberkernel ipk installed), files.sh and com.nizovn.androidchroot_1.0.0_all.ipk
Update: changed root.tar.gz and system.tar.gz for hw keyboard support, by ananimus(post #58).
2. Create files and copy them to the Pre 3.
AndroidChroot needs 5 files to work correctly being :
root.ext3, system.ext3, data.ext3, cache.ext3, swap.ext3 ( which isn't actually an ext3 file).
Please note these commands are to be executed in Linux (either native or via VirtualBox or Cygwin (not tested yet)).
These files can be created by executing the following commands in the folder where you placed all the files:
You can adjust the file sizes in files.sh, if you want.
sudo chmod +x files.sh
In case you don’t have a Linux machine available, you could also do these steps on your Pre 3, but it will be a bit slower. You can connect with Novaterm and execute the following:
NOTE: Due to the small size of RAM in the Pre 3 (380MB) it's necessary to use a swap file. Since continuous use of Android will heavily rely on the swap file which is stored in the flash memory, this can drastically reduce the life-time of your flash memory, because flash memory has a limited number of write cycles and these will get used up rather quickly this way.
If you want to install gapps, then follow the steps in under 4.
In case you created the files on your PC, you need to copy all the files from the “out”-folder on your PC to the Pre 3's /media/internal/AndroidChroot directory.
It is also necessary to create a folder called “sdcard” in /media/internal/AndroidChroot. This is used by many programs in Android and using this folder you can easily transfer files between webOS and Android. You will also need a folder called “root” in /media/internal/AndroidChroot
3. Install and run android.
Install the ipk-file using WebOSQuickInstall or Preware and reboot your Pre3 into recovery mode by restarting the phone and holding the “volume up” button until you see the big USB symbol on the screen.
In the terminal/command line, navigate to the directory containing Novacom (when not accessible from current directory) and make sure to have uImage.android in the same folder and run:
After the Pre 3 booted, you can start the AndroidChroot app.
novacom boot mem:// < uImage.android
WARNING: Android will only work with this kernel. Since this method for safety reasons does not contain anything that can affect the webOS boot process, after you reboot, the Pre 3 will use stock (or maybe custom, if you've replaced it) kernel again and AndroidChroot will not be able to run. If you have tested AndroidChroot and you decided to install the Android kernel on your Pre 3, then you can set up a dual-boot with bootr-nofob(see step #7) or replace the stock kernel (not recommended).
The first boot can take very long, be patient.
4. Installing Google Apps (gapps)
Download gapps-gb-20110828-signed.zip and put in a folder with the archives.
Download gapps.sh, put it in the same folder and run it.
5. Using AndroidChroot.
To start Android, launch the AndroidChroot app and press the “Start Android && Start Client”-button. A new card (client) will appear and it will boot Android. The Up Gesture is equivalent to screen lock in Android. The client can be safely thrown off, you can open it again in AndroidChroot.
The Back gesture corresponds to pressing the back button, the Forward gesture to the home button.
To turn off Android, go to the AndroidChroot app and press «Send Shutdown», which corresponds to pressing the power button in Android. In the client, the reboot menu will appear, then select to “turn off” (or reboot).
Unfortunately, not all of the code responsible for wifi was removed. Therefore, when selecting flight mode, wifi will turn off irreversibly. Be careful and avoid accidentally turning on this mode.
When working in android, do not close the AndroidChroot card, because most likely your Pre3 will run out of RAM, so you will not be able to shutdown Android, because AndroidChroot will refuse to launch.
For convenience, you can set the screen off timeout in Android settings to “maximum” and disable the lock screen (strongly recommended). If the screen turns off, then minimize/maximize the client app and make a Back gesture (see video — screen turned off while loading Opera).
When you run demanding applications, be prepared for the fact that the Pre 3 will be very slow and may stop responding to actions - you then have to wait patiently until it unfreezes.
6. Removing AndroidChroot.
AndroidChroot can be removed as any normal application, but be prepared that the removal process may hang. In this case, restart your Pre 3.
7. Set up a dual-boot with bootr-nofob
Download bootr-nofob-master.zip and put it under /media/internals/AndroidChroot, put uImage.android in the same folder.
Execute in novaterm:
cp uImage.android /boot/uImage.Android
unzip bootr-nofob-master.zip -d tmp
cp -rf tmp/bootr-nofob-master /boot/bootr
sh /boot/bootr/bin/install.sh install
mount -o remount,rw /boot
cp /boot/sbin/init.webos.bootr /boot/sbin/init.android.bootr
rm -fr tmp
NOTE: if you installed uberkernel, you will need to uninstall bootr and uberkernel in the same order as installed them(they both do backups). For example: install UK->install bootr->uninstall bootr->uninstall UK.
sh /boot/bootr/bin/install.sh uninstall
1. It is also possible to enable tablet UI(for android onscreen buttons) by replacing system.ext3/framework/framework-res.apk with framework-res.apk and system.ext3/app/SystemUI.apk with SystemUI.apk.
2. If you want to install apps requiring root access, then mount system.ext3 and under xbin directory run:
chown root:root ./*
chmod 6755 ./*
If you are so much impressed by AndroidChroot, and want to donate, you can do it HERE.(but I can not guarantee that I will be able to improve AndroidChroot).
Useful projects whose source greatly helped writing this app:
Main Page - WebOS Internals