Changin Device ID - Samsung Galaxy 5 I5500

Ok, so before there was android id changer in the market. That has now gone, so how do we change our id now? is there a code we can type into an emulator or anything?
Thanks
EDIT:
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
apparently works.

Related

[ROOKIE][DEV][HOWTO] Permenant BN-OTA Update Block

From this thread:
http://forum.xda-developers.com/showthread.php?t=874871
Attached is a working sqlite3 binary.
Copy it to /system/bin
(I transfered it to my SD, then used rootexplorer (mount R/W) to copy into /system/bin))
you will now be able to edit sqlite databases on the nook itself.
--------------------------------------------------------------------------------
Attached Files sqlite3.7z (11.9 KB, 56 views)
--------------------------------------------------------------------------------
In your terminal:
$ adb pull /data/data/com.bn.devicemanager/databases/devicemanager.db devicemanager.db
$ sqlite3 devicemanager.db
sqlite> update registry set value='manual' where name='com.bn.device.fota.mode';
sqlite> .q
$ adb push devicemanager.db /data/data/com.bn.devicemanager/databases/devicemanager.db
$ adb reboot
Congrats Your NC is now permanently blocked from any future BN OTA auto updates.
No more build.prop spoof hacks for each release (sideload only),,,,,, yada yada
sleep like a baby.........with yur wifi on.
Nook got pissed and reset itself. Good thing I have backups.
bonzer2u, thanks! Just did it on my rooted (1.0.1 version) nook and so far no issues.
That reminds me that the prereqs are you need to be rooted with SU and ADB working.....DOH
Jeeeez and of course credit where credit is due...
JoshMiers - for providing the sqlite3 binary post.
and
ixampl - for providing the clues that lead me to find the appropriate db and setting to hack.
Finally, disclaimer: Apply and/or feel free to incorporate into your projects at your own risk, if your NC self distructs, yur on yur own......NOT
Instructions don't use sqlite3 binary on device
Your instructions work fine assuming that the computer connected to the NC has the sqlite3 binary installed. The sqlite3 binary you link to could be used to make the changes inside adb shell but it's not documented as such. Just wanted to give that note to help clear up anyone's confusion if they run into issues with the given instructions. Other than that, thanks for the tip!
The sqlite3 binary I posted is for use on the Nook itself. If you want to do that instead of doing adb pull/push just do this in an adb shell:
Code:
# sqlite3 /data/data/com.bn.devicemanager/databases/devicemanager.db
sqlite> update registry set value='manual' where name='com.bn.device.fota.mode';
sqlite> .q
# reboot
JoshMiers said:
The sqlite3 binary I posted is for use on the Nook itself. If you want to do that instead of doing adb pull/push just do this in an adb shell:
Code:
# sqlite3 /data/data/com.bn.devicemanager/databases/devicemanager.db
sqlite> update registry set value='manual' where name='com.bn.device.fota.mode';
sqlite> .q
# reboot
Click to expand...
Click to collapse
Easier then I thought, thanks again Josh....
hoban_eris said:
Your instructions work fine assuming that the computer connected to the NC has the sqlite3 binary installed. The sqlite3 binary you link to could be used to make the changes inside adb shell but it's not documented as such. Just wanted to give that note to help clear up anyone's confusion if they run into issues with the given instructions. Other than that, thanks for the tip!
Click to expand...
Click to collapse
If I understand you correctly, my PC is a dell win7-32 laptop and it doesn't have any sqlite3 installed binary on it? I did however use it to download and transfer the sqlite3 binary Josh posted to my nook??
Yes Josh mentioned the adb shell version above.
I did initially forget to mention you need to be rooted and have SU and ADB functioning as a prereq, my bad, but it is pretty obvious.....
If you have adb working on your PC, the chances are that you have sqlite binary on your PC since it seems to come with the android sdk in the tools folder (for example, android-sdk_r07-windows\android-sdk-windows\tools). When I did it on mine, I used the commands from the OP, and did it on the PC with nook connected, but didn't use the linked sqlite3 binary for nook).
droidseban said:
If you have adb working on your PC, the chances are that you have sqllite binary on your PC since it comes with the android sdk in the tools folder (for example, android-sdk_r07-windows\android-sdk-windows\tools). When I did it on mine, I followed your directions, and did it on the PC with nook connected, but didn't use the linked sqllite3 binary for nook).
Click to expand...
Click to collapse
Ahh I see now and didnt know that... I understand what you guys are referring to now.
Thanks for clearing that up, like my post title suggests, still just a rookie with the nook that is.....
We are all here to learn from each other.
Looking through the rest of the entries in the registry table, there is this entry: "com.bn.device.fota.next_connect_default_interval" which is set to the value 604800000. Assuming this is in milliseconds as usual, it translates to 7 days. So, nook is set to check for updates once every week. I guess you can try upping this number also to avoid the updates.
Adding a command to raise the udate check interval to a year to the steps from OP (NOTE: no space in "...default_interval". Not sure why the forum software is inserting it):
$ adb pull /data/data/com.bn.devicemanager/databases/devicemanager.db devicemanager.db
$ sqlite3 devicemanager.db
sqlite> update registry set value='manual' where name='com.bn.device.fota.mode';
sqlite> update registry set value='31557600000' where name='com.bn.device.fota.next_connect_default_interval';
sqlite> .q
$ adb push devicemanager.db /data/data/com.bn.devicemanager/databases/devicemanager.db
$ adb reboot
excellent, did you notice the download URL in the table as well?????
Someone suggested another way to perma-stop OTA would be to add the url
https://csqaint.barnesandnoble.com/bncloud/serviceG 127.0.0.1
to our hosts file?
Do you think this would work as well?
I would think so, but it might crash the process that checks for the updates.
bonzer2u said:
Someone suggested another way to perma-stop OTA would be to add the url
https://csqaint.barnesandnoble.com/bncloud/serviceG 127.0.0.1
to our hosts file? Do you think this would work as well?
Click to expand...
Click to collapse
No -- the hostname csqaint does not resolve outside BN.
I don't think it is directly going to https://csqaint.barnesandnoble.com/bncloud/serviceG. My guess is Nook goes to https://bncs.barnesandnoble.com/bncloud/oauthpage/BnOAuthMgmt.jsp to authorize the connection, establishes a VPN, and then move on to https://csqaint.barnesandnoble.com/bncloud/serviceG.
bonzer2u said:
From this thread:
http://forum.xda-developers.com/showthread.php?t=874871
Attached is a working sqlite3 binary.
Copy it to /system/bin
(I transfered it to my SD, then used rootexplorer (mount R/W) to copy into /system/bin))
you will now be able to edit sqlite databases on the nook itself.
--------------------------------------------------------------------------------
Attached Files sqlite3.7z (11.9 KB, 56 views)
--------------------------------------------------------------------------------
In your terminal:
$ adb pull /data/data/com.bn.devicemanager/databases/devicemanager.db devicemanager.db
$ sqlite3 devicemanager.db
sqlite> update registry set value='manual' where name='com.bn.device.fota.mode';
sqlite> .q
$ adb push devicemanager.db /data/data/com.bn.devicemanager/databases/devicemanager.db
$ adb reboot
Congrats Your NC is now permanently blocked from any future BN OTA auto updates.
No more build.prop spoof hacks for each release (sideload only),,,,,, yada yada
sleep like a baby.........with yur wifi on.
Click to expand...
Click to collapse
I like your method better than spoofing the build.prop of 1.1.
Would it be okay with you if I make this into a Clockwork update.zip ?
thecubed said:
I like your method better than spoofing the build.prop of 1.1.
Would it be okay with you if I make this into a Clockwork update.zip ?
Click to expand...
Click to collapse
Absolutely and goes for anyone it might be useful for......
I dont get sqlite 2
Hi All,
Noob quiestion,
I go in adb shell promt "#" by typing "adb shell" in command line.
when I type sqlite3 I get "sqlite3 : not found"
Am I missing anything?

[GUIDE] Basic Unix/Linux command to use with ADB SHELL

So I have been reading quite a few threads here on XDA, and the one thing I noticed for noobs to linux/unix world is that they are struggling with some basic command once adb shell is gained. I decided to whip out this quick tutorial to help those noobs out to become more of an expert...like me...lol j/k
Here we go:
Prerequisites:
You must know how to invoke a adb shell command already to drop into your phone.
ALL commands in Unix/Linux are case sensitive
For more details, go to this ADB tutorial (very good one): http://forum.xda-developers.com/showthread.php?t=517874
Let's get going:
Once a shell is gained via adb, let's look at some of the basic commands you can do to navigate around the filesystem. Note: you must remove the double-quotes (") for the actual command.
Code:
"cd" = is change directory
to change to any directory, you type: cd dir_name (where dir_name is a full path)
Example: I want to go to /data/local/tmp in my phone, I would do
cd /data/local/tmp <hit ENTER>
You can also use the ".." to go UP one directory.
Example: I'm in /data/local/tmp and I want to go up to /data folder, a command would be: cd ../.. alternatively, if I do cd .. then i'll drop into /data/local folder instead.
Code:
"ls" = list files/directories
to list files/directories within a folder, the command should be:
ls <hit enter> => this will list all NON-HIDDEN file/directories within your CURRENT directory.
ls /data/local/tmp => this will list all NON-HIDDEN file/directories within /data/local/tmp directory.
ls -l => this will list all NON-HIDDEN file/directories within your CURRENT directory, plus additional details. Consider this is like a "Details" view in Windows Explorer.
ls -a => this will list all files/directories (including hidden files) within your CURRENT directory.
ls -la => this will list all files/directories (including hidden files) within your CURRENT directory, plus details.
Code:
"chmod" = change mode
Goes to wikipedia for more details: https://secure.wikimedia.org/wikipedia/en/wiki/Chmod
Most commonly used modes on android phones are:
"755" or "777".
So if you have a root.sh shell script that you downloaded from XDA, and uploaded to your phone and try to execute it with ./root.sh and it said "Permission denied". That means your script does not have the execute permission. You need to do:
chmod 755 root.sh <hit enter>
[B]IMPORTANT: There is *NO* negative sign (-) in front of the mode bit. So it is NOT chmod -755 root.sh[/B]
If you get a "File or directory not found" error, which means you are chmod-ing a file that doesn't exist in your current directory. To execute a chmod on root.sh in /data/local/tmp you do:
chmod 755 /data/local/tmp/root.sh
If you want to chmod an ENTIRE DIRECTORY and ALL files underneath it you do:
chmod -R 755 /data/local/tmp => this will set /data/local/tmp and ALL files/folders underneath it to be 755.
Code:
"chown" = change ownership
Go to wikipedia for details: https://secure.wikimedia.org/wikipedia/en/wiki/Chown
Most common used chown for android is: "root:root" or "root:shell"
Example: if you want to change ownership of root.sh to root:shell then you do:
chown root:shell root.sh
NOTE: the -R (recursive) option is also available for chown.
chown -R root:shell /data/local/tmp
Code:
"pwd" = print working directory
so when you are within a directory and you want to know which directory you are in, then you issue the command:
pwd <hit enter>
The system will reply back with the currently directory you are in.
I'll try to add more if I think of anything else useful, or if you have suggestions, please feel free to add.
so what does it mean to add adb to your path? thats holding me back from temp rooting on my mac. Im a total adb noob clearly.
hockey4life0099 said:
so what does it mean to add adb to your path? thats holding me back from temp rooting on my mac. Im a total adb noob clearly.
Click to expand...
Click to collapse
The easiest way to explain it is that you can run ADB from anywhere...do a search and you can find a more detailed (and more proper) explanation and directions on how to set it up.
hockey4life0099 said:
so what does it mean to add adb to your path? thats holding me back from temp rooting on my mac. Im a total adb noob clearly.
Click to expand...
Click to collapse
What OS are you using?
vboyz103 said:
What OS are you using?
Click to expand...
Click to collapse
mac
______________
hockey4life0099 said:
mac
______________
Click to expand...
Click to collapse
Like I said, do a search on XDA...there's a great guide on how to set up ADB properly. I'll link to it tomorrow when I get on the computer.
-- Sent from my 3VO Shooter --
hockey4life0099 said:
mac
______________
Click to expand...
Click to collapse
If you use mac, open a Terminal, and you should be at your home directory and type:
nano ~/.profile
if the .profile doesn't exist yet, then you'll see an empty.
Put this into the file
PATH=$PATH:/path/to/your/android/platform-tools
export PATH
save and exit out of Nano, and type:
source ~/.profile
then after this type adb and if adb is in your PATH then you see adb help.
Overview Of Permissions via ADB SHELL
Example = drwxrwxrwx
To Check Permission at anytime in ADB just Type:
ls -l
The First character defines the Directory, Link, Binary.
Below are some examples
Example = d---------
d = Directory
l = Link
b = Binary
The next 9 characters define the file permissions. These permissions are
given in groups of 3 each.
The first 3 characters are the permissions for the owner of the file or directory.
Example = -rwx------
The next 3 are permissions for the group that the file is owned by.
Example = ----rwx---
The final 3 characters define the access permissions for everyone not part of the group.
Example = -------rwx
There are 3 possible attributes that make up file access permissions.
r - Read permission. Whether the file may be read. In the case of a
directory, this would mean the ability to list the contents of the
directory.
w - Write permission. Whether the file may be written to or modified. For
a directory, this defines whether you can make any changes to the contents
of the directory. If write permission is not set then you will not be able
to delete, rename or create a file.
x - Execute permission. Whether the file may be executed. In the case of a
directory, this attribute decides whether you have permission to enter,
run a search through that directory or execute some program from that
directory
In addition to the file permission, you can also modify the owner and
group of the file. The chown program is used here and its syntax is very
simple. You need to be the owner of a file or root to do this.
Understanding Owner Permissions:
The first command is for owner ID, the Second Command is for Group ID.
exp. root.root ( First Root is owner, Second Root is Group ).
Chmod 644 some file, Like Build.prop For testing & then Veiw the Resulted Changes!
Refer to the table below as a quick reference.
Command Line for Both would look like this
chmod 644 build.prop = -rw-r--r--
\/
Chmod Guide
0 - ---
1 - --x
2 - -w-
3 - -wx
4 - r--
5 - r-x
6 - rw-
7 - rwx
SH Chown Guide
\/
chown root.root build.prop
root.root = Root
root.shell = Shell
Busybox SH Chown Guide
\/
chown 0.0 build.prop
0.0 = Root
0.2000 = Shell
I'll update the chmod with more with More Complex Commands Later
Side Note:Always set owner ( chown ) before Setting Permissions ( Chmod )!
Hope this Clears up things & is Helpful to everyone
~Eugene373​
Add adb to your path in Windows.
As has been explained above all it does is allowing your adb to be called out from any location.
To set it in windows you will need to add path to your adb.exe file to your PATH in widows XP or CLASSPATH in windows7.
You can find it in start->contro panel->system->advanced.
There is a tab called "Inviromental Variables".
Click on that tab and new window will pop up. New window has 2 field in it. We are interested in bottom field called "System variables".
Windows XP user should look for line with variable "Path".
Click that line and choose edit below. New pop up will apear and you can edit path line in there. You should add path to your adb.exe to that line.
Example.
I did install windows sdk in c:\android\android-sdx-windows so my adb.exe file is in that folder. I did add path to that folder in "Paht" line of system variables. Add path to your adb.exe after semicolon.
;c:\Location\of folder\where you have\adb exe file\
Save changes, apply them. Now you can use call for adb commands from any location.
Widows 7 users.
Same changed need to be appied as for Windows XP.
There is only one difference that that path in Inviromental variables in windows7 is called "CLASSPATH".
Rest is same. Just add the path to folder containing your adb.exe file to CLASSPATH line and you would be able to use adb in any location.
Hope this make sense and will help.
My mac keeps sayin no device but I can access adb from anywhere basically its in my path but won't pick up my phone
Sent from my PG86100 using XDA Premium App
snoopy1e11 said:
My mac keeps sayin no device but I can access adb from anywhere basically its in my path but won't pick up my phone
Sent from my PG86100 using XDA Premium App
Click to expand...
Click to collapse
Make sure your phone is in debugging mode.
ADB won't see phone if debugging is not enabled.
It is on
Sent from my PG86100 using XDA Premium App
I'm a windows user.
Can't think of anything else.
Sorry.
agat63 said:
Make sure your phone is in debugging mode.
ADB won't see phone if debugging is not enabled.
Click to expand...
Click to collapse
If you have USB debugging turned on, you should see a triangle with exclamation mark on task bar. Secondly, try to do this:
adb kill-server => kill off current server first
then
sudo adb devices => u need to enter password
Basically, you are running adb with escalated privilege, sometimes it needs root access.
This is Wat I got
Sent from my PG86100 using XDA Premium App
snoopy1e11 said:
This is Wat I got
Sent from my PG86100 using XDA Premium App
Click to expand...
Click to collapse
hmmm interesting...just wondering if you have your device turned on to be disk usage instead of just Charge Only?
Check on your desktop to see if you SD card had mounted, not sure if it makes a difference but worth a try. Another thought is that maybe your USB port doesn't work?? Did you check your phone to see if you have a triangle with exclamation mark in it on the task bar? (to the left)
Also, try it on a different computer if u can, and if it still doesn't work, afraid urs is defective.
I really appreciate ur help I re did the sudo command and hit "adb devices connect" and my device popped up
Sent from my PG86100 using XDA Premium App
snoopy1e11 said:
I really appreciate ur help I re did the sudo command and hit "adb devices connect" and my device popped up
Sent from my PG86100 using XDA Premium App
Click to expand...
Click to collapse
Ha, interesting cuz I never have to issue that command. Good to know you got it to work.

[Q] How do I set the hostname?

How do I manually assign my phone a hostname on my wlan?
I've gone through all the other threads on XDA but none seem to actually work.
I've tried setprop net.hostname galaxys2
(can check this with getprop net.hostname)
and I've edited system/etc/dhcpcd/dhcpcd.conf and added hostname galaxys2 and ddns-hostname galaxys2
but still no result, anyone got any ideas?
this works for me. just add the below to the end of system/etc/dhcpcd/dhcpcd.conf
Code:
# custom hostname
hostname CHANGETHISTOSOMETHINGELSE
obviously, change the part "CHANGETHISTOSOMETHINGELSE" to the descriptive hostname that you want
note: make sure the file permission remains the same as before
can you tell me more how tho chang the dhcpcd.conf file, i try to use terminal, but the VI command was not found.
zeus_19 said:
can you tell me more how tho chang the dhcpcd.conf file, i try to use terminal, but the VI command was not found.
Click to expand...
Click to collapse
adb pull to your desktop, edit the file in notepad, finally adb push back the file
desean said:
this works for me. just add the below to the end of system/etc/dhcpcd/dhcpcd.conf
Code:
# custom hostname
hostname CHANGETHISTOSOMETHINGELSE
obviously, change the part "CHANGETHISTOSOMETHINGELSE" to the descriptive hostname that you want
note: make sure the file permission remains the same as before
Click to expand...
Click to collapse
Thanks. That's exactly what I wanted.
zeus_19 said:
can you tell me more how tho chang the dhcpcd.conf file, i try to use terminal, but the VI command was not found.
Click to expand...
Click to collapse
Remember it's case sensitive. The exact steps I just followed are as follows:
1. Install Dropbear SSH server. (Needs root)
2. SSH in (I use puttytray on Windows) and login as root (password given in Dropbear)
3. `mount -o rw,remount /system` to make the conf file writeable
4. `vi /system/etc/dhcpcd/dhcpcd.conf`
5. Hit 'I' to enter input mode. Scroll down to the last line and type 'hostname Georges-GSII'
6. Press 'Esc' to exit input mode, then type ':w' and ':q'. It should NOT give an error saying the file is read only.
7. `mount -o ro,remount /system` to mount it read only as it should be
8. Stop the SSH server and restart wifi (just turn it off and on again)
Voila.
deed02392 said:
Remember it's case sensitive. The exact steps I just followed are as follows:
1. Install Dropbear SSH server. (Needs root)
2. SSH in (I use puttytray on Windows) and login as root (password given in Dropbear)
3. type `mount -o rw,remount /system` press enter to make the conf file writeable
4. type `vi /system/etc/dhcpcd/dhcpcd.conf`press enter
5. Hit 'I' to enter input mode. Scroll down to the last line and type 'hostname Georges-GSII'
6. Press 'Esc' to exit input mode, then type ':w' press enter and type ':q'. press enter It should NOT give an error saying the file is read only.
7. type `mount -o ro,remount /system` press enter to mount it read only as it should be
8. Stop the SSH server and restart wifi (just turn it off and on again)
Voila.
Click to expand...
Click to collapse
dhcpcd.conf has new entry, hostname Nexus but still host name is androidthensumnumber ....so the above did not work for me

[Q] Disable Lock Screen thru ADB

I am running CM 7.1 Jordon Stable
So I disabled the slider unlock, but it stopped recognizing my gesture for some reason and I cannot figure out how to login to my phone. Not sure if I can change that setting somehow from ADP or do something from a terminal... Any ideas?
When I say gesture, I am not referring to the password based on the motion with the dots, I am saying the screen where the unlock / silent toggle was has been disabled and I cannot get passed there.
Here are the things I have tried already
----
Attempt 1:
$ ./adb -d shell
# cd data/data
# sqlite3 ./com.android.providers.settings/databases/settings.db
SQLite version 3.7.2
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> update system set value=1 where name='lockscreen_disabled';
sqlite> .exit
# reboot
Attempt 2:
adb shell
input keyevent 82
---
Neither of these worked. I think the solution should be in the updating the settings.db, but maybe its a different row/record that contains "ENABLE slider"?
Help would be appreciated!

[Guide] Add WiFiHotspot Toggle to any rooted Touchwiz Rom

This method doesn't require purchasing any app. It does require the use of sqlite3 in /system/xbin/. As well as terminal emulator from the play store. This will work for both 4.3 and 4.4 roms.
First if you don't already have terminal emulator installed install it now.
https://play.google.com/store/apps/details?id=jackpal.androidterm
Open up the terminal emulator and type in sqlite3 if the prompt doesn't change to sqlite> then you need to install sqlite3.
To install sqlite3: install sqlite installer root from the play store.
https://play.google.com/store/apps/details?id=ptSoft.util.sqlite3forroot
Open the program, press install, and allow root permissions. Once the installation is complete go ahead and Uninstall the sqlite installer app.
Open terminal emulator back up and copy paste in the following:
su
Allow the permissions... copy in:
sqlite3 /data/data/com.android.providers.settings/databases/settings.db
Your prompt should change to sqlite>
At this point if you don't have any custom toggles in your rom you can just copy and paste the below into terminal emulator. If you're not sure or if you do then you can get your current value(see end of post) and add WiFiHotspot; to the end of it using the syntax below.
update system set value='Wifi;MobileData;Location;Bluetooth;AutoRotate;SilentMode;Sync;Ebook;AirplaneMode;DrivingMode;AllShareCast;MultiWindow;SmartStay;PowerSaving;SBeam;Nfc;AirView;AirGesture;SmartPause;SmartScroll;DormantMode;WiFiHotspot;' where name='notification_panel_active_app_list';
After you update the value exit sqlite using:
.quit
You should now be able to add the WiFiHotspot Toggle in settings under display> notification panel.
To query your current value use the following command:
select * from system where name='notification_panel_active_app_list';
You should see something like the below returned. (Long pressing and using select text will copy whatever text you select.)
4034|notification_panel_active_app_list|Wifi;MobileData;Location;Bluetooth;AutoRotate;SilentMode;Sync;WiFiHotspot;Ebook;AirplaneMode;AllShareCast;MultiWindow;SmartStay;PowerSaving;SBeam;Nfc;AirView;AirGesture;SmartPause;SmartScroll;DormantMode;DrivingMode;
You'll need to copy from after the | to the end and add WiFiHotspot; to the end for the update command shown above.
Thanks to jbeitel for the original guide here:
http://forum.xda-developers.com/showthread.php?t=2483258
Sent from my SM-N900V using Tapatalk

Categories

Resources