Script Making - G1 Q&A, Help & Troubleshooting

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

Related

***HELP***

HOW DO I LOAD A CUSTOM LAUNCHER?????CAN SOMEONE HELP ME PLZ
Jerzdre said:
HOW DO I LOAD A CUSTOM LAUNCHER?????CAN SOMEONE HELP ME PLZ
Click to expand...
Click to collapse
You can use adb: (enter after each line) Put Launcher.apk in C: 1st.
adb shell
rwsystem or mount -o rw,remount /dev/block/mtdblock3 /system
exit
adb push C:\Launcher.apk /system/app
or you can use terminal: (enter after each line) Make sure Launcher.apk is on the root of your sd card 1st
su
rwsystem or mount -o rw,remount /dev/block/mtdblock3 /system
rm system/app/Launcher.apk
cp sdcard/Launcher.apk /system/app
exit
exit
Hope this helped.
Exiting out will cause problems. A lot!
Rather than typing exit type reboot instead.

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

Installing service.jar

How do you do it? Just same as adb push? Or any special way? Don't wanna get stuck to bootloader again.....
Sent from my DROIDX using XDA App
I just do this
Code:
adb push services.jar /sdcard/
adb shell
su
mount -o rw,remount -t ext3 /dev/block/userdata /data
cp /sdcard/services.jar /system/framework/services.jar
mount -o ro,remount -t ext3 /dev/block/userdata /data
reboot

Categories

Resources