[Q] How to change android ID in some ROMs - HD2 Android Q&A, Help & Troubleshooting and Genera

Hi Guys,
i want to change my Android ID in /data/data/android.provider.settings/databases/settings.db
Normaly there is only this file in that folder, so i can use "SQlite Database Browser" to change the id.
Now, in some roms there is also a setting.db-wal file in which this id is, but i cant open it with this tool. It seems to be compressed or somethink like this.
If i use "Android ID Changer" the ROM doesnt boot...
So, how i can change the Android ID in these ROMs?
thanks

no input for me?

Hi,
In my Eclair tablet it is in 3 places:
/data/data/com.android.providers.settings/databases/settings.db
table [secure] android_id as a 16 character hex
table [gservices] android_id as a decimal of the hex
/data/data/com.google.android.googleapps/databases/gls.db
table [meta] androidId as a decimal of the hex
I understand that it may be in:
/data/data/com.google.android.gfs/databases/gservices.db
as well but I don't have that database on my tablet.
All the best ...
Nigel.

Make sure and backup your /data/data/com.android.providers.settings/databases/settings.db file
Then in ADB type the following:
su
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
sqlite> insert into secure (’name’, ‘value’ ) values (’android_id’,'DEVICE_ID_GOES_HERE’);
sqlite> .exit
Reboot

thanks guys,
thats what i normaly do, i change the value in the database.db, but in some ROMs there are not this information, insteat in database-wal.db, but this db i cant open with the sqlite tool.
e.g. in the actual Cyagenmod ROM there is this database-wal.db file, which i cant change.

paid app tested in that scenario
https://play.google.com/store/apps/details?id=com.vcastroi.changeid
manually
if you copy all 3 files using adb and then open it on your pc using a sqlite utility and then push all 3 file back and fix the files permissions

Related

I'm rooted but

I still cant install blocked sources. I keep getting that message "install blocked", and I changed the install_non_market_apps field as well. I cant install apps from my sd card or from websites still. Is there a custom rom I can flash that would include "unknown resources" so you can select it.
SysAdmNj said:
I still cant install blocked sources. I keep getting that message "install blocked", and I changed the install_non_market_apps field as well. I cant install apps from my sd card or from websites still. Is there a custom rom I can flash that would include "unknown resources" so you can select it.
Click to expand...
Click to collapse
How did you change the field?
On a properly rooted ROM,
Start android, enable usb debugging. Stay in Android.
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
reboot
there will be no toggle, but you will be able to sideload with Astro of another equivelent file manager.
attn1 said:
How did you change the field?
On a properly rooted ROM,
Start android, enable usb debugging. Stay in Android.
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
reboot
there will be no toggle, but you will be able to sideload with Astro of another equivelent file manager.
Click to expand...
Click to collapse
I tried that method you just posted, and just tried again. Waiting for reboot, and you meant adb reboot?
I also used droid explorer and ran sql commands to update the file, it seemed to have taken that way but when I tried to install an app from the sd card using app installer it failed.
Ok I used astro and now it installs. Can I install from a website?
Thanks.
SysAdmNj said:
I tried that method you just posted, and just tried again. Waiting for reboot, and you meant adb reboot?
I also used droid explorer and ran sql commands to update the file, it seemed to have taken that way but when I tried to install an app from the sd card using app installer it failed.
Ok I used astro and now it installs. Can I install from a website?
Thanks.
Click to expand...
Click to collapse
You can install any way any other Android can now.
note: if you do a wipe, you'll need to do this step again with these AT&T roms.
confirmed this working on attn1 liberated beta, my brother is super extatic now heheh no droid explorer anything needed just download apk and install bam!
just cant get it to work
i have tried this method a few time but i always get an error:
error: incomplete SQL: update secure set value = 1 where name = `install_market_apps';
try this, save a whatevername.cmd file into the sdk folder, in my case \android\tools
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
just cant get it to work
i may sound dumb here but how do u make .cmd file...
also the error message only appears after i type in this command:
echo update secure set value = 1 where name = 'install_non_market_apps';|sqlite3 settings.db
heres wat i see: " error: incomplete sql: update secure set value = 1 where name = `install_non_market_apps'; "
your help is appreciated
open notepad (start,run,notepad)
type the commands (copy paste) and save the file into \android\tools (provided that is where you have the SDK)
name the file whateveryouwantocallit.cmd (give it any name you want)
thnx xdafly makin tat cmd file worked perfectly....

settings.db?

Hello!
My main question is: where are the settings stored? I've done some research, and there is apparently supposed to be a file called settings.db on android phones... but mine doesn't have one
I was locked out of my phone because of the pattern lock screen, and it will not accept my gmail user name and password. It immediately fails when I submit the info, and I am positive it is correct. A common solution to this problem is to change some variables in settings.db (for different phones).
To find all .db files, I used: find / -name "*.db" -print
I can boot into clockwork recovery and connect with adb...
Thanks in advance!
Are you running the command as root? The default user doesn't have read access to all directories on the phone, and it's likely the file is in one of those directories.
I believe so. I have a # for the prompt.
Ah, after many hours, I have fixed my problem. Since it's possible someone else may find this thread, I'll explain what I did. Basically, the datadata folder is not auto-mounted. I noticed this when I was doing a nandroid backup... so, I mounted it, and my problems were solved
First, I used adb to pull /etc/fstab. In fstab, you can view the device location that is usually mounted for the datadata folder (open it in notepad or wordpad or something).
After that, I used adb -d shell and mounted the device.
I forget the name of the block file, but the syntax of the command to mount devices is:
Code:
mount <block_device_location> /datadata
Come to think of it, "mount /datadata" might have also worked.
After that, I was able to find the settings.db file in the datadata/databases folder and edit a setting in it to remove the permanent lock using the "sqlite browser". The variable to change is obvious (it has permanent lockout in the name) and it needs to be changed from a 1 to a 0.
**** this **** didnt work, too confusing.

[Q] MAC spoofing

Hi
Will this work on vibrant
Original link http://forum.xda-developers.com/showthread.php?t=917684
You require:
1.)Rooted phone.
2.)anroid sdk
1.)First pull the nvram.txt file from /etc/wl to sdcard:
in cmd(windows) goto android-sdk-windows\tools and type
adb shell
2.)Copy nvram.txt from /etc/wl to sdcard
cp /etc/wl/nvram.txt /sdcard/nvram.txt
3.) Using text editor in phone add following line at the end:
macaddr=XX:XX:XX:XX:XX:XX (replace XX:XX:.... with desired mac addr.)
4.)Save file and copy it to /etc/wl from adb shell
cp /sdcard/nvram.txt /etc/wl/nvram.txt
5.)Reboot and it is done.
To restore orignal mac address just delete the macaddr line.
Note:
1.) Tested only in stock LG rome with GNM OC kernel. In other roms or kernel the location of nvram.txt may differ according to the parameter using which driver module (wireless.ko or bcm4325.ko) just find that file and use the above process. It will work.
2.) The file cannot be edited in windows as windows has different new line character than linux. It has to be edited in some linux compactible file editor like Programmers Notepad

[Q] [Perfect Viewer] Hardware key mapping

Intuition says I'm not likely to get an answer to this, but let's give it a shot.
Perfect Viewer allows for hardware key mapping, but the default KeyEvent numbers are wrong (up right is 98, down right is 97, up left is 96, down left is 95). No problem there, since I found the (presumably) correct numbers here. The real problem is, I can't edit the keys. When I go into the edit dialogue and the keyboard pops up, the number keys all have minds of their own (pressing 0-9 results in KeyEvent number 7-16 appearing; I can't input the numbers I want to).
So, is there another way to change my Perfect Viewer settings to map the right keys? Thanks!
/bump
(I didn't see that it's not allowed...?)
Its on my list to install and mess around with on my new glow. So I'll have some answer for you sooner than later just not now
Last time I set it up I remember there were nook specific hardware keys available in its key list.
Got around to it eventually....
I can confirm the last version that works on android 2.1 (v1.9.2.2) has a bug where keyboard input using number is screwed in a strange pattern so modifying numerical fields is not possible. Also reassigning touch functions menu does not work.
So we do it manually. The data is a in a xml file you can below
Code:
/data/data/com.rookiestudio.perfectviewer/shared_prefs/perfect_viewer_settings.xml
Now you can change these several ways all require a root enable app. you can adb pull the file off, modify, adb push back. You can use an app like es file explorer to navigate to the file and use esnote editor to edit the file on the NST (enable root explorer in settings). Both of these methods will mess up the permissions on the file.
I strongly suggest before editing either with an adb shell
Code:
ls -l /data/data/com.rookiestudio.perfectviewer/shared_prefs/perfect_viewer_settings.xml
or use details view with esfileexplorer to make a note of the <owner>.<group> and file permissions. In my case looks like this (app number will be different on your own system!):
Code:
-rw-rw---- app_41 app_41 6574 2013-12-21 21:21 perfect_viewer_settings.xml
Personally I edited the file on my pc after using adb
First make sure perfect viewer is not running.
Code:
adb pull /data/data/com.rookiestudio.perfectviewer/shared_prefs/perfect_viewer_settings.xml c:\temp\perfect_viewer_settings.xml
<EDIT FILE>
Code:
adb push c:\temp\perfect_viewer_settings.xml /data/data/com.rookiestudio.perfectviewer/shared_prefs/perfect_viewer_settings.xml
[change app_41 to match whatever it should be!]
Code:
adb shell chown app_41.app_41 /data/data/com.rookiestudio.perfectviewer/shared_prefs/perfect_viewer_settings.xml
adb shell chmod 660 /data/data/com.rookiestudio.perfectviewer/shared_prefs/perfect_viewer_settings.xml
What you wanted with changing the hardware keys did not work. I expect its because nookmodmanager has remapped them.
What I did find had the desired affect in my case was swapping these values as someone else suggested few years ago.
Code:
<int name="LeftFunction" value="5" />
<int name="RightFunction" value="6" />
Either way you can tinker around. If you do mess the file up say with two hardware keys with same value perfect viewer auto returns file to default.

How to change kernel settings directly?

Hi,
In my kernel several config-files are placed within /sys/kernel. If I wanna change one of the settings I get always an permission error I tried with Terminal emulator and changed the permissions for the dir as well for the file so everybody could write. But vi doesn't save it Trying other root browsers with their editors fail in the same way.
How to change single files properly?
thx
roland
use " echo " command
You need to allow R/W permissions to the system partition.

Categories

Resources