yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Captainkrtek:
Thanks! Added :)

Thanks, all goes to Adrynalyne
[Android Software Development] mudrock1000:
Thanks for the guide. Helped me pick out the stupid stupid mistakes I was making...so just a problem. I'm able to use fastboot easily but I seem to be unable to use ADB still on my windows 7. It says there are no devices and I'm dang well sure I have USB debugging on. Is it because Windows 7 is missing drivers for the nexus one or something else?
[Android Software Development] nir36:
wonderful guide. I would like to add it to the guides thread.
[Android Software Development] mm7490:
Really awesome work, thumbs up.

But we should also take a guide on installing adb with Ubuntu/Linux, which isn't a very difficult thing...
[Android Software Development] Captainkrtek:
If I got time tomorrow I could do that. I work primarily in Linux also
[Android Software Development] mustafa.aziz:
This is good but I have a problem, when I try to remove an .apk file from /system/app it fails and says 'rm failed, Directory not empty'

I have followed exact instructions many time but never succeeded :s any help!!

(I am runnging these commands in device mod)

when I am in recovery mod I get this prompt ~ # and I am not able to enter su mod. how to get rid of this??
[Android Software Development] shungun:
Well when the $ changes to # it means you have SU access :D
[Android Software Development] Khoral:
Please give us the exact command(s) you entered :)
[Android Software Development] mustafa.aziz:
Here are the commands I entered after adb shell;

su

mount -o rw,remount /dev/block/stl9 /system

rm /system/app/mytouchmusic-signed.apk

exact message returned is 'rm failed for mytouchmusic-signed.apk, Directory not empty'
[Android Software Development] shungun:
Ok i think you need to do a recursive force delete which should be rf but i am not too sure! could somebody please confirm/ correct this?
[Android Software Development] Khoral:
Well, I don't think so ^^ As he doesn't want to erase a whole directory, but only a file.

What surprises me the most is the returned message... You're trying to delete an apk, and it says it's a directory :/

Could you please give us the output of this :

su
mount -o rw,remount /dev/block/stl9 /system
ls -l /system/app/mytouch*

Perhaps you don't even need the su and mount lines, but I'm not sure about that, and that can't harm your system ^^
[Android Software Development] shungun:
I know he doesn't want to delete a whole directory, but since the apk isn't compressed perhaps android looks at is as a directory and not a file? i don't know since what was returned suggested that it was a directory i presumed it was a directory! :S
[Android Software Development] Captainkrtek:
rm -rf /blah/blah :)
[Android Software Development] mustafa.aziz:
here is your desired output:

sh-3.2# su

su

sh-3.2# mount -o rw,remount /dev/block/stl9 /system

mount -o rw,remount /dev/block/stl9 /system

sh-3.2# ls -l /system/app/mytouch*

ls -l /system/app/mytouch*

-rw-r--r-- root root 299838 2008-08-01 18:00 mytouchmusic-signed.apk

sh-3.2#
[Android Software Development] mustafa.aziz:
ok tried the following as well;

sh-3.2# mount -o rw,remount /dev/block/stl9 /system

mount -o rw,remount /dev/block/stl9 /system

sh-3.2# rm -rf /system/app/mytouchmusic-signed.apk

rm -rf /system/app/mytouchmusic-signed.apk

rm failed for -rf, Read-only file system

sh-3.2# rm /system/app/mytouchmusic-signed.apk

rm /system/app/mytouchmusic-signed.apk

rm failed for /system/app/mytouchmusic-signed.apk, Directory not empty
[Android Software Development] Khoral:
Ok, first of all, rm -rf is dangerous.

And if you have to delete a file (which is your case, as we can see with the "ls -l"), you should not use the "-r" option (meaning recursive, useful to delete a whole directory).

"-f" meaning "force", you'll understand that if you miss something, hit enter too early, or whatever you could imagine bad, well, you will cry ^^

About your problem, I don't know much about the mount command, but it is the one that fail. Anyone with more knowledge than me on this ? ^^

Edit : Can you try this ? (this won't harm by any means your system, it will only rename a file)

su
mount -o rw,remount /dev/block/stl9 /system
mv /system/app/mytouchmusic-signed.apk /system/app/mytouchmusic-signed.apk.ori

If this doesn't work, try to replace the last line with this :

bb mv /system/app/mytouchmusic-signed.apk /system/app/mytouchmusic-signed.apk.ori

And if this always doesn't work, try to replace last line with this one :

busybox mv /system/app/mytouchmusic-signed.apk /system/app/mytouchmusic-signed.apk.ori

And please give us all outputs :)
[Android Software Development] mustafa.aziz:
Non worked, below is the output;

sh-3.2# su

su

sh-3.2# mount -o rw,remount /dev/block/stl9 /system

mount -o rw,remount /dev/block/stl9 /system

sh-3.2# mv /system/app/mytouchmusic-signed.apk /system/app/mytouchmusic-signed.apk.ori

<uchmusic-signed.apk /system/app/mytouchmusic-signed.apk.ori

failed on '/system/app/mytouchmusic-signed.apk' - Directory not empty

sh-3.2# bb mv /system/app/mytouchmusic-signed.apk /system/app/mytouchmusic-signe

d.apk.ori

<ytouchmusic-signed.apk /system/app/mytouchmusic-signed.apk.ori

sh: bb: command not found

sh-3.2# busybox mv /system/app/mytouchmusic-signed.apk /system/app/mytouchmusic-

signed.apk.ori

<app/mytouchmusic-signed.apk /system/app/mytouchmusic-signed.apk.ori

mv: can't rename '/system/app/mytouchmusic-signed.apk': Directory not empty
[Android Software Development] Khoral:
Well, this "Directory not empty" thing is really strange, as your apk isn't a directory :/

One thing I was wondering, what OS are you running ?

And why, when you type "su", you seems to already be root ? (cause you already have the # command line)

Can you explain us from the start what you do ? (starting from the moment you plug your phone in your computer and it is detected with adb devices)
[Android Software Development] mustafa.aziz:
Am using WildpuzzleRom_2.2.1

Kernel: 2.6.32.21-g0f9e9b5

Yes my device is rooted and I type su precautionary.

What I do is, attach device with the USB cable and from CMD I type adb shell that’s where I get # prompt and I start typing the commands.

One more thing I run all these commands in device mod not in recovery.
[Android Software Development] Khoral:
Well, when typing adb shell, you should get $, not #.

# should come only after typing su (meaning "now, you're root"). That's what is surprising me.

Can you give us the output of this (in code tags please, it's easier to read ^^) :

adb shell
su
ls -l /system/app
[Android Software Development] Khoral:
Well, nothing strange here :/

To me it seems like the rm is made on /system/app and not /system/app/mytouchmusic-signed.apk, and that is the strange part.

Let's give it another try o/

su
rm /system/app/mytouchmusic-signed.apk

If it doesn't work with a "permission failed" or something like that, try this instead :

su
busybox rm /system/app/mytouchmusic-signed.apk
[Android Software Development] mustafa.aziz:
lol

tried both of them and got the same Directory not empty error :p

confirm one thing, I am working in device mod not in Recovery. When I try adb in recovery I get ~# prompt. what does ~# means?
[Android Software Development] Khoral:
~ means you're in your home directory.

# means you're root.

If you weren't root and in home dir, you would get ~$ instead of ~#.

And what do you call "device mod" ?
[Android Software Development] {davros}:
creepy how easy this is to pull say framework off the phone
[Android Software Development] mustafa.aziz:
I get this when I am in Phone mod (normal boot):

adb devices
List of devices attached
HT077PY00893 device
& prompt sh-3.2#
sh-3.2# ls /system/app
ls /system/app
teeter.apk
restartapp.apk
htcsettingwidgets.apk
htcmsgwidgets.apk
htcmailwidgets.apk
htccontactwidgets.apk
htccalendarwidgets.apk
htcbookmarkwidget.apk
com.htc.WeatherWidget.apk
com.htc.TwitterWidget.apk
com.htc.StockWidget.apk
com.htc.NewsReaderWidget.apk
com.htc.MusicWidget.apk
com.htc.FriendStreamWidget.apk
com.htc.FMRadioWidget.apk
chrometophone.apk
YouTube.apk
WorldClock.apk
WifiRouter.apk
WidgetDownloadManager.apk
WeatherSyncProvider.apk
WeatherProvider.apk
WeatherAgentService.apk
Weather.apk
VpnServices.apk
Vending.apk
UserDictionaryProvider.apk
UploadProvider.apk
UpgradeSetup.apk
Updater.apk
TtsService.apk
TransferData.apk
TelephonyProvider.apk
Talk.apk
Superuser.apk
Street.apk
Stock.apk
Stk.apk
SocialNetworkProvider.apk
SetupWizard.apk
SettingsProvider.apk
Settings.apk
Rosie.apk
RSS.apk
QxdmLog.apk
Quickoffice.apk
QuickLookup.apk
PluginManager.apk
PicoTts.apk
Phone.apk
PackageInstaller.apk
PCSCII.apk
NewsReader.apk
NetworkLocation.apk
Mms.apk
MediaUploader.apk
MediaProvider.apk
MarketUpdater.apk
Maps.apk
Mail.apk
LiveWallpapersPicker.apk
LatinImeTutorial.apk
Jbed.apk
HtcWeatherWallpaper.apk
HtcTwitter.apk
HtcSyncwidget.apk
HtcStreamPlayer.apk
HtcSoundRecorder.apk
HtcSettingsProvider.apk
HtcRingtoneWidget.apk
HtcRingtoneTrimmer.apk
HtcProfilesWidget.apk
HtcPhotoWidget.apk
HtcMusic.apk
HtcMessageUploader.apk
HtcLockScreen.apk
HtcLocationService.apk
HtcLocationPicker.apk
HtcFootprintsWidget.apk
HtcFootprints.apk
HtcFacebook.apk
HtcFMRadio.apk
HtcDialer.apk
HtcCopyright.apk
HtcContacts.apk
HtcClockWidget.apk
HtcCalculatorWidget.apk
HtcAddProgramWidget.apk
HTMLViewer.apk
HTC_IME.apk
HTCSetupWizard.apk
HTCCamera.apk
HTCAlbum.apk
GoogleServicesFramework.apk
GoogleQuickSearchBox.apk
GooglePartnerSetup.apk
GoogleFeedback.apk
GoogleContactsSyncAdapter.apk
GoogleCalendarSyncAdapter.apk
Gmail.apk
GSD.apk
FriendStream.apk
Flickr.apk
Flashlight.apk
FlashPlayer.apk
FlashLitePlugin.apk
FilePicker.apk
FieldTest.apk
DrmProvider.apk
DownloadProvider.apk
DefaultContainerService.apk
DebugTool.apk
DCSUtility.apk
DCSStock.apk
DCSImpl.apk
CustomizationSetup.apk
CustomizationSettingsProvider.apk
ContactsProvider.apk
Clicker.apk
CheckinProvider.apk
CertInstaller.apk
CalendarProvider.apk
Calendar.apk
Calculator.apk
Browser.apk
BrcmBluetoothServices.apk
Bluetooth.apk
ApplicationsProvider.apk
AppSharing.apk
AdobeReader.apk
AccountSyncManager.apk

In recovery mod (restart in recovery) I run same commands and get:

adb devices
List of devices attached
HT077PY00893 recovery

adb shell
~ #

~ #

~ # ls /system/app
ls /system/app
ls: /system/app: No such file or directory
~ # ls
ls
cache etc res sdcard
data init root sys
default.prop init.rc sbin system
dev proc sd-ext tmp
~ #

what am I doing wrong in recovery where I dont get to see the .apk files??
[Android Software Development] Khoral:
Seems like HTC phones are responding differently from Samsung's :/

In the first part, you never entered "adb shell". Is that an omission or did you really not enter it ? If it's the second, where do you enter commands from ? xD (btw, you didn't answer me about the OS you're running, is it Windows ?)

In the second one, you get something "normal". As you didn't do "su" (and still you get the # prompt, strange thing), you aren't allowed to "ls" /system and it's subdirectories :)

But either way should work the same, so that's not a normal behaviour. I would ask about it to your ROM's cook, maybe he did something to have this happening.

Or it can be a HTC thing, as I never touched Android on HTC I can't say :/
[Android Software Development] mustafa.aziz:
I am using windows and from cmd I run adb shell.. when I enter adb shell I get # so at times I write su and at times I don’t (because it never makes a difference).

Yes the second case is normal but why am I not allowed to ls /system/app?

I know one thing for sure that it ant HTC thing. I have been running commands in recovery mod previously but since I installed Cyanogen mod I am unable to execute complete commands in recovery. I changed the ROM but all in vain.

BTW thanks for your help Khoral, I will wait for other people to respond to my issue :)
[Android Software Development] mustafa.aziz:
Finally I am able to delete mytouchmusci-signed.apk :)

Here is what I did, just in case someone else falls in same situation.

Unplug USB cable

Shutdown device

Boot to recovery by pressing down the volume key and power button simultaneously

Go to partiotions menu and mount /system

that is it, you are now good to delete any file you want :) (Precaution do not delete the ones linked with other files or you may have to reinstall you ROM)

You must also remount /system by typing following commands in order to get write access;

mount -o rw,remount /dev/block/stl9 /system

Now rm any file you don’t need :D

Thanks XDA I found the solution from the forum :p
[Android Software Development] cabletech28:
i can't get the files to download it's giving me a 500 error
[Android Software Development] agentJBM:
I can't use any of the links to your pdf files. I keep getting the following errors. Do I need to gain permission somewhere to view these files?

500 Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, support@ipage-inc.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
[Android Software Development] Captainkrtek:
Ill check it out, sorry for the inconvenience
[Android Software Development] Captainkrtek:
The PDF's appear to be working now :)
[Android Software Development] wmiphranum:
SGS got bricked

Hi, my SGS got bricked and only has this message each time I try to install a firmware to fix it:

E: Can't mount /dev/block/mmcblk0p1

(no such file or directory)

E: copy_dbdata_media. Can't Mount SDCARD

Your storage is not prepared yet.Please use UI menu for format and reboot actions.

Is there a way I can go around this with adb?

Thanks in advance.
[Android Software Development] Captainkrtek:
I dont believe ADB could help you here more likely to use ODIN to repair that :/ Best of luck!
[Android Software Development] Khoral:
Maybe it can, but it's a bet.

On IRC, we saw that someone with an access to busybox can execute mke2fs, and then format /dev/block/mmcblk0p1 and mount it correctly again.

But you need to have an access to busybox to do that, and I don't think it's a 100% win.
[Android Software Development] lch78:
great tutorial

Great tutorial for adb....
[Android Software Development] jimbo77:
This is really helpfull especially for some of us who are not Developers... I'm already working on my first .sh script :D

Thanks Again!
[Android Software Development] joebob2000:
Anyone have any tips on how to get ADB to use the right control characters? I get a lot of weird chars when doing things like ls -al or trying to use vi... Lots of little arrows and semicolons and crap. I assume its a change in the way control chars got sent, it worked fine for me with a stock rooted phone, but now I am on the super clean DJ05 .9 and its all jacked up.

~←[1;1H←[24;1H←[0K- /init.smdkc110.rc 1/16 6%←[1;1Hvi /init.smdkc110.rc^C
[Android Software Development] HateSoul:
Help!

I know i am walking into a mine field here,and i am literally clueless so i would appreciate any help. i am trying to do this..

mkdir /tmp/boot
mount -t yaffs2 /dev/block/mtdblock0 /tmp/boot
After that, you can replace the zImage initrd that's located in /tmp/boot
When you're done, you have to unmount the boot partition, like so:
umount /tmp/boot
Restart your device to use the new kernel initrd.

but i got the read only system error when tried 'mkdir' and tried this from first post

mount -o rw,remount /dev/block/stl9 /system

but still i couldn't create a directory still i get read only system error. <---Help needed here

so i improvised,instead of mkdir /tmp i replaced it with mkdir /system/tmp <---would that be the same?

and it worked,but when i tried to replace the initrd.gz that i found in the folder i mounted i got error "no space left on device" <---BIG help needed here.

I do apologize if this might sound unrelated to the topic,but i truly believe it's related and i just want to know more about these errors in ADB and how to fix them or work around them.
[Android Software Development] Captainkrtek:
Try doing

mount -o rw,remount /dev/block/stl9 /tmp

as you dont want to mount the /system you want to mount /tmp :)
[Android Software Development] Khoral:
Well, if he does that, it will map /tmp to /dev/block/stl9 instead of /system.

Won't change the error if i'm correct :/
[Android Software Development] Captainkrtek:
hmm I guess so :/
[Android Software Development] takkun1946:
Can you try ls -l right after you login using adb shell? Would like to see the permissions on the /tmp dir. I was able to mkdir /tmp/boot with no issues (Moto Milestone)
[Android Software Development] takkun1946:
This isn't always the case. If you run adb root, it will start adb with su already started. Followed w/ adb shell, the user should see # to begin with.
[Android Software Development] Khoral:
Right. That's because I never use adb root, always adb shell ^^ So I missed this detail :D
[Android Software Development] rajasyaitan:
Excellent guide here my friend. Will definitely helps a lot of people, myself included.
[Android Software Development] hdpham83:
So when I try to install the usb drivers, I get to the step where I browse to the installation folder and after selecting it, I get this message "Windows has determined the driver software for your device is up to date."

Help?

Running windows vista and I have rooted cdma hero.
[Android Software Development] agentJBM:
What's the problem? Newer windows has them. Go into device manager find Sony Ericsson and below that should say usb adb interface or something like that. Means you didn't need that step. You should be ready to adb, as long as you set up path to platform-tools
[Android Software Development] blaksheep:
This guide is excellent. Thanks much for it!
[Android Software Development] Captainkrtek:
No problem!
[Android Software Development] CTR01:
Thanks!

Glad i found this and got help from Captainkrtek! Been practicing the adb by overclocking and disable stock apps : )
[Android Software Development] Rivertamer:
Thanks to you and Adrynalyne...this is great for us noobs.....trying to learn everything I can about this stuff.....Thanks a bunch!!
[Android Software Development] jukyO:
Hello,

would like to have ADB ability on my Ubuntu machine.

Can this howto:

How To Install The Android Sdk and Adb and Fastboot in Linux

from Nexus One subforum be applicable for all HTC's android based phones?

Thanks in advance,

jukyO

EDIT:

Found it!:

Lazyman's installation guide to ADB on Ubuntu 10.10

So mods, maybe you can add this part to the first post as Ubuntu/Linux specific ADB installation, since original one is for Windows only.
[Android Software Development] binocularface:
Hi,

I have followed the instructions (running Windows 7 6f bit & HTC Desire HD). However when I try to use adb I get the following error:

The term 'adb' is not recognized as the name of a cmdlet g of the name, or if a path was included, verify that th At line:1 char:4 + adb <<<< shell + CategoryInfo : ObjectNotFound: (adb:Strin + FullyQualifiedErrorId : CommandNotFoundException

I have tried updating the USB drivers as per the instruction, but it informs me I am running the best driver.

Any advice appreciated!

Regards

B
[Android Software Development] Kickface:
If you're not comfortable with installing ADB, then you can grab a portable version of the ADB shell here. Works straight out of the box. The download is also considerably smaller.

It only works for Windows machines at the moment. I am however working on a Linux version and waiting on someone else to finish off a Macintosh port.
[Android Software Development] hmdknight:
This is exactly what I needed. nice work
[Android Software Development] carhauler1969:
Thanks to this guide I now have ADB fully functional on my laptop after many failed attempts at getting it running! :cool: The key was editing the PATH in Windows System Variables, something the other guides I've read leave out. Thanks so much!!! :D :D :D :D :D
[Android Software Development] mcimo88:
Thanks for the great guide! Full of information.
[Android Software Development] aat455:
excellent guide for noobs like me :) thanks...
[Android Software Development] distan7:
Hi,

This is a very valuable thread for the like of me who just started learning Android.

From my experience, you don't need JDK nor Android SDK if you only want to run ADB on Windows. Just make sure that any driver needed (USB Driver) is installed. Then you can use ADB files from SuperOneClick package. There should be 3 or something files beginning with adb (you can ignore adblinux and adbmac). Copy these three files into C:\Windows\System32 then you're all set to go, no need to add paths whatsoever.

CMIIW.
[Android Software Development] abofihmi:
Permission denied in adb shell

:confused:confused::confused::confused:Hello,

I followed the instruction carefully but when i typed adb shell i got $, when i typeds su it gives me access denied and NO PROMPT IN THE PHONE.

I have USB debugging enabled.

I am connecting to MyToch 4G(Glacia) with the latest stock ROM 2.3.4

Please help.
[Android Software Development] jukyO:
From recovery or normal boot? If in recovery, I would say it is normal. In normal boot environment, you should be able to do it.

Of course, you will not get prompt in the phone if you are using ADB. You are working on the phone from PC terminal.
[Android Software Development] abofihmi:
I am in normal mode and that what the instruction said???
[Android Software Development] abofihmi:
If i boot from recovery mode, the pc cannot find the phone so the only way i know is normal mode and here whem I am getting access denied.
[Android Software Development] jukyO:
Don't know mate, for me its working well. But I have HTC Desire, rooted and S-OFFed:

$ adb shell
su (return/enter)
bash (return/enter)
bash-3.2#
[Android Software Development] 3rdstring:
I would check out the Superuser app & verify it's not denied without prompting & also check the logs to verify it is seeing the requests.
[Android Software Development] abofihmi:
I am not sure if I have superuser installed on my phone by default, can i nstalle it before rooting my phone?

Edit: I just installed superuser and made sure to set the notification correctly, still no luck
[Android Software Development] prboy1969:
Thank you. Great guide :)
[Android Software Development] Blackberrynomore:
Is there a new location to download the PDF files that went with this tutorial originally?? The original links no longer work?
[Android Software Development] GReddySetGO:
Is there a new link to the ADB download? The Sun/Oracle link has changed...
[Android Software Development] angusc:
Try this Thread:

http://xdaforums.com/showthread.php?t=1241935
[Android Software Development] GReddySetGO:
Thank you!
[Android Software Development] crz6662:
Nice guide. Always had issue setting up adb correctly. Thx.
[Android Software Development] punisher2008:
Wish I had this tutorial about a year ago when I started learning all of this, took me hours to do it when I first started just put adb onto my laptop so I can do everything at school now :)

btw in the OP the links for the PDFs to Adrynalyne website(I think its for his website) are coming up with inquiring about the domain name. Also the link for the Java JDK didnt come up with anything just saying that they changed so I just used this link which is what I believe what was suppose to be

Link for Java JDK: http://www.oracle.com/technetwork/java/javase/downloads/index.html
[Android Software Development] dalawh:
It would be nice if you organized it more and color coded it. It's a pain to read when its just straight up text, especially long ones. Thanks for this anyways.
[Android Software Development] Android_Guy:
These PDFs are gone
[Android Software Development] darkmantra:
Could someone reup the pdf.
[Android Software Development] {davros}:
Has anyone seen this?

Installing sdk, stoppping adb server error (code -1)

Then when it goes to restart adb I get

Adb server error code 255