How can you install APKs from other ROMs? - EVO 4G Q&A, Help & Troubleshooting

I have looked around quite a bit, and haven't really figured out the straight answer on this.
I have seen apks that can be downloaded of things like the clock or gallery app, and then I have seen custom roms that include things like the AOSP dialer, contact app, browser, etc. However in my small amount of trying, I couldn't install them on top of another ROM (or stock).
Is there an issue with signing them, or does it have to be done in recovery mode, or do I have to remove the existing stuff in something like Titanium backup and then install the other APKs, or would my only option be to learn the dark arts of rom cooking?
Edit: Answered thanks to mrchu001. Doing an "adb remount" and then issuing the install command from the shell worked.

I'm not sure if this works for ALL apks between roms, but when i flashed Fresh it didn't have the cooliris 3d gallery that DC has, so i opened the zip, and copied the APK from one rom to the other then flashed it. I'm sure there are some programs that just won't work even if you did it this way, but something to consider.

That works in most cases..
Just get the zip on your computer, open it extract the apk you want and adb install it to your connected device.

No luck with either method mentioned above. I'm sure I don't know what I'm doing... but I did an adb install <apk name> and got an error:
Code:
MacBook: tools laydros$ adb install CarDock.apk
1344 KB/s (238640 bytes in 0.173s)
pkg: /data/local/tmp/CarDock.apk
Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION]
And I grabbed one of the base rooted roms, unzipped, added the CarDock and DeskClock apks to the system/app folder with everything else, and the ROM failed to load. I did the same clockwork rom manager install rom from SD card methods I have done before. I assume this means that the zip was not properly signed.
The apks I was testing were ones from bugless beast 0.4, any ideas?

laydros said:
No luck with either method mentioned above. I'm sure I don't know what I'm doing... but I did an adb install <apk name> and got an error:
Code:
MacBook: tools laydros$ adb install CarDock.apk
1344 KB/s (238640 bytes in 0.173s)
pkg: /data/local/tmp/CarDock.apk
Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION]
Click to expand...
Click to collapse
it looks like you didnt direct your terminal correctly. i'm assuming you have the sdk on your computer btw. now try to upload the rom you want on your phone. plug it in. make sure usb debugging is set. make sure the apks you want to put on your phone are on your desktop. and try this:
Code:
cd ~/*where every your sdk is*/tools
./adb remount
./adb shell
./adb install ~/desktop/*apk name* /system/app
./adb shell reboot

maybe you already tried but just incase.. do you have the Unknown sources check box "Checked" under "Settings/application" menu? if not you need to to install apps not from the market..

mrchu001 said:
it looks like you didnt direct your terminal correctly. i'm assuming you have the sdk on your computer btw. now try to upload the rom you want on your phone. plug it in. make sure usb debugging is set. make sure the apks you want to put on your phone are on your desktop. and try this:
Code:
cd ~/*where every your sdk is*/tools
./adb remount
./adb shell
./adb install ~/desktop/*apk name* /system/app
./adb shell reboot
Click to expand...
Click to collapse
The remount part did it, and then doing the install from adb shell. Thanks so much.
For the sake of anyone else that finds this, once you type adb shell, you are working from the phones shell instead of the one on your computer, so you would skip that command. I ended up moving the files to the sdcard, and then doing
Code:
cd ~/*where every your sdk is*/tools
./adb remount
./adb shell
(at this point you are at the phone's prompt)
install /sdcard/*apk name* /system/app
exit
(now you are back at the computer's prompt)
./adb shell reboot
Now I need to figure out what to install to get the phone/contacts working. Calendar and Mms applications were easy, but after installing several apks for the phone and contacts I just have a mess.

FroydVillain 1.0.0 install *.apk files in /system/app
Hi has anyone tried installing another apk file in FroydVillain 1.0. I follow the steps in the thread described i am able to issue adb shell commands and i have placed the apk files in the SD card as described. but i am getting an error as below that the file or dir is not found. tried several paths:
# install /mnt/sdcard/*.apk /system/app
install /mnt/sdcard/*.apk /system/app
install: can't stat '/mnt/sdcard/*.apk': No such file or directory
# install /sdcard/*.apk /system/app
install /sdcard/*.apk /system/app
install: can't stat '/sdcard/*.apk': No such file or directory
I use /mnt/sdcard path cause on Froyo the SDCARD folder is under /mnt.
any help solving this. i am trying to install some of the HTC Sense UI app to sys app. Like Stock.apk for test. and HTCAlbum.apk and others same result every time.
I have tried also AndroidCommander 0.7.9.6 updated for froyo. installing with it's install option button, and also from the console i run the shell command for install, successfully adds the apk in sys app folder but the apk is not installed, and asks for installation.
Thanks.
Regards Alek

help
Hi,
Can you explain to begginers (like me) how do you installed the apk in system/app? please, I want to install contacs.apk form CM9 to other rom.
Thanks.

Related

help changing boot screen

Hey all, ive been trying to change my boot screen to the haters gonna hate one for a few days now but cant seem to get it to work at all, i have full root and tried to the fastboot method and recovery/adb method. no matter what it stays the same as the one i had originally, i never get errors when trying to push the files if someone can give me instructions for dummies haha or another method id really appreciate it sorry for being a noob at all this.
I had the same problem
First of all, what rom are you using? Different rooms pull from different places. I might be able to help you out. If you are running cyan6, try this:
Adb reboot recovery
Adb remount (make sure it remounts. Maybe also do adb root to make sure.)
Adb push blahblah.zip /system/customize/resource/bootanimation.zip
Adb push blahblah.zip /system/media/bootanimation.zip
Adb push blahblah.zip /data/local/bootanimation.zip
If you want sound, push that to the same locations. Make sure there is only one of each file in each folder. Then, to check,
Adb reboot
Hope this helps
oh yeah sorry i should have included that i am on evios 1.2 beta 2 rom
I'm not familiar on where to place boot on this rom. Try all three locations I suggested. System customize resource. System media. Data local. Tell me if it works out.
I had this animation on EViO. I just pushed it from my desktop to system/media. Worked fine for me.
how do you push it from the desktop? i tried all 3 methods posted above and none worked. i had the file in the android sdk tools folder though...also whenever i try to do adb remount i get "remount failed:invalid argument" and adb root gives me "error:closed" i tried killing adb and restarting but no luck
This might be an obvious question, but do you have USB debugging enabled on your phone? Under Setting>Applications>Development
You arent going to be able to push anything if you can't get ADB running first.
yeah debugging has been enabled the whole time
ok have you been in recovery mode?
try typing
adb shell
su (make sure #comes up.)
exit (retype until you get back to the tools directory)
then do the push commands to system media, system customize resource, and data local.
Just use this program. Its as easy as it gets.
http://forum.xda-developers.com/showthread.php?t=701295
dkdude36 said:
First of all, what rom are you using? Different rooms pull from different places. I might be able to help you out. If you are running cyan6, try this:
Adb reboot recovery
Adb remount (make sure it remounts. Maybe also do adb root to make sure.)
Adb push blahblah.zip /system/customize/resource/bootanimation.zip
Adb push blahblah.zip /system/media/bootanimation.zip
Adb push blahblah.zip /data/local/bootanimation.zip
If you want sound, push that to the same locations. Make sure there is only one of each file in each folder. Then, to check,
Adb reboot
Hope this helps
Click to expand...
Click to collapse
Putting sound in boot animation doesn't work with cm6. Just to clarify. No one has been able to get it to work unless you found something out to make it work please share as I have hates going to hate also and want to use haters everywhere mp3 and is perfect for it.
Sent from my PC36100 using XDA App
yeah i have also been in recovery mode every time i tried to run a command prompt for adb...i tried that when i hit adb shell i get # but when i type su after the # it says "/sbin/sh: su: not found"
mount: mounting /dev/block/mtdblock4 on /system failed: Device or resource busy
A duplicate file name exists, or the file
cannot be found.
A duplicate file name exists, or the file
cannot be found.
A duplicate file name exists, or the file
cannot be found.
A duplicate file name exists, or the file
cannot be found.
A duplicate file name exists, or the file
cannot be found.
A duplicate file name exists, or the file
cannot be found.
thats what i get when in command prompt when i try to use the program you just posted above
Want a easier way? Use root explorer and copy and paste. Works for my every time. It's in the market. And root explore you can manually turn writeable on and off to move it into system. It's on the top right of screen in root explorer when you go into system folder.
Edit: the command you are tying to put in enables you to push and pull in the system folder. Root explore you can just click a button.
Sent from my PC36100 using XDA App
Good idea
Root explorer works most of the time. If you have the cash, go ahead. You should make site out posted though.
/sbin/sh: reboot: not found
been trying to use adb and i keep on getting that....any of you know a fix?

Finally getting around to installing the OTA, I think I'm using adb incorrectly...

I'm following the guide at http://solo.dc3.com/dinc/ and I'm on step 2 where you move all of the crapware back to /system/app. I made the mistake of deleting the apps instead of moving them, so I re-downloaded them from http://www.chadhaney.com/droidIncDefault/ (both the apps and the odex files). I followed all of the instructions under step 2 for moving the files back, but none of them show up in /system/app after rebooting the phone. Since I'm copying the files from my computer to the phone, the command I used was
Code:
adb push C:\path\to\file \system\app
and it seemed to work (I didn't get any errors). Is there something I'm missing?
thevoiceless said:
I'm following the guide at http://solo.dc3.com/dinc/ and I'm on step 2 where you move all of the crapware back to /system/app. I made the mistake of deleting the apps instead of moving them, so I re-downloaded them from http://www.chadhaney.com/droidIncDefault/ (both the apps and the odex files). I followed all of the instructions under step 2 for moving the files back, but none of them show up in /system/app after rebooting the phone. Since I'm copying the files from my computer to the phone, the command I used was
Code:
adb push C:\path\to\file \system\app
and it seemed to work (I didn't get any errors). Is there something I'm missing?
Click to expand...
Click to collapse
Whenever I push something, I put the file in the Android SDK - Tools folder, then run the adb push command. EX) adb push Gmail.apk /system/app/
That way you aren't having to type out the path to the file. Also make sure that when you are in recovery, you mount /system first, then run the adb push command.

[Q] Can't delete anything in system/app: Help appreciated!

What's up XDA?
I've been messing around with my Xperia Play and i successfully got it rooted. My next task is to get all the annoying icons and processes that are running in the background deleted to make my phone run like a champ (Also i just like the clean appearance of only the applications that i use in my menu, perhaps OCD).
With that said i have tried a few different ways to get my system folder writeable but nothing seems to work as I am unable to delete anything in that folder.
My questions are the following:
1) How to delete files out of this folder.
2) Is there a way to do this via computer so i don't have to mess around with an explorer application on my phone.
Thanks for the help thus far everyone!
FoXide- said:
What's up XDA?
I've been messing around with my Xperia Play and i successfully got it rooted. My next task is to get all the annoying icons and processes that are running in the background deleted to make my phone run like a champ (Also i just like the clean appearance of only the applications that i use in my menu, perhaps OCD).
With that said i have tried a few different ways to get my system folder writeable but nothing seems to work as I am unable to delete anything in that folder.
My questions are the following:
1) How to delete files out of this folder.
2) Is there a way to do this via computer so i don't have to mess around with an explorer application on my phone.
Thanks for the help thus far everyone!
Click to expand...
Click to collapse
You can delete system apps with adb. Here are some commands you may find useful:
"adb remount" - This will remount /system/ as R/W.
"ls /system/app/" This will list all the .apk's in /system/app/
"rm /system/app/***.apk" - this will delete the specified .apk file.
Thanks for the help.
I was able to get the abd to list out all the files in the apps folder but when i type adb remount it gives me an error saying "remount failed: Operation not permitted"
Any tips?
FoXide- said:
Thanks for the help.
I was able to get the abd to list out all the files in the apps folder but when i type adb remount it gives me an error saying "remount failed: Operation not permitted"
Any tips?
Click to expand...
Click to collapse
It's because you do not have insecure adb. Download and install this .apk. after install run it, and your device will reboot. You now have insecure adb and can remount /system/. also once installed you can uninstall app
http://loadbalancing.modaco.com/download.php?url=mf/?8qqca688rvbwcfk
You are a boss! I got it to work but i had to use a slightl different command to remove apps "adb shell rm -r /system/app/***.apk"
My last question is seeing as how your location is Manchester, are you going for city or united? =P
FoXide- said:
You are a boss! I got it to work but i had to use a slightl different command to remove apps "adb shell rm -r /system/app/***.apk"
My last question is seeing as how your location is Manchester, are you going for city or united? =P
Click to expand...
Click to collapse
Yeah sorry you have to be logged into shell for the remove command to work
I'm a man utd fan, city don't scare me there just throwing there money about ....... but they will run out just like chelski

[GUIDE] ADB, logcat, shell, etc

ADB:-
Android Debug Bridge
Very useful program made itself by Google for Programmers and developers. Its based on command line and basically communicates with your Android to respond to certain commands. There is vast amount of knowledge about adb but its most useful commands limit to getting:-
Logcat:-
A real time log of what is happening in background of our devices. It is really useful for developers to see which component has malfunctioned and helps to narrow down their search for what failed and what needs to be fixed. Several times users are asked to give logcats of their devices which are giving errors. We will go in detail that how to get logcats in every and easiest way possible.
App Installation and Management:-
adb proves really handy if you want to install apks directly from your PC or want to batch install or delete them.
Shell Execution:-
You must have heard of Terminal Emulator. It is an app for android to execute shell commands(linux commands) which are basically present as applets in /system/bin, /system/sbin or /system/xbin(in our case) folders. A very imporant applet called busybox is installed there mainly used for execution of basic commands during root browsing or ROM installation. Many times updater script of ROMs use busybox commands to install it. Well, these commands can be initiated from your device too but they can be initiated from adb also making it easy for programmers.
Pushing and Pulling:-
Most used commands of adb. adb makes it a piece of cake for new device developers to get an ideo of structure and basic knowledge of devices by pulling command. We can pull out i.e copy any files or folders from our devices to our PC, even the root directories without rooting the devices. It help rooters and ROM chefs of new devices to get an idea and implement their mods on them. Pushing is also very useful command. It copies your files and folders from PC to your device. Very useful in pushing some /system apps and other things
Remounting and setting permissions
Basic commands:-
Of-course basic commands such as reooting and rebooting in recovery ode and download mode are supported.
Others:-
There are several other features of adb such as fastboot, aapt, etc
Setting up ADB
Pre Requirements:-
A little amount of brain
PC(This is a windows guide, if asked I will add linux and mac guide later)
Java Runtime environment or Java Developing kit
Your Device Drivers
An Android Device
Assuming you all these ready and working properly, we continue
If you are having trouble completing Pre-Requisites, there are several guides featuring them too
Start
1. First Download Android SDK. Roughly about 70 MB
2. There may be any compressed zip file or exe file
If zip file, then extract it to C:\android-sdk
If exe file then double click on it and install it in C:\ Drive(or any other drive you want)
3. Now to get adb and other tools, you need to download 'Platform Tools'
To download them, go to the android-sdk folder and double click on SDK Manager
It will ask you which package to download? However, it is your choice which package to Download, but here, we will only talk about platform
Tools. So, simply tick on Platform Tools and click on install. Once you have done it. Go to the platform-tools folder in the directory where you installed android-sdk. You will find several files there like adb, fastboot, aapt, etc
4. Now, you can backup the whole folder of android-sdk to any external storage that will make you not download package
again if you want to. You can have it placed in any computer and run it as it does not require registry to work
5. Now, you are just one step away from using adb. Next step is SKIPPING SETTING ENVIRONMENT VARIABLE
Many guides on internet say that it is to be done for making it easy for users and if you have some basic knowledge of Command Prompt,
you will know that to execute any application with command prompt, you first need to change the directory to the one where application is
placed. And to skip changing the directories every time you open CMD, you need to put that application is environment variable. Howeve, we will not do so.
6. Type cmd in the search bar. Copy cmd.exe from there. Go to the directory where you have installed android-sdk. Go to platform-tools folder. Paste cmd there, right click on it and in the settings, select Run as Administrator.
7. You are done. Now what to do in it?
ADB Commands
Type adb in command prompt. And several commands will show up on your screen. It is very difficult to analyse these all commands, so we will only talk about most used and important commands
Connect your device via USB cable
And open the CMD in platform-tools folder(Make a shortcut of it on desktop). And type the suitable commands
Code:
adb devices
Will show the list of devices attached to the PC andtheir serial numbers. If this shows up correctly on your PC, then it means that everything is fine for continuing.
Logcat
Code:
adb logcat
It will display the real time log of your device
Best time to do it is when your device boots up
Now, many users ask me how to copy the logcat and upload it from CMD
There are several methods:-
1. Right click on the Title Bar of Command Prompt. Hover the cursor over edit and select mark. Select all the things you want to copy and then click enter. All the things will be copied to clipboard.
2. This is the correct way of getting logcat saved.
Code:
adb logcat > logcat.txt
This command will create a logcat.txt document in platform-tools folder with the complete logcat of the device. Ofcourse you can type any name instead of logcat.txt
3. I prefer taking logcat this way as it neatly compiles logs of different time
Code:
adb logcat -v long > logcat.txt
This is a very nice way to get logcat.
Installing Apps
Code:
adb install %PATH OF APK%
This will install an app on your Android
For example, if my app AreeB.apk is in G:\ drive (G:\AreeB.apk)
Then I will type
Code:
adb install G:\AreeB.apk
Be sure your apk is not in a folder that has space in its name, else the command will break at space bar.
For eg:-
G:\Program Files\AreeB.apk
Mounting
However, I never found any problem in tweaking with system files with adb, but some users said that they couldn't do it, so the problem was that their system partition was mounted as Read Only(R/O)
So, it is necessary now to tell how to mount system partition as Read Write(R/W)
Code:
adb remount
It is easiest way to do so, if it does not work then
There is another method that we will discuss in ADB Shell commands section
Pushing and Pulling
For pushing,
Type
Code:
adb push %PATH TO BE PUSHED% %PATH WHERE TO BE PUSHED%
Suppose I have an app named SystemUI.apk(PATH = G:\SystemUI.apk) which I want to push in /system/app/ on my android(or in other words, install an app as a system app). Then I would type
Code:
adb push G:\SystemUI.apk /system/app/
More examples
G:\Dance.txt file to be pushed in Dance folder in sdcard
Code:
adb push G:\Dance.txt /sdcard/Dance/
OR
Code:
adb push G:\Dance.txt /mnt/sdcard/Dance/
G:\Movies folder to be transferred in SDCARD in Videos Folder
Code:
adb push G:\Movies /sdcard/Videos/
G:\system\framework\framework-res.apk to be pushed in /system/framework/
Code:
adb push G:\system\framework\framework-res.apk /system/framework/
For pulling,
push command replaces with pull and paths are swapped
Code:
adb pull %PATH TO BE PULLED FROM% %PATH TO PLACE PULLED FILE%
Example,
All system apps are to be pulled to G:\ROM\system\app
Code:
adb pull /system/app G:\ROM\system\app\
build.prop to be extracted to desktop
Code:
adb pull /system/build.prop C:\Users\Areeb\Desktop\
However, if a folder is in platform-tools folder, you don't need to type full path
Suppose if I type
Code:
adb pull /system/ system
Then a folder named system will be created inside platform-tools with all the files in system in it
If a file is in platform-tools folder, then also no need to type full path
For example,
There is an app name DeskClock.apk in this folder then, to push it to /system/app, type
Code:
adb push DeskClock.apk /system/app/
ADB Shell Commands
This mode of adb allows you to execute linux shell commands from your PC
These commands can aldo be executed through the mobile using Terminal Emulator
To initiate shell mode
Type
Code:
adb shell
You will get an prompt like this
sh-3.2#
Now you are in shell mode
adb commands won't work here and a new set of commands will work here. But we will only go in a little detail here.
Assuming you are in adb shell mode, I will only type commands that will work on shell. Note:- These commands won't work if you type them alone on cmd. But, these command will directly work on your mobile's Terminal Emulator
As these commands can also work on mobile, I am going to tell you a way of taking logcat on mobile
Type
Code:
logcat
You will see log of your device
To save this
Type
Code:
logcat > /sdcard/log.txt
A file named log.txt will be generated in sdcard
Uninstalling Applications
Code:
cd /data/app
This will change the directory to /data/app
Code:
ls
This will show the list of files in there
Suppose, there is an app named com.opera.browser (Opera Mobile) you want to uninstall it
Type
Code:
rm -r com.opera.browser
This will uninstall the app
Mounting Command:-
Code:
mount -o rw,remount /dev/block/mtdblock3 /system
Miscellanous commands:-
su: Initiates root request
du: Shows file foldrs and size
date: Shows todays date
Forgot next ones, will write later
Credits
Google: For Android and several searchings
Samsung: For Galaxy Ace s5830I
Broadcom: For their Open Sourceness
XDA Forums : For the precious knowledge
My Uncle: For gifting me this Phone
My Teachers: For teaching me English(I would not be here without them)
You: For future Thanks
Till now, thats it, will add some more things later
If any problem, I will add it too
Suggestion? They are welcome
Doesn't it belong to General section???
great work, now i know how to make a logcat. hehehehe. tnx a lot.
Ganesh A said:
Doesn't it belong to General section???
Click to expand...
Click to collapse
Well if you say so
I will request a mod to move it
But I have seen several threads (even stickies) that are guides just about logcat
And my guide features it all
Well I will not argue and request a mod if you insist
Keep it in this section

(Guide) How to logcat, ADB, shell, etc

ADB:-
Android Debug Bridge
Very useful program made itself by Google for Programmers and developers. Its based on command line and basically communicates with your Android to respond to certain commands. There is vast amount of knowledge about adb but its most useful commands limit to getting:-
Logcat:-
A real time log of what is happening in background of our devices. It is really useful for developers to see which component has malfunctioned and helps to narrow down their search for what failed and what needs to be fixed. Several times users are asked to give logcats of their devices which are giving errors. We will go in detail that how to get logcats in every and easiest way possible.
App Installation and Management:-
adb proves really handy if you want to install apks directly from your PC or want to batch install or delete them.
Shell Execution:-
You must have heard of Terminal Emulator. It is an app for android to execute shell commands(linux commands) which are basically present as applets in /system/bin, /system/sbin or /system/xbin(in our case) folders. A very imporant applet called busybox is installed there mainly used for execution of basic commands during root browsing or ROM installation. Many times updater script of ROMs use busybox commands to install it. Well, these commands can be initiated from your device too but they can be initiated from adb also making it easy for programmers.
Pushing and Pulling:-
Most used commands of adb. adb makes it a piece of cake for new device developers to get an ideo of structure and basic knowledge of devices by pulling command. We can pull out i.e copy any files or folders from our devices to our PC, even the root directories without rooting the devices. It help rooters and ROM chefs of new devices to get an idea and implement their mods on them. Pushing is also very useful command. It copies your files and folders from PC to your device. Very useful in pushing some /system apps and other things
Remounting and setting permissions
Basic commands:-
Of-course basic commands such as reooting and rebooting in recovery ode and download mode are supported.
Others:-
There are several other features of adb such as fastboot, aapt, etc
Setting up ADB
Pre Requirements:-
A little amount of brain
PC(This is a windows guide, if asked I will add linux and mac guide later)
Java Runtime environment or Java Developing kit
Your Device Drivers
An Android Device
Assuming you all these ready and working properly, we continue
If you are having trouble completing Pre-Requisites, there are several guides featuring them too
Start
1. First Download Android SDK. Roughly about 70 MB
2. There may be any compressed zip file or exe file
If zip file, then extract it to C:\android-sdk
If exe file then double click on it and install it in C:\ Drive(or any other drive you want)
3. Now to get adb and other tools, you need to download 'Platform Tools'
To download them, go to the android-sdk folder and double click on SDK Manager
It will ask you which package to download? However, it is your choice which package to Download, but here, we will only talk about platform
Tools. So, simply tick on Platform Tools and click on install. Once you have done it. Go to the platform-tools folder in the directory where you installed android-sdk. You will find several files there like adb, fastboot, aapt, etc
4. Now, you can backup the whole folder of android-sdk to any external storage that will make you not download package
again if you want to. You can have it placed in any computer and run it as it does not require registry to work
5. Now, you are just one step away from using adb. Next step is SKIPPING SETTING ENVIRONMENT VARIABLE
Many guides on internet say that it is to be done for making it easy for users and if you have some basic knowledge of Command Prompt,
you will know that to execute any application with command prompt, you first need to change the directory to the one where application is
placed. And to skip changing the directories every time you open CMD, you need to put that application is environment variable. Howeve, we will not do so.
6. Type cmd in the search bar. Copy cmd.exe from there. Go to the directory where you have installed android-sdk. Go to platform-tools folder. Paste cmd there, right click on it and in the settings, select Run as Administrator.
7. You are done. Now what to do in it?
ADB Commands
Type adb in command prompt. And several commands will show up on your screen. It is very difficult to analyse these all commands, so we will only talk about most used and important commands
Connect your device via USB cable
And open the CMD in platform-tools folder(Make a shortcut of it on desktop). And type the suitable commands
Code:
adb devices
Will show the list of devices attached to the PC andtheir serial numbers. If this shows up correctly on your PC, then it means that everything is fine for continuing.
Logcat
Code:
adb logcat
It will display the real time log of your device
Best time to do it is when your device boots up
Now, many users ask me how to copy the logcat and upload it from CMD
There are several methods:-
1. Right click on the Title Bar of Command Prompt. Hover the cursor over edit and select mark. Select all the things you want to copy and then click enter. All the things will be copied to clipboard.
2. This is the correct way of getting logcat saved.
Code:
adb logcat > logcat.txt
This command will create a logcat.txt document in platform-tools folder with the complete logcat of the device. Ofcourse you can type any name instead of logcat.txt
3. I prefer taking logcat this way as it neatly compiles logs of different time
Code:
adb logcat -v long > logcat.txt
This is a very nice way to get logcat.
Installing Apps
Code:
adb install %PATH OF APK%
This will install an app on your Android
For example, if my app AreeB.apk is in G:\ drive (G:\AreeB.apk)
Then I will type
Code:
adb install G:\AreeB.apk
Be sure your apk is not in a folder that has space in its name, else the command will break at space bar.
For eg:-
G:\Program Files\AreeB.apk
Mounting
However, I never found any problem in tweaking with system files with adb, but some users said that they couldn't do it, so the problem was that their system partition was mounted as Read Only(R/O)
So, it is necessary now to tell how to mount system partition as Read Write(R/W)
Code:
adb remount
It is easiest way to do so, if it does not work then
There is another method that we will discuss in ADB Shell commands section
Pushing and Pulling
For pushing,
Type
Code:
adb push %PATH TO BE PUSHED% %PATH WHERE TO BE PUSHED%
Suppose I have an app named SystemUI.apk(PATH = G:\SystemUI.apk) which I want to push in /system/app/ on my android(or in other words, install an app as a system app). Then I would type
Code:
adb push G:\SystemUI.apk /system/app/
More examples
G:\Dance.txt file to be pushed in Dance folder in sdcard
Code:
adb push G:\Dance.txt /sdcard/Dance/
OR
Code:
adb push G:\Dance.txt /mnt/sdcard/Dance/
G:\Movies folder to be transferred in SDCARD in Videos Folder
Code:
adb push G:\Movies /sdcard/Videos/
G:\system\framework\framework-res.apk to be pushed in /system/framework/
Code:
adb push G:\system\framework\framework-res.apk /system/framework/
For pulling,
push command replaces with pull and paths are swapped
Code:
adb pull %PATH TO BE PULLED FROM% %PATH TO PLACE PULLED FILE%
Example,
All system apps are to be pulled to G:\ROM\system\app
Code:
adb pull /system/app G:\ROM\system\app\
build.prop to be extracted to desktop
Code:
adb pull /system/build.prop C:\Users\Areeb\Desktop\
However, if a folder is in platform-tools folder, you don't need to type full path
Suppose if I type
Code:
adb pull /system/ system
Then a folder named system will be created inside platform-tools with all the files in system in it
If a file is in platform-tools folder, then also no need to type full path
For example,
There is an app name DeskClock.apk in this folder then, to push it to /system/app, type
Code:
adb push DeskClock.apk /system/app/
ADB Shell Commands
This mode of adb allows you to execute linux shell commands from your PC
These commands can aldo be executed through the mobile using Terminal Emulator
To initiate shell mode
Type
Code:
adb shell
You will get an prompt like this
sh-3.2#
Now you are in shell mode
adb commands won't work here and a new set of commands will work here. But we will only go in a little detail here.
Assuming you are in adb shell mode, I will only type commands that will work on shell. Note:- These commands won't work if you type them alone on cmd. But, these command will directly work on your mobile's Terminal Emulator
As these commands can also work on mobile, I am going to tell you a way of taking logcat on mobile
Type
Code:
logcat
You will see log of your device
To save this
Type
Code:
logcat > /sdcard/log.txt
A file named log.txt will be generated in sdcard
Uninstalling Applications
Code:
cd /data/app
This will change the directory to /data/app
Code:
ls
This will show the list of files in there
Suppose, there is an app named com.opera.browser (Opera Mobile) you want to uninstall it
Type
Code:
rm -r com.opera.browser
This will uninstall the app
Mounting Command:-
Code:
mount -o rw,remount system /system/
Miscellanous commands:-
su: Initiates root request
du: Shows files, folders and size
date: Shows todays date
surfaceflinger: Shows your bootanimation (Tested on GB)
grep: Used to search through text files
chmod: Sets permission to files
sh: Initiates shell mode
echo: Displays the text you wrote with the command. Analogous to PRINT command on QBasic
Forgot next ones, will write later
Credits
Google: For Android and several searchings
Samsung: For Galaxy Ace s5830I
Broadcom: For their Open Sourceness
XDA Forums : For the precious knowledge
My Uncle: For gifting me this Phone
My Teachers: For teaching me English(I would not be here without them)
You: For future Thanks
Till now, thats it, will add some more things later
If any problem, I will add it too
Suggestion? They are welcome
Nice thread , every thing is very clearly stated.
Thx, Nice guide.
I suggest to change the 'remount' command in:
mount -o remount,rw /system
As the effect is the same and it works universally (at least, should)
Sent from my GT-5660 using xda app-developers app
ItachiSama said:
I suggest to change the 'remount' command in:
mount -o remount,rw /system
As the effect is the same and it works universally (at least, should)
Sent from my GT-5660 using xda app-developers app
Click to expand...
Click to collapse
I use the command you mentioned every time. Thanks for reminding. I can't remember why I wrote that command there!

Categories

Resources