Adb issues - G1 Q&A, Help & Troubleshooting

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

Related

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

Tattoo Rosie Remover.

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

Push to phone for n00b

I am trying to push the stock HTC clock widget to my phone. Here are my command lines...
/AndroidSDK/tools
adb shell
# adb remount
adb not found
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# adb push HtcClockWidget.apk /system/app/
adb not found
What am I doing wrong? Please help.
I can get into the system/app folder and run a list of my apps, but have been unable to push to the phone
pipefitter said:
I am trying to push the stock HTC clock widget to my phone. Here are my command lines...
/AndroidSDK/tools
adb shell
# adb remount
adb not found
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# adb push HtcClockWidget.apk /system/app/
adb not found
What am I doing wrong? Please help.
I can get into the system/app folder and run a list of my apps, but have been unable to push to the phone
Click to expand...
Click to collapse
You don't use adb commands inside the shell.
C:\AndroidSDK/tools> adb remount
C:\AndroidSDK/tools> adb push HtcClockWidget.apk /system/app/

Newb terminal command questions

What's the difference between these two (at least why they use the mount command, remount command, or shell command?)
su
mount -o remount,rw /dev/mtdblock3 /system
rm [whatever i want]
mount -o remount,ro /dev/mtdblock3 /system
and
adb remount
adb shell rm [whatever i want]
The first is a terminal command from the phone. (Only requires the phone)
The second is through adb to the phone. (Involves a properly configured adb, computer, usb cable, and phone)
evilkorn said:
The first is a terminal command from the phone. (Only requires the phone)
The second is through adb to the phone. (Involves a properly configured adb, computer, usb cable, and phone)
Click to expand...
Click to collapse
Wow, so people manage to type out all that craziness on the phone huh.
Thanks!
Anytime. Doubt they do that all the time, it would be easier to just make a script if you have to do that more than once. I just use root explorer, it has a button that mounts /system/ -rw.
I'm not sure about other terminals, but you can create aliases in Better Terminal Emulator
alias rw='mount -o remount,rw /dev/mtdblock3 /system'
alias ro='mount -o remount,ro /dev/mtdblock3 /system'
so now all you have to do is type rw or ro and it executes the full command. Or you can create scripts:
su
mount -o remount,rw /dev/mtdblock3 /system
cd /system/bin
echo "#! /system/bin/sh" | tee ro rw
echo "mount -o remount,rw /dev/mtdblock3 /system" >> rw
echo "mount -o remount,ro /dev/mtdblock3 /system" >> ro
chmod 755 rw ro
Same thing, except it executes the scripts instead of an alias.

[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

Categories

Resources