[TinyTut] - Removing Apps(*.apk-Files) from the Emulator

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

[TinyTut] - Removing Apps(*.apk-Files) from the Emulator

Postby plusminus » Thu Nov 22, 2007 3:26 pm

TinyTut] - Removing Apps(*.apk-Files) from the Emulator


What you learn: You will learn how delete Applications (their *.apk-Files) from the Emulator

Difficulty: 1 of 5 :roll:

Description:
Google itself got a pretty short explanation on removing *.apk-Files, but I've got sth. for you:

In the SDK's main directory (i.e. "C:/Programming/Android/SDK") there is the folder called "tools" --> Get into that folder. You need to start a console terminal/shell ("Start -> Run... -> type 'cmd'" for Windows PCs). Type-in sth. like the following command:
Code: Select all
adb shell rm data/app/{myFile.apk}

For example if you want to uninstall "HelloAndroid.apk" you should type this:
Code: Select all
adb shell rm data/app/HelloAndroid.apk


Regards,
plusminus
Last edited by plusminus on Mon Dec 03, 2007 1:03 am, edited 2 times in total.
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Postby Lex » Thu Nov 22, 2007 3:39 pm

plusminus wrote:Hello Lex,

removing your Project from Eclipse is the wrong way.

Google itself got a pretty short explanation on removing *.apk-Files, but I've got sth. for you:

In the SDK's main directory (i.e. "C:/Programming/Android/SDK") there is the folder called "tools". You need to start a console terminal/shell ("Start -> Run... -> type 'cmd'" for Windows PCs). Type-in sth. like the following command:
adb shell rm data/app/{myFile.apk}
For example if you want to uninstall "HelloAndroid.apk" you should type this:
adb shell rm data/app/HelloAndroid.apk


@atr I don't think this is a problem with his source, but with the SDK/ADT.

Regards,
plusminus


Great, this works perferct ! Somehow now I don't have the update problem anymore. Maybe it was a due to a name collision. Anyway thx !
Last edited by Lex on Wed Dec 12, 2007 7:24 pm, edited 1 time in total.
Lex
Developer
Developer
 
Posts: 30
Joined: Fri Nov 16, 2007 11:03 pm

Postby plusminus » Thu Nov 22, 2007 3:41 pm

Lex wrote:Great, this works perferct ! Somehow now I don't have the update problem anymore. Maybe it was a due to a name collisionor something. Anyway thx !


No problem :)

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby martin_nuke » Sat Dec 08, 2007 7:51 am

My .apk is located at c:AndroidProjectsPreviewerbinPreviewer.apk

I typed this command
adb shell ../AndroidProjects/Previewer/Previewer.apk

The result is
../AndroidProjects/Previewer/Previewer.apk: not found

What seems to be the problem?
martin_nuke
Junior Developer
Junior Developer
 
Posts: 15
Joined: Sat Dec 08, 2007 7:44 am

Postby tum0rc0re » Sat Dec 08, 2007 8:31 am

martin_nuke wrote:My .apk is located at c:AndroidProjectsPreviewerbinPreviewer.apk

I typed this command
adb shell ../AndroidProjects/Previewer/Previewer.apk

The result is
../AndroidProjects/Previewer/Previewer.apk: not found

What seems to be the problem?


Hi, this command (adb shell rm data/app/{myFile.apk}) need for remote removing any package from emulator. And your path (c:AndroidProjectsPreviewerbinPreviewer.apk) is some path in your desktop computer. You simply can delete it, e.g. though context menu (Delete) or a key Del on keyboard :)
User avatar
tum0rc0re
Senior Developer
Senior Developer
 
Posts: 158
Joined: Sun Nov 25, 2007 7:15 am
Location: Moscow, Russia

Postby plusminus » Sat Dec 08, 2007 12:41 pm

Hello martin_nuke,

this topic is about removing *.apk from the emulator :!:

Did you want to install your file ON the emulator :?:

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Postby R4 » Wed Dec 19, 2007 7:53 am

Hello,

android_sdk_windows_m3-rc37a

What should I type if the apk file name contains spaces?
[EDIT] I got it... Put the name in single quotes.

Thanks

R4
Last edited by R4 on Wed Dec 19, 2007 8:06 am, edited 1 time in total.
R4
Freshman
Freshman
 
Posts: 3
Joined: Wed Dec 19, 2007 7:48 am

Postby tum0rc0re » Wed Dec 19, 2007 8:05 am

R4 wrote:Hello,

android_sdk_windows_m3-rc37a

What should I type if the apk file name contains spaces?

Thanks

R4


Then you have to enclose your apk filepath in quotes, e.g. adb shell rm "data/app/Hello Android.apk"
User avatar
tum0rc0re
Senior Developer
Senior Developer
 
Posts: 158
Joined: Sun Nov 25, 2007 7:15 am
Location: Moscow, Russia

Postby R4 » Wed Dec 19, 2007 8:08 am

Thanks TumOrcOre,

In XP double quotes didn't work... because it isn't really XP anymore! Single quotes did the job.

R4
R4
Freshman
Freshman
 
Posts: 3
Joined: Wed Dec 19, 2007 7:48 am

regarding .apk files in Data folder

Postby asifk1234 » Tue Nov 18, 2008 10:46 am

Hi +-,

I have run the filebrowser application , but in that root directory , Data folder is blank. But infact in Data folder, App folder should be seen and inside that all .apk files. Can you please tell me why it is blank? :?:
asifk1234
Freshman
Freshman
 
Posts: 5
Joined: Tue Nov 18, 2008 8:14 am

Postby x-files » Wed Nov 19, 2008 3:08 pm

How to remove apps from system/app dir

I try:

adb shell rm system/app/Launcher.apk

but completed with error

rm failed for system/app/Launcher.apk, Read only file system
x-files
Developer
Developer
 
Posts: 44
Joined: Fri Jan 11, 2008 10:27 am

Re: [TinyTut] - Removing Apps(*.apk-Files) from the Emulator

Postby HelloWorld » Mon Nov 22, 2010 9:25 am

I have the same problem: rm failed for ....apk, Read only file system.
User avatar
HelloWorld
Freshman
Freshman
 
Posts: 4
Joined: Wed Oct 20, 2010 10:22 am

Re: [TinyTut] - Removing Apps(*.apk-Files) from the Emulator

Postby HelloWorld » Mon Nov 22, 2010 9:46 am

Finally, I can remove .apk file from the emulator.
Open the terminal, go to ...tool directory, for example:
cd e:\android-sdk-windows\tools\
adb shell ls data/app
Remove your file, for example
adb shell rm data/app/com.androidcan.asudoku.apk
Check:
adb shell ls data/app
User avatar
HelloWorld
Freshman
Freshman
 
Posts: 4
Joined: Wed Oct 20, 2010 10:22 am

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 7 guests