Related
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..
hi all!
i have put a script "99complete"
(
Code:
#!/system/bin/sh
sync;
setprop cm.filesystem.ready 1;
sleep 500
echo 25 > /sys/devices/platform/i2c-adapter/i2c-0/0-005c/sensitivity
echo 25 > /sys/devices/platform/i2c-adapter/i2c-0/0-005c/noise
)
in /system/etc/init.d
but when i boot my phone the script doesn't start...
i have Vachounay 1.0.1 Rom and Acer Liquid S100
any suggestion?
Probably the script isn't executable. Do "chmod +x" on file
-------------------------------------
Sent via the XDA Tapatalk App
I nave already tryed it...
Did you use linux to make the scripts? Scripts don't work if made with windows (unless you use notepad++)
does sleep 500 mean 500/60 ~=8+minutes??? I wonder why u wud wait 8 minutes for executing your script...Give it a try with say sleep 250 ..Wonder if that might be it..rest appears okay to me
Suxsem said:
hi all!
i have put a script "99complete"
(
Code:
#!/system/bin/sh
sync;
setprop cm.filesystem.ready 1;
sleep 500
echo 25 > /sys/devices/platform/i2c-adapter/i2c-0/0-005c/sensitivity
echo 25 > /sys/devices/platform/i2c-adapter/i2c-0/0-005c/noise
)
in /system/etc/init.d
but when i boot my phone the script doesn't start...
i have Vachounay 1.0.1 Rom and Acer Liquid S100
any suggestion?
Click to expand...
Click to collapse
If you edit the script on Windows then use notepad++ and make sure you select "Unix format" under Edit -> EOL Conversion. Also, leave an empty line at the end of the file.
It could also be that whatever ROM you are using does not support init.d scripts.
Check out ScriptManager. It's a little easier way to run stuff at boot, etc..
I found it when I couldn't get my tun.ko module inserted at boot..
https://market.android.com/details?id=os.tools.scriptmanager
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#
This trick (should) disable autobrightness
Code:
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
echo "echo 0 > /sys/devices/i2c-0/0-0040/leds/lcd-backlight/als/enable" >> /etc/hw_config.sh
echo "echo 254 > /sys/devices/i2c-0/0-0040/leds/lcd-backlight/brightness" >> /etc/hw_config.sh
echo "echo 254 > /sys/devices/i2c-0/0-0040/leds/lcd-backlight/max_brightness" >> /etc/hw_config.sh
exit
exit
adb reboot
You may edit /etc/hw_config.sh using root explorer, or similar, remounting system as rw. If so, remember to set permissions on hw_config.sh 550!
Tnx mate will try this..
I confirm, it works perfectly^^
you will need to restart your phone though
by the way, I did it through root explorer, no need for adb
Worked for me as well, but the disabled max brightness was a little too low for me.
If you cover the sensor with your thumb at max brightness without the sensor disabled that is basically what you get with it disabled through this hack. Great work, it does exactly what it's supposed to do which is disable the auto-brightness, but wish I could get to true full brightness with it disabled though.
Sent from my R800a using XDA App
Also did it through root explorer and it works for me to. No more flickering screen when not on full brightness
Regards Dousan...
you sure, I got it at full brightness.
try the backlight wedgit and set it to max and see.
EDIT:
you can also go to (in root explorer):
/sys/devices/i2c-0/0-0040/leds/lcd-backlight/brightness
and set it to 250 (max is 255)
Lol tried the native SE backlight widget and the third step (full brightness) turns the screen off?
It's the 1x1 widget by the way. The powercontrol toggles through the three steps.
Regards Dousan...
NielDK said:
This trick (should) disable autobrightness
Code:
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
echo "echo 0 > /sys/devices/i2c-0/0-0040/leds/lcd-backlight/als/enable" >> /etc/hw_config.sh
exit
exit
adb reboot
to enable autobrightness, edit the /etc/hw_config.sh and change the "0" to "1".
Click to expand...
Click to collapse
Sent from my R800a using XDA App
m3dteam said:
you sure, I got it at full brightness.
try the backlight wedgit and set it to max and see.
EDIT:
you can also go to (in root explorer):
/sys/devices/i2c-0/0-0040/leds/lcd-backlight/brightness
and set it to 250 (max is 255)
Click to expand...
Click to collapse
Yeah I checked all those, brightness and max brightness are both set to 255 with the hack turned on. But I still get the dim effect with the hack on, even after using the widgets and brightness controls in system prefs. Turn it off and the screen gets much brighter on reboot. I'll have to mess around some more...
Hey man could you give more detailed instructions for this please. I have no clue what that means. Could you break it down, tell me what software i need etc, and how to actually do this. I'm not a developer, just a Play owner.
You have to have root access before you can even try this, but if you do you can edit the hw_config.sh file in /etc, and an entry to disable the auto brightness function.
Sent from my R800a using XDA App
axiomjunglist said:
You have to have root access before you can even try this, but if you do you can edit the hw_config.sh file in /etc, and an entry to disable the auto brightness function.
Sent from my R800a using XDA App
Click to expand...
Click to collapse
NVM seems like you removed the code.
emann56 said:
NVM seems like you removed the code.
Click to expand...
Click to collapse
Yeah I thought I had it figured out and working but the sensor was still active and changing the brightness, thought strangely not for a while. Ah well. Here it is if it helps anyone though...
# Disable auto brightness, enable max brightness
dev=/sys/devices/i2c-0/0-0040/leds/lcd-backlight
echo 0 > $dev/als/enable # default = 1
echo 254 > $dev/brightness # default = 255
echo 254 > $dev/max_brightness # default = 255
I've tried with both root explorer and with adb shell commands and it seems to work for a time and then go back to normal again. After a reboot it's as never applied. Yesterday i did it with root explorer and went back into /sys/.../enable (after closing root ex and then open it again) and the number was still zero, but an hour later i checked again, cause it seemed to be dimming, and it had reverted back to 1? This morning i did it with adb shell and when i rebooted and checked /sys/.../enable it was still on 1.
Sorry but i'm a bit confused, shouldn't it be zero and not 1 after doing this mod?
Regards Dousan...
e: just did it again with adb shell the exact same way as before (copy paste both time, no errors) and now it seems to work again and /sys/.../enable is zero when checking with root explorer
e2: then not, a few min. after it started dimming again and the zero in /sys/../enable had reverted back to a 1? I'm lost and will give this a rest...
Dousan said:
I've tried with both root explorer and with adb shell commands and it seems to work for a time and then go back to normal again. After a reboot it's as never applied. Yesterday i did it with root explorer and went back into /sys/.../enable (after closing root ex and then open it again) and the number was still zero, but an hour later i checked again, cause it seemed to be dimming, and it had reverted back to 1? This morning i did it with adb shell and when i rebooted and checked /sys/.../enable it was still on 1.
Sorry but i'm a bit confused, shouldn't it be zero and not 1 after doing this mod?
Regards Dousan...
e: just did it again with adb shell the exact same way as before (copy paste both time, no errors) and now it seems to work again and /sys/.../enable is zero when checking with root explorer
e2: then not, a few min. after it started dimming again and the zero in /sys/../enable had reverted back to a 1? I'm lost and will give this a rest...
Click to expand...
Click to collapse
When using root explorer, make sure permissions are retained as 550 (r-xr-x--)
NielDK said:
When using root explorer, make sure permissions are retained as 550 (r-xr-x--)
Click to expand...
Click to collapse
Cheers mate, didn't know I had to change permissions to. Mine is rw-r--r-- in /sys/.../als. Just did the change in root ex again, changed permissions as you stated rebooted and checked the file. It said zero, then went out and back and there the 1 was again, even the permissions had changed back to rw-r--r--. Odd stuff?
Regards Dousan...
e: did the procedure again in root ex and rebooted and it changed back, so it wont stick when doing it with root ex. Would I just do a chmod 550 when doing it with adb shell before 'exit'?
I have the same problem, changing owners and permissions never seems to stick via root ex. Is there something buried in the system that reverts those properties back to default, gotta wonder...
Installing the ADB tools to try that next.
Edit: I've been monkeying around for hours trying different variables, changing permissions, etc. I just can't get the 'enable' file to stay at 0. It will stay at 0 for a while after initially setting it, but after a while something changes it back to 1. Oddly enough, with that code in the hw_config.sh it just happens more slowly than the default auto brightness mode if you don't modify anything further. The default auto-brightness changes rapidly on the fly which is really jarring when you're in a situation like being under a bright light and inadvertently covering the sensor with your shadow, for example. Conversely it does take a little longer to adjust the screen back to full brightness from working in a darker area, hence the annoyance of not seeing true brightness right away.
Sent from my R800a using XDA App
well i still have no clue how to do this, but it doesn't sound like it works anyhow, so I'm not too distressed. If anyone does get a fix for the auto-brightness, keeping the brightness on max, and permanent, please let me know, thanks.
Any updates? Could really do with the screen being brighter :/
NielDK said:
This trick (should) disable autobrightness
Code:
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
echo "echo 0 > /sys/devices/i2c-0/0-0040/leds/lcd-backlight/als/enable" >> /etc/hw_config.sh
echo "echo 254 > /sys/devices/i2c-0/0-0040/leds/lcd-backlight/brightness" >> /etc/hw_config.sh
echo "echo 254 > /sys/devices/i2c-0/0-0040/leds/lcd-backlight/max_brightness" >> /etc/hw_config.sh
exit
exit
adb reboot
You may edit /etc/hw_config.sh using root explorer, or similar, remounting system as rw. If so, remember to set permissions on hw_config.sh 550!
Click to expand...
Click to collapse
What am I changing in the hw_config file via root explorer.?
Using the amazing overclock module made by Tiago Sousa http://code.google.com/p/milestone-overclock/ , it is possible to modify the frequency tables on the motoACTV.
I'm not responsible for what you do to your device. This is potentially dangerous.
Extract the attached overclock.ko in some folder of your computer and open a command line in that folder. You need to have adb installed.
Issue the following commands:
Code:
adb remount
adb push overclock.ko /system/lib/modules/
adb shell insmod /system/lib/modules/overclock.ko omap2_clk_init_cpufreq_table_addr=0xc0049150
adb shell 'echo "0 1000000" > /proc/overclock/freq_table'
adb shell 'echo "1 800000" > /proc/overclock/freq_table'
adb shell 'echo "2 600000" > /proc/overclock/freq_table'
adb shell 'echo "3 300000" > /proc/overclock/freq_table'
adb shell 'echo "1 300000000 20" > /proc/overclock/mpu_opps'
adb shell 'echo "2 600000000 30" > /proc/overclock/mpu_opps'
adb shell 'echo "3 800000000 45" > /proc/overclock/mpu_opps'
adb shell 'echo "4 1000000000 45" > /proc/overclock/mpu_opps'
adb shell "echo 1000000 > /proc/overclock/max_rate"
adb shell "echo 45 > /proc/overclock/max_vsel"
This will create 4 frequency steps:
300MHz. This is the minimum we can get with the current kernel.
600Mhz. This is the stock highest speed. Now the voltage is lower.
800Mhz.
1Ghz.
Now, you can use a program like setCPU http://forum.xda-developers.com/showthread.php?t=505419 to set the maximum and minimum speeds.
Enjoy
On this command (after copying and pasting your commands above):
Code:
adb shell 'echo "0 1000000" > /proc/overclock/freq_table'
I get a return of:
Code:
The system cannot find the path specified.
I tried next to re-run:
Code:
adb shell insmod /system/lib/modules/overclock.ko omap2_clk_init_cpufreq_table_addr=0xc0049150
but it failed, because it already exists.
EDIT: I believe they should be like this:
Code:
adb shell "echo '0 1000000' > /proc/overclock/freq_table"
adb shell "echo '1 800000' > /proc/overclock/freq_table"
adb shell "echo '2 600000' > /proc/overclock/freq_table"
adb shell "echo '3 300000' > /proc/overclock/freq_table"
adb shell "echo '1 300000000 20' > /proc/overclock/mpu_opps"
adb shell "echo '2 600000000 30' > /proc/overclock/mpu_opps"
adb shell "echo '3 800000000 45' > /proc/overclock/mpu_opps"
adb shell "echo '4 1000000000 45' > /proc/overclock/mpu_opps"
EDIT 2: That didn't work... the frequencies aren't in setcpu, even after re-detecting speeds.
can you try this command?
Code:
adb shell grep omap2_clk_init_cpufreq_table /proc/kallsyms
It should return a number, and this number is the one that has to be used for the insmod.
I haven't updated my MotoActv in a while and maybe the kernels have changed.
Code:
C:\Users\Owner\Desktop\MiniADB>adb shell grep omap2_clk_init_cpufreq_table /proc
/kallsyms
[B]c0049150[/B] T omap2_clk_init_cpufreq_table
There was no error when running the insmod the first time, it went through successfully, just the next several lines, and then no change at the end, even after a reboot and re-checking the frequencies in SetCPU.
You are right about the commands, for windows, you have to use this:
Code:
adb remount
adb push overclock.ko /system/lib/modules/
adb shell insmod /system/lib/modules/overclock.ko omap2_clk_init_cpufreq_table_addr=0xc0049150
adb shell "echo '0 1000000' > /proc/overclock/freq_table"
adb shell "echo '1 800000' > /proc/overclock/freq_table"
adb shell "echo '2 600000' > /proc/overclock/freq_table"
adb shell "echo '3 300000' > /proc/overclock/freq_table"
adb shell "echo '1 300000000 20' > /proc/overclock/mpu_opps"
adb shell "echo '2 600000000 30' > /proc/overclock/mpu_opps"
adb shell "echo '3 800000000 45' > /proc/overclock/mpu_opps"
adb shell "echo '4 1000000000 45' > /proc/overclock/mpu_opps"
adb shell "echo 1000000 > /proc/overclock/max_rate"
adb shell "echo 45 > /proc/overclock/max_vsel"
Do not reboot! This changes are not save anywhere yet. It's a bit dangerous because the system will not boot if you put wrong values in there. I'm leaving this for later.
Good work, however the changes are not persistent to reboots. I put them in init.goldfish.sh but still not persistent. When doing it from shell, the changes are there in SetCPU, just not after a reboot. Maybe we could script it somewhere else to start at reboot...
Regards...
I added init.d to the /system/etc folder and added my script - still nothing
I added the script in other shells but still nothing...
I heard that SManager will boot scripts at logon, maybe this is the way to go?
There are a few scripts that are launched by init directly. One for the keyboard, one for preinstall, etc.
Try adding the insmod and echo commands to one of those. I'll test this later and post about it.
I amended the one for the keyboard, no dice. I am going to try again though... keep you informed.
init_prep_keyboard.sh keeps reverting back to what it was before amendments. I am sure that I verified its permissions prior to reboot, it just went back to what it was before and deleted the .BAK file too, wierd.
Peace
Working Solution...
I've tested the method above and it works perfectly.
But as mentioned, the script has to be executed upon every reboot.
Working Solution !!!
I've tested this and it works 100%
- Dump boot.img from watch.
- Extract and decompile boot.img
- Create overclock.sh and put it in etc folder from boot.img
- Write entire script in overclock.sh
- Open init.rc from boot.img
- Add exec /system/etc/overclock.sh in init.rc
- Save changes to init.rc
- Repack boot.img
- Push modified boot.img to watch via fastboot
- Restart watch.
Consider adding overclock.ko in system.img
Overclock is now permanent !!! Even after reboot :-D
tansoftware said:
I've tested the method above and it works perfectly.
But as mentioned, the script has to be executed upon every reboot.
Working Solution !!!
I've tested this and it works 100%
- Dump boot.img from watch.
- Extract and decompile boot.img
- Create overclock.sh and put it in etc folder from boot.img
- Write entire script in overclock.sh
- Open init.rc from boot.img
- Add exec /system/etc/overclock.sh in init.rc
- Save changes to init.rc
- Repack boot.img
- Push modified boot.img to watch via fastboot
- Restart watch.
Consider adding overclock.ko in system.img
Overclock is now permanent !!! Even after reboot :-D
Click to expand...
Click to collapse
Can you possibly make a patched boot.img for us?
tansoftware: This is no easy task on a windows box... I will try on Fedora...
a detailed walkthrough would be superb! i.e. How-to? Otherwise GIYF
Peace
EDIT: This ain't easy in linux either...
If you could post your modified Boot.img, that would be killer!
What bash shell did you use upon init.rc? Could you at least share that with us?
dproldan: This thing WIZZes at 1Ghz! If there were just an easier way to make it persistent across reboots... but what a difference.
I posted on the other motoactv thread a very easy way to overclock.
You need android overclock and rom toolbox pro (maybe the free version works I have no idea)
1. Open android overclock select advanced/custom.
2. Scroll to bottom and select apply preset. This gives you four slots 350, 500, 800, 1000.
3. Open rom toolbox pro, performance, cpu control.
4. Slide the bar to desired speed. You can also set profiles in this section to clock down to 350 while the screen is off etc.
I was able to apply at boot etc and haven't lost the overclocking settings. With cf-bench my score went from 1504 to 2370. You can probably apply settings beyond the slots listed above but you will need to increase the voltages in android overclock. I haven't had time to try it. Another microsoft certification exam this week.
Updated Method...
Jeff said:
tansoftware: This is no easy task on a windows box... I will try on Fedora...
a detailed walkthrough would be superb! i.e. How-to? Otherwise GIYF
Peace
EDIT: This ain't easy in linux either...
If you could post your modified Boot.img, that would be killer!
What bash shell did you use upon init.rc? Could you at least share that with us?
Click to expand...
Click to collapse
I can't share my boot.img at this time as it is highly experimental and could easily & un-reversibly brick your watch. My boot.img contains a modified bootstrap.bin that flashes upon boot and forces Android to boot from the built-in MMC instead of internal nvram. Extremely buggy at this stage with several crashes but I'm no longer limited by the 256mb ram on the watch. Hopefully after the bugs are ironed out, we can all enjoy full 8/16 gigs of space. This trick was taken from the nook color modified boot code.
As for how to embed the code into your own boot.img, I believe @Prack posted a simpler cleaner method to overclock the watch. If his method does not work as explained, I'll provide a more thorough explanation of my method.
tansoftware said:
Extremely buggy at this stage with several crashes but I'm no longer limited by the 256mb ram on the watch.
Click to expand...
Click to collapse
Uh what?
eXecuter.bin said:
Uh what?
Click to expand...
Click to collapse
My guess is he's talking about a swapper2 or some other swap file. It helps but it by no means replaces having more ram. I was on a droid 1 for years and the biggest issue with that phone was the ram/internal storage space. I used swap and 2nd sdcard partitions to make up for it. I'm guessing he's doing the same thing with the watch. Would be interesting to see if he gets any actual improvement.
any more news on this?
permanent settings for the overclock
Attached is a modified "loadpreinstalls.sh" file that will load the module and apply the settings at boot.
Be careful with this, it can prevent your device from booting, requiring a full system reinstall to bring it back.
so, download the overclock.ko from the first post, download and extract this loadpreinstalls.sh to the same folder in your computer and issue this commands from a terminal:
adb remount
adb push overclock.ko /system/lib/modules/
adb push loadpreinstalls.sh /system/bin/
adb shell chmod 755 /system/bin/loadpreinstalls.sh
adb reboot
Now you can use SetCPU to choose the speeds you like and make its changes permanent.
This is working fine for me with the current MotoACTV system releases, it could be broken for some older versions.
Enjoy
This sounds like an awesome application - any way to make it easier for the lay (er) people that know just enough to be dangerous?
mattyv said:
This sounds like an awesome application - any way to make it easier for the lay (er) people that know just enough to be dangerous?
Click to expand...
Click to collapse
How about this. I just wrote a simple windows install script and included all of dproldan's needed files, so all you have to do is unzip this to your desktop and run "runme.bat".
Pre-requesites:
-ACTV must be rooted
-ACTV must be plugged into computer and turned on normally
Called it "dproldan_overclock".
Even included the ADB drivers.