There are many tools and "Super-Ultra-Mega-Rooters" and things to root your Nook.
They will install 23 different things on your Nook.
If you like them, use them.
What is "rooting"?
At the most basic level, "rooting" is managing to get a root (all-powerful) shell (command line interpreter).
When your Nook is sitting there with a prompt saying # then you are rooted.
Alright, a prompt #, but on where?
On your desktop computer, which has to be linked somehow to your Nook.
The way we link Android devices to desktop computers is with ADB (Android Debug Bridge).
Every Android device has this capability built in, but sometimes it's disabled.
Sometimes they make it easy to enable, sometimes they make it hard.
On the Nook, it's fairly easy because the Nook will boot up off an external SD card.
How to root any Nook
The configuration for the Nook is stored in a filesystem called uRamdisk inside the boot partition.
If we can get a copy of uRamdisk, modify it, then replace the copy in the boot partition we can root.
Copy uRamdisk to the desktop
There are two easy ways to get a copy of uRamdisk:
Put noogie on an SD card, boot up, connect the USB and a disk will appear on your desktop.
This will be the boot partition, copy uRamdisk.
Get the update zip from B&N and unzip it.
They call the file ramdisk.img, but it's uRamdisk.
Modify uRamdisk
You need to extract two files out of uRamdisk then replace them.
There is a utility for Win32 called bootutil.exe in the signature below.
Code:
bootutil /x /v uRamdisk init.rc default.prop
This should say that it extracted two files.
Using an editor you need to edit the two files.
Don't use Windows Notepad (it's miserable and doesn't understand Unix end-of-lines).
Try Notepad++ if you don't have a good text editor.
Comment out a few lines in init.rc (additions in red):
Code:
service adbd /sbin/adbd
[color=red]#[/color] disabled
...
# adbd on at boot in emulator
on property:ro.kernel.qemu=1
[color=red]#[/color] start adbd
on property:persist.service.adb.enable=1
[color=red]#[/color] start adbd
on property:persist.service.adb.enable=0
[color=red]#[/color] stop adbd
You can use ADB over WiFi or USB.
Over WiFi can be easier because you don't need to configure desktop drivers.
As so far modified the ADB would use USB.
If you want it to work over WiFi instead, delete the comment # mark:
Code:
[color=red]#[/color] setprop service.adb.tcp.port 5555
Now a minor modification to default.prop.
Change it so that it reads only (no other lines):
Code:
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
To put these two files back into the desktop's copy of uRamdisk:
Code:
bootutil /v /r uRamdisk init.rc default.prop
This should say that it replaced two files.
Copy uRamdisk to the Nook
Use noogie as in step one and just copy the uRamdisk over the old copy.
Reboot. Make sure that your WiFi is turned on and connected.
Use ADB
Get adb.exe from the Android SDK.
You connect to your Nook using either an IP address or a host name if you defined one in your C:\Windows\System32\drivers\etc\hosts.
Code:
adb connect nook [color=red][i]or whatever you named it[/i][/color]
adb shell
or
Code:
adb connect 192.168.1.2 [color=red][i]or whatever the IP is[/i][/color]
adb shell
Then you will get your # prompt.
You can do whatever you want.
Usually the point of all this is to allow you to modify something in the system.
To do this, you have to "remount" the system partition.
Code:
# mount -o rw,remount /dev/block/mmcblk0p5 /system
The rest is up to you!
Can you release a version of this utility for linux?
nobricks said:
Can you release a version of this utility for linux?
Click to expand...
Click to collapse
In Unix (as always) you can accomplish your purpose by chaining together a half dozen commands with obscure case-sensitive parameters.
I don't know the exact parameters, but the general drift of things is here.
Thanks for pointing me in the right direction.
Did some further searching on the forums and found this post with the proceedure for modifying uRamdisk under linux.
Renate NST said:
Over WiFi can be easier because you don't need to configure desktop drivers.
Click to expand...
Click to collapse
Renate,
Question about NST USB drivers for ADB.
In short: I got 2 NSTs, they do have "slightly" different hardware, I guess. Or might be, internal SD card size is different only?
First was rooted long time ago, and my WinXP see it as ADB device (backup size 1,958,739,968 bytes)
NST modded ADB driver was installed long time ago.
Another one is a bit newer (backup size 1,962,934,272 bytes)
I’ve decided to root second one, followed instruction to the letter.
It was not detected as ADB device, only ADB via WiFi worked.
Apparently, /sbin/adbd was started, but I was not able to adb connect via USB at all, but only via WiFi with following line was uncommented (obviosly):
setprop service.adb.tcp.port 5555
Tried few times, the results are consistent.
Made me think, are there different drivers for "slightly" different NST hardware?
Am I mistaken?
The partitioning on an NST actively uses 1,941,962,752 bytes.
Any capacity over that is unused by the stock partitioning.
The exact capacity of the "2 GB" is varied.
I wrote a note somewhere of 3 different sizes that I have seen.
adbd, the ADB daemon uses either USB or TCP (on the Nook, that's WiFi).
Whether service.adb.tcp.port is defined determines this.
Renate,
Renate NST said:
The partitioning on an NST actively uses 1,941,962,752 bytes.
…
I wrote a note somewhere of 3 different sizes that I have seen.
Click to expand...
Click to collapse
The Q is: Does all 3 use exact same windows driver?
Could you compare your NST Android Composite ADB Interface driver with mine, please:
Google, Inc. | 8/11/2009 | 2.0.10.2
Hardware Ids
USB\Vid_2080&Pid_0003&Rev_0216&MI_01
USB\Vid_2080&Pid_0003&MI_01
The excess size of the internal NAND does not make a difference in anything.
The "ADB driver" is basically a way to tell Windows:
Hey, dude, you don't really know this device but pretend that you do.
It just has a bulk in endpoint and a bulk out endpoint.
Don't worry your little head over what the data is.
Just use the generic driver file C:\Windows\System32\drivers\winusb.sys
And if I feel like using it I'll interface through C:\Windows\System32\winusb.dll
Click to expand...
Click to collapse
And Windows sighs and just does it.
(Well, actually, it's a bit more complicated than that because it creates the Android Device install class.)
Anyway, what was your question?
Then what about adb wireless apps? Do we still need one of those to adb-connect wirelessly? I tried this on a fresh Nook with 1.1.2, and don't seem to be able to connect to the Nook.
If you use ADB over WiFi and if you leave your WiFi on then you have a big security leak unless you are only on a private network.
People use app like ADB Konnect to disable ADB over WiFi.
I prefer just using ADB over USB.
Renate NST said:
If you use ADB over WiFi and if you leave your WiFi on then you have a big security leak unless you are only on a private network.
People use app like ADB Konnect to disable ADB over WiFi.
I prefer just using ADB over USB.
Click to expand...
Click to collapse
Thank you for the advice. Then, if I want to use adb over wifi, but want it to be off (or standby or whatever state that doesn't allow adb connection over wifi) at boot so that it can be toggled on/off later using one of adb wireless apps, what should I do? Is keeping "setprop service.adb.tcp.port 5555" commented sufficient for this?
ADB is only designed to support one transport at a time, USB or WiFi.
Apps that control this have to kill the adbd to have it restart.
If you comment the service.adb.tcp.port out then USB will be used.
Renate NST said:
ADB is only designed to support one transport at a time, USB or WiFi.
Apps that control this have to kill the adbd to have it restart.
If you comment the service.adb.tcp.port out then USB will be used.
Click to expand...
Click to collapse
I've been having a really hard time today attempting to get ADB over USB working on my NSTG 1.2.1. I followed the instructions, but when I do
Code:
adb usb
-OR-
Code:
adb devices
I always get
Code:
error: device not found
Which, of course, means that ADB isn't picking up my Nook as an ADB device.
Can you help?
Use Device Manager (devmgmt.msc) to see if the USB part is working.
See: http://forum.xda-developers.com/showthread.php?p=55428192#post55428192
Related
I managed to install the drivers but how do I open the shell? I want to access some lost files.
I followed the instructions but adb_usb.ini was nowhere to be found so I had to create it.
I have to control ADB via cmd.exe right? Anyone can guide me?
http://forum.xda-developers.com/wiki/BN_Nook_Simple_Touch/Installing_ADB
http://forum.xda-developers.com/wiki/Android_Debug_Bridge
Ok, to get to a shell on the Nook you have to use a shell on the host computer.
In Windows, a shell is known as cmd.exe, "MS-DOS Prompt" or command.
That's the (by default) black window with text.
You can start a Windows shell through the Program list if a shortcut already exists.
If not, you can start it by holding down the Windows key, hitting "R" and typing cmd.exe in the box.
The little box is in a sense already a shell, but it makes a bigger looking shell.
The program adb.exe is the one that you will run to interact with your Nook.
You will have to either be in the same directory as where adb.exe or else have that directory in your PATH.
There are a bunch of commands that you can use (documented in the second link above).
You must first tell ADB how to connect to your device through either a "connect" (for WiFi) or "usb".
Once you are connected you can issue the other commands.
Code:
adb shell
This will let your Windows shell access a shell on your Nook.
Since this is an entirely different system, the commands are different.
In Windows, to list files you type "dir", in Linux (the basis of Android), you type "ls".
I can get to the directory of adb.exe on command.
I don't get it what am I supposed to do next.
If I run adb.exe it starts to load something and then nothing. The Nook is connected, it has Noogie as it's CWR.
After running adb.exe what do I do? Do I go to the nook directory or something? The thing is that I don't even know if I'm running ADB correctly. I followed everything on the wiki
vdguzman said:
it has Noogie as it's CWR.
Click to expand...
Click to collapse
Um, Clockwork Recovery and Noogie are two separate and unrelated things.
Code:
C:\>adb usb
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
At that point it will either say that it found a USB device or that it didn't.
If it's connected, you can type "adb shell".
On Windows, when you click on the USB icon on the taskbar it will list what is connected.
Normally with CWR you should see two lines, USB Mass Storage and ADB.
Hello Everyone,
I recently Rooted my Nexus 7, but did not Unlock it because as I understand it......Unlocking will wipe my data.
I have tried many backup solutions and I find TWRP to be by far the best, but there is one catch and it's bugging me.
TWRP doesn't backup everything. For example "Internal Storage" aka "SDCARD" aka what ever else android calls the directory to be more confusing lol
I have been trying different things to backup what TWRP doesn't cover and it has just been a long frustrating failure.
MTP is terrible. It can't really be trusted and Windows Explorer becomes unresponsive. It worked better when I selected a few folders at a time but still horrible to trust. However I am open to any suggestions.....maybe there is an MTP Client that is better at handling this than Windows Explorer? I don't know.
ADB Kinda sorta doesn't seem to work with a locked device. Although Holo backup which uses ADB seemed to save a lot to a backup file, it didn't work to restore from it. Even tried unzipping it to see what was in that file but no luck. So I don't know if this means ADB is also hopeless or not.
Airdroid / Wifi File Transfer app also don't work very well with certain directories or major transfer sizes.
Any suggestions would be greatly appreciated. I would really like to be able to do the unthinkable which is recover from a Hard Factory Reset, but I am fine with just being able to save a backup of everything that TWRP won't.
Thanks so much in advance.
External USB and Titanium Backup. You can order a cable to use an external usb on amazon for about a dollar.
What about uploading to cloud storage? Dropbox, drive, etc. Might not work so good for large files though.
Sent from XDA app
Not sure why you created another thread on this issue, but what doesn't work with adb? Adb pull /sdcard will pull everything from your sdcard including your twrp backup.
Adb doesn't care if you have a locked boot loader.
Sent from my Galaxy Nexus
KingVeto said:
External USB and Titanium Backup. You can order a cable to use an external usb on amazon for about a dollar.
Click to expand...
Click to collapse
Thanks I already have one and I been using it for the things I tried above. Mine is just a small adapter no cord.
gc84245 said:
What about uploading to cloud storage? Dropbox, drive, etc. Might not work so good for large files though.
Click to expand...
Click to collapse
That would be ok but as you said not so good for large files. plus i would prefer an offline backup solution to toss on my NAS as well.
Pirateghost said:
Not sure why you created another thread on this issue, but what doesn't work with adb? Adb pull /sdcard will pull everything from your sdcard including your twrp backup.
Adb doesn't care if you have a locked boot loader.
Click to expand...
Click to collapse
Honestly it beats me why I can't get ADB to work. Only reason why I though it was related to my bootloader being locked was because some programs / toolkits I used brought up an error saying that it couldnt connect adb due to locked bootloader.
I can't get ADB working and it has been driving me mad lol. I feel like maybe I am doing something stupid wrong when trying to use an adb command.
At this point I would love a noob guide with screen shots on how to use adb command, the adb command line tool....the works on adb lol.
Screenshots would be a huge help to prove that I am not doing something dumb and that I actually have some issue with adb.
Thanks Everyone.
Code:
C:\Users\pirateghost>adb
Android Debug Bridge version 1.0.31
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <specific device> - directs command to the device or emulator with the given
serial number or qualifier. Overrides ANDROID_SERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices [-l] - list all connected devices
('-l' will also list device qualifiers)
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devices.
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] [--algo <algorithm name> --key <hex-encoded key> --iv <hex-encoded iv>] <file>
- push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-s' means install on SD card instead of internal storage)
('--algo', '--key', and '--iv' mean the file is encrypted already)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>.
If no -f option is supplied then the data is written
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves
in the archive; the default is noapk.)
(-shared|-noshared enable/disable backup of the device's
shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes
system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If
the -all or -shared flags are passed, then the package
list is optional. Applications explicitly given on the
command line will be included even if -nosystem would
ordinarily cause them to be omitted.)
adb restore <file> - restore device contents from the <file> backup archive
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb get-devpath - prints: <device-path>
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition
is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list of the following values
1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes priority over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed.
Code:
c:\temp\gnex>adb pull /sdcard
Using your example except for the directory names being different this is what I would get:
(I am using the names of your directories for simplicity....I know enough that mine would vary lol)
After running adb and entering the command as you did. This is the outcome:
'adb' is not recognized as an internal or external command, operable program, or batch file.
HandyAndyXDA said:
Using your example except for the directory names being different this is what I would get:
(I am using the names of your directories for simplicity....I know enough that mine would vary lol)
After running adb and entering the command as you did. This is the outcome:
'adb' is not recognized as an internal or external command, operable program, or batch file.
Click to expand...
Click to collapse
because you have not set adb to be an environment variable.
browse to where your adb.exe is located
make a new directory called n7
hold down shift and right click in the box somewhere in windows explorer
click on open command window here
then type this:
Code:
adb pull /data/media n7/
/data/media and /sdcard are the same location
Pirateghost said:
because you have not set adb to be an environment variable.
browse to where your adb.exe is located
make a new directory called n7
hold down shift and right click in the box somewhere in windows explorer
click on open command window here
then type this:
Code:
adb pull /data/media n7/
/data/media and /sdcard are the same location
Click to expand...
Click to collapse
OK, did that which made perfect sense.
This is what it outputs:
pull: building file list...
0 files pulled. 0 files skipped.
(That was trying it with /media n7/)
The following is when i tried it with /sdcard:
remote object '/sdcard' not a file or directory
HandyAndyXDA said:
OK, did that which made perfect sense.
This is what it outputs:
pull: building file list...
0 files pulled. 0 files skipped.
(That was trying it with /media n7/)
The following is when i tried it with /sdcard:
remote object '/sdcard' not a file or directory
Click to expand...
Click to collapse
/data/media
/data is the partition, media is the directory
/media is looking for a media directory on the root or /
I usually just run...
Code:
adb pull /mnt /N7backup
Which copies everything to a folder called 'N7backup' onto the root of my C:/ drive in Windows...
But, boy... does it take a while! Seriously, I could be half way through 'War & Peace' by the time it's done! (OK, bit of an exaggeration, but you get my point).
For this reason, I rarely use ADB much... I tend to use MTP to copy select folders over - drag'n'dropping folders... Titanium, TWRP, MyStuff, etc., et.al. But even that takes it own sweet time.
---------------------
The N7 is a great device... but it's crippled by the lack of removable storage (microSD), that I can slip into my laptop, and can copy everything within 5 minutes.
Rgrds,
Ged.
Pirateghost said:
/data/media
/data is the partition, media is the directory
/media is looking for a media directory on the root or /
Click to expand...
Click to collapse
I appreciate you're patience with me and the help.
Do I need to do some connect command before doing any of that?
HandyAndyXDA said:
I appreciate you're patience with me and the help.
Do I need to do some connect command before doing any of that?
Click to expand...
Click to collapse
no. the command is simply
adb pull /data/media /nameoffolderyouwanttosenditto
GedBlake said:
I usually just run...
Code:
adb pull /mnt /N7backup
Which copies everything to a folder called 'N7backup' onto the root of my C:/ drive in Windows...
But, boy... does it take a while! Seriously, I could be half way through 'War & Peace' by the time it's done! (OK, bit of an exaggeration, but you get my point).
For this reason, I rarely use ADB much... I tend to use MTP to copy select folders over - drag'n'dropping folders... Titanium, TWRP, MyStuff, etc., et.al. But even that takes it own sweet time.
---------------------
The N7 is a great device... but it's crippled by the lack of removable storage (microSD), that I can slip into my laptop, and can copy everything within 5 minutes.
Rgrds,
Ged.
Click to expand...
Click to collapse
I agree with the first part but I would like to understand and get ADB going and give it a try myself.
As for the "crippled by lack of removable storage" ..........if you are rooted you can use an adapter to go from the usb port on the nexus to a regular USB port then you can use usb flash drives or any kind of usb storage / card reader whatever. You will need to be rooted / have that adapter / and install an app like StickMount so the device can see the drive and mount it as a directory. This works great.
Thanks
Pirateghost said:
no. the command is simply
adb pull /data/media /nameoffolderyouwanttosenditto
Click to expand...
Click to collapse
This should work but instead right away it outputs this:
pull: building file list...
0 files pulled. 0 files skipped.
GedBlake said:
I usually just run...
Code:
adb pull /mnt /N7backup
Which copies everything to a folder called 'N7backup' onto the root of my C:/ drive in Windows...
But, boy... does it take a while! Seriously, I could be half way through 'War & Peace' by the time it's done! (OK, bit of an exaggeration, but you get my point).
For this reason, I rarely use ADB much... I tend to use MTP to copy select folders over - drag'n'dropping folders... Titanium, TWRP, MyStuff, etc., et.al. But even that takes it own sweet time.
---------------------
The N7 is a great device... but it's crippled by the lack of removable storage (microSD), that I can slip into my laptop, and can copy everything within 5 minutes.
Rgrds,
Ged.
Click to expand...
Click to collapse
Sorry I was replying quick and misunderstood.......yes an actual sdcard would not be something I'd say no to. What would be good too is if you didnt have to use either MTP or PTP.....if it just showed up as a drive
HandyAndyXDA said:
I agree with the first part but I would like to understand and get ADB going and give it a try myself.
As for the "crippled by lack of removable storage" ..........if you are rooted you can use an adapter to go from the usb port on the nexus to a regular USB port then you can use usb flash drives or any kind of usb storage / card reader whatever. You will need to be rooted / have that adapter / and install an app like StickMount so the device can see the drive and mount it as a directory. This works great.
Thanks
Click to expand...
Click to collapse
Oh, don't get me wrong - I wasn't trying to dissuade you from using and understanding ADB... and you should give it a try. Definitely. Both Fastboot and ADB are powerful and useful tools, and IMHO you should learn everything you can about them.
I was just grumbling about the data transfer speeds from N7 to laptop...
HandyAndyXDA said:
...if it just showed up as a drive
Click to expand...
Click to collapse
Yes,Yes,Yes... and thrice times YES!.
Rgrds,
Ged.
GedBlake said:
Oh, don't get me wrong - I wasn't trying to dissuade you from using and understanding ADB... and you should give it a try. Definitely. Both Fastboot and ADB are powerful and useful tools, and IMHO you should learn everything you can about them.
I was just grumbling about the data transfer speeds from N7 to laptop...
Yes,Yes,Yes... and thrice times YES!.
Rgrds,
Ged.
Click to expand...
Click to collapse
I understand and agree completely. And, yes i would love to learn as much as i can. This android stuff is awesome and fun.
Thanks again and I like your attitude
BUMP:
So any last ideas on what could be wrong with ADB not working?
I don't blame you if you are stumped at this point.
PS:
At this point I am desperate, so feel free to even ask me noob questions such as .....Did I connect the device to the computer. I won't be offended you guys are a real help.
HandyAndyXDA said:
BUMP:
So any last ideas on what could be wrong with ADB not working?
I don't blame you if you are stumped at this point.
PS:
At this point I am desperate, so feel free to even ask me noob questions such as .....Did I connect the device to the computer. I won't be offended you guys are a real help.
Click to expand...
Click to collapse
UPDATE:
I tried
adb reboot-bootloader
and that worked so why dont
pull
work?
I know that this is for second edition but I don't seen a forum for the first edition so this seems to be the closest match. Anyway I am trying to root my Nook Classic (the one with a E-ink display on the top and color touch screen on the bottom). I am following the instructions on nookdevs for rooting the Nook Classic on all hardware and firmware versions (I can't post the link here as I am new but PM me and I can pass it that way if you need). The method is that sometimes when the web browser browses a certain type of website it crashes and sometimes starts adbd and you can connect adb at that point.
I have managed to get adb to connect, pull the init.rc file, make the needed change, but when I try to push the ratc.bin file adb says it goes though but then the second command $ cd /sqlite_stmt_journals (after starting adb shell) says it is not found. So I can't go any further. ratc.bin is what gives root access long enough to push the init.rc back and without being able to run that, well I am up a creek.
Any ideas?
dob43 said:
I know that this is for second edition but I don't seen a forum for the first edition so this seems to be the closest match. Anyway I am trying to root my Nook Classic (the one with a E-ink display on the top and color touch screen on the bottom). I am following the instructions on nookdevs for rooting the Nook Classic on all hardware and firmware versions (I can't post the link here as I am new but PM me and I can pass it that way if you need). The method is that sometimes when the web browser browses a certain type of website it crashes and sometimes starts adbd and you can connect adb at that point.
I have managed to get adb to connect, pull the init.rc file, make the needed change, but when I try to push the ratc.bin file adb says it goes though but then the second command $ cd /sqlite_stmt_journals (after starting adb shell) says it is not found. So I can't go any further. ratc.bin is what gives root access long enough to push the init.rc back and without being able to run that, well I am up a creek.
Any ideas?
Click to expand...
Click to collapse
>> http://www.mobileread.com/forums/forumdisplay.php?f=209
>> http://www.the-ebook.org/forum/viewforum.php?f=44&sid=e250da1c3a4967da22dae8ca2d104ac8
Thanks osowiecki, I did find a thread on Mobile read shortly after I posted this. The other is non-english I am afraid, and sadly I only speak english.
Anyway I did mange to root my nook today. And I am posting here as I hope it will help someone in the future:
Yessssssssssssssss! I finally hacked my Nook Classic (Nook First Edition called by some)! I followed most of the instructions at http://nookdevs.com/Rooting_B&N_revision_1.4_to_1.7_on_any_hardware
I only tweeked in a few places. Here is a general list of what I did:
1. Look at the site above and grab the linked file (ratc.bin). Then go to this thread http://forum.xda-developers.com/showthread.php?t=1474956 and at the top there grab the adb + fasboot + drivers.zip. The reason I used this is because it is much smaller than the full Andriod SDK (which is over 500mb btw) and I figured this would work since it works for Nook Tablets. I didn't install the drivers or anything though. Just used adb.
2. Went with nook browser to http://nookadb.suspended-chord.info/ to crash the browser. If this should ever be down I see on the nookdevs page there is a discussion with the code that is on the crash page so you can put it on any web server and still do this procedure.
3. Once it crashed I went to cmd (comand prompt) and navigated to the folder that had the adb package I downloaded and decompressed earlier. I suggest putting this folder on your desktop for easy use. I gave the command
adb connect yournookip:5555 please note that the nookdevs instructions are not specific in that you NEED the :5555 after the IP. If it doesn't connect, keep crashing the browser by going to that page until it connect.
4. extracted the init.rc file with the command
adb pull /init.rc then edited as per the instructions on nookdevs
5. Now here is where things are different. I tried to push the ratc.bin file and while that seemed to work the commands after it didn't. It would keep saying the file wasn't there. I was cut and pasting the commands direct from the website so I don't think that was the issue. So what I did was grab the bat file at www.mobileread.com/forums/showthread.php?t=121655&page=2 by Jackr and edit it slightly removing the bit about location of adb and placed the bat in the same folder as adb on my desktop and ran it.
6. This actually worked and the bat prompted me to crash the browser again. I kept trying it took a while but as soon as I did it pushed the modifyed init.rc to the nook. The another reason why I think the bat/script is important as my nook totally froze a second after I crashed it. I think that if I was trying to paste that command manually after connecting I would still be trying lol.
7. After reboot I was fully rooted and I installed a bunch of apps from nookdevs using adb. Just make sure the apk (app file) is in the same directory as adb and use the command install nameofapp.apk
8. If you want to use nookmarket app to install files by itself then you need to:
adb connect nookIP:5555
adb shell
then type this after the #
/system/xbin/sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update secure set value=1 where name='install_non_market_apps'"
It will allow nookmarket to install apps on the fly over the net. If you ever want to turn it back off just change the value=1 to value=0 in the above command. Of course you can always use adb, but it can be handy.
Of all the apps I would definitely suggest Nooklibary and wifilocker along with Nooksync. There are several other good nook apps such as trook. Oh I should also mention that Nook Browser still works fine. I think using the batfile/script helped with that situation.
I hope this helps someone who is thinking of taking the plunge (and trying to find out HOW). I wouldn't have bothered if B&N actually continued to update the Nook Classic and add the features that we BEGGED for (and are in NookLibrary). Instead of spending time adding things we didn't like games.
I've tried a thousand times, but always get "failed to copy 'init.rc' to '//init.rc': Permission denied" so RATC must not be working. And I'm on mac, so no bat. Any ideas?
lolbutts said:
I've tried a thousand times, but always get "failed to copy 'init.rc' to '//init.rc': Permission denied" so RATC must not be working. And I'm on mac, so no bat. Any ideas?
Click to expand...
Click to collapse
I would suggest looking at the bat, and creating the equivalent in apple script. If I remember right Mac's still have that option. Another option would be to run say WinXP in emulation (with virtual box for example) and do it that way.
How to root the original Nook tablet (model number: BNRZ100)
dob43 said:
Yessssssssssssssss! I finally hacked my Nook Classic (Nook First Edition called by some)! I followed most of the instructions at http://nookdevs.com/Rooting_B&N_revision_1.4_to_1.7_on_any_hardware
Click to expand...
Click to collapse
Okay, since nookdevs.com has apparently been down for sometime now, I was checking out the mobileread.com link that was shared above and found out the info that I have been searching for to find out how to root the Nook. Be forewarned that I have not tried this yet, but I am about to, and afterwards I will post the results, I am just posting it as sort-of a guide for myself and anyone interested at this point. I will edit this post accordingly once I am successfully rooted.. Please see below for links / details.
Disclaimer: I am not responsible for any damage that is done by you to your Nook, either physically or otherwise. I am just showing you what I have researched and if you choose to follow these directions it is at your own risk.
Which Nook Device Do You Have?
click here to find out:
http://glyde.com/glydecast/how-to/which-nook-do-you-have/
Remember, this is for the first generation only (model number: BNRZ100)
Here is a visual aid that will help you find the SD card that you need to look for once you get the Nook opened up (yes, you will need to open your Nook and access the motherboard):
http://www.wired.com/2009/12/nook-torn-open-hacked-and-rooted/
How to open the Nook up:
https://www.youtube.com/watch?v=GEDqiNiQFHk
Hint: you don't need to take to front panel / bezel off, just the back section because all we need is access to the motherboard to be able to remove the internal SD card, which contains the file that we will be editing.
Finally, the info that you need to root the device (also posted below the link for quick reference, and just in case the link gets broken):
http://www.mobileread.com/forums/showthread.php?t=128210
How to root the Nook, after you figute out how to open it up:
Just you need a microSD Card reader + Linux (any linux ) !
just you should remove the System file MicroSD ( which is inside the Nook )
put it in your PC , change the "init" file with Any txt editor !
just find "service adbd /sbin/adbd" and change the "disable" to "enable" ...
you are done !
Wow I had no idea that Nookdevs went down. Thankfully I did archive all the information on that page. While the method you mentioned is great, and the best, only the earliest nook classic's had removable system SD cards. After the first batch they were soldered chips instead.
With that in mind I am posting what was contained in the link I posted before on NookDevs since it is not available on the internet archive.
------------
This method of rooting is known to work on B&N firmware revisions 1.4-1.7, on all hardware versions. Unlike the other rooting methods, this one involves an element of luck -- it takes advantage of a memory-corrupting bug in the web browser, and its success depends on the current contents of the memory which depends on more variables than we can control. As such, the method requires a little bit of (or more) patience. Warning: After this root is completed, the web browser will be irreversibly damaged.
Contents
1 Preparation
2 Enable adbd on the Nook
3 Pull and modify /init.rc
4 Getting root access
4.1 Keeping root access
5 Your rooted Nook
6 Notes
Preparation
Install Google's Android platform tools from developerdotandroiddotcom. These include many useful utilities, such as the ADB control software.
Open up a terminal to use ADB
Open a command prompt
Navigate to the directory that you installed, then go into the platform-tools subdirectory. This is where the adb executable lives.
Connect your nook to the same WiFi that your computer is on. You need direct (non-firewalled) access to the Nook's IP address to connect via ADB.
Find your Nook's IP address (How to find our your nook's IP address)
Write it down somewhere.
Enable adbd on the Nook
This is the luck portion of the root. adbd is the other half of ADB: ADB runs on your computer, and tries to connect with adbd on the nook. Once connected, you can issue commands, shuffle files, and install applications. Our final goal is to be able to start and stop adbd at will[1].
Open the Nook's web browser and navigate to the web site nookadb.suspended-chord.info. You may want to bookmark the page for a quicker access.
When you load this web page, the browser will crash. (It may automatically reload itself a few times first.) After it crashes, it might enable adbd.
Go back to the command prompt on your computer, and type:
adb connect <nook's IP>
One of two things will happen:
You will get the message unable to connect to <ip address>:5555.
In this case, restart your web browser and load the web page again (from the history or the bookmark). You may have to do this a dozen times or more, so keep at it!
You will get the message connected to <ip address>:5555.
Success!
At this point you have (temporarily) access the nook via ADB, can now enter commands on your PC for the Nook, and can move files back and forth. If you reboot the nook, adbd (the nook companion to ADB) will not be running.
Pull and modify /init.rc
If this isn't your first time through, and you have a modified copy of init.rc, skip this step.
Now that you can connect into the Nook, you will want to pull and edit the /init.rc file. This file is run when the nook turns on, and includes an option to enable adbd (disabled by default). Download the file to your PC with:
adb pull /init.rc
Open this file with Notepad (or a different plain text editor), and find the part the lines:
service adbd /sbin/adbd
disabled
Change 'disabled' to 'enabled' and save the file.
Getting root access
You got the web browser to launch adbd, but you only have the privilege level of the web browser's user - system. To install software and to start adbd when the Nook reboots, you need root access. Rage Against the Cage will give you root access. Next, you'll restart adbd, and push the modified init.rc back to the nook. After that, reboot the nook and you're done!
Download [ratc.zip].
Extract it to the same directory that adb is stored in, then go back to the command prompt:
adb push ratc.bin /sqlite_stmt_journals
adb shell
$ cd /sqlite_stmt_journals
$ /system/bin/chmod 777 ./ratc.bin
$ ./ratc.bin
(several lines of output follow -- don't do anything, a few seconds later adb will disconnect you.)
Keeping root access
If everything went well, you should have root access on the Nook. However, the Nook is now relatively unstable and may stop working at any point, so work quickly!
The nook may crash - just reboot, then restart the process from scratch. (Remember, you don't need to pull init.rc again.)
First, you need to stop your PC's ADB server. It still thinks that it's connected to the nook.
adb kill-server
Second, you need to re-establish the connection with adbd on the nook and then push init.rc file. You can do this by typing these commands[2]:
adb connect <nook IP>
adb push init.rc /
Perform the browser crash procedure again. After each attempt, check if the computer successfully transferred init.rc. If it did, you're done!
If the nook crashes before the transfer completes (so you are not able to connect to your nook), go back to "Enabling adbd on the Nook". You can skip "Pull and modify /init.rc", but do the other steps.
If the adb push gives a permission denied error, redo the "Getting root access", and try again. You may have to do this quite a few times until the whole process succeeds.
Your rooted Nook
Assuming everything worked, you now have a rooted Nook with adbd running on reboot, with root access. You should be able to establish the connection with adbd on the nook without jumping through any other hoops.
What's next? Browse the applications, and install to your heart's content.
Suggestions:
Mynook.ru Launcher A polished replacement launcher. You must replace the launcher to access additional applications with the nook.
Trook A RSS feed reader for the nook, and much more! It can install applications, too. Just go into the nookdevs feed.
NookLibrary A replacement library for the nook. If unifies sideloaded books with Barnes & Noble content, and offers other improvements.
NookMarket A program that allows you to easily install everything on nookdevs. Trook offers more functionality (imho)
Games There are a few games on the applications page.
Notes
↑ There's also a Python script to automate the process: root-nook-eink.tar.xz (Updated Jun 6 , 2011)
↑ You may want to run a script that automatically issues the following commands, reducing the chances of the nook crashing before init.rc has been pushed to it. In this case, extract this [batch file] to the same directory as ADB. Run it by typing:
push.bat
It will prompt you for your nook's IP address, then try connecting. Every few seconds, ADB will complain that it can't connect to the nook. Let's fix that.
------------------------------------------------
The above is from Nookdevs.com and I did not write it I am only posting it here as the site has went down.
I am also posting the html file that is needed to do this (although here it is in txt format). If the the site listed above ever dies you can put this on a website somewhere to use it. And the ratc.bin file needed.
And finally I am adding the apps that make rooting the nook classic worth while. The improved library definitely. Which btw are two parts, the library app and the nooksync which enables you to download from B&N directly. Otherwise you need to use the normal nook library app to download then you can read with the nookdev version. I am not sure which version of the library works best, been a while since I installed it so I included both.
Also wifilocker is great to turn wifi on/off not to mention lock it and keep the nook from going to sleep while you are connected to adb. I definitely suggest installing that as well. The others are handy. Trook can connect to calibre and download books from your desktop. The nook browser is a improved web browser for nook classic, although I never really bothered with it.
Nook notes is good for quick little notes when you don't have any other device handy. Txt reader reads txt files, not the best but it is handy. Personally I just make epubs of anything with calibre. But if you don't want to bother making a epub first, this is handy.
Hope this helps someone!
I downloaded files and rat.bin has malware in it.
I also have hard time understanding the ones that are explained above. Is there any easier way to do it? Does anybody have a good tutorial video or "fool-proof" instruction on this? I have Nook classic wifi version.
I would like to read kindle books on nook as well as the nook books. Is this even possible on this model?
Thanks for the help
kidollt said:
I downloaded files and rat.bin has malware in it.
I also have hard time understanding the ones that are explained above. Is there any easier way to do it? Does anybody have a good tutorial video or "fool-proof" instruction on this? I have Nook classic wifi version.
I would like to read kindle books on nook as well as the nook books. Is this even possible on this model?
Thanks for the help
Click to expand...
Click to collapse
Er of course rat.bin would be flagged as malware, because technically it is. You are hacking a system that is designed not to let you in. But in this case all rat.bin will do is let you in so you can get root of your own device, nothing else. No back doors for anyone else or making your device do odd things.
The problem you are having is not using rat.bin, without that you might as well not try. I also only managed to do it with a BAT file so that it would keep trying to push the init.rc RIGHT AFTER the rat.bin was used. Generally you can't type fast enough to do the push. The window of opportunity is very very small.
This does work but is tricky as the window of opportunity is very small. I tried for hours trying to get it to work, then I used the BAT file to make the push automatic and on the second try it worked. Rooting the Nook Classic is the toughest device to root that B&N made. If you have one of the really early models that has a removable internal SD card then you can pull that, made modifications (install a old version of the ROM, make a modification to init.rc), and reinstall the SD card. I forget the serial numbers of the models that this worked with, but I do know it was the first batch of Nooks B&N made. If you got yours after the first Christmas, then it is likely it doesn't have a internal SD card that you can remove. Later on they soldered them to the board.
As for reading kindle books, no. There isn't a mobi reading app that I have found, let alone kindle books with DRM. The better bet is to use Calibre calibre-ebook.com to convert your kindle books to epub. But they can't be encrypted/DRM. If they are, then you have to remove that. There are scripts for Calibre that can do it for nook and kindle. I use calibre to convert my mobi/kindle books to epub then side load them. Another benefit of rooting a nook classic, you can then browse and download wireless from your calibre library with the took app. Although I never bothered and just did the transfers via USB.
Hi!
I would like to ask for help in this case:
I followed all the instructions here, however for some reasons I wanted to install this app first using the command "adb push Home.apk /system/app" pushing the app found here: Github
Now it turns on/off, shows "Home", batter and time at the top bar, but everything else is black both the Eink screen and the touchscreen as well.
It does not connect to wifi automatically so I can't connect via ADB to switch back to the original Home apk
Please help me, what should I do?
Is 1.7 software not rootable?
I can't get adb to come on, no matter how many browser crashes I do. Even wrote a script for it:
@echo off & setlocal
set IP=192.168.0.119
set loopcount=0
set s
:loop
set /a loopcount=loopcount+1
echo Connecting %loopcount% time...
adb connect %IP% | find /i "connected to" > %s
if errorlevel 1 (
echo Not successful + %ERRORLEVEL% + %s%
goto loop
) else (
echo Successful + %ERRORLEVEL% + %s%
adb shell
goto exitloop
)
:exitloop
pause
Click to expand...
Click to collapse
Is OTA rooting (by redirect on sync.barnesandnoble.com) not possible any longer as well?
Sorry for the late response, for some reason the email telling me there was a post here just arrived TODAY lol.
It should be, I did it with 1.7. The script I have I modded a little from another one I found online here is mine:
Code:
@echo off
echo The website hack seems to work on the round right after it has an instant crash.
echo.
adb kill-server
adb start-server
set /p ip=Enter the IP here.
:CON
cls
echo Crash the browser.
echo.
adb connect %ip%
for /f "tokens=2" %%A in ('adb devices') Do (Set dev=%%A)
if %dev%==device goto INT
echo.
goto CON
:INT
if exist ratc.bin (set f1=1) else (set f1=0)
if exist init.rc (set f2=1) else (set f2=0)
if %f1%==%f2% (if %f1%==1 (goto RTT) else (goto 2fi)) else (goto 2fi)
:2fi
if %f1%==0 (echo "The ratc.bin file is not in the %cd% directory.") else (echo Ratc.bin file present.)
echo.
if %f2%==0 (echo "The init.rc file has not been pulled from the device to the %cd% directory, pulling now.") else (echo Init.rc file present.)
if %f2%==0 adb pull /init.rc
echo.
echo Please add the required files and restart this batch. If init.rc was just pulled, you will need to modify the file.
cmd
:RTT
adb push ratc.bin /sqlite_stmt_journals
adb shell cd /sqlite_stmt_journals
adb shell /system/bin/chmod 0777 /sqlite_stmt_journals/ratc.bin
adb shell /sqlite_stmt_journals/ratc.bin
adb kill-server
adb start-server
goto CO2
:CO2
cls
echo Re-crash the browser.
echo.
adb connect %ip%
for /f "tokens=2" %%A in ('adb devices') Do (Set dev=%%A)
if %dev%==device goto PSH
echo.
goto CO2
:PSH
adb push init.rc /
adb shell reboot
echo.
echo Congrats! The device is now rooted.
echo.
cmd
It is RANDOM on the browser crashes. Sometimes it happens fast, another time it look me a hour or two to get a good crash and root the nook. Also if it doesn't seem to be doing it for a long time, try rebooting the nook (hold down the power until the screen blanks then press the button again to restart it). In my opinion, this is the toughest Nook to root, but definitely worth it. Especially now that B&N ended support some time ago. Also make sure the ADB, this script, and the ratc.bin is in the same folder. I used a folder on the desktop as it made it much easier/faster to get to. Also after you get the init.rc and modded, that should be in the same folder as well.
As for OTA rooting, I have no idea if it will work or not. I never used that method. But if it depended on any sort of connection from B&N, I doubt it will work now since they have abandoned the Nook classic.
If you need any of the nook apps that were on the nook developer site let me know. I downloaded all the apps before the site went down.
dob43 said:
Sorry for the late response, for some reason the email telling me there was a post here just arrived TODAY lol.
It should be, I did it with 1.7. The script I have I modded a little from another one I found online here is mine:
Code:
@echo off
echo The website hack seems to work on the round right after it has an instant crash.
echo.
adb kill-server
adb start-server
set /p ip=Enter the IP here.
:CON
cls
echo Crash the browser.
echo.
adb connect %ip%
for /f "tokens=2" %%A in ('adb devices') Do (Set dev=%%A)
if %dev%==device goto INT
echo.
goto CON
:INT
if exist ratc.bin (set f1=1) else (set f1=0)
if exist init.rc (set f2=1) else (set f2=0)
if %f1%==%f2% (if %f1%==1 (goto RTT) else (goto 2fi)) else (goto 2fi)
:2fi
if %f1%==0 (echo "The ratc.bin file is not in the %cd% directory.") else (echo Ratc.bin file present.)
echo.
if %f2%==0 (echo "The init.rc file has not been pulled from the device to the %cd% directory, pulling now.") else (echo Init.rc file present.)
if %f2%==0 adb pull /init.rc
echo.
echo Please add the required files and restart this batch. If init.rc was just pulled, you will need to modify the file.
cmd
:RTT
adb push ratc.bin /sqlite_stmt_journals
adb shell cd /sqlite_stmt_journals
adb shell /system/bin/chmod 0777 /sqlite_stmt_journals/ratc.bin
adb shell /sqlite_stmt_journals/ratc.bin
adb kill-server
adb start-server
goto CO2
:CO2
cls
echo Re-crash the browser.
echo.
adb connect %ip%
for /f "tokens=2" %%A in ('adb devices') Do (Set dev=%%A)
if %dev%==device goto PSH
echo.
goto CO2
:PSH
adb push init.rc /
adb shell reboot
echo.
echo Congrats! The device is now rooted.
echo.
cmd
It is RANDOM on the browser crashes. Sometimes it happens fast, another time it look me a hour or two to get a good crash and root the nook. Also if it doesn't seem to be doing it for a long time, try rebooting the nook (hold down the power until the screen blanks then press the button again to restart it). In my opinion, this is the toughest Nook to root, but definitely worth it. Especially now that B&N ended support some time ago. Also make sure the ADB, this script, and the ratc.bin is in the same folder. I used a folder on the desktop as it made it much easier/faster to get to. Also after you get the init.rc and modded, that should be in the same folder as well.
As for OTA rooting, I have no idea if it will work or not. I never used that method. But if it depended on any sort of connection from B&N, I doubt it will work now since they have abandoned the Nook classic.
If you need any of the nook apps that were on the nook developer site let me know. I downloaded all the apps before the site went down.
Click to expand...
Click to collapse
Does this still work? I recently dug up my old nook 1st edition, I tried the website and it didn't crash my browser, it just sat there forever loading.. I looked at the site, now it's using TLS 1.3, but old nook 1st edition is stuck with TLS 1.2... I tried for many hours just couldn't "crash" the web browser at all...
FAT (the old DOS-based file system) is a bad idea.
It's ugly, doesn't mix well with Linux and saves timestamps in local time.
Moreover, the Nook has problems with FAT, randomly changing timestamps a number of hours.
Certainly at daylight savings time transitions everything changes.
If you use timestamps as an indication for syncing files from a host, this is a problem.
UMS (USB Mass Storage) is a bad idea.
It takes a happily mounted volume from an OS, and hands it in a raw block view to a remote system.
Outside of using noogie for full physical backups or initial partitioning and formatting there is no need for UMS.
The last need of UMS was the Adobe Digital Editions which was discussed and obviated in this thread
Finally, there are some devices and occasions where you'd want to hot swap SD cards.
A camera taking megapixels shots might have a need for swapping SD cards.
Our Nooks use SD cards more as permanent expansion units.
Get a 32 GB card, stick it in and never take it out.
Then we wouldn't need vold (the volume daemon).
In another thread I posted a modified vold so that the SD card could be ext3 formatted.
To my mind, the cleanest solution to all this is to:
Format the SD card with ext3
Mount the SD card in init.rc inside the uRamdisk
Disable UMS
Disable vold
Right now I'm running into problems mounting the SD card inside init.rc
Code:
mount ext3 /dev/block/mmcblk1p1 /sdcard wait nosuid nodev noatime nodiratime
chown system sdcard_rw /sdcard
chmod 0777 /sdcard
init has not very useful error reporting, it returns an error of -1 for any condition.
I was trying to build init that could tell me something more.
This is a work in progress.
(If we get rid of vold, we'll have to strip the Android MountWatcher so that it doesn't flail.)
I found out what the problem with doing a normal mount in init.rc was.
The system had not found /dev/block/mmcblk1p1 yet.
I'm still working on this.
For now I have a oneshot service that mounts /sdcard.
It uses a little executable that waits until /dev/block/mmcblk1p1 appears.
I disabled vold.
I would have liked to be able to mount the SD card inside init.rc,
but apparently /dev/block/mmcblk1p1 has not appeared by then.
You need to have a service do the job, a few seconds later.
Yes, you could probably write a little script, but I'd rather write a little Linux program.
I'm still wondering if there is an easier solution to mount inside init.rc
People use their Nooks in such different way.
I would really like to know what exactly people are interested in this thread.
There is a poll at the top to fill in, please.
Pieces of the pie ready to go now:
mke2fs
tune2fs -j
Mods to init.rc - disable vold, enable mntsdcard
mntsdcard - a Linux program
Patches to MountService to disable it.
Is anybody interested in trying this?
Well, if you want to give it a go, here's how.
Black = commands to the Nook shell over ADB
Blue = commands to the Windows shell
Convert your SD card to ext 3
Backup the data on your SD card (or just let it all get deleted).
You can use adbsync.exe if you like:
Code:
[color=blue]mkdir sdcard[/color]
[color=blue]adbsync /hscu /s C:\sdcard sdcard[/color]
Then you can re-partition the SD card.
Code:
umount /sdcard
busybox fdisk -H 255 -S 63 /dev/block/mmcblk1
Do the commands to delete (D) old partitions, create a new (N) primary partition.
Then write (W).
Then format the SD card in ext2, upgrade to ext3 and check the mount.
Code:
mke2fs /dev/block/mmcblk1p1
tune2fs -j /dev/block/mmcblk1p1
mount -t ext3 /dev/block/mmcblk1p1 /sdcard
Install mntsdcard
Copy over mntsdcard:
Code:
mount -o rw,remount /dev/block/mmcblk0p5 /system
[color=blue]adb push mntsdcard /system/bin[/color]
chmod 755 /system/bin/mntsdcard
Get uRamdisk and extract init.rc:
Code:
mount -o rw,remount rootfs /
mkdir /boot
mount -t vfat /dev/block/mmcblk0p1 /boot
[color=blue]adb pull /boot/uRamdisk[/color]
[color=blue]bootutil /x /v uRamdisk init.rc[/color]
Add in a mount for media (we'll leave it FAT for now):
Code:
mount ext2 /dev/block/mmcblk0p5 /system
mount ext2 /dev/block/mmcblk0p5 /system ro remount
[b] mount vfat /dev/block/mmcblk0p6 /media sync noatime nodiratime uid=1000,gid=1000[/b]
Comment the old vold stuff out:
Code:
#service vold /system/bin/vold
# socket vold stream 0660 root mount
Add in the mntsdcard stuff at the end of init.rc:
Code:
service mntsdcard /system/bin/mntsdcard
oneshot
Replace init.rc and push the uRamdisk back:
Code:
[color=blue]bootutil /r /v uRamdisk init.rc
adb push uRamdisk /boot[/color]
reboot
If there are any problems, look in /data/mntsdcard.log
Restore your SD card
Code:
[color=blue]adbsync /ascu /s C:\sdcard sdcard[/color]
Wow, this seems like a lot of stuff to do! :cyclops:
Thanks so much for all this great dev work, Renate!
:good:
BUT!
Will this definitely make noogie not function correctly? (I make new backups with it, like, once every week and a half, so that would definitely stop me from trying this)?
What will this do to the regular USB mounting onto a PC?
What will this do to mounting USB devices on the Nook using host mode?
And, finally: Will this mean I can't ever remove my SD card to use for something else temporarily (or to write a Nook-bootable image to it for miscellaneous reasons)?
Thanks,
3N
It's ugly, doesn't mix well with Linux and saves timestamps in local time.
Click to expand...
Click to collapse
That isn't correct. Linux has had support for FAT file systems very early on
and Linux support is quite stable. Saving timestamps in local time should not be a problem.
These mods look like it would make it non-trivial to side load content (unless you are using Linux for a main PC) for no reason.
smeezekitty said:
...These mods look like it would make it non-trivial to side load content (unless you are using Linux for a main PC) for no reason.
Click to expand...
Click to collapse
Hmmm. Good point. Thanks for pointing this out, as I use a Windows 7.
Here's your first post thank!
smeezekitty said:
TSaving timestamps in local time should not be a problem.
Click to expand...
Click to collapse
It's a problem twice a year when daylight savings time makes all your file times shift one hour.
Also, try moving timezones on your device.
smeezekitty said:
These mods look like it would make it non-trivial to side load content (unless you are using Linux for a main PC) for no reason.
Click to expand...
Click to collapse
Mmm, not really. I have a Windows desktop and I use ADB push/pull and my adbsync utility.
Moreover, I can easily sync all my Android devices before going out the door.
Renate NST said:
...Mmm, not really. I have a Windows desktop and I use ADB push/pull and my adbsync utility.
Moreover, I can easily sync all my Android devices before going out the door.
Click to expand...
Click to collapse
But if we wanted to transfer files without WiFi, ADB wouldn't be available, and so how would we sideload our files w/out ADB?
I agree ADB file transfer is more fun - heck, you can use an FTP Server app and manage your whole filesystem in the comfort of Windows Explorer! But without WiFi...
thenookieforlife3 said:
But if we wanted to transfer files without WiFi, ADB wouldn't be available, and so how would we sideload our files w/out ADB?
I agree ADB file transfer is more fun - heck, you can use an FTP Server app and manage your whole filesystem in the comfort of Windows Explorer! But without WiFi...
Click to expand...
Click to collapse
It is a little harder to set up, but adb usb has been available in the Nook since it was first rooted. This is just one of the multiple threads here that gives instructions....
Getting USB-enabled ADB working
thenookieforlife3 said:
But if we wanted to transfer files without WiFi, ADB wouldn't be available, and so how would we sideload our files w/out ADB?
I agree ADB file transfer is more fun - heck, you can use an FTP Server app and manage your whole filesystem in the comfort of Windows Explorer! But without WiFi...
Click to expand...
Click to collapse
ADB is something a little advanced for me at this point. But regardless of if you want to use it or not,
It is still very handy to be able to just copy files on and off the device just by moving the SD card or mounting by USB
I suggest that the OP adds a note for less experienced users so they know that you lose those capabilities if you do these mods.
smeezekitty said:
ADB is something a little advanced for me at this point. But regardless of if you want to use it or not,
It is still very handy to be able to just copy files on and off the device just by moving the SD card or mounting by USB
I suggest that the OP adds a note for less experienced users so they know that you lose those capabilities if you do these mods.
Click to expand...
Click to collapse
I entirely agree. Although ADB is fantastic and I absolutely love it, it's good to still have the USB mounting option instead.
The post you replied to was actually pointed toward Renate, so yeah.
---------- Post added at 02:50 PM ---------- Previous post was at 02:48 PM ----------
David0226 said:
It is a little harder to set up, but adb usb has been available in the Nook since it was first rooted. This is just one of the multiple threads here that gives instructions....
Getting USB-enabled ADB working
Click to expand...
Click to collapse
Thanks for the link - this topic has given me grief for the whole month, as I just can't seem to get the danged thing working! :laugh:
thenookieforlife3 said:
Thanks for the link - this topic has given me grief for the whole month, as I just can't seem to get the danged thing working! :laugh:
Click to expand...
Click to collapse
Good luck. My experience is that much depends on the model you have and the rooting method used. I have an original NST on which ADB over USB works without an issue. I also have a NST with Glowlight (rooted with NookManager) that I can't seem to get it working on. (I can't remember how I rooted the NST, it was a couple of years ago.)
David0226 said:
Good luck. My experience is that much depends on the model you have and the rooting method used. I have an original NST on which ADB over USB works without an issue. I also have a NST with Glowlight (rooted with NookManager) that I can't seem to get it working on. (I can't remember how I rooted the NST, it was a couple of years ago.)
Click to expand...
Click to collapse
AH! Good to know! I thought that I was just being a dumbo not being able to get ADB USB working (I have an NSTG rooted w/NookManager), but now that I hear that you're having problems, too, maybe I won't worry so much!
Getting ADB to work should be easy, especially if you have a few devices and can see if the problem is with the device or the host.
On Windows getting ADB over USBcan be a pain. There are a few roadblocks:
Make sure that your device is using USB and not WiFi for ADB. The option is set in init.rc in uRamdisk. Use bootutil.exe to check/edit.
Getting the WinUSB driver loaded. Use the driver package from here: http://forum.xda-developers.com/showthread.php?p=49665945#post49665945
Getting ADB to recognize B&N devices. The newer adb.exe has the VID for B&N built in. The older adb.exe required fiddling with adb_usb.ini
Renate NST said:
Getting ADB to work should be easy, especially if you have a few devices and can see if the problem is with the device or the host.
On Windows getting ADB over USBcan be a pain. There are a few roadblocks:
Make sure that your device is using USB and not WiFi for ADB. The option is set in init.rc in uRamdisk. Use bootutil.exe to check/edit.
Getting the WinUSB driver loaded. Use the driver package from here: http://forum.xda-developers.com/showthread.php?p=49665945#post49665945
Getting ADB to recognize B&N devices. The newer adb.exe has the VID for B&N built in. The older adb.exe required fiddling with adb_usb.ini
Click to expand...
Click to collapse
Yep, already seen these in previous posts. Modifying uRamdisk doesn't seem to work, as I can still use wireless ADB with or without the mentioned changes. Already edited adb_usb.ini to include B&N. And, I think, already got the WinUSB driver. I'll check that, though.
As stated many times, if you can connect to ADB over WiFi then you can not connect to ADB over USB.
Renate NST said:
As stated many times, if you can connect to ADB over WiFi then you can not connect to ADB over USB.
Click to expand...
Click to collapse
Yes, I know that, too. The problem, as stated, is that I always can connect over WiFi, and never USB!
No matter what mods I apply to any system file, it's the same result!
thenookieforlife3 said:
No matter what mods I apply to any system file, it's the same result!
Click to expand...
Click to collapse
Are you modifying init.rc inside uRamdisk? (Not the one that appears in the root after you have booted.)
What about default.prop in uRamdisk?
Do you see a 5555 anywhere?
Are you using some amazing-super-duper-ADB-instant-turn-on-offer-application?
Well, don't.
Renate NST said:
Are you modifying init.rc inside uRamdisk? (Not the one that appears in the root after you have booted.)
What about default.prop in uRamdisk?
Do you see a 5555 anywhere?
Are you using some amazing-super-duper-ADB-instant-turn-on-offer-application?
Well, don't.
Click to expand...
Click to collapse
Answer 1: Yes, I most definitely am. In fact, I am using your bootutil.exe program to do it.
Answer 2: Yes, I also edited that to match what you wrote in the Minimal rooting - back to basics thread.
Answer 3: Yes, in the line of code
Code:
setprop service.adb.tcp.port 5555
It doesn't matter if I comment it out, it still connects wirelessly.
Answer 4: Yes, I am. But if I don't use one, then how will I turn ADB on or off?
Hey all,
I've been working at getting USB-enabled adb working for my Nook Simple Touch. I've got adb working on my Linux laptop, and I've got an adbwireless app working on my nook. (It was part of the app bundle when I rooted and flashed the Nook with extras.)
So I can connect via adbwireless, but not via USB. My main desire to get USB working is in the eventuality that my nook gets locked. (Getting jostled in my bag can activate the PIN and cause a lockout if it happens often enough.) But I'm also taking this as an exercise in learning more about ADB.
To be clear, I've got adb installed already on the laptop, I just want to be able to detect the nook when it's plugged in.
jasonmehmel said:
So I can connect via adbwireless, but not via USB.
Click to expand...
Click to collapse
As I understand it, you have a choice with the Nook Simple Touch, you can have ADB over wireless, or USB, but not both. It is based on a setting in init.rc (which is contained inside uRamdisk)
Code:
setprop service.adb.tcp.port 5555
If this line is present, it sets the TCP port for ADB, and your NST will connect via wireless. If you comment it out (place a "#" at the beginning of the line), your NST will connect via USB.
I see that Renate gave full instructions for you on this in another thread, you should check there.
MildBill
MildBill said:
I see that Renate gave full instructions for you on this in another thread, you should check there.
MildBill
Click to expand...
Click to collapse
Yeah, I posted this before I saw their reply. That said... I'm having a hard time following Renate's instructions clearly; I feel like I'm too new at this to fully understand each point though I am researching the questions as I have them.
So, uRamdisk and init.rc... if I've got the ES File Explorer on the nook, would I be able to track down that file and open it that way? I'm assuming uRamdisk is part of what I've used to root the nook?
(I followed instructions online to root the nook and partially understood them, but I'm still fuzzy or non-expert on a lot of what I'm using.)
jasonmehmel said:
I'm assuming uRamdisk is part of what I've used to root the nook?
Click to expand...
Click to collapse
uRamdisk is used to boot the nook, it is actually an archive of many files, and is the actual filesystem used in booting the Nook. There were longer, more complete instructions I have seen, and followed myself, in another of Renates posts. it can be found here:
http://forum.xda-developers.com/showthread.php?t=2122046
You would not need to do anything with with the default.prop file, as NookManager will already have done what is needed. But, you can either use noogie.img as suggested, or use ADB pull via your wireless connection to get the current uRamdisk, then follow the instructions to extract init.rc from it, modify the one line in the file, then insert the new copy back into uRamdisk and use ADB push to replace the copy of uRamdisk on your device.
NOTE that once you do this, and reboot your NST that ADB over WiFi will no longer work, you will be using ADB via USB.
There is a utility that you will need to download from Renates page (Click on her signature block, it will take you there) to extract and reinsert the init.rc from uRamdisk. Otherwise, the instructions in that post should be all you need to do the job. Read them over, be sure you have everything ready to go and that you have a basic understandng of what you are doing before you actually try it.
One more suggestion, you may want to keep 2 copies of uRamdisk on your computer, one set up for ADB WiFi (a copy of the file you will be starting with!) and one for ADB by USB (The one you will create after you modify init.rc). That way all you will need to do in the future to change over is an ADB push of the appropriate file to your device, then reboot it.
Hope this helps,
MildBill
If you have ADB working over wifi and all you want is to enable it to work over USB on Linux you can probably forget about uRamdisk. You're fine, you don't need to change anything on Nook's side, all you need are a few changes on Linux. Specifically:
1. Enable permissions for Nook's device in udev. In order to do that, create a file (or edit an existing one) /etc/udev/rules.d/51-android.rules, and add a line:
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="2080", ATTRS{idProduct}=="0003", MODE="0666", OWNER="<your_username>"
2080:0003 is Nook's USB ID, and <your_username> is (surprise!) your username on Linux. Reboot to force the changes to takes effect.
2. Create a file (or edit an existing one) ~/.android/adb_usb.ini and add a line with Nook's vendor ID:
Code:
0x2080
3. Connect the USB cable to your Nook. At that point, Linux will probably detect your Nook as two USB drives. Eject those drives.
4. Start the ADB server:
Code:
adb start-server
5. Check that ADB sees your Nook:
Code:
adb devices
If you get back something like "<big_number> device", you're good to go, you can run ADB commands. Otherwise kill the server and start it again:
Code:
adb kill-server
adb start-server
lcd047 said:
2080:0003 is Nook's USB ID
Click to expand...
Click to collapse
... and the new white Nook is 2080:0007
lcd047 said:
~/.android/adb_usb.ini and add a line with Nook's vendor ID:
Click to expand...
Click to collapse
The latest ADB version has B&N in the list of known manufacturers.
This will not be necessary if your copy is new enough.
Sorry, there's one more thing needed before ADB can work over USB: enable USB debugging. Get NookColorTools, run it, and go to "All Settings" > "Development" and check "USB debugging". After that the ADB server should be able to see your Nook.
lcd047 said:
Sorry, there's one more thing needed before ADB can work over USB: enable USB debugging. Get NookColorTools, run it, and go to "All Settings" > "Development" and check "USB debugging". After that the ADB server should be able to see your Nook.
Click to expand...
Click to collapse
Odd, I used Renate's instructions from http://forum.xda-developers.com/showthread.php?t=2122046 and ADB works fine either over USB or WiFi (either/or, both will not work at one time, depending on whether or not you define the port with
Code:
setprop service.adb.tcp.port 5555
).
I never had to do anything other than that to get ADB root access, but then, I don't want all the junk that the leading root managers want to add to my Nook.
MildBill said:
Odd, I used Renate's instructions from http://forum.xda-developers.com/showthread.php?t=2122046 and ADB works fine either over USB or WiFi (either/or, both will not work at one time, depending on whether or not you define the port with
Code:
setprop service.adb.tcp.port 5555
).
I never had to do anything other than that to get ADB root access, but then, I don't want all the junk that the leading root managers want to add to my Nook.
Click to expand...
Click to collapse
I just flashed my Nook to factory and went through all this from scratch, and the setprop above was not enough. Whether USB debugging actually does anything on Nook is still subject to debate among the supposedly knowledgeable people, but it was needed for me to enable the ADB server to see my Nook over USB. It was also required on all other (newer) Android devices I used, so it makes at least some sense. Still, It might have to do with the version of ADB.
As for not being able to use both TCP and USB at the same time, that's a limitation of the server (it can't talk to more than one device at a time), which is why you have to kill it before switching. But you don't need to do anything on Nook to switch from one to the other (at least that's how it works for me).
lcd047 said:
I just flashed my Nook to factory and went through all this from scratch, and the setprop above was not enough.
Click to expand...
Click to collapse
No, by itself it is not. But, if you read the post I linked, you make changes to both init.rc and default.prop, both contained in the uRamdisk filesystem archive, and that is all it takes to achieve root shell access via ADB on the Nook ST v1.2.1, or, at least, that is all it took for me to achieve it.
Keep in mind that the setprop as listed forces WiFi access to ADB, for USB access to it, you must leave that line commented out, again as shown in the linked post.
MildBill