Tattoo Rosie Remover. - Click Android Development

I've been trying to permanently remove all the htc apps and widgets but I've been getting "directory not empty" error when I use :
Code:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
rm /system/app/Rosie.apk
rm /system/app/Rosie.odex
rm /system/app/htcbookmarkwidget.apk
rm /system/app/htcbookmarkwidget.odex
rm /system/app/htccalendarwidgets.apk
rm /system/app/htccalendarwidgets.odex
rm /system/app/htccontactwidgets.apk
rm /system/app/htccontactwidgets.odex
rm /system/app/htcmailwidgets.apk
rm /system/app/htcmailwidgets.odex
rm /system/app/htcmsgwidgets.apk
rm /system/app/htcmsgwidgets.odex
rm /system/app/htcsearchwidgets.apk
rm /system/app/htcsearchwidgets.odex
rm /system/app/htcsettingwidgets.apk
rm /system/app/htcsettingwidgets.odex
Would it be possible to use the update.zip for Hero from MoDaCo.
Ok so I tested the hero zip and I get these errors :
No signature (4 files)
Verification failed.
I signed the update.zip with test keys.

same problem here...
where have you found the test keys?

What test keys?
Just run these commands in adb shell
Code:
su
#
rm /system/app/Rosie.apk
rm /system/app/Rosie.odex
rm /system/app/htcbookmarkwidget.apk
rm /system/app/htcbookmarkwidget.odex
rm /system/app/htccalendarwidgets.apk
rm /system/app/htccalendarwidgets.odex
rm /system/app/htccontactwidgets.apk
rm /system/app/htccontactwidgets.odex
rm /system/app/htcmailwidgets.apk
rm /system/app/htcmailwidgets.odex
rm /system/app/htcmsgwidgets.apk
rm /system/app/htcmsgwidgets.odex
rm /system/app/htcsearchwidgets.apk
rm /system/app/htcsearchwidgets.odex
rm /system/app/htcsettingwidgets.apk
rm /system/app/htcsettingwidgets.odex
But backup to /sdcard before removing...
Or at least run backup.sh in recovery
I did it few days ago and got some speed and battery improvement...

Thanks I managed to remove them. It's wierd when I used mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system before the comands wouldnt work.
Blackdragon_860 There is a tutotrial on the forum how to sign update.zip.

lgstoian said:
I've been trying to permanently remove all the htc apps and widgets but I've been getting "directory not empty" error when I use :
Code:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
rm /system/app/Rosie.apk
rm /system/app/Rosie.odex
rm /system/app/htcbookmarkwidget.apk
rm /system/app/htcbookmarkwidget.odex
rm /system/app/htccalendarwidgets.apk
rm /system/app/htccalendarwidgets.odex
rm /system/app/htccontactwidgets.apk
rm /system/app/htccontactwidgets.odex
rm /system/app/htcmailwidgets.apk
rm /system/app/htcmailwidgets.odex
rm /system/app/htcmsgwidgets.apk
rm /system/app/htcmsgwidgets.odex
rm /system/app/htcsearchwidgets.apk
rm /system/app/htcsearchwidgets.odex
rm /system/app/htcsettingwidgets.apk
rm /system/app/htcsettingwidgets.odex
Would it be possible to use the update.zip for Hero from MoDaCo.
Ok so I tested the hero zip and I get these errors :
No signature (4 files)
Verification failed.
I signed the update.zip with test keys.
Click to expand...
Click to collapse
You cannot use a Hero ROM on the Tattoo.

The update.zip only contained a script to remove Rosie. It wasn't a hero rom.

lgstoian said:
I've been trying to permanently remove all the htc apps and widgets but I've been getting "directory not empty" error when I use :
Code:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
rm /system/app/Rosie.apk
rm /system/app/Rosie.odex
rm /system/app/htcbookmarkwidget.apk
rm /system/app/htcbookmarkwidget.odex
rm /system/app/htccalendarwidgets.apk
rm /system/app/htccalendarwidgets.odex
rm /system/app/htccontactwidgets.apk
rm /system/app/htccontactwidgets.odex
rm /system/app/htcmailwidgets.apk
rm /system/app/htcmailwidgets.odex
rm /system/app/htcmsgwidgets.apk
rm /system/app/htcmsgwidgets.odex
rm /system/app/htcsearchwidgets.apk
rm /system/app/htcsearchwidgets.odex
rm /system/app/htcsettingwidgets.apk
rm /system/app/htcsettingwidgets.odex
Would it be possible to use the update.zip for Hero from MoDaCo.
Ok so I tested the hero zip and I get these errors :
No signature (4 files)
Verification failed.
I signed the update.zip with test keys.
Click to expand...
Click to collapse
well done...but sence is more...
u used it... and
u need to add some more in that script m8 ...
'well.done
THX
Marsdroid

i continue having this problem:
"directory not empty"
i used the command: mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
but it doesent works.. i have su!

For me it worked without the mount comand on a freshly flashed rom and with mainfram3 custom boot.img. Before that I ran in the same problem as you did. I don't know exactly why it worked that time.

Worked for me too...
Goodbye sense ui...
Thank you for the commands...
Cheers

Removal Commands have been included in AzusaROM v1.0. Thanks for the commands! I've trimmed about 10MB or so from the ROM now.

I'm trying to remove some apk's from system but I can't !
Code:
# pwd
pwd
/system/app
# id
id
uid=0(root) gid=0(root) groups=1003(graphics),1004(input)
15(sdcard_rw),3001(net_bt_admin),3002(net_bt),3003(inet)
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# rm HtcFootprints.apk
rm HtcFootprints.apk
rm failed for HtcFootprints.apk, Directory not empty
I didn't flash custom boot yet but I DO have su
thanks

Odd...I didn't flash my Tattoo either and on mine it works...:/

was tired of this semi-su, so I flashed custom img and now it works
thanks anyway

Related

Adb issues

hi all
I'm trying to do the following on adb and am failing - any thoughts?
Code:
C:\Dev\Android\android-sdk-windows\tools>adb shell
# mount /system -o remount,rw
mount /system -o remount,rw
Usage: mount [-r] [-w] [-o options] [-t type] device directory
# rm /system/app/Maps.apk
rm /system/app/Maps.apk
rm failed for /system/app/Maps.apk, Read-only file system
#
eladkatz said:
hi all
I'm trying to do the following on adb and am failing - any thoughts?
Code:
C:\Dev\Android\android-sdk-windows\tools>adb shell
# mount /system -o remount,rw
mount /system -o remount,rw
Usage: mount [-r] [-w] [-o options] [-t type] device directory
# rm /system/app/Maps.apk
rm /system/app/Maps.apk
rm failed for /system/app/Maps.apk, Read-only file system
#
Click to expand...
Click to collapse
adb remount
adb shell rm /system/app/Maps.apk

Script Making

Tell me what I'm doing wrong here. I'm trying to make a script that will remove some apps whenever I flash a new rom. Here's what I thought would work:
Code:
mount -o remount,rw /dev/block/mtdblock3 /system
cd /system/app
rm com.amazon*.apk
rm Mail.apk
rm Development.apk
rm LatinIME.apk
To use it I type:
Code:
$ su
# sh /sdcard/apps.sh
and it just fails at every line. Any help would be appreciated.
On the first line try
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
or your could shortcut it by using
mount /system
Stupid question, but do you have the permissions set to allow root access?
I've done that a few times to realize what my "mistake" was.
well you could just make a script for your PC something along the lines of
Code:
@echo off
adb remount
adb shell rm /system/app/com.amazon*.apk
adb shell rm /system/app/Mail.apk
adb shell rm /system/app/Development.apk
adb shell rm /system/app/LatinIME.apk
adb shell reboot
and rename it to a .bat or .cmd file
jackslim said:
On the first line try
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
or your could shortcut it by using
mount /system
Click to expand...
Click to collapse
Ok so I did that and the script appears to be working. I'll test it when Cyanogen release another update with amazon... Adding the -t yaffs2, what exactly did that do?
The -t is a trigger saying that your going to specify what type of filesystem your mounting, yaffs2 is the type of filesystem

removing pre-installed apps

How can I remove some of the pre-installed apps? I don't use Peep or some others, but I can't figure out how to get rid of them.
I have an uninstaller app, I've gone to Manage Apps, I even used a file manager to find the apk file in /system/app. If I tell it to delete it says it does, but the file is still there.
How do I remove them?
If you are rooted:
cd c:\android-sdk-windows\tools
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/app
ls (This displays all apps on the phone.)
Do this to delete them.
rm NameOfApp.apk
rm NameOfApp.odex
names are case sensitive so look for any caps in the name of the app you want to remove.
I removed:
rm teeter.odex
rm Sprint_Nscar.apk
rm Sprint_Navigation.apk
rm HtcFootprintsWidget.odex
rm HtcFacebook.odex
rm IM.odex
rm HtcTwitter.apk
rm com.htc.StockWidget.odex
rm Flickr.odex
rm HtcRingtoneTrimmer.odex
rm Sprint_TV.apk
rm HtcFootprintsWidget.apk
rm Flickr.apk
rm com.htc.StockWidget.apk
rm Stock.odex
rm Facebook.apk
rm Sprint_TVWidget.apk
rm Sprint_NFL.apk
rm IM.apk
rm HtcFootprints.apk
rm teeter.apk
rm HtcFacebook.apk
rm Stock.apk
rm amazonmp3.apk
rm HtcFootprints.odex
rm com.htc.TwitterWidget.apk
rm HtcTwitter.odex
rm com.htc.TwitterWidget.odex
Thanks raz! That's exactly what I needed. I knew there had to be a way to get that stuff off of the phone. I will keep a couple of things, I do like the Sprint Football app. But ALL of the Twitter stuff is useless, and Nascar, and the stock stuff......etc.
I'd much rather have that space for something useful, like games.
This is a useful resource as well:
http://forum.xda-developers.com/showthread.php?t=581976
there's a lot of posts of what people removed and if it caused them problems or not

[Q] adb remount vs. mount -o rw,remount -t yaffs2 ...

So in several "how to remove apk" threads, I've seen 2 different ways to go about removing apks.
1)
Code:
adb remount
adb shell rm /system/app/blah.apk
2)
Code:
adb shell
$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# rm /system/app/blah.apk
My questions is, is there a difference between adb remount and mount -o rw,remount -t yaffs2blahblah?
The long command can be run on a terminal emulator on the phone so you can do other things without a computer.
Sent from my HERO200 using XDA App

[BRAINSTORM] Booting directly into recovery

For reference, these are my thoughts on the matter.
We have 3 ways to do this:
1. Get hold of SBL, change it and flash it
Currently impossible afaik.
2. Get an init.d bash script to reboot into recovery if key is pressed
Most likely possible taking these 2 assumptions into account:
a) Bash allows to detect a pressed key, something like this:
Code:
_key()
{
local kp
ESC=$'\e'
_KEY=
read -d '' -sn1 _KEY
case $_KEY in
"$ESC")
while read -d '' -sn1 -t1 kp
do
_KEY=$_KEY$kp
case $kp in
[a-zA-NP-Z~]) break;;
esac
done
;;
esac
printf -v "${1:-_KEY}" "%s" "$_KEY"
}
_key x
case $x in
$'\e[15~') reboot recovery ;;
esac
Replacing this key code for one of OB's.
But for this, we need assumption number 2:
b) Key codes mapping is the same for recoveries.
Now, while this is the method of the greatest chance to work, it is also fairly useless. Developers will often break the boot before the init.d scripts are ran. So, this code should be ran before. Hence, the third method.
3. Start a custom service in init.rc (@ ramdisk) that will detect pressed key
This would be the perfect solution as it can't be broken from kernel (zImage) or system changes. However, init.rc has its own programming language (android init language) and there's no way to run this kind of listener.
However, it is possible to run an external script located for example in /system/bin/. These can be both an executable compiled from c (higher chances of working) or a bash scripting like the aforementioned one (lower chances of working since android probably doesn't start a console on boot).
Code for this would be something like:
Code:
service exampleservice /system/bin/exampleservice
user exampleservice
group exampleservice
oneshot
So uh, am I missing anything?
Anyone has other ideas?
a lot of times i heared about pressing "G" and "Power" would boot into some kind of save mode... if thats true i guess its easyer to reprogramm that keycombo to do something else... so does that keycombo anything? i couldnt figure out^^
Sent from my LG-P970 using XDA App
Are others devices has the key combination code in SBL?
I wish I have enough knowledge about android system so i can help...
i04055 said:
Are others devices has the key combination code in SBL?
I wish I have enough knowledge about android system so i can help...
Click to expand...
Click to collapse
Yes there are devices heaving the key-combo in SBL if that answers your question. The "Samsung Galaxy S GT-I9000" e.g. has them there afaik. With that device it was possible flashing the SBL to add a "booting directly into recovery" key-combo...
So I don´t know why there should not be a solution to do the same to the OB but Noejn surely has good reason for telling its impossible.
But hey what about booting into recovery on every system startup and only boot into the system through the recovery? It´s a "quick & dirty" solution even if its possible but better than developing the way we do isn´t it? I´m not sure if its easier to change the startup that way than to add or modify a key-combo but maybe someone here does?
I'm sure (or hope..) someone can, but perhaps we should move this Thread to another part of the Forum so someone with the knowledge how to do this will read it.
d0n22 said:
But hey what about booting into recovery on every system startup and only boot into the system through the recovery? It´s a "quick & dirty" solution even if its possible but better than developing the way we do isn´t it? I´m not sure if its easier to change the startup that way than to add or modify a key-combo but maybe someone here does?
Click to expand...
Click to collapse
Yeah, i prefer that way if poosibble rather than nothing.
But if put it that way, when the phone get bootloop is it still posibbe to boot into recovery?
Sent from my LG-P970 using XDA App
This is how it's done on Xperia X8 phone.
The /system/bin/chargemon is usb-charge daemon that is being hijacked on boot (it's binary is replaced with this script)
Original chargemon is copied into "charger" to keep it's functionality.
Than "sleep 3" waits for any keypress, and checks the dump, if keys were pressed, it launches the recovery binary.
quite simple.
Code:
#!/system/bin/busybox sh
/system/bin/charger
cat /dev/input/event1 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck -o -f /data/local/tmp/xrecovery ]
then
rm -f /data/local/tmp/xrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
racht said:
This is how it's done on Xperia X8 phone.
The /system/bin/chargemon is usb-charge daemon that is being hijacked on boot (it's binary is replaced with this script)
Original chargemon is copied into "charger" to keep it's functionality.
Than "sleep 3" waits for any keypress, and checks the dump, if keys were pressed, it launches the recovery binary.
quite simple.
Code:
#!/system/bin/busybox sh
/system/bin/charger
cat /dev/input/event1 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck -o -f /data/local/tmp/xrecovery ]
then
rm -f /data/local/tmp/xrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
Click to expand...
Click to collapse
yeah ,from this we can see what is running before logo screen and we can mod that file
so.. is that mean we can boot to recovery mode same as x8?
racht said:
This is how it's done on Xperia X8 phone.
The /system/bin/chargemon is usb-charge daemon that is being hijacked on boot (it's binary is replaced with this script)
Original chargemon is copied into "charger" to keep it's functionality.
Than "sleep 3" waits for any keypress, and checks the dump, if keys were pressed, it launches the recovery binary.
quite simple.
Code:
#!/system/bin/busybox sh
/system/bin/charger
cat /dev/input/event1 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck -o -f /data/local/tmp/xrecovery ]
then
rm -f /data/local/tmp/xrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
Click to expand...
Click to collapse
soundes quite promising... have you tried it?
Can this be usefull?
http://forum.xda-developers.com/showthread.php?t=991276
Noejn have you abandoned us ? Or are u planning to take a look at this ? Would be nice if u get OB up and running
recovery
Hi,
has there been any success with booting into recovery mode?
BR,
J
logitec said:
Hi,
has there been any success with booting into recovery mode?
BR,
J
Click to expand...
Click to collapse
No,I try to boot directly into recovery through boot.img,but I get a big "error" form the LG Security Team!
Hijacking a daemon would work if Optimus Black had those binaries. I took a quick glance at a backup and I didn't see chargemon in /system/bin.
Besides, a xRecovery is limited as it's dependent on system files so a /format can't be done which isn't really that "comfy", especially when changing fs.
But yeah, better than nothing. Still, the method you described is only possible in Xperia phones, as far as I know.
I still say injecting a service on the init.rc is the way to go.
However, I can't test this now.
racht said:
This is how it's done on Xperia X8 phone.
The /system/bin/chargemon is usb-charge daemon that is being hijacked on boot (it's binary is replaced with this script)
Original chargemon is copied into "charger" to keep it's functionality.
Than "sleep 3" waits for any keypress, and checks the dump, if keys were pressed, it launches the recovery binary.
quite simple.
Code:
#!/system/bin/busybox sh
/system/bin/charger
cat /dev/input/event1 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck -o -f /data/local/tmp/xrecovery ]
then
rm -f /data/local/tmp/xrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
Click to expand...
Click to collapse
Good news, I'm getting close.
ok, thank you for everithing
Noejn said:
Good news, I'm getting close.
Click to expand...
Click to collapse
good news indeed^^ im working on it as well but im not feeling like getting close :-\ pls let me know what you did and how you did it as soon as its done... again thank you very much for your efforts!
Sent from my LG-P970 using XDA App
d0n22 said:
good news indeed^^ im working on it as well but im not feeling like getting close :-\ pls let me know what you did and how you did it as soon as its done... again thank you very much for your efforts!
Sent from my LG-P970 using XDA App
Click to expand...
Click to collapse
Well, I've succeed injecting the script on boot.
However, I'm getting some problems on the event0 > keycheck; I don't think at this time of boot /dev entries are up.
But I've already thought of a workaround and I'll test it tomorrow.
I´m thinking, if i compile kernel of ubuntu and install it in recovery partition, not possible then run ubuntu in native mode from sdcard with dualboot?

Categories

Resources