[HELP] Logcat enable. - Galaxy S 5 Q&A, Help & Troubleshooting

Hi,
I've just set up a new handset.
Since changes ive made over night im getting;
- unfortunately, 'app name' has stopped.
I'm trying to generate a logcat, having no joy.
- handset; SGSV
- rom; XTRESTROLITE
- kernel; blaze
I have turned logging on via 'pimp my rom' tweaks.
Upon adb logcat command i get;
- Unable to open log device '/dev/log/main': No such file or directory
So i set about tying to manually ensure logcat is enabled.
First with ADB;
> adb shell
> logcat-enable
Result;
C:\android-sdk\platform-tools>adb shell
[email protected]:/ $ logcat-enable
logcat-enable
/system/bin/sh: logcat-enable: not found
Then via USSD code;
> *#*#2846579#*#*
Result;
Number dialled, no code.
Then i attempted to follow as per these instructions;
http://bitmote.com/index.php?post/2013/02/19/Enabling-Logcat-in-Custom-Android-Roms
I found system set to ro, remounted rw ok.
But ran into a dead end here;
"First you need to locate the logger kernel module...
logger.ko located in...your /system folder...
Try these locations:
/system/lib/modules/logger.ko
/system/modules/logger.ko"
The folder "modules" does not exist in system or lib/system.
Help would be much appreciated.
Cheers.

Related

Rooted, can I now sideload?

I am rooted with the Liberated ROM and using unrevoked tool. I tried sideloading an app I downloaded from my phone's browser and it said the phone was still locked outside of the marketplace apps. Am I doing something wrong?
Thanks
if windows and assuming you have installed the Android SDK, rename the SDK folder to simply c:\android
then run this little batch file (save it via notepad as whateveryouwant.bat), alternatively execute line by line the commands below
cd\android\tools
adb remount
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
echo update secure set value = 1 where name = 'install_non_market_apps';|sqlite3 settings.db
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
pause 1
adb reboot
You need to enable sideloading separately. Refer to this post, specifically the section entitled "Also, enable installation of non-Market (untrusted) apps (sideloading)."
http://forum.xda-developers.com/showpost.php?p=6906288&postcount=2
kaschenberg said:
I am rooted with the Liberated ROM and using unrevoked tool. I tried sideloading an app I downloaded from my phone's browser and it said the phone was still locked outside of the marketplace apps. Am I doing something wrong?
Thanks
Click to expand...
Click to collapse
NOTES:
You MUST have root access on the phone in order for this to work
You must have the tools directory from the Android SDK installed.
sqlite3 is included in the Android SDK tools, so this would be the best way:
Windows:
Enable USB debugging (settings > applications > development > USB Debugging)
From the command prompt, change to the sdk/tools directory.
adb remount
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
echo update secure set value = 1 where name = 'install_non_market_apps';|sqlite3 settings.db
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
Optional test for success:
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
echo select value from secure where name = 'install_non_market_apps';|sqlite3 settings.db
If the last command returns 1, then your change is successful.
Linux/OS X
Enable USB debugging (settings > applications > development > USB Debugging)
From a superuser command prompt, change to the /sdk/tools directory
./adb remount
./adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
echo "update secure set value = 1 where name = 'install_non_market_apps';"|./sqlite3 settings.db
./adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
Optional test for success:
./adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
echo "select value from secure where name = 'install_non_market_apps';"|./sqlite3 settings.db
If the last command returns 1, then your change is successful.
Reboot phone and sideloading works. (thanks fluffyarmada)
xdafly said:
if windows and assuming you have installed the Android SDK, rename the SDK folder to simply c:\android
then run this little batch file (save it via notepad as whateveryouwant.bat), alternatively execute line by line the commands below
cd\android\tools
adb remount
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
echo update secure set value = 1 where name = 'install_non_market_apps';|sqlite3 settings.db
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
pause 1
adb reboot
Click to expand...
Click to collapse
worked perfectly! thanks for that! i just ran line for line in cmd prompt and i can now sideload just fine on the phone. now, just need to find apps to sideload!!! already installed swype and tried the wifi tether thing, but after that, i dont know what else to load up! i guess its back to more forum searching. but thanks so much!
sorry for the noobish question...
is sideloading the same as installing and running apps from the SD card? and, i have also heard that if you run anything from the SD card, you should go with a Class 6 SD.
im holding off on the root for now... but these are some of the few questions i had in regards to it
jbizz said:
sorry for the noobish question...
is sideloading the same as installing and running apps from the SD card? and, i have also heard that if you run anything from the SD card, you should go with a Class 6 SD.
im holding off on the root for now... but these are some of the few questions i had in regards to it
Click to expand...
Click to collapse
No, it is not. That is referred to as apps2sd. That is not currently available on the Aria, and once it is, a class 2 Samsung works just fine.
attn1 said:
No, it is not. That is referred to as apps2sd. That is not currently available on the Aria, and once it is, a class 2 Samsung works just fine.
Click to expand...
Click to collapse
cool deal, wasnt for sure or not. i have a Patriot 8gb Class 4. so in any case, im still good. looking forward to rooting my phone in a week or 2.
attn1 said:
No, it is not. That is referred to as apps2sd. That is not currently available on the Aria, and once it is, a class 2 Samsung works just fine.
Click to expand...
Click to collapse
In anticipation of this I just purchased a 16gig sd card sound...can't wait...
Sent from my HTC Aria using XDA App
attn1 said:
NOTE: You MUST have root access in order for this to work
sqlite3 is included in the Android SDK tools, so this would be the best way:
COMMON
Enable USB debugging (settings > applications > development > USB Debugging)
adb remount
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
Linux/OS X
echo "update secure set value = 1 where name = 'install_non_market_apps';"|./sqlite3 settings.db
WINDOWS
echo update secure set value = 1 where name = 'install_non_market_apps';|sqlite3 settings.db
COMMON
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
Reboot phone and sideloading works. (thanks fluffyarmada)
Click to expand...
Click to collapse
I have an HTC Aria, rooted with Clockwork, an 003 rom version installed.
The annoying AT&T startup was replaced as stated elsewhere, yet I see the AT&T files it was suppose to delete are still present.
(Debugging in Settings is on, and signature verification is off in Clockwork)
I'm unclear why the AT&T files still remain after running the 003 rom, or how to manually remove them.
More importantly...
I'm confused on what the step by step means are to get my Aria to accept unapproved apps.
Exactly how do I make the modifications you posted to allow non-Market apps to be installed on my Aria?
After installing Adroid SDK, ran Sqlite3.exe, and typed in this on my Windows Vista pc -
sqlite> adb remount (enter)
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db (enter)
echo update secure set value = 1 where name = 'install_non_market_apps';|sqlite3 settings.db (enter)
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db (enter)
I then x'ed out of Sqlite and rebooted the Aria.
I obviously missed something, because after downloading a non-Market app to the Aria successfully, when I clicked to install it, I'm still getting the same message that it's not allowed.
What do I need to correctly make the code work???
Best solution I could find for installing non market apps. http://forum.androidcentral.com/showthread.php?p=236589#post236589
I've worked on this a few hrs now. I got Clockwork Recovery to work. Figured out HTC Sync was reverting the phone to stock recovery somehow. Removed that though...
Have rerun Unrevoked, and I can get into clockwork. I'm not interested in changing to different ROM now, just removing ATT crap.
When I try sideloading instructions/alternate method for removing ATT stuff, I get an error in cmd:
C:\android\tools>adb remount
remount failed: Operation not permitted
adb devices returns:
List of devices attached:
<myserial#> device
Any ideas? Have I not completed the root access procedure? I thought it was part of the Unrevoked process.
attn1 said:
NOTE: You MUST have root access in order for this to work
sqlite3 is included in the Android SDK tools, so this would be the best way:
COMMON
Enable USB debugging (settings > applications > development > USB Debugging)
adb remount
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
Linux/OS X
echo "update secure set value = 1 where name = 'install_non_market_apps';"|./sqlite3 settings.db
WINDOWS
echo update secure set value = 1 where name = 'install_non_market_apps';|sqlite3 settings.db
COMMON
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
Reboot phone and sideloading works. (thanks fluffyarmada)
Click to expand...
Click to collapse
Remember to run all this from within the android-sdk-linux_86/tools directory. For users that have modified their path, adb can be run from anywhere, but these commands won't work properly.
Thanks for the guide! Seems to have worked properly.
Great! The problem was the drive. I had to cd to the device drive (h: in my case) to get it to find the files. Thanks again.
I got the Swype apk, installed it, and it's working perfectly!
Quick question. Does the phone have to be operating in a boot mode via Clockwork OR on and operating normally when you do this. Once connected via USB does it have to be set for Charge only, Sync, or Disk drive when this is done. I know it should be set for USB debugging. My phone is rooted but still has the original ROM. I am getting a permission denied error when I run the adb remount command.
attn1 said:
NOTES:
You MUST have root access in order for this to work
You must have the tools directory from the Android SDK installed.
sqlite3 is included in the Android SDK tools, so this would be the best way:
Windows:
Enable USB debugging (settings > applications > development > USB Debugging)
From the command prompt, change to the sdk/tools directory.
adb remount
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
echo update secure set value = 1 where name = 'install_non_market_apps';|sqlite3
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
Optional test for success:
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
echo select value from secure where name = 'install_non_market_apps';|sqlite3 settings.db
If the last command returns 1, then your change is successful.
Linux/OS X
Enable USB debugging (settings > applications > development > USB Debugging)
From a superuser command prompt, change to the /sdk/tools directory
./adb remount
./adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
echo "update secure set value = 1 where name = 'install_non_market_apps';"|./sqlite3 settings.db
adb push settings.db /data/data/com.android.providers.settings/databases settings.db
Optional test for success:
./adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
echo "select value from secure where name = 'install_non_market_apps';"|./sqlite3 settings.db
If the last command returns 1, then your change is successful.
Reboot phone and sideloading works. (thanks fluffyarmada)
[/list]
Click to expand...
Click to collapse
anybody could translated in to normal language for people who is not in familiar with computer??
can't push settings.db
I've got a problem! I'm able to pull settings.db and make the change. But when I try pushing it back onto the phone, all it does is print the help screen. I've got an htc aria and am using ubuntu. Thanks!
ctoacsn said:
I've got a problem! I'm able to pull settings.db and make the change. But when I try pushing it back onto the phone, all it does is print the help screen. I've got an htc aria and am using ubuntu. Thanks!
Click to expand...
Click to collapse
I figured out my problem. The instructions for linux say
Code:
adb push settings.db /data/data/com.android.providers.settings/databases settings.db
when it should be
Code:
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
There was a space, instead of / between databases and settings.db
http://de.codeplex.com/
getting error:
adb remount
remount failed: Operation not permitted
when trying to set the sideloading as mentioned by attn1.
inWindows Vista, after rooting using unrevoked process.
Note that I have both the SU app showing up in All apps on phone and the ClockworkMod and ran adb from the \tools directory.
Anyone know what the problem is?

[How To] Enable Non-Market apps on Captivate (consolidated)

(additional CHOWN notes added below. If you are getting "chown: unknown user/group system:system" read them!
Ok, we do have a WHOLE other thread that was made a sticky already, but you need to read the WHOLE thing to get all the properly interesting parts. I'll make sure I keep this OP up to date.
The following methods enable side loading and installing of apps onto the captivate, without the need of a program on a computer attached via the SDK. There are multiple methods, and for the most part, these methods that have worked flawlessly for many users here on this forum. We're just collecting them all in one post for speed and clarity.
Methods that assist in loading applications, without modification to the settings (a.k.a still need a computer attached) can be found at the collective wiki, http://samsungcaptivate.wikia.com/wiki/How_to_Sideload
ALL METHODS REQUIRE ROOT & BUSYBOX:
Root your phone, see http://forum.xda-developers.com/showthread.php?t=725555
Busybox : http://www.appbrain.com/app/stericson.busybox
Please, save a clean, un-altered backup copy of this file. To be safe. Rarely does corruption occur, but if it does, it won't be good.
Method 1: From Win7x64, Samsung Drivers, Android SDK installed.
This method uses the tools you already have at hand, as part of the SDK. All instances in code blocks are run inside of the command prompt. You will need to know where you installed your SDK, and the tools directory therein.
Once rooted, go install BusyBox installer from the App Market/AppBrain etc and run it. It will download and install the latest version for you.
From my Win7x64, with USB Debugging ON. Ensure that you phone is UNLOCKED as it the SU app will ask for permission for 'UNKOWN' in the following command.
Connect to PC, and Eject/Safely Remove the SD card, and "Turn off USB Storage" on the phone.
open command prompt, follow along:
Code:
> c:
> cd \android\tools
> adb shell
$ su
# cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
# exit
$ exit
mount the SD cards to the pc,
"USB Connected select to... ", Mount
mine mounted as H:
Code:
> copy H:\settings.db settings.db
> sqlite3 settings.db
~> update secure set value="1" where name="install_non_market_apps";
1 row updated
~> .quit
> copy settings.db H:\settings.db
Eject the drive, safely remove, etc.
"Turn off USB storage" etc, to mount it back to the phone
Code:
> adb shell
$ su
# cp /sdcard/settings.db /dbdata/databases/com.android.providers.settings/settings.db
# chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
# chown system.system /dbdata/databases/com.android.providers.settings/settings.db
# exit
$ exit
> adb reboot
Bam. Done.
Method 2: with Root Explorer
(courtesy of kirbo20)
This is a pretty easy process. I went in to Root Explorer - dbdata - databases - com.android.providers.settings, copied settings.db to my sd card, edited it on my pc with a db editor changed 0 to a 1 next to non market apps. Copied it back to the original directory, rebooted and installed a non market app.
(added by gotfolk)
again using FF plug in..
Click Secure on the left pane
click on install_non_market_apps
click edit
number 3 states value click there and type in 1. hit ok
(/gotfolk)
Please use caution. If you want to make sure the db save properly open it on your sd card before you copy and replace the original. It should open up as a readable table. If it opens up in a txt editor its corrupt. This permanently enables non market apps. You can not toggle it on and off.
( This is a sqlite3 database file, you can find many GUI editors that will be able to handle the editing, including a FF plugin. Search "SQLite" )
Method 3: with Root Explorer & Sqlite Editor & Terminal Emulator
(courtesy of ice3186)
- Open Root Explorer
- Browse to /dbdata/databases/com.android.providers.settings/
- copy settings.db to the root of your sd card ( /sdcard/ )
- Click on the newly copied settings.db in /sdcard/, with SQLite Editor installed, you can open and edit it here.
- Select the "secure" table, and update the value of 'install_nonmarket_apps' from 0 to 1, and save.
- close out of SQLite editor
- copy the modified file ( /sdcard/settings.db ), and browse back to /dbdata/databases/com.android.providers.settings/ and paste
- confirm the overwrite if asked and then open again to confirm it's been changed.
- open Terminal Emulator
Code:
$ su
# chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
# chown system.system /dbdata/databases/com.android.providers.settings/settings.db
# reboot
- reboot phone.
No PC, no Mac, no drivers, no SDK. Viola.
Method 4: Mac & Android SDK
You will see "[sdcard]" through this method...I don't own a Mac so I'm guessing a bit.
This method uses the tools you already have at hand, as part of the SDK. All instances in code blocks are run inside of the Terminal. You will need to know where you installed your SDK, and the tools directory therein.
Once rooted, go install BusyBox installer from the App Market/AppDroid etc and run it. It will download and install the latest version for you.
From a Max OS X, with USB Debugging ON. Ensure that you phone is UNLOCKED as it the SU app will ask for permission for 'UNKOWN' in the following command.
Connect to Mac, and Eject/Safely Remove the SD card, and "Turn off USB Storage" on the phone.
open Terminal, follow along:
Code:
> cd /android/tools
> ./adb shell
$ su
# cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
# exit
$ exit
mount the SD cards to the Mac,
"USB Connected select to... ", Mount
mine mounted as [sdcard]
Code:
> cp [sdcard]/settings.db settings.db
> ./sqlite3 settings.db
~> update secure set value="1" where name="install_non_market_apps";
1 row updated
~> .quit
> cp settings.db [sdcard]/settings.db
Eject the drive, safely remove, etc.
"Turn off USB storage" etc, to mount it back to the phone
Code:
> ./adb shell
$ su
# cp /sdcard/settings.db /dbdata/databases/com.android.providers.settings/settings.db
# chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
# chown system.system /dbdata/databases/com.android.providers.settings/settings.db
# exit
$ exit
> ./adb reboot
Method 5: Android SDK only
Of course, this also requires root and BusyBox.
From the android sdk tools folder in a command prompt:
note: all linux/mac should use './adb' in place of just 'adb', and place quotes on the echo statement between echo and |
Code:
adb shell
su
chmod 666 /dbdata/databases/com.android.providers.settings/settings.db
exit
exit
adb pull /dbdata/databases/com.android.providers.settings/settings.db settings.db
echo update secure set value = 1 where name = 'install_non_market_apps';|sqlite3 settings.db
adb push settings.db /dbdata/databases/com.android.providers.settings/settings.db
adb shell
su
chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
chown system.system /dbdata/databases/com.android.providers.settings/settings.db
reboot
NOTICE
You must chown the settings.db file and reboot once it is back in its original location. If you do not, you will not be able to alter settings such as WiFi,GPS, default Ringtones, etc. It's also highly likely that you may wish to chmod to 660 (-rw-rw---), so I've tacked that in here and above.
Code:
> adb shell
$ su
# chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
# chown system.system /dbdata/databases/com.android.providers.settings/settings.db
# exit
$ exit
> adb reboot
Chown Note
In the event that you are getting "chown: unknown user/group system:system" please try 1000.1000 as this has been reported to work on several of the samfirmware-released roms that fail with this message.
Absolutely do not use someone else's settings.db unless you specifially make it a point replace android_id with your android_id!
Special Note
Any of these adb comments can be run from Terminal Emulator (Android Terminal Emulator, free) from the su command. I use the ADB here as it is a lot easier to type into. Terminal Emulator will provide you with a shell that is an exact match of the 'adb shell' command, as they both simply provide the shell to you.
Result:
After completing this process you will be able to load non-market apps directly from the APK files, SDK tools, tools such as DroidExplorer and apps such as APKtor.
You will be able to download the APKs directly, and then install from your favorite file browser (e.g. MyFiles(s), Astro(f), RootExplorer($)...)
Tools
SQLite Administrator (Win, GUI, no FF required) http://sqliteadmin.orbmu2k.de/
SQLite Manager (FF addon, search for it)
Application links
Root Explorer http://www.appbrain.com/app/com.speedsoftware.rootexplorer
SQLite Editor http://www.appbrain.com/app/com.speedsoftware.sqleditor
Terminal Emulator http://www.appbrain.com/app/jackpal.androidterm
BusyBox http://www.appbrain.com/app/stericson.busybox
bump.. settings.db people.. please read the threads!!
good stuff!!!
Ok. I can find settings.db with root explorer. i can copy it and i put it in my sdcard folder but nothing is there when i try to find it on my computer. Im trying to use SQlite editor on firefox. Im also on a powermac g4 if that makes a difference. I did download sqlite editor on my phone and I can find where to change the values for installing non market apps but when I change from a zero to a one it denies me. Please help
Ok, so let me make sure I have your process:
- Rooted
- Installed busybox ?
- Installed Root Explorer
- copied settings.db to /sdcard
-- cant see the file when mounted to Mac, thus can't edit with FF plugin
-- SQLite editor for android wont allow access..
(is this the SQLite Editor you used? http://www.appbrain.com/app/com.speedsoftware.sqleditor)
Try installing "Android Terminal Emulator" from the market (http://www.appbrain.com/app/jackpal.androidterm)
- open Terminal Emulator
$ su
# cd /sdcard
# chmod 777 settings.db
# exit
- Open the sqlite editor, and make the change
- back to Terminal Emulator
$ su
# chmod 660 settings.db
- proceed with rest of instructions.
how many more threads do we need on the same thing? We already have ALL of this info posted, several times.
designgears said:
how many more threads do we need on the same thing? We already have ALL of this info posted, several times.
Click to expand...
Click to collapse
Please read my initial post, first few lines. I explained why, specifically: Consolidation.
Thanks I will give it a try later today.
Sent from my SAMSUNG-SGH-I897 using XDA App
- OP updated to reflect stock ownership settings for 'chown'
Also, which sqlite app are you using? I'll put that up as method 3 if it works out nicely for you.
fixed a typo in the chown command.. bad copy paste.. bad.. doh.
added method 3 courtest of ice3186
added links to Root Explorer ($), SQLite Editor ($) and Android Terminal Emulator (free) and added the chmod/chown commands to method 3, as they were skipped by accident.
bump** for newcomers, sry.
thanks max for adding the third method. this was by far much easier than the first two methods. I have a hard time getting my mac to talk to my phone sometimes and it was good to not have to plug the lil guy in at all. Worked like a charm
myself and ice3186 are glad we could be of help
If I had accidentally deleted the settings.db how should I go about recovering my phone? Now I have the issue that my phone won't boot past the boot animation and I'm notbsure what to do
mkslt4 said:
If I had accidentally deleted the settings.db how should I go about recovering my phone? Now I have the issue that my phone won't boot past the boot animation and I'm notbsure what to do
Click to expand...
Click to collapse
Did you make any kind of backup before hand?
You may have to use someone else's settings.db and then do a factory reset.
Depending on how much you've done with the phone I'd suggest deciding on doing a the reboot process for rooting, but choosing to clear data. This may rebuild it, I am not sure.
my dbdata directory is empty.. My phone is less then 2 hours old and i have some market apps installed..
xetrev said:
my dbdata directory is empty.. My phone is less then 2 hours old and i have some market apps installed..
Click to expand...
Click to collapse
Oh, if it's running, then this folder isn't actually empty.
What are you using to browse this folder?
i followed this guide to a T yesterday when i did this. I used option 1, ADB commands on terminal since i'm a mac and it was super easy, did it in about 5 minutes.
this is just my opinion but i think everyone should try playing with the ADB commands, they're actually really useful and educational to know. and if you should brick your phone, just use clockwork recovery to restore it.
that being said, maybe you should add a disclaimer that when done on a mac, the adb commands require a "./" in front (so adb reboot becomes ./adb reboot). cp, chown, and chmod commands don't need it though (or at least i didn't).

Replacing the existing hosts with addfree

Problem writing /system/etc/hosts
Hi forum,
I have searched around the forum for advice regarding copying my own hosts file to my wildfire, but it wont work. I have used adb to transfer the file from computer, and used the terminal on the phone by directly getting it from the internet.
On the terminal i followed:
http://forum.xda-developers.com/showpost.php?p=3719090&postcount=6
where i get the error "cant open 'hosts' : Out of mermory"
and via the adb where i followed:
http://forum.xda-developers.com/showpost.php?p=6697366&postcount=2
where it gives the same error.
It might be me missing out on something but i cant figure out what i am doing wrong.
I am running CyanogenMod 6.1 stable 12/12-2010.
I hope someone have the time and help me figure this out.
Thanks in advance
Omorashi
Omorashi said:
Hi forum,
I have searched around the forum for advice regarding copying my own hosts file to my wildfire, but it wont work. I have used adb to transfer the file from computer, and used the terminal on the phone by directly getting it from the internet.
On the terminal i followed:
http://forum.xda-developers.com/showpost.php?p=3719090&postcount=6
where i get the error "cant open 'hosts' : Out of mermory"
and via the adb where i followed:
http://forum.xda-developers.com/showpost.php?p=6697366&postcount=2
where it gives the same error.
It might be me missing out on something but i cant figure out what i am doing wrong.
I am running CyanogenMod 6.1 stable 12/12-2010.
I hope someone have the time and help me figure this out.
Thanks in advance
Omorashi
Click to expand...
Click to collapse
Lolz , u were sooo close !!!!!
Reboot into Recovery , goto partitions menu and mount /system partition then use adb from ur computer
adb remount
adb push hosts /system/etc/hosts
adb reboot
should fix it (i recommend that you search for the new hosts file from adfree adblocker , also in the new Wildpuzzle Rom if your comfortable moveing files between roms before flashing)
Hope this helps
PS. Until AlphaRev comes out we dont have Read/write Access to the /system partition while the phone is running :-( (Google S-ON HTC Devices)
Splendid
Ok thanks, it works. I knew it was some sort of permission that was needed, which made me crazy. (I am new in this android world)
I just made it into a batch file, so it is is easy to update the hosts file as new comes along. This is also to make it easier for the next that comes along with my problem. It requires adb ofcourse.
By a local hosts file (can probably be made more user friendly, but it works for me):
Code:
@ echo off
echo Updating hosts file:
echo You need to have added the adb path to Environment variables,
echo Or placed this batch file in the directory with adb.
echo The hosts file should be in the same directory as this file.
echo After unpause are the phone started in recovery:
pause
adb reboot recovery
echo Waiting for device to reboot into recovery
echo After it is done rebooting do the following:
echo Go to partitions menu
echo Mount system (first option)
echo Unpause and the file gets overwritten:
pause
adb remount
adb push hosts /system/etc/hosts
echo Check if it is done correctly (the transfer).
adb reboot
pause
And by the way i used the updated hosts file on "external website" that was recommended in another thread i found about updating hosts file on this forum. (Cant post the direct link)

[HOWTO] Overclock the MotoACTV

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.

How to Restore/Change Android ID in Android 6.0 Marshmallow

I haven't found this posted anywhere so figured it might be useful to others as well.
When you reinstall Android it is set up as a new device with a new unique Android ID. This ID is often used by apps to identify the device - for example all my internet banking apps use it to register the device with the service. To avoid having to re-register after reinstall the ID can be changed to what it was previously.
The Android ID backup/restore function is included in Titanium Backup. However, the Settings Storage (com.android.providers.settings) doesn't seem to be backed by a traditional SQLite database in Android 6.0 Marshmallow - /data/data/com.android.providers.settings/databases/settings.db is empty (0 bytes) on my device. Therefore the Android ID cannot be restored/changed by the usual tools (including Titanium Backup).
I have found a way to query/update the settings database via adb though as follows:
Get current Android ID:
Code:
adb shell content query --uri content://settings/secure --where "name=\'android_id\'"
Normally, you would update the value as follows:
Code:
adb shell content update --uri content://settings/secure --bind value:s:<new_android_id> --where "name=\'android_id\'"
However, this wasn't working for me - I kept getting the same ID when querying after update. So, I tried removing the current record and re-inserting it with the new ID:
Code:
adb shell content delete --uri content://settings/secure --where "name=\'android_id\'"
adb shell content insert --uri content://settings/secure --bind name:s:android_id --bind value:s:<new_android_id>
Which worked just fine
Any idea if this works going from CM to Stock or the reverse? Or does it only work stock to stock?
I ask because my two factor auth token for work is on my CM, but if I restore it on stock using Titanium Backup, it works oddly. I wonder if changing the ID would make it work better on stock
Sweet. Any idea how to do this to get the device ID for exchange in gmail?
So were the SETTINGS.DB file gone?
For Windows, exclude escape characters
Simply perfect. I was worried when Titanium Backup couldn't restore old ID, but this worked like a beauty.
The only hitch was that the cmd.exe doesn't need escape characters for apostrophes.
So the code for me was just
Code:
adb shell content delete --uri content://settings/secure --where "name='android_id'"
adb.exe shell content insert --uri content://settings/secure --bind name:s:android_id --bind value:s:<newID>
edit: installing adbwireless and using that solved the problem. not sure why adb from my computer won't work though.
I have the latest SDK installed, have root, and have allowd adb shell root privileges and everytime i run a command I get:
tmp-mksh: adb: not found
Can anyone help me out? I'm using a Nexus 6.
edit: seems like no matter what command i type i get adb : not found. I get a response from the command adb devices when I don't have a shell open. running the abobe commands outside of a shell returns an error, and when i go into a shell no commands work. I always get the adb: not found response.
exactly what I just needed for my nexus 5, worked flawless... thanks a lot!
nyreyn said:
edit: installing adbwireless and using that solved the problem. not sure why adb from my computer won't work though.
I have the latest SDK installed, have root, and have allowd adb shell root privileges and everytime i run a command I get:
tmp-mksh: adb: not found
Can anyone help me out? I'm using a Nexus 6.
edit: seems like no matter what command i type i get adb : not found. I get a response from the command adb devices when I don't have a shell open. running the abobe commands outside of a shell returns an error, and when i go into a shell no commands work. I always get the adb: not found response.
Click to expand...
Click to collapse
Of course! This is a simple problem arising from the absence of the adb.exe executable from the system path being read by your shell or terminal program. You can either add your adb.exe to your system path or else navigate to the platform-tools directory and use the adb.exe from there:
Verify that adb.exe resides in %LOCALAPPDATA%\Android\sdk\platform-tools\
Set the path and restart the cmd or PowerShell and then try again.
I tried doing this, but my adb shell doesn't seem to have content in its sbin.
Nevermind.. it works now.
piit79 said:
I haven't found this posted anywhere so figured it might be useful to others as well.
When you reinstall Android it is set up as a new device with a new unique Android ID. This ID is often used by apps to identify the device - for example all my internet banking apps use it to register the device with the service. To avoid having to re-register after reinstall the ID can be changed to what it was previously.
The Android ID backup/restore function is included in Titanium Backup. However, the Settings Storage (com.android.providers.settings) doesn't seem to be backed by a traditional SQLite database in Android 6.0 Marshmallow - /data/data/com.android.providers.settings/databases/settings.db is empty (0 bytes) on my device. Therefore the Android ID cannot be restored/changed by the usual tools (including Titanium Backup).
I have found a way to query/update the settings database via adb though as follows:
Get current Android ID:
Code:
adb shell content query --uri content://settings/secure --where "name=\'android_id\'"
Normally, you would update the value as follows:
Code:
adb shell content update --uri content://settings/secure --bind value:s:<new_android_id> --where "name=\'android_id\'"
However, this wasn't working for me - I kept getting the same ID when querying after update. So, I tried removing the current record and re-inserting it with the new ID:
Code:
adb shell content delete --uri content://settings/secure --where "name=\'android_id\'"
adb shell content insert --uri content://settings/secure --bind name:s:android_id --bind value:s:<new_android_id>
Which worked just fine
Click to expand...
Click to collapse
Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! Thanks!
Hi,
another way is :
to read Android ID:
Code:
adb shell settings get secure android_id
To write Android ID:
Code:
adb shell settings put secure android_id <new_android_id>
Tested on Android 6.0 Marshmallow.
Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! Thanks!
Any way to get this done without pc access?
IparryU said:
Any way to get this done without pc access?
Click to expand...
Click to collapse
Sure. Just open Terminal Emulator as root and use the same commands as above but without "adb shell":
Code:
su
settings get secure android_id
settings put secure android_id <new_android_id>
I used it in my Nexus 5 (Marshmallow).
I'm already on Marshmallow, so I'm guessing that the "settings get secure android_id" will just tell me my current, new, unwanted android_id. Correct, or am I confused? Is there an easy way to find out what my previous android_id was so that I know what to restore it to? Perhaps Titanium Backup has it squirreled away somewhere?
Or do I need to follow this process?
1. Make nandroid of current Marshmallow setup.
2. Restore nandroid of prior Lollipop setup.
3. From terminal window, "settings get secure android_id" and write down the ID (e.g. "abcdef0123456789")
4. Restore Marshmallow nandroid
5. From terminal window, "settings put secure android_id abcdef0123456789"
There has to be a way to change the device ID for GMail but I haven't figure it out yet. There was an module on Xposed that claimed it could do it but I'm on 6.0 so that doesn't do me any good. Any one have ideas?
Hi!
I am trying adb shell settings but I get:
"/system/bin/sh: /system/bin/settings: /bin/sh: No such file or directory"
In other words the settings command is not found.
Am I missing something?
Thanks for the help!
Crios said:
Hi,
another way is :
to read Android ID:
Code:
adb shell settings get secure android_id
To write Android ID:
Code:
adb shell settings put secure android_id <new_android_id>
Tested on Android 6.0 Marshmallow.
Click to expand...
Click to collapse
MSKS said:
Hi!
I am trying adb shell settings but I get:
"/system/bin/sh: /system/bin/settings: /bin/sh: No such file or directory"
In other words the settings command is not found.
Am I missing something?
Thanks for the help!
Click to expand...
Click to collapse
Seems I'm not watching my own thread! Duh Lots of useful info here.
I was getting the same error message. The /system/bin/settings script is there but it's missing the "shebang" line at the beginning to specify what interpreter to use (e.g. #!/bin/bash). For some reason the system defaults to /bin/sh - which is not there.
You can get around it by running the scripts like so:
Code:
sh /system/bin/settings ...
Hope that helps.
Thanks a lot man! Appreciated.
piit79 said:
Seems I'm not watching my own thread! Duh Lots of useful info here.
I was getting the same error message. The /system/bin/settings script is there but it's missing the "shebang" line at the beginning to specify what interpreter to use (e.g. #!/bin/bash). For some reason the system defaults to /bin/sh - which is not there.
You can get around it by running the scripts like so:
Code:
sh /system/bin/settings ...
Hope that helps.
Click to expand...
Click to collapse
merouleau said:
I'm already on Marshmallow, so I'm guessing that the "settings get secure android_id" will just tell me my current, new, unwanted android_id. Correct, or am I confused? Is there an easy way to find out what my previous android_id was so that I know what to restore it to? Perhaps Titanium Backup has it squirreled away somewhere?
Or do I need to follow this process?
1. Make nandroid of current Marshmallow setup.
2. Restore nandroid of prior Lollipop setup.
3. From terminal window, "settings get secure android_id" and write down the ID (e.g. "abcdef0123456789")
4. Restore Marshmallow nandroid
5. From terminal window, "settings put secure android_id abcdef0123456789"
Click to expand...
Click to collapse
Did you try this and did it turn out? I'm about to do the same thing because it makes sense.

Categories

Resources