how to create batch files? - G1 Q&A, Help & Troubleshooting

Hi all,
I just did a cyanogenmod update, and obviously it has removed my custom AZERTY keyboard layout.
not that it is difficult to redo, but it is just something like twelve/fifteen lines of command to type...
is there any way of doing a batch file that would do the copy i am looking for?
thanks for your help,
Allan.

DJ_Spray said:
Hi all,
I just did a cyanogenmod update, and obviously it has removed my custom AZERTY keyboard layout.
not that it is difficult to redo, but it is just something like twelve/fifteen lines of command to type...
is there any way of doing a batch file that would do the copy i am looking for?
thanks for your help,
Allan.
Click to expand...
Click to collapse
Yes. Google is the answer to all of your questions.

DJ_Spray said:
is there any way of doing a batch file that would do the copy i am looking for?
Click to expand...
Click to collapse
Type everything you would normally type at the cmd prompt into a text file and rename it with a .bat extension? I'm not sure if that's what you want, but that's the basic gist of it.
Note: bat files can't interact with the adb interactive shell, so you'll have to preface every command you do in adb with "adb shell "

Oh and use notepad++, trust me it helps alot

thanks for the google search proposal.......
what you tell me is using my computer, but the whole idea is to do it directly on the phone. I'm not really sure if .bat files will work under android....

adb shell is the same thing as running it on your phone. if you don't have adb then use gscripts and make one for it

david1171 said:
adb shell is the same thing as running it on your phone. if you don't have adb then use gscripts and make one for it
Click to expand...
Click to collapse
I know adb shell is the same...
anyway, found out that typing from a terminal bash mybatch.bat would run what's in it, sounds like exactly what I was asking for......

DJ_Spray said:
I know adb shell is the same...
anyway, found out that typing from a terminal bash mybatch.bat would run what's in it, sounds like exactly what I was asking for......
Click to expand...
Click to collapse
sorry i really didn't interpret your previous comment the right way. glad you got it to work though

Related

[SOLVED] /BIN (android g1 JF1.50)

What directory should I put command line programs in because I cant find a /BIN folder.
(very newb but attempting to become dangerous with a little knowledge)
purg said:
What directory should I put command line programs in because I cant find a /BIN folder.
(very newb but attempting to become dangerous with a little knowledge)
Click to expand...
Click to collapse
Are you asking what program would you type the command line in?
nope ive complied a program just need a locaiton for it!
In docs it suggests /BIN but this doesnt seem to exist in my G1
its system/bin
supremeteam256 said:
its system/bin
Click to expand...
Click to collapse
Thanks,
one more step towards becoming knowledgeable

Footprints and Voice Dialer

I have noticed that a lot of roms have voice dialer and footprints removed. I, one of the few, actually use them.. and was wondering if anyone has these files laying around.
I know how to push files (I think), but is that basically all you have to do? Just push the right files into system/apps or whatever?
Nobody eh? Nuts!
Wow thanks. Will give it a shot later today!
edit: link is broken
Seems to work now. Thanks man!
So do you just push all these files to the apps directory?
I pushed the voice search and dialer apks to the app_s dir, didnt try footprints as i already have it installed... but yeah its contained in the same dir, so give it a shot, back up your stuff in case something goes awry
Well I installed voice diaaler and it somewhat works. Recognizes what I say but force closes when I select a number to call.
Footprints won't even install lol.. via adb or through file manager. Oh well, hopefully they get included in other Roms
I dont have that issue, my voice search and dialer work just fine. These were the commands i used
adb remount
adb push<insert file name> /data/app_s
adb shell reboot
Click to expand...
Click to collapse
origins81 said:
I dont have that issue, my voice search and dialer work just fine. These were the commands i used
Click to expand...
Click to collapse
Hmm different commands then what I used. Where are your files located when you push them? Tools directory?
Correct sir, they're in the SDK tools dir
Here's the string I used
adb remount
adb push VoiceDialer.apk /data/app_s
adb push VoiceSearch.apk /data/app_s
adb shell reboot
Click to expand...
Click to collapse
What commands did you use?
On a side note, this place here is a great resource tool to learn from. Check it out when you get a chance
http://developer.android.com/guide/developing/tools/adb.html
origins81 said:
Correct sir, they're in the SDK tools dir
Here's the string I used
What commands did you use?
Click to expand...
Click to collapse
1. adb push VoiceDialer.apk /data/local/tmp
2. adb shell pm install /data/local/tmp/VoiceDialer.apk
3. adb shell rm /data/local/tmp/VoiceDialer.apk
I ran your commands and voice dialer installed. Will test it a bit.
Tried the same thing wtih footprints but for some reason that didn't get installed. i had to use file manager to go to system/apps and try and install it from there, then it just said can't be installed on this phone.
I am not sure what to do with the odex files. i thought they were created by system when the app is installed or system is updated.. don't really know what to do with them.
origins81 said:
I'm using bcrook's qteknology's hero v1.3b rom port, it's got footprints installed but no voice dialer and search so i just pushed them, also I extracted the footprints apk and odex files. Hope it helps...
Weird...it wont let me attach the zip files...
Click to expand...
Click to collapse
is it work on CM ROM ?
wg1 said:
is it work on CM ROM ?
Click to expand...
Click to collapse
What are you trying to install?
I was just looking for voice dialer!
Thanks for the upload!

nexus one system png files

hi, i just tried to open a nexus one image to extract all the png files, but failed. does anyone know how or where to get all these files, like banners, battery meters etc.?
thanks in advance!
They are in /system/framework/framework-res.apk. If you adb pull that file onto your PC you should be able to unzip it to get the pngs.
alright, thanks. i'll try this at home - i just dl adb but dont know how to use it. when i doubleclick adb.exe the windows opens and shuts very quickly, probably because i dont have admin rights here.
Alternatively, you could install a file manager like Astro that lets you browse the system folders and just email it to yourself from there. I've done that with a few of the files just because it's convenient and I don't have to dig out the USB cable.
woelv said:
alright, thanks. i'll try this at home - i just dl adb but dont know how to use it. when i doubleclick adb.exe the windows opens and shuts very quickly, probably because i dont have admin rights here.
Click to expand...
Click to collapse
adb is a command line app. Anyway Mike's suggestion of using Astro is an easier way.
my problem is the adb window wont stay open, so i have no chance to write a command line. i need all the files for themeing, so Astro seems inappropriate to me.
The Astro method should work. If you browse to /system/framework with it you should see the framework-res.apk. Long press on it and tap send. It should attach it to a new email which you can send to yourself. You can then unzip it with a program like 7-zip.
This will be easier than using adb as you will need to install the adb usb drivers, connect the phone to your PC and use a DOS prompt.
go start menu for xp and click run and type CMD and you'll get your command line. vista or 7 go to start and right above it type CMD. theres a little more to but that will get you your command line
woelv said:
my problem is the adb window wont stay open, so i have no chance to write a command line. i need all the files for themeing, so Astro seems inappropriate to me.
Click to expand...
Click to collapse
So run it like every other command line app. From the command line. (terminal, console, cmd, etc...)
craz6r said:
go start menu for xp and click run and type CMD and you'll get your command line. vista or 7 go to start and right above it type CMD. theres a little more to but that will get you your command line
Click to expand...
Click to collapse
Clarkster said:
So run it like every other command line app. From the command line. (terminal, console, cmd, etc...)
Click to expand...
Click to collapse
So I am pretty sure if the OP hasn't figured this out over six months later, they have either given up, or figured it out.
Good job bringing things back from the dead.

[SOLVED] Simple SDK question (Linux)

I recently switched to Ubuntu, and I can't figure out how to set up the SDK in linux, ^^' (at least adb, I need to push some files) could somebody help me out here?
EDIT: It's much simpler than I thought, I got some help from the guys at #hero-cdma on irc.bikcmp.com
<Obelisk79> download it, unzip it to your home folder
<Obelisk79> then you can run terminal and cd to the sdk/tools folder and run ./adb
Click to expand...
Click to collapse
Now to figure out how to rename the thread XD (I'm new, obviously)
edit in advanced mode

How to push files via adb?

Can someone please point me to a place that explains how to push files via adb? I have Android SDK installed and I know how to do a screen shot using Dalvik Debug Monitor using the ddms.bat file. But other than that, I don't know what I am doing. lol Also, I am not rooted.
I know it can't be that difficult, any help is appreciated! Thanks!
Holy crap, apparently I pushed a new bootanimation via adb and really had no idea what I was doing. lol
So I guess my question is different now.
First, I put the bootanimation.zip file in the platform-tools folder.
Then I launched a CMD prompt and then I went into my Android/Android-SDK\platform-tools\
then I typed in "adb push bootanimation.zip /data/local" and I wasn't even sure it did anything.
So my question now is what made it push the bootanimation file to my xoom? Did it have something to do with the file being in the platform-tools folder, along with the adb.exe file?
I don't really get the question... It pushed the file to the Xoom because you told it to. A better question might be why it did not push the file during your previous attempts, but I cannot answer that without knowing what you tried. Anyways, I just wanted to chime in that since you are already familiar with DDMS, right under the screenshot option is a file explorer that you can use to push files.
edit: actually, I think it may not be possible to push to subfolders in /data using ddms since it cannot see them
sangreal06 said:
I don't really get the question... It pushed the file to the Xoom because you told it to. A better question might be why it did not push the file during your previous attempts, but I cannot answer that without knowing what you tried. Anyways, I just wanted to chime in that since you are already familiar with DDMS, right under the screenshot option is a file explorer that you can use to push files.
edit: actually, I think it may not be possible to push to subfolders in /data using ddms since it cannot see them
Click to expand...
Click to collapse
Yea, I didn't do it in ddms because I did not see the local folder. I did it through the CMD prompt. But my question is how does it know where to push the files by just typing "adb push bootanimation.zip /data/local"? No where in that does it say push it to the xoom. When using adb, does it automatically try to push the file to whatever Android is plugged up? How does it know where and what to push it on? That was my question.
Best place I've found to start is http://developer.android.com/guide/developing/tools/adb.html which gives an overview along with some good details on some of the subcommands. Beyond that, use your favorite search engine.
To answer your question more directly, though, if only one Android device is connected, ADB can figure out how to talk with it. With two or more you'll need to specify the device (which you can get from "adb devices").
HTH
short/y said:
Best place I've found to start is http://developer.android.com/guide/developing/tools/adb.html which gives an overview along with some good details on some of the subcommands. Beyond that, use your favorite search engine.
To answer your question more directly, though, if only one Android device is connected, ADB can figure out how to talk with it. With two or more you'll need to specify the device (which you can get from "adb devices").
HTH
Click to expand...
Click to collapse
Ahh.. cool. I did google it to see what came up and learned a little but nothing ever explained how adb knew what or where to push the file.
But just knowing that it does know, then the rest is pretty easy to figure out. I can follow and type commands well... even though I might not know what they do (which is scary, huh?). lol
Edit: Thanks for the link also.
I got this from XDA somewhere so credit to them:
A:android-sdk-windows installed
B: (on your phone) go to menu>settings>applications>developement and make sure usb debugging is checked.
C: the file you are pushing must be placed in the tools folder of adb so if you are pushing file "build.prop.txt" this needs to be downloaded/copy and pasted in C:\android-sdk-windows\tools
1: go to run and type cmd (or just open your command prompt)
2: cd C:\android-sdk-windows\tools
3: adb remount
4: adb devices *if everything is set up right this should output a serial number*
5: adb push FFFFFFF.FFF /#####/###### *i hope my notes help here you need to put the file name in for the F(s) and in the pound signs you put the destination on the devices example adb push build.prop.txt /system/bin
6. repeat step 3 for multiple files
7. adb reboot this is how you finish

Categories

Resources