How to fix market download "freezes" - G1 General

I think I've found the cause of this, where you download something from the Market and it says downloaded but just sits there forever. Google has something called a "checkin" service that sends them anonymous usage data, bug reports, crash logs, etc, but it fails a lot. When you download something from the Market, it sends a message to Google about it, and if it fails it just freezes.
You can turn this off easily with a system property. I haven't seen any issues with doing this except that it will break the setup wizard if you have this set during boot after a wipe.
All you need to do is add this line to the end of /system/build.prop:
Code:
ro.config.nocheckin=1
So, something like this:
Code:
adb pull /system/build.prop .
(edit file with notepad, vim, emacs if you hate yourself)
adb remount
adb push build.prop /system
adb shell reboot
Hopefully this helps someone and Google doesn't shoot me down from space

build.prop reverts after reboot
hey
followed instructions
- pulled build.prop
- added ro.config.nocheckin=1 to end
- adb remount (RW filesystem)
- pushed new build.prop, says 2593 bytes written
- rebooted device
upon reboot: /system/build.prop reverts back to original
any idea for a Rogers Dream user here

Just wanted to clarify that the steps should actually be:
Code:
adb remount
adb pull /system/build.prop .
*(edit file with notepad, vim, emacs, whatever)*
adb push build.prop /system
adb shell reboot
Otherwise, people are going to reboot their computers willy-nilly, and not their androids.

cyanogen said:
Hopefully this helps someone and Google doesn't shoot me down from space
Click to expand...
Click to collapse
Google is going to have you wacked for figuring this out.

terminal commands plz?

G1-evolve said:
terminal commands plz?
Click to expand...
Click to collapse
Code:
su
mount -o remount,rw /system
echo "ro.config.nocheckin=1" >> /system/build.prop
reboot

cyanogen said:
Code:
su
mount -o remount,rw /system
echo "ro.config.nocheckin=1" >> /system/build.prop
reboot
Click to expand...
Click to collapse
Thanks alot! What would be the "Undo" to this incase one day I need to wipe/flash a rom?
edit: seems to still "hang" and not work. Only works if I log into "gtalk"

After having completed this procedure, I've still managed to "hang" the market once. Though in all fairness, once is fine, because it used to happed daily.
However, I've noticed something that some people might consider a "down side" - when you uninstall apps, they remain in your downloads. That's exactly the same behavior that people were complaining about before cupcake came out.

besides anonymous usage data, bug reports and crash logs, what else would i be disabling by doing this?

AlfaTrion said:
besides anonymous usage data, bug reports and crash logs, what else would i be disabling by doing this?
Click to expand...
Click to collapse
Well, as I've mentioned in my post above yours, all apps that you ever downloaded while having check-in disable, will stay in your My Downloads. Again, it doesn't bug me as I use aTrackDog primarily for update checks, but I know some people don't like this.

Have you tried clearing the market cache in Settings > Applications > Manage Applications > Market? I'm curious to know if that assist with that at all.

jordanjay29 said:
Have you tried clearing the market cache in Settings > Applications > Manage Applications > Market? I'm curious to know if that assist with that at all.
Click to expand...
Click to collapse
I haven't, but I'll try. Though I am quite sure it will not do anything because that list remains the same through flashes and upgrades, so I'm sure it's pulled from Google servers.

my solution......
Whenever the market hangs when I download [email protected] reboot and it works fine. I don't get the hang problem a lot so it doesn't bother me to reboot.

pistol4413 said:
Whenever the market hangs when I download [email protected] reboot and it works fine. I don't get the hang problem a lot so it doesn't bother me to reboot.
Click to expand...
Click to collapse
It's not only about Market hanging. After disabling check-in, Market actually works much faster because data does not get sent to Google every time you do something (download / remove / update / etc.)

Would there be a way to schedule this checkin? Or make it run only once every x times? That might bridge the difference between no hangs and retaining all past downloads, and many hangs but clearing the downloads list.

jordanjay29 said:
Would there be a way to schedule this checkin? Or make it run only once every x times? That might bridge the difference between no hangs and retaining all past downloads, and many hangs but clearing the downloads list.
Click to expand...
Click to collapse
The framework could be modded for that, but thats a lot of work. Right now, the checkin code is a listener, and just wakes up for certain events (like an app install).

I THINK this could happen if one changes or deletes the APN of the phone.. for me it started to freeze the download after I completely closed the 3g/2g connection. So maybe google uses that connection in order to gether the data instead of the wifi. Can that be changed so that both use the wifi?

script to disable checkin service:
Code:
#!/bin/sh
su
if ! grep -q "^ro.config.nocheckin=" /system/build.prop; then
echo "Mounting system as read/write"
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
echo "Disabling Checkinservice"
echo "ro.config.nocheckin=1" >> /system/build.prop
echo "rebooting.."
reboot
else
echo "CheckinService already disabled"
fi

jordanjay29 said:
Would there be a way to schedule this checkin? Or make it run only once every x times? That might bridge the difference between no hangs and retaining all past downloads, and many hangs but clearing the downloads list.
Click to expand...
Click to collapse
I disassembled the classes.dex from the checkin.apk with baksmali and in the CheckinService.smali these fields are defined:
Code:
.field private static final CHECKIN_INTERVAL:J = 0x6ddd00L
.field private static final CHECKIN_INTERVAL_MAX:J = 0xa4cb800L
.field private static final CHECKIN_INTERVAL_MIN:J = 0x927c0L
Values in decimal(dont take the last character for conversion!). I think they should represent milliseconds:
0x6ddd00L: 7200000
0xa4cb800L: 172800000
0x927c0L: 600000
Maybe you can "schedule" the checkin service by changing these values, assemble the dex again with smali, replace the original classes.dex in the apk and push it back to the Phone.
Code:
adb remount
adb pull /system/app/checkin.apk .
Make a backup copy of the apk ;)
extract the classes.dex
java -jar -Xmx512m baksmali-0.94.jar -o ./checkin classes.dex
Edit the File
java -jar -Xmx512m smali-0.94.jar -o classes.dex ./checkin
Replace the classes dex in the pulled checkin.apk
adb push checkin.apk /system/app/checkin.apk
adb shell reboot
You can get smali and baksmali from here:
http://code.google.com/p/smali/

I was talking about the explicit checkin that happens after apps are installed, etc..

Related

[Q] Syslog for Android?

I'm trying to start busybox's httpd at boot w/o success. However, I can start it manually post-boot w/o problems. Can I enable a syslog facility so I can see what happens when the bootup script calls it?
Code:
httpd -p 80 -u 80 -h /sdcard/www -c /etc/httpd.conf
I've tried running the process as -u 80 and as -u 0, both work post-boot, not before.
It's Linux - if there is an rc.local you should be able to drop a string in there to make it start.
KaiserLinux said:
It's Linux - if there is an rc.local you should be able to drop a string in there to make it start.
Click to expand...
Click to collapse
Not that simple
There is no rc.local, but I inserted
Code:
/sbin/syslogd -O /data/log/syslog
into the beginning of init.rc, but it logs nothing.
Go into applications and turn on debugging mode. Plug your phone into your computer and run 'adb logcat' or something to that effect. You can play around with your phone and watch the log scroll by.
Your gonna need the whole ADB setup. Go to the samsung epic 4G wiki and check the article about getting root and flashing a new kernel. This will have the instructions for getting ADB on your system as well.
KaiserLinux said:
Go into applications and turn on debugging mode. Plug your phone into your computer and run 'adb logcat' or something to that effect. You can play around with your phone and watch the log scroll by.
Your gonna need the whole ADB setup. Go to the samsung epic 4G wiki and check the article about getting root and flashing a new kernel. This will have the instructions for getting ADB on your system as well.
Click to expand...
Click to collapse
I've compiled my own rooted kernel and a new busybox with syslogd to see if I can diagnose why bb's httpd isn't starting at boot. As I mentioned, it starts manually w/o a problem. adb logcat isn't very useful in this particular situation. Thanks for the reply though.
jocala said:
There is no rc.local, but I inserted
Code:
/sbin/syslogd -O /data/log/syslog
into the beginning of init.rc, but it logs nothing.
Click to expand...
Click to collapse
I'm kind of a noob myself, but I recall reading that init.rc isn't really a shell script. It has a special syntax that is parsed by Android init, I'm not sure just throwing shell commands in there is going to work. I'd post a link to the doc but I can't post links yet
coldguy said:
I'm kind of a noob myself, but I recall reading that init.rc isn't really a shell script. It has a special syntax that is parsed by Android init, I'm not sure just throwing shell commands in there is going to work. I'd post a link to the doc but I can't post links yet
Click to expand...
Click to collapse
Weird, the first 500 lines of init.rc are nothing BUT shell commands.
i.e. chmod 0666 /dev/input/event0
Anyway, further along in init.rc the daemon processes are started up. syntax looks like:
Code:
service playlogo /system/bin/playlogo
user root
oneshot
I've tried setting up my programs (httpd,syslogd) as services, no joy.
jocala said:
Not that simple
There is no rc.local, but I inserted
Code:
/sbin/syslogd -O /data/log/syslog
into the beginning of init.rc, but it logs nothing.
Click to expand...
Click to collapse
sorry to hijack your post.
but i want to know how do you modify the /init.rc,
because when i reboot, the /init.rc will automatic recovery the old verison.
did you check the /init.rc, is it modified, after your phone reboot?
Does logcat not give you the info you want?
You can go here to find out how to redirect stdout and stderr to the logcat as well.
init.rc is part of the root fs, which is compiled into the kernel. So, a custom kernel is required. Search for custom kernel for details.

[GUIDE] ADB Workshop and Guide for everyone

This workshop was held in #android-learning on irc.freenode.net by XDA Member Adrynalyne. All credit to him for this guide, I simply am taking it and turning it into a guide. Here we go!
You can find the raw IRC log here
Good evening folks, and welcome to my ADB workshop. This is by no means a full explanation on the subject, but more of a crash course to help folks get up to speed, and get more from their devices. There may be some things you already know here, so please be patient and respect those who do not.
Reference Files
http://adrynalyne.us/files/How to install adb.pdf
http://adrynalyne.us/files/Using ADB.pdf
So, lets just start with the basics.
What is ADB?
ADB stands for the android debugging bridge and is used for testing and debugging purposes by developers.
However, we like to get more out of our devices, and its a great way to fix things.
Knowing adb can mean the difference between a paperweight and a working phone.
So, to start with, we will look at installing ADB.
Generally speaking, the Sun/Oracle JDK is required to run all SDK functions.
ADB is but one tool in the SDK arsenal.
So, we begin by downloading and installing the JDK. This can be found here:
https://cds.sun.com/is-bin/[email protected]_Developer
Choose your OS, download and install. I recommend that 64 bit users use the regular x86/32 bit version as well.
Moving ahead, we download the Windows sdk from here:
http://dl.google.com/android/installer_r08-windows.exe
Due to already installing JDK, you won't be stopped by the install process.
Now, if you notice, I installed it to:
C:\android-sdk-windows
I did this because it makes things easier when setting up path variables.
I encourage everyone to do the same, but obviously it is not required.
So, this SDK is handy, but is only good up to 2.2. We want the latest and greatest! (Well I do)
So, we navigate to:
C:\android-sdk-windows\
and we run SDK Manager.exe
If you notice in your PDF file for installing adb, you will notice that you can update, and I made a choice not to include earlier sdk versions.
I won't go into full detail on that, but depending on the version of SDK you have, 8 or 9, it WILL make a difference in using adb.
By default, for version 8 adb.exe resides in C:\android-sdk-windows\tools
By default, for version 9 adb.exe resides in C:\android-sdk-windows\platform-tools
We will assume version 9 in this guide
Really, the SDK is installed and adb is usable right now, but in my humble opinion, its not enough
I like the ability to use adb in ANY directory on my machine.
To do this, we edit Windows's environment variables.
Specifically, the system path.
To do this, we click on start, or the orb (depending on OS), and right click on Computer, left clicking on properties in the menu.
If its windows XP, I believe it brings you into advanced system properties immediatly. Vista and 7 need a second step.
On the left hand side, as you notice I have highlighted in the pdf, left click advanced system settings.
Under advanced tab, we left click environment variables...
There are two boxes here.
We are concerned with system variables, however.
So we scroll down the list and highlight path and click edit.
Ignoring all the extra stuff in here, make sure you are at the end of the line, and type
Code:
;C:\android-sdk-windows\platform-tools
The semicolon allows us to separate it
from the previous path statement.
Click ok all the way out.
We now have ADB setup globally. We can use cmd.exe (I use powershell) and no matter what directory we are in, adb is recognized.
If it is not, make certain you entered the path into system variables, and made no typos.
If you installed to a different location, you will need to adjust the path accordingly.
This concludes the section on installing the Android SDK to use ADB.
This next section will be on using ADB, so please open that pdf now.
Now, this applies to any OS, not just Windows.
Well, with the exception of the USB drivers.
I will not go too much into that, but if you take a look at the PDF, it goes through installing usb drivers for the sdk, and how to download them.
Fiarly straightforward, in that rspect.
Now, to setup our phones to use with the SDK and ADB, we must change some settings.
First, we go to menu softkey, then settings.
We scroll down to Applications and tap it.
Under Development, we will check Enable USB Debugging. Please note the SGS phones are different in this respect.
The USB cable must be unplugged before enabling or disabling this setting.
Once this is done, we are now ready to play with adb
One quick note: If you get device not found/conencted, please reboot your phone. DJ05 has a quirk in it where ADBD randomly crashes on boot.
A reboot will fix this
ADBD= ADB Daemon
Ok, continuing on.
Lets look at installing applications. This is also known as sideloading.
Unlike installing from the SD card, it does not require unknown sources to be enabled.
The command for this is
Code:
adb install packagename
This assumes that you are working from the directory where the file is located.
This will install the application to /data/app.
It will also show sometimes useful errors if install fails.
That is not something you will see from the Android GUI.
Now, a lot of us have probably deleted files with apps like Root Explorer. While this isn't really a bad thing, it leaves behind databases and data for the application removed.
This is where the 0kb applicaiton entries come from.
If you take that application entry name, you can uninstall the extra data via adb.
First we go to the adb shell which logs into the phone.
Code:
adb shell
If we end up with a $, we will want admin rights, in many cases. This is not one of them, I don't beleive.
To get admin rights, you want to type
Code:
su
Look at your phone if this is the first time, it may prompt you to allow access. Else you will get permission denied.
If you are not rooted, this will not work either.
Ok, now that we are logged in, we will type
Code:
pm uninstall packagename
where packagename is the name of the 0kb listing.
Now this seems like a pain in the a** and I agree.
HOWEVER
There will be a time where Manage applications crashes when you try to uninstall it from the phone. In this case, a factory reset, or this method is the only effective way to fix the problem.
Moving on.
How many of us have removed system applications or renamed them? Did you know that you can simply disable them from the system?
Code:
adb shell
su
pm disable appllicationname
This will disable it, and the system will ignore it.
This can be seen as safer than deleting or renaming things, but your mileage may vary.
On the other hand, you can also re-enable these applications.
Code:
adb shell
su
pm enable applicationname
Please note: Not all applications will properly re-enable. I believe a factory reset or reinstall of said application will fix the issue.
Also, application names are absolutely case sensitive.
*nix based Operating Systems see the letter 'a' and 'A' as two different things.
when you log into adb shell, you are playing by android rules
Ok, a lot of us tweak and mod our phones and turning off the device to get to clockwork recovery, or battery pulls, or multiple button holds to get into Download mode are troublesome and annoying at best.
ADB can help us here.
Here, we do not need to be logged into the shell
If we want to merely reboot the phone:
Code:
adb reboot
If we want to go to recovery (works well with voodoo5)
Code:
adb reboot recovery
If we want to go to Download Mode because we need Odin, heaven forbid:
Code:
adb reboot download
Its instant. No waiting on animations or anything else.
Its also handy if Android has locked up, but yet still works in adb.
I for one hate taking my case off to battery pull.
So now we move on to pushing and pulling files.
Sometimes, I don't feel like mounting my sd card to copy a file over to my phone.
I can use this command to push a file straight to my sd card:
Code:
adb push filename /pathtodirectoryonphone
So for instance, if I have test.txt that I want to send, I would type:
Code:
adb push test.txt /sdcard/
and there it goes.
Ok moving on
Pushing files can be done to any directory, however, some are protected.
For instance, /system is going to give you a permission denied or a read only filesystem error.
To get around this, the easiest thing to do is push the file to your sdcard, then log into the shell:
Code:
adb shell
Code:
su
We will then mount the system as writable
Code:
mount -o rw,remount /dev/block/stl9 /system
Then we can use something like
Code:
cp /sdcard/test.txt /system/app/test.txt
cp stands for copy
and it requires the path of the file and destination path. The name of the file is optional
When you copy it, you can rename it to whatever you like.
For instance, if we wanted to backup a file
Code:
cp /sdcard/test.txt /sdcard/backuptest.txt
Now, lets assume you do not have busybox installed.
You non rooted users will not.
Then you must use a slightly more complicated command called dd
This is used like this:
Code:
dd if=/sdcard/test.txt of=/system/app/test.txt
if is for inputfile
of= output file
Not every user friendly, but probably one of the safer copy commands.
Ok, moving on to pulling files.
Lets say you want to get a file from your phone, to modify, backup, etc.
To do this, we simply use adb in this manner:
Code:
adb pull /pathtofile/filename destinationname
For instance, if I wanted to backup ADW launcher in system/app
I would do this
Code:
adb pull /system/app/ADWLaucnher.apk ADWLauncher.apk
And it will pull the file from the phone and put it in the current directory.
Like above, you can specifcy where it goes.
pushing files to the sdcard, it seems prudent to talk about changing permissions.
sdcards are typically fat32, which destroys permisisons, and Android is heavily permission based.
So if you push an application to your sd card, then try to copy it to /system/app/ bad things are going to happen, or the app may not even show up.
So in that case, we use something called chmod.
This is used in this manner
Code:
adb shell
su
chmod 755 /pathtoapplication/applicationname
Keep in mind
you dont want to do this while its still on your sd card.
an example
Code:
adb shell
su
chmod 755 /system/app/ADWLauncher.apk
755 is good for applications and script files.
Just a couple more topics to cover.
Lets go over deleting files.
This becomes especially handy for removing rogue applications.
To do this, we must be in the adb shell.
Code:
adb shell
su
rm /system/app/ADWLauncher.apk
You may need to remount system as writable with:
Code:
mount -o rw,remount /dev/block/stl9 /system
That applies when using chmod as well.
So what I did above was delete ADW Launcher from system/app
However, what if I wanted to delete the entire contents of a directory?
Same thing as before, except
Code:
adb shell
rm -f /data/dalvik-cache/*.*
I just cleared my dalvik-cache with that command
very quick, very effective.
If you just tried that, please reboot your phone now
Ok....this leaves us with the final topic: logcat
logcat allows us to log what the OS is doing, and possibly delve information for when things are not working
its quite simple Reading it is another.
To use logcat
Code:
adb shell
logcat
To logcat to a certain file do
Code:
adb shell
logcat > /sdcard/logcat.txt
Now we let the log settle down to a reasonable amount of data coming in and not a wall of scrolling, then start the app in question. When it gives an error, we hit ctrl-C and kill the adb shell session.
This should have captured enough data to see the error. Now, I prepared an example. A user came to me on IRC, and Google Maps was force closing. Clearing data didnt fix it, Clearing dalvik-cache, and fix permissions did not fix it. In this case, the user did not know how to use adb So I had him grab an app called alogcat from the market and email me the log. This is also a very valid method.
this file explains what the problem was, and highlights what to look for as an example.
http://adrynalyne.us/files/logcat.pdf
___________________________________________________________________
This concludes the guide from Adrynalyne, there will be more workshops such as this one in irc.freenode.net #android-learning.
Thanks to everyone in #samsung-fascinate !
Reserved for possible extension of topic
Great, saves a lot of questions/answers & search
Every new user should read this!!
Thread stuck as valuable reference thread
Just to add, if I may, a little about the permissions...
============================================================
File permissions for Unix... which Android is based, just so those who tinker with the file permissions may know what they are getting into.
============================================================
Use the chmod command to set file permissions.
The chmod command uses a three-digit code as an argument.
The three digits of the chmod code set permissions for these groups in this order:
1.Owner (you)
2.Group (a group of other users that you set up)
3.World (anyone else browsing around on the file system)
Each digit of this code sets permissions for one of these groups as follows. Read is 4. Write is 2. Execute is 1.
The sums of these numbers give combinations of these permissions:
0 = no permissions whatsoever; this person cannot read, write, or execute the file
1 = execute only
2 = write only
3 = write and execute (1+2)
4 = read only
5 = read and execute (4+1)
6 = read and write (4+2)
7 = read and write and execute (4+2+1)
Chmod commands on file apple.txt (use wildcards to include more files)
Command Purpose
chmod 700 apple.txt Only you can read, write to, or execute apple.txt
chmod 777 apple.txt Everybody can read, write to, or execute apple.txt
chmod 744 apple.txt Only you can read, write to, or execute apple.txt Everybody can read apple.txt;
chmod 444 apple.txt You can only read apple.txt, as everyone else.
Detecting File Permissions
You can use the ls command with the -l option to show the file permissions set. For example, for apple.txt, I can do this:
$ ls -l apple.txt
-rwxr--r-- 1 december december 81 Feb 12 12:45 apple.txt
$
The sequence -rwxr--r-- tells the permissions set for the file apple.txt. The first - tells that apple.txt is a file. The next three letters, rwx, show that the owner has read, write, and execute permissions. Then the next three symbols, r--, show that the group permissions are read only. The final three symbols, r--, show that the world permissions are read only.
Compliments and full credit from:
http://www.december.com/unix/ref/chmod.html
Amazing thread just what I needed lol thanks!
cooolone2 said:
Just to add, if I may, a little about the permissions...
============================================================
File permissions for Unix... which Android is based, just so those who tinker with the file permissions may know what they are getting into.
============================================================
Use the chmod command to set file permissions.
The chmod command uses a three-digit code as an argument.
The three digits of the chmod code set permissions for these groups in this order:
1.Owner (you)
2.Group (a group of other users that you set up)
3.World (anyone else browsing around on the file system)
Each digit of this code sets permissions for one of these groups as follows. Read is 4. Write is 2. Execute is 1.
The sums of these numbers give combinations of these permissions:
0 = no permissions whatsoever; this person cannot read, write, or execute the file
1 = execute only
2 = write only
3 = write and execute (1+2)
4 = read only
5 = read and execute (4+1)
6 = read and write (4+2)
7 = read and write and execute (4+2+1)
Chmod commands on file apple.txt (use wildcards to include more files)
Command Purpose
chmod 700 apple.txt Only you can read, write to, or execute apple.txt
chmod 777 apple.txt Everybody can read, write to, or execute apple.txt
chmod 744 apple.txt Only you can read, write to, or execute apple.txt Everybody can read apple.txt;
chmod 444 apple.txt You can only read apple.txt, as everyone else.
Detecting File Permissions
You can use the ls command with the -l option to show the file permissions set. For example, for apple.txt, I can do this:
$ ls -l apple.txt
-rwxr--r-- 1 december december 81 Feb 12 12:45 apple.txt
$
The sequence -rwxr--r-- tells the permissions set for the file apple.txt. The first - tells that apple.txt is a file. The next three letters, rwx, show that the owner has read, write, and execute permissions. Then the next three symbols, r--, show that the group permissions are read only. The final three symbols, r--, show that the world permissions are read only.
Compliments and full credit from:
http://www.december.com/unix/ref/chmod.html
Click to expand...
Click to collapse
Thanks! Added
ih4ckback said:
Amazing thread just what I needed lol thanks!
Click to expand...
Click to collapse
Thanks, all goes to Adrynalyne
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?
wonderful guide. I would like to add it to the guides thread.
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...
mm7490 said:
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...
Click to expand...
Click to collapse
If I got time tomorrow I could do that. I work primarily in Linux also
Sent from my Samsung Fascinate using Tapatalk Pro
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??
Well when the $ changes to # it means you have SU access
mustafa.aziz said:
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'
Click to expand...
Click to collapse
Please give us the exact command(s) you entered
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'
mustafa.aziz said:
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'
Click to expand...
Click to collapse
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?
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 :
Code:
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 ^^
Khoral said:
Well, I don't think so ^^ As he doesn't want to erase a whole directory, but only a file.
Click to expand...
Click to collapse
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
mustafa.aziz said:
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'
Click to expand...
Click to collapse
rm -rf /blah/blah
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#

How to Install/Remove System Apps on Android [MUST HAVE ROOT]

########## IMPORTANT UPDATE ##########
There is an APP available that makes this much simpler
* No Console Commands Needed
* You still MUST HAVE ROOT
* It must be installed on internal memory to work correctly
* Be sure you know what a system app does before you remove it.
* If you remove a vital app you could mess up your system completely.
The APP is Called: "System APP Remover"
Here's a Link to Download it: http://www.megaupload.com/?d=ZFC2C1R7
Mirror Download Link: http://www.mediafire.com/?h3n3ftbwilshcvn
######################################
Here are the console commands for installing/removing system apps in android console emulator, very easy ; )
You must have ROOT and console emulator, I found this very helpful, so I hope it helps others as well...
_____________________________________________________________________________________
Install App to System:
Place APK file in the root folder on your sd card.
Open terminal and enter these commands:
# su
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# cat /sdcard/filename.apk > /system/app/filename.apk
# mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
# reboot
_____________________________________________________________________________________
Remove App from System (Be careful what you remove):
# mount -o remount,rw /system
# rm /system/app/Filename.apk
[Optional, to make read-only again]
# mount -o remount,r /system
[When Finished]
# reboot
_____________________________________________________________________________________
****KEY****
"#" means root command will follow
[Notes are in these brackets and aren't commands]
- ENJOY
ALSO...
**** I'm new to Android APP creation, but if anyone can automate this script to make a simple One-Click GUI APP that would be awesome, all I ask is that you put my name in the co-dev/"Thanks to" list for the app, just so I can say I helped ;-) ****
- CuriousAndroid
I am trying to reinstall some files I uninstalled. I went to the following link on this site and found some apps that people said could be removed - http://forum.xda-developers.com/showthread.php?t=773142
however, my Act1 video player now quits whenever I receive an incoming text, so I need to reinstall some programs and see which one is causing the problem
I downloaded an app called Android Terminal Emulator by Jack Palevich. I tried a "reboot" command (without the #) but it said reboot operation not permitted. Is this the Emulator I need to reinstall files? Am I doing something wrong?
--------------
EDITED:
ok nevermind, i realized the "su" command gives superuser access needed for the reboot....going to try to install files now
yeah, to use any root commands "su" must be used first otherwise the shell will think your just some generic user with limited privileges and nothing will work.
It's very important to identify any apps you plan on removing before you attempt it to make sure it isn't needed by another process.
You got lucky, some apps once removed can cause the whole rom to fail, so be careful!
- CuriousAndroid
well i think i messed something up...is there a way to recover back to stock after using the sdx stock app remover? i removed the video player but tried reinstalling it...when i uninstalled it from sdx, i noticed my other video player (Act1) would quit whenever i'd get an incoming text
i have all the .apks backed up, but after attempting to reinstall the stock video player, it hangs in MyFiles...then i reset back to factory (no Act1), and it can't play my videos, i get the error "No applications can perform this action"
Is there a way to recovery back to stock with all applications installed and in tact? i have all the .apks, but this video player won't work, after following your instructions above
thanks
It will work. Check the following:
* All shell commands are CASE-sensitive, so if the app is called Vending.apk you can't type vending.apk
* for the command to work you must have the apk on the root of your SDcard, not in sub-directories.
* if you have a copy of the rom you installed you can unzip it on your PC and find the system app folder, which you can use to cross-refference with the system/app folder on your phone to see if your missing something else.
in terminal you can list system apps like this:
# su
# cd /system/app/
# ls | more
[that will allow you hit space bar to navigate through app list if it's longer than a page,press ESC when done to go back to prompt]
* If all else fails you can backup your settings to your sd card and re-install your rom (as a last resort)
-Good Luck
curiousandroid said:
Install App to System:
Place APK file in the root folder on your sd card.
Open terminal and enter these commands:
# su
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# cat /sdcard/filename.apk > /system/app/filename.apk
# mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
# reboot
_____________________________________________________________________________________
Remove App from System (Be careful what you remove):
# mount -o remount,rw /system
# rm /system/app/Filename.apk
[Optional, to make read-only again]
# mount -o remount,r /system
[When Finished]
# reboot
_____________________________________________________________________________________
****KEY****
"#" means root command will follow
[Notes are in these brackets and aren't commands]
- ENJOY
ALSO...
**** I'm new to Android APP creation, but if anyone can automate this script to make a simple One-Click GUI APP that would be awesome, all I ask is that you put my name in the co-dev/"Thanks to" list for the app, just so I can say I helped ;-) ****
- CuriousAndroid
Click to expand...
Click to collapse
When I am doing the first part here of installing app to system I dont just simply do that first I can already have an app ready to go that I want to move to sd card right? I am just making sure I didnt have to do that simply first before I even start moving the apps. This site has be great and thanks for everybody help. Wish I would have known have this site way back when.
What is "yaffs2" standing for? I type "yaffs" instead of "yaffs2". What has this done to my system? Do I have to expect any "side-effects"?
When I call # ls | more to list the directories content, the apk is listed but it is not installed yet. Is there anything else i have to do?
yaffs is nand flash filesystem
yaffs2 is more elaborate updated version
yaff2 has greater support
so if your device isnt supported by yaffs1, it may not work.
it's best to follow the commands as they're written.
apps still appear as apks in system/apps folder after installation.
Haha thats funny!! I downloaded this app.. put it on my sdcard.. installed it and when i tried to open it it said " Shame on you for trying to pirate a 1.00 app "
If you have Applanet just go there and look for Systemapp Remover - it's a bit older version but seems to do the job.
By mistake my contacts.apk is removed. Above trick also not worked. my phone is LG GT540. Pl suggest any other way.
rajhan9412 said:
By mistake my contacts.apk is removed. Above trick also not worked. my phone is LG GT540. Pl suggest any other way.
Click to expand...
Click to collapse
Grab the contacts.apk from the rom you're running and push it back in. Btw titanium backup removes system/apps without terminal commands while allowing to to make a backup first in case u want. it back or for little hickups such as this.
Sent from transparent xda app by theimpaler747
I did everything right, and the apps that I removed disappeared from the app drawer. But, after I reboot my phone, they show up again.
What can I do?
In terminal type
ls system/app
Hit enter and see if said apps are in the list
Sent from my HTC Sensation 4G using XDA App
i got a better method.
app is called app quarantine
it need root and is totally free
it can quaratine every app including rom apps and system apps
really that thing awesome. no manuall backup needed anymore and as long you dont brick the os you can easy try and error - but of course still be carefull and login and activate com.brain.logic.provider lol
Hi there i use root explorer and that is the easiest way i think to remove system apps on android phones [root required] you can download root explorer from the market or get it from 4shared just search for root explorer.apk install it and navigate to /system/apps/ and the app you wish to delete long press the app and delete make sure you mount as read/write instead of read only.
Hope this helps 
@0mpranav
actually its not and actually you didnt read my post
i advertise this little peace of freeware because it really made my day (im not related in anyway to the developer)
the quarantine removes it but store it automatically in another directory
just multiselect and press one button DONE
no need to single delete something because you always should backup first
for example turns out on samsungs device EMAIl application is also related to exchange sync - huh i was happy to restore it
really take a look -
btw i hate the root explorer - for some taksts might be usefull but fileexpert is way better in that and its free as the quaratine app is too
bofh999 said:
actually its not and actually you didnt read my post
i advertise this little peace of freeware because it really made my day (im not related in anyway to the developer)
the quarantine removes it but store it automatically in another directory
just multiselect and press one button DONE
no need to single delete something because you always should backup first
for example turns out on samsungs device EMAIl application is also related to exchange sync - huh i was happy to restore it
really take a look -
btw i hate the root explorer - for some taksts might be usefull but fileexpert is way better in that and its free as the quaratine app is too
Click to expand...
Click to collapse
You were right mate got problems in upgrading my nexus one coz i deleted the .odex system apps directly without any backup but upgraded to 2.3.6 with some trial and error method but lost root access any help would be appriciated 
@0mpranav
Installing system app
Hi, i have the same problem. I tried Root Explorer, and the Shell Commands method (with Cat command), the files i copy are in there, with all the permissions and everything, but when i reboot, none of them are installed, and my "contacts" app is still broken. Can anyone help please?
Nevermind, found the problem. I needed the exact files for my Atrix 4G with the same android version.

Build.prop Edits (Stock ROM)

I wanted to start an official thread on performing build.prop edits on KFHD since no one has of yet. I have tinkered for several hours yesterday trying to get one that allows Google Play apps to install that show "unsupported device". I have had zero luck unfortunately, and am hoping some others want to take up the challenge and find a solution.
I suggest you get busybox before attempting this, it makes copying files easier. Get it in the GooglePlay store:
https://play.google.com/store/apps/details?id=stericson.busybox&hl=en
Make sure you back up your file first!!! I did these steps:
Code:
# adb shell
# su
# mount -o remount,rw /system
# cp /system/build.prop /system/build.prop.orig (cp comes with busybox see link above)
# cp /system/build.prop /sdcard/build.prop.orig
# exit
NOTE: If you didn't install busybox, then you can do the cp commands as below:
Code:
# cat /system/build.prop.orig > /system/build.prop
Word of caution, I have managed to get my Kindle into a boot loop several times through this, but fortunately have been able to recover (details below). I cannot guarantee that you won't damage your Kindle in the process, and prevent it from booting.
I am also attaching a copy of the stock build.prop in case you manage to damage yours. I can't guarantee you will be able to put it back if you get in a boot loop, but you should be able to at minimum "vi" the existing one and manually enter everything to fix you up.
Here are my recovery steps if you manage to get stuck in a boot loop (I notice this happens a lot if you modify the ro.product.board entry). All credit for saving my bacon (and showing us how to root) goes to jcase and sparkym3. One note, you cannot use "su" if you get in this state, you get some exception and the binary errors out about you not being fully booted.
Code:
# adb shell
# echo 'ro.kernel.qemu=1' > /data/local.prop
# exit
# adb reboot
# adb shell
# mount -o remount,rw /system
# cp /system/build.prop.orig /system/build.prop (cp comes with busybox see link above)
# rm /data/local.prop
# exit
# adb reboot
Your device "should" boot after this.
nvrmore100 said:
I wanted to start an official thread on performing build.prop edits on KFHD since no one has of yet. I have tinkered for several hours yesterday trying to get one that allows Google Play apps to install that show "unsupported device". I have had zero luck unfortunately, and am hoping some others want to take up the challenge and find a solution.
I suggest you get busybox before attempting this, it makes copying files easier. Get it in the GooglePlay store:
https://play.google.com/store/apps/details?id=stericson.busybox&hl=en
Make sure you back up your file first!!! I did these steps:
Code:
# adb shell
# su
# mount -o remount,rw /system
# cp /system/build.prop /system/build.prop.orig (cp comes with busybox see link above)
# cp /system/build.prop /sdcard/build.prop.orig
# exit
NOTE: If you didn't install busybox, then you can do the cp commands as below:
Code:
# cat /system/build.prop.orig > /system/build.prop
Word of caution, I have managed to get my Kindle into a boot loop several times through this, but fortunately have been able to recover (details below). I cannot guarantee that you won't damage your Kindle in the process, and prevent it from booting.
I am also attaching a copy of the stock build.prop in case you manage to damage yours. I can't guarantee you will be able to put it back if you get in a boot loop, but you should be able to at minimum "vi" the existing one and manually enter everything to fix you up.
Here are my recovery steps if you manage to get stuck in a boot loop (I notice this happens a lot if you modify the ro.product.board entry). All credit for saving my bacon (and showing us how to root) goes to jcase and sparkym3. One note, you cannot use "su" if you get in this state, you get some exception and the binary errors out about you not being fully booted.
Code:
# adb shell
# echo 'ro.kernel.qemu=1' > /data/local.prop
# exit
# adb reboot
# adb shell
# mount -o remount,rw /system
# cp /system/build.prop.orig /system/build.prop (cp comes with busybox see link above)
# rm /data/local.prop
# exit
# adb reboot
Your device "should" boot after this.
Click to expand...
Click to collapse
Do you means that if we get stuck in the boot loop, we can try the third code to recovery?
It should let you get back to the device if you are in a loop like you would experience with the build.prop edit. Meaning you can still use adb shell to access the system even though its not entirely booted up, and you can't use SU.
No one willing to try more build.prop edits? I spent another few hours at this, I'm still no farther. I am able to trick play.google.com into thinking I have a different system (Nexus S in this case) but the play store on the kindle doesn't allow me to install several apps. If I tell it to download via the web site, it does not push them down to my device. Also, if I try to do a combination of website / play store app at various stages of the process, I can get all the way to install portion and then it tells me its not compatible...
Does anyone ever try to change DPI to 160 or lower?
Sent from my KFHD rooted
Yes, with a lower dpi, the normal android lock screen returns, however, the keyboard gets seventy messed up and becomes unusable. This was at 130 dpi.
Sent from my KFTT using XDA Premium HD app
Has any progress been made on installing incompatible apps from the play store?
Sent from my KFTT using xda app-developers app
madddoggj said:
Has any progress been made on installing incompatible apps from the play store?
Sent from my KFTT using xda app-developers app
Click to expand...
Click to collapse
use market unlocker.its ok.
madddoggj said:
Has any progress been made on installing incompatible apps from the play store?
Sent from my KFTT using xda app-developers app
Click to expand...
Click to collapse
Yes, when Google says no, I go look for the apk and download it anyways. So far nothing has crashed. But I try to stick with things for ICS.
I messed with the ro.product.board entry... and now when reboot it got stuck at "Kindle is Upgrading... Starting application..."
Tried adb but device not attacked.
Is there a way to boot it up again?
dexd, http://forum.xda-developers.com/showthread.php?t=1930656
nvrmore100 said:
Here are my recovery steps if you manage to get stuck in a boot loop (I notice this happens a lot if you modify the ro.product.board entry). All credit for saving my bacon (and showing us how to root) goes to jcase and sparkym3. One note, you cannot use "su" if you get in this state, you get some exception and the binary errors out about you not being fully booted.
Code:
# adb shell
# echo 'ro.kernel.qemu=1' > /data/local.prop
# exit
# adb reboot
# adb shell
# mount -o remount,rw /system
# cp /system/build.prop.orig /system/build.prop (cp comes with busybox see link above)
# rm /data/local.prop
# exit
# adb reboot
Your device "should" boot after this.
Click to expand...
Click to collapse
Worked like a charm on 7.2.1 jcase and sparkym3 are brilliant. I have no idea how this code works or what makes sense about it, but it's fantastic. Also, since this code lets you copy files without root, could this be another method for rooting my device?
Yuretz said:
dexd, http://forum.xda-developers.com/showthread.php?t=1930656
Click to expand...
Click to collapse
I followed the guide and got myself this factory cable and I can boot it up again
My build.prop
Quadrant 2450
No need to block accelerometer in games
Fast worm program start
Suddenly deleted strings about fast restart and unlock, will add tomorrow. Issue's is cold start takes a sec but it doesnt bother
Thank you for your post, this thread may be quite useful for who has had a bricked device.
Yuretz said:
My build.prop
Quadrant 2450
No need to block accelerometer in games
Fast worm program start
Suddenly deleted strings about fast restart and unlock, will add tomorrow. Issue's is cold start takes a sec but it doesnt bother
Click to expand...
Click to collapse
I don't know what the other two things mean, but the "No need to block accelerometer in games" is something I need! Are you sing a Kindle Fire HD 7"? If so, I'm definitely doing this!
macravin said:
I don't know what the other two things mean, but the "No need to block accelerometer in games" is something I need! Are you sing a Kindle Fire HD 7"? If so, I'm definitely doing this!
Click to expand...
Click to collapse
Yes, I'm KFHD 7 user. DPI 160!!! Stock launcher won't be usable.. If U have so, need to change string about dpi to 260, if i'm not mistaken.
On ADW Launcher or any other sideloaded everything work like a charm.. APPS switch to TABLET mode if support
Yuretz said:
Yes, I'm KFHD 7 user. DPI 160!!! Stock launcher won't be usable.. If U have so, need to change string about dpi to 260, if i'm not mistaken.
On ADW Launcher or any other sideloaded everything work like a charm.. APPS switch to TABLET mode if support
Click to expand...
Click to collapse
So you can download apps from marked which are marked as "incompatible device" with stock build.prop ? Thank you for your answer! :fingers-crossed:
Yuretz said:
Yes, I'm KFHD 7 user. DPI 160!!! Stock launcher won't be usable.. If U have so, need to change string about dpi to 260, if i'm not mistaken.
On ADW Launcher or any other sideloaded everything work like a charm.. APPS switch to TABLET mode if support
Click to expand...
Click to collapse
I did this, but the dpi made my keyboard unuseable (the keyboard doesn't fit on screen idk why it became big when everything else became small)... does anyone know of a fix for this? That would be really great!
Does this work on Kindle Fire HD 8.9?
Yuretz said:
My build.prop
Quadrant 2450
No need to block accelerometer in games
Fast worm program start
Suddenly deleted strings about fast restart and unlock, will add tomorrow. Issue's is cold start takes a sec but it doesnt bother
Click to expand...
Click to collapse
Ok I am very excited.I saw this possible solution to my problem, as I would like to download NBA Jam for android (that I modded with Jordan in it that I have working on my rooted Kindle Fire with CM10 linaro on it, but what I wonder is if this will work for a rooted Kindle Fire HD 8.9 as well as a Kindle Fire HD 7? Thank you in advance.

[Q] How do I delete system apks?

I can't figure out how to delete some of the system apks off my rooted Nook Simpletouch. Running 1.2.1, and Nootered it. Tried to ADB uninistall Phone.apk, but it just reports failure. I could use some help.
/system is usually read-only.
To make changes in its content you need to remount it read/write:
Code:
stop
mount -o rw,remount /dev/block/mmcblk0p5 /system
The stop is to be on the safe side, it stops the android subsystem.
After you are done making changes it's best to:
Code:
reboot
Renate NST said:
/system is usually read-only.
To make changes in its content you need to remount it read/write:
Code:
stop
mount -o rw,remount /dev/block/mmcblk0p5 /system
The stop is to be on the safe side, it stops the android subsystem.
After you are done making changes it's best to:
Code:
reboot
Click to expand...
Click to collapse
Just rename them. add ",bak:" to the end or similar. This will disable them, and if you notice instabilities because of getting rid of them you can just remove the appended extension. If everything runs well, you can then delete them with no worries.
I've renamed some of the recommended ones and have an error that comes up. "A problem has occurred, contact support". I need to figure out what is causing that to happen. its annoying but doesn't seem to be an actual problem.
What does "mmcblk0p5" represent?
mmcblk = multimedia card block device, 0 = first device, p5 = fifth partition
Thanks Renate, but It's not working. In order to rename or delete an apk off my Nook simpletouch, would someone please give me step instructions? I feel I'm missing something.
Code:
stop
mount -o rw,remount /dev/block/mmcblk0p5 /system
cd /system/app
mv BoringApp.apk BoringApp.bak
mv TediousApp.apk TediousApp.bak
reboot
And don't tell me that you have no boring or tedious apps!
The advice here is correct, better to rename sysapp extensions (.bak or .ap_) than delete as some might be needed by future apps/sys hacks/kernels. For those who can't adb by cable or keep it up wifi-wise, this is the easiest way even easier than root explorer:
https://play.google.com/store/apps/details?id=com.ghisler.android.TotalCommander
for sys or user app removal if you have to and can't use adb or even total commander, but then you shouldn't if not knowing sys file structures (I use Pro version, for removing many apps i just tested in a batch, sorted reminder):
https://play.google.com/store/apps/details?id=com.jumobile.manager.systemapp
I renamed talk telephone music audio etc apks on nst but Gallery is the only one I removed on all android devices & nst as it's just nasty which has never been missed by later hacks and quickpic is much better anyway:
https://play.google.com/store/apps/details?id=com.alensw.PicFolder
I created another directory under /system called archive. I move apps I don't what to use and fonts I change into /system/archive then I can just move them back if I have issues.
This still isn't working. My commands keep getting rejected. It isnt allowing stop to work. Also, I tried "adb cd /system/apps" and when that didn't work, I tried
"adb shell"
"#cd /system/apps"
No dice.
EDIT: Got it. needed to call it shell instead of adb. I also accidentally wrote "apps" instead of "app".

Categories

Resources