Android and the LG P500. Removing Preinstalled Apps
Today I’ll explain how to get root access on your LG Optimus One (also known as the LG P500) running Android 2.3.3 and remove preinstalled apps. We’ll be removing the likes of Facebook, VKontakte, and Odnoklassniki, along with useless apps from LG.
This article is intended for Linux users, but the ADB archive also includes a Windows version.
First, download ADB and unpack it:
wget -O ADB.tgz /media/2012/04/ADB.tar.gz
tar -xzf ADB.tgz
cd ADB
Go into your phone’s settings under “Applications” -> “Development” and enable “USB debugging”, then connect your phone to your computer with a USB cable and run:
chmod +x adblinux
sudo ./adblinux devices
> List of devices attached
> 80A357486041192199 device
Great, we’ve connected successfully. Now let’s get root access:
sudo ./adblinux shell
$ echo 1 > /data/local/lge_adb.conf
Manually restart the phone (turn it off and back on), then start the shell again:
sudo ./adblinux shell
# exit
Hooray, we now have root privileges!
Now let’s mount “/system” with write access:
sudo ./adblinux shell
# mount -o rw,remount /dev/block/mmcblk0p1 /system
After that, we can remove the software we “need”:
# cd /system/app
# ls
...
# rm Facebook.apk
# rm VKontakte.apk
# rm Odnoklassniki.apk
# rm MobileAgent.apk
# rm YandexSearch.apk
# rm LGWorld.apk
# rm LGMusicClub.apk
# rm LiveWallpapers.apk
# rm LiveWallpapers.odex
# rm LiveWallpapersPicker.apk
# exit
Just don’t delete “LGHome.apk”, as I did by mistake… This app provides your phone’s home screen and menu. Without it, the phone isn’t much use: it can receive calls and messages and connect to the network, but essentially nothing else. At the end of the article, I describe how I eventually restored “LGHome.apk”.
Off Topic
You can reset the phone to its original state (“Factory reset”) like this:
- Press and hold “Home + VolumeDown + Power” simultaneously for a few seconds until an image of “Android with a little box” appears on the screen.
- You can also reset the phone to factory settings through the service menu. To do this, dial 3845#*500# and tap “Factory Reset” in the menu that appears.
If You Did Delete LGHome.apk
It seemed things weren’t so bad: I just needed to download the app from the Internet and upload it via ADB. But in my case, things were much worse… I had done a “Factory Reset”, which made me lose root access and reset “USB debugging”, so I couldn’t connect via ADB.
In the end, I needed to get into the phone’s “Settings” and enable “USB debugging”. Here’s how I got around it:
- First, I uploaded an app’s *.apk file to my website (it doesn’t matter which app);
- Then I downloaded the app on the phone (fortunately, GPRS/WIFI worked). To do this, I sent myself a link by text message using MTS’s free service;
- After downloading it, I started installing it. Android then warned me about an “unknown source” and let me into the “Applications” settings menu so I could specify that I “allow installation of apps from unknown sources”;
- Instead, I went into “Development” and enabled “USB debugging”, after which ADB was able to detect my device!
As soon as you’ve managed to enable “USB debugging”, connect the USB cable and enter the following in the console:
mkdir /tmp/system_apps
cd /tmp/system_apps
wget -O LGHome.apk.tgz /media/2012/04/LGHome.apk.tar.gz
tar -xzf LGHome.apk.tgz
rm LGHome.apk.tgz
sudo chmod 644 LGHome.apk
sudo chown root:root LGHome.apk
sudo ./adblinux shell
# mount -o rw,remount /dev/block/mmcblk0p1 /system
# exit
sudo ./adblinux push /tmp/system_apps /system/app
sudo ./adblinux reboot
Well, that’s it. Good luck!
Comments are closed. Read the original discussion in Russian →
