sqlite3 binary for nook - Nook Color Themes and Apps

Attached is a working sqlite3 binary. Copy it to /system/bin and you will be able to edit sqlite databases on the nook itself.

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?

is there any ways to open support for init.d on version 1.5.7??

i have rooted perfectly,and built the folder /system/etc/init.d and i gave limits of authority to it.besides,i modify the file install-recovery.sh,the content is
【
#!/system/bin/sh
if ! applypatch -c MTD:recovery:2048:b01ab98799f9db633bbc6b43fe0df8fe5cebb820; then
r=`/data/sqlite3 /data/data/com.android.providers.settings/databases/settings.db "select * from system where name='stay_on_while_plugged_in';"`
if [ $r eq "" ]; then
/data/sqlite3 /data/data/com.android.providers.settings/databases/settings.db "insert into system values (null, 'stay_on_while_plugged_in','0');"
else
/data/sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update system set value='0' where name='stay_on_while_plugged_in';"
fi
rm /data/sqlite3
log -t recovery "Installing new recovery image"
applypatch MTD:boot:8388608:f1e31577c64654f400f65ddea1fb4d6a51be9ba9 MTD:recovery c54d675c3e1a8fe9e9d810e7bee501111bacd2ed 8388608 f1e31577c64654f400f65ddea1fb4d6a51be9ba9:/system/recovery-from-boot.p
else
log -t recovery "Recovery image already installed"
fi
# chmod the init.d dir
busybox chmod -R 755 /system/etc/init.d
# run init.d
/system/bin/logwrapper /system/bin/busybox run-parts /system/etc/init.d
】.
but when i reboot the phone,the file Won't enforced.i wonder why?
after testing,when i copy the sh script from init.d to install-recovery,it works.but it confuses me more,why can't i transfer the script from init.d to execute??
mapleshadow said:
after testing,when i copy the sh script from init.d to install-recovery,it works.but it confuses me more,why can't i transfer the script from init.d to execute??
Click to expand...
Click to collapse
Its 5am and I haven't slept much, but have you checked the permissions and made sure they are rw-r-r I've noticed files with different configuration not having these have some issues while running.
Easiest way to look and change is RootExplorer
I ran into a similar issue with my phone. Make sure your init.d folder has execute permissions and the scripts inside the same. i got fed up and made the scripts inside init.d executable ... seems to work now

Hosts file

I am trying to update my hosts file and have done so on CM7.1RC1 (the best Rom so far), its proporly formatted as I do this all the time on my linux boxes but for some reason on my gtab it does not work. With oenvpn enabled and working I cannot reach items by name as stated in my hosts file.
Question .. does the /etc/hosts file work the same on the gtab as it does on all other operating systems? If so then ideas of what to look for to resolve this?
brwatters said:
With oenvpn enabled and working I cannot reach items by name as stated in my hosts file.
Click to expand...
Click to collapse
Try both pings (the android one in /system/bin and the busybox one in /system/xbin--you may only have one on some firmwares) to check.
Question .. does the /etc/hosts file work the same on the gtab as it does on all other operating systems? If so then ideas of what to look for to resolve this?
Click to expand...
Click to collapse
Yes--but programs have to use it. The busybox utilities all use it and the stock browser also; don't know about openvpn.
Are the permissions set correctly on /etc/hosts (actually, /system/etc/hosts)? It should be readable for all users.
The issue is that the hosts file (/etc/hosts) in GTab is readonly and the device has to be rooted to edit the file. Now I have not been able to root my GTab running Gingerbread. This makes it impossible to effectively use VPN to access the corporate network. I tried to create another hosts file in /system/bin folder but it would not let me save anything in that folder. Without being able to edit the /etc/hosts file VPN seems to be of limited value in GTab.
Any ideas?
There is no need to "root" a gTab running a custom ROM. If an "adb shell" command works, then you have root permissions. Same thing if you download and install the Superuser app from Market.
To edit /system/etc/hosts, install Root Explorer from the Market. This will let you remount /system read-write easily. Once remounted, just edit the hosts file.
To edit the hosts file on the command line:
Code:
C:\> [B]adb pull /system/etc/hosts .[/B] [I]Get the hosts file[/I]
[I]Edit the file on the PC[/I]
C:\> [B]adb remount[/B] [I]Remount /system read-write[/I]
C:\> [B]adb push hosts /system/etc/hosts[/B] [I]Put the file back[/I]
C:\> [B]adb shell chmod 644 /system/etc/hosts[/B] [I]Set the correct permissions[/I]
Reboot the tablet after this.

bat script to check if android is rooted

can anyone help me out with an
adb bat script that will check weather android is rooted
root files are located
superSU -- /system/app
su binary -- /system/xbin symlinked to /system/bin
i can find functions but nothing that is adb bat script.
any help would he appriciated.

Debugging busybox

Hi, I'd like to ask a general question about busybox. I've added busybox binary into ramdisk root directory of boot.img. I've set busybox binary permissions to 0777 in init.rc, in order to be sure not getting any denied permissions issues.
I've put an exec command into init.rc for using busybox cp and it worked because it really made a copy of default.prop in ramdisk root directory. I've also put a start service line into init.rc That service is essentially a busybox sh call for launching a shell script. Unfortunately, it seems shell script is not executed because some cp and echo commands which I put inside it have not effects.
Looking for around the www, it looked like redirection ('>', '>>', ...) is not prohibited by busybox. So, i've also tried to redirect
command output to a file, but file was not created.
So, how could I debug busybox? Any ideas?

Categories

Resources