yashsingh1/xdaforums huggingface dataset:
[Nook Touch Android Development] mali100:
Thats correct, but you can call your own bash script from it. Take a look on how clrbootcount.sh is called in the init.rc
[Nook Touch Android Development] klausef:
Per the documentation I have invoked a script through init.rc. The script is very simple. I included a busybox binary in the uRamdisk at /busybox, so that's what it's based on:

#/busybox ash
/busybox ls /dev/block/ > /data/blocks;

I have verified that the script works by first running it on an up-and-running nook and it worked properly. (That is, it created a populated file in /data/blocks and then terminated)

The script is called through the init.rc right after it finishes mounting all the partitions:

service lsdev /lsdev.sh
oneshot

When I start up the nook with this init.rc it hangs on boot. I also tried calling the script using `exec` instead of `service` but it still hangs.

In other news, I noticed dmesg finds mmcblk1 (the SD card) around the same time it finds the internal memory. See this dmesg snippet:

<6>[ 22.080810] twl4030_rtc twl4030_rtc: setting system clock to 2012-04-15 00:48:42 UTC (1334450922)
<6>[ 22.090759] mmc0: new high speed MMC card at address 0001
<6>[ 22.096801] Freeing init memory: 164K
<6>[ 22.106384] mmcblk0: mmc0:0001 SEM02G 1.82 GiB
<6>[ 22.111450] mmcblk0: p1 p2 p3 p4 < p5 p6 p7 p8 >
<4>[ 22.238494] EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
<4>[ 22.321990] mmc1: host does not support reading read-only switch. assuming write-enable.
<6>[ 22.330841] mmc1: new high speed SDHC card at address 1234
[B]<6>[ 22.337280] mmcblk1: mmc1:1234 SA04G 3.67 GiB [/B]
<6>[ 22.342651] mmcblk1: p1 p2 p3 p4 < p5 p6 p7 p8 >

The Nook is failing to boot for some other reason than because it doesn't see the SD card. I previously assumed the opposite, which is why I've been going through this big init.rc exercise to verify it. (I was expecting not to see a /dev/mmcblk1p*)

It is my assumption that this has something to do with how the stock userland is set up, so I'm going to call it a day, then shift my focus to compiling a new kernel and userland instead of just aimlessly trying to get this one to run off the SD card.

Please don't let that doesn't discourage any of you from further contributing to this thread's original goal, because it would still be immensely useful to the development process.

Good day, all. Thanks for the help.
[Nook Touch Android Development] fanoush:
It would still make sense to see if there is /dev/block/mmcblk1 device node. Seeing mmcblk1 in kernel log is not enough, there needs to be device node in filesystem too.
[Nook Touch Android Development] probbiethe1:
Any more progress on booting from the sd card?
[Nook Touch Android Development] probbiethe1:
I have been messing around with stuff just seeing what I could find out and I might be going crazy but it looks to me like cwm recovery runs off the sd card http://xdaforums.com/showthread.php?t=1360994 If that is the case i wonder if the files from cwm could be modded to run a full rom from the sd card
[Nook Touch Android Development] probbiethe1:
I have been doing some of my own testing and using klausef words of advice I made a complete back up image of my nook simple touch. I then wrote it to an sd card and changed the booting images so I could tell if the nook was booting from the card. Well it appears that my nook boots from the sd card through the boot images but then after that it starts up the internal memory. The way i tested this is I changed my background with the sd card out and then when I put the sd card back in it the background was changed to what it was with out the sd card.

Does any one have any tips/ideas on how to get the nook simple touch to boot all the way from the sd card?
[Nook Touch Android Development] klausef:
Ok bolakes and boardeys:

There is some reason that the device does not want to boot to any userland, save the one on the embedded MMC.

We can see that the kernel detects the external MicroSD card very early on in the boot process [See my dmesg paste]. Through what fanoush mentioned, I assume that the issue is because the SD cards' device nodes don't get created in /dev/block/. (This is a conjecture).

To alleviate this, we must investigate how the Nook's kernel creates device nodes. There's a number of ways the kernel could do this:

1) udev -- We know the kernel probably doesn't use the udev subsystem because it hardly shows up anywhere

2) MAKEDEV script -- Before udev existed, people used a script called 'MAKEDEV' that called the 'mknod' command to manually create device nodes. It was ugly and hacky, which was why udev was eventually developed. This script is nonexistent, as far as I know, in the uRamdisk which is all the kernel has access to initially after booting.

3) Device nodes are 'hardcoded in the kernel' -- It's looking to me that this is the most likely method the Nook is using. Wow, I have no idea why they would have done something this inelegant.

Check out the file: kernel/drivers/mmc/card/block.c

Also interesting: Documentation/emmc_fat_boot.txt (Basically describes how to modify kernels so that they boot from internal MMC, this may be the guide the Nook team followed)

At any rate, this little train of thought led me to find a config option 'MMC_OMAP_CONSISTENT_NAMES' documented in 'kernel/arch/arm/mach-omap2/Kconfig':

config MMC_OMAP_CONSISTENT_NAMES
bool "Consistent naming of MMC devices"
depends on MMC_OMAP || MMC_OMAP_MODULE || MMC_OMAP_HS || MMC_OMAP_HS_MODULE
default "n"
help
Say Y here if you want the internal and external SD/MMC devices to
have dependable device names on every boot. When N, the internal MMC
will be called either mmcblk0 or mmcblk1 depending on whether or not
an external card is present. If unsure, say Y.

Lo and behold, checking the config we've been compiling with (omap3621_gossamer_evt1 or whatever) has this option set to Y. Changing it to 'n' and compiling the kernel changes the SD card's device name to mmcblk0, and the nook ends up booting to it instead. Just like we want.

I'm trying it right now.

---

EDIT: looks like it trys to boot from the uRecImage and uRecRam now since it shows the 'Install Failed' screen...
[Nook Touch Android Development] ApokrifX:
If I get it right (from bool "Consistent naming of MMC devices")

N:

1. No external present during boot:

Internal - mmcblk0

2. External present during boot:

external mmcblk0, internal - mmcblk0

Y:

Internal - mmcblk0, external mmcblk1 always

"N" behavior works just fine to boot from SD.

But for "Y" in your experiments, you don’t see external as mmcblk1 during boot, correct?

Did it work?
[Nook Touch Android Development] klausef:
Actually yes, I do see the external as mmcblk1 using 'Y'

I tried it and for some reason it wants to boot to the recovery image (it shows the 'install failed' screen). Renaming the new image uRecImg hangs the boot process (surprise!) but further experimentation is required. I also tried varying the init.rc in the uRamdisk to mount mmcblk1, to no avail. (Not sure why that would have worked, anyway...)

---

Mmkay it works now. I burned an image of the internal memory onto the SD card, then replaced the kernel with the one with that one flag set differently. I used the stock uRamdisk. I copied all of the .bin files from the nooter image, overwriting the old u-boot configurations. Attached are my uImage and all the things I copied over. Just paste all that into your SD card's boot partition and it should work.

When it boots, it displays the nooter instructions screen, then switches to the nook boot animation. Clearly this is not ideal and I or someone else down the road will have to bite the bullet and actually remake uBoot. (^;

Performance is horrible; it made me somewhat depressed. Immediately after booting you are greeted with a boatload of 'Not responding' notifications. If you choose 'wait' on too many of these then the nook will freeze (or something?) and you will be thrown back to the boot animation for a brief period before the screen locks. Unlocking the screen also takes quite a while longer than it normally would.

At any rate, I left the system up just long enough so that I could establish some checks to show us that it was indeed running completely off the SD card, and it was.

I guess there are two major things we can do to improve our current situation:

1) Make the system less dependent on swap and whatnot so it doesn't hit the disk as hard, make more stuff run off of what little RAM we have.

2) Rebuild U Boot for this usage case.

If that didn't make sense to you I'll write up a guide on how to do it start to finish Here
[Nook Touch Android Development] probbiethe1:
i like the write up at nook devs. I cant wait for the second step.
[Nook Touch Android Development] mali100:
Nice, will try it when I find some time.

The nooter instrunctions should just be the booting.pgm picture. If you keep the one from the boot partition it should be fine.

Afaik there is no swap enabled.
[Nook Touch Android Development] The Archangel:
Thread moved to general. Questions don't go in development.
[Nook Touch Android Development] probbiethe1:
I followed klausef steps and made a backup img then copied over the files that we so kindly shared and my simple touch is now running off the sd card!!

I havent seen any lag like klausef but I have changed the background and added some app shortcuts to the home screen and when I take the card out it is different so I know it is running off the sd card.

Thanks klausef for all your work and helping me with this. It is great I cant wait to see how far it goes.
[Nook Touch Android Development] klausef:
This thread may die if it is moved to the general discussion forum.

Please look this thread over and consider moving it back to the development forum; it has clearly evolved into a development thread.

Cheers
[Nook Touch Android Development] probbiethe1:
I am loving my bootable sd card and having been messing around with it most of the day.

One thing though is there a way to partition the sd card so the nook will see the partition as the sd card? Right now when i try to download something it doesnt see an sd card.
[Nook Touch Android Development] The Archangel:
Thread has been back to development, based on thread review an PM from the OP
[Nook Touch Android Development] staylo:
Ha! Such a simple fix, yet works brilliantly. I was able to transplant my rooted system to an SD card and then run it on an out-of-the-box Nook Touch. There's no obvious slowdown :)
[Nook Touch Android Development] probbiethe1:
Yeah I am loving my bootable sd card but still cant figure out how to partition the sd card so part of it will show up as an sd card to the nook. Also I have been trying to change the booting.pgm to a different boot image but just copying and pasting over another pgm is not working for me.
[Nook Touch Android Development] klausef:
Oh, so there isn't; `free` returns 0 bytes dedicated to swap. I need to source my comments a bit more thoroughly :o
[Nook Touch Android Development] cceerrtt:
Hi, unfortunately I do not have sdcard that would let me to fit whole system but let me know it following would work (only assumptions baseod on my observations of the system:

1. Are you able to create additional FAT32 partition on sdcard after flashing the nook image? I believe this should be possible but I am not sure whether the nook would still be able to boot and work properly.

2. Are you able to mount the new partition in nook?

3. If yes, mount setting for sdcard seems to be stored in /system/etc/vold.conf

## vold configuration file for zoom2
# modified for encore

volume_sdcard {
## This is the direct uevent device path to the SD slot on the device
media_path /devices/platform/mmci-omap-hs.1/mmc_host/mmc0
partition	6
media_type mmc
##mount_point /sdcard
mount_point /media
ums_path /devices/platform/usb_mass_storage/lun0
}

volume_sdcard2 {
## Currently points to internal eMMC, assumes eMMC is formatted as FAT32
media_path /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
media_type mmc
##mount_point /media
mount_point /sdcard
ums_path /devices/platform/usb_mass_storage/lun1
}

Thats because the mounted sdcard is mounted as

/dev/block//vold/179:17 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

Maybe it would be possible to update vold.conf with correct patch to new partition and let him mount it.
[Nook Touch Android Development] Googie2149:
Wow, this seems to have gone really far. Awesome! I just got a new Sandisk 16GB uSD, and my Nook has a broken screen, so if anyone wants to send me experimental kernels or anything that might possibly brick the thing entirely for the sake of experimentation, I'd be happy to sacrifice my already useless Nook. Only the top 1/4 of the screen actually updates, but I can use ADB to get a look at the screen. Now time to try this for myself...
[Nook Touch Android Development] Renate:
Have you tried editing /system/build.prop?

ro.sf.widthpixels=600
ro.sf.heightpixels=800

Maybe changing the height to 200 pixels would get you a functioning 1/4 screen?
[Nook Touch Android Development] Googie2149:
Maybe. Now I just need to remember how to get to that... Doesn't CWR have USB ADB? Also, I attached a picture of my Nook.

Edit: I can't seem to find any of my old uSD cards that I always used. Would it cause any problems to use a new Sandisk 16GB Class 6?
[Nook Touch Android Development] Renate:
Oops, you really busticated your screen.

How about trying to get a USB VGA adapter going?
[Nook Touch Android Development] Googie2149:
Meh, maybe some day. Currently I'm planning on replacing this with a Nook Color, but I'll probably work on that at some point. These things are fun to toy with! Also, if I could somehow get a VGA adapter working, I think we also need to get a mouse working just to make this a bit more viable.
[Nook Touch Android Development] GabrialDestruir:
I haven't really looked through all this, but felt I'd cover the basics of fully booting from SD. I have done this before (not on the touch specifically).

The basics is, only uRamdisk matters initially. You have to unpack it and modify the mount points, which seems to have been figured out already.

The second part is the vold.conf it needs to be modified to mount your "media" partition on the SDCard and also your "Media" on your emmc (if you want both).

(Seems this is covered a few posts back)

However if you mount the emmc as the sdcard as opposed to the "built-in" media, there's a chance you might end up formatting your emmc if you ever use the Format for SDCard, I remember I had this done for the Nook Color and the format button and it completely wiped the SDCard, so that might be hard coded and unaffected by vold.conf, it'd be something to test if you're willing to risk it.

A few other things to keep in mind when doing this, if you deregister either the sdcard or the actual emmc, the other one will end up forcefully deregistered if it syncs with BN. This may deregister both if you by chance deregistered and reregistered then tried to use it... so basically, always keep a clone of such changes you make to one so you can apply it to both.

Anyways I think that's about it, have fun.
[Nook Touch Android Development] klausef:
Thanks for the info, GabrialDestruir, I had not considered deregistration
[Nook Touch Android Development] probbiethe1:
I was able to make another fat32 partition that was about 5gb on an 8gb card but i wasnt able to get it to mount but it still booted from the sdcard just fine.
[Nook Touch Android Development] probbiethe1:
I was able to deregister my sd card with out it having any affect on the internal memory of the nook.

I am still trying to figure out a way to mount a partition as the sd card so things can be saved but I havent had anhy success yet.
[Nook Touch Android Development] GabrialDestruir:
Have you tried syncing with B&N on the internal after deregistering? This is usually the cause of forced deregistering because B&N's servers no longer have the device in their records, or/and because the device's registration number changed.
[Nook Touch Android Development] probbiethe1:
No i havent tried reregistoring the card and to tell you the truth I dont know how to. I dont use barnes and noble for anything so once its passed the initial setup and i deregistor I dont know how to reregistor.
[Nook Touch Android Development] probbiethe1:
I am still working on trying to get the NST to see one of the partitions as the sd card. Here is what I have tried so far.

I have created a new fat32 partition to be the sd card I then try to change the mount point through linux but I must not have the right program or something because I can never get it to work.

I have also tried using rom toolbox to edit the void file and I can edit it but it never saves the changes. It says the changes are saved but when I go back in and check the settings are back to normal.

So any suggestions on how to change the mount point for a partition would be great. And thanks for all of the help so far
[Nook Touch Android Development] klausef:
Want to know a silly hack?

'Mount' the personal files directory to where the SD card would go:

mount -o bind /media /sdcard
[Nook Touch Android Development] probbiethe1:
I am still trying to get the NST to see a partition as a sdcard but I am having tons of issues with it. I got it to mount one of the partitions at /media/sdcard_ but I dont know where the underscore came from. Any ideas would be greatly appreciated.
[Nook Touch Android Development] probbiethe1:
I am also trying to do this same thing for the NST Glow Light but am running into an issue with editing the boot sequence.
[Nook Touch Android Development] klausef:
The hack for mounting a fake SD card from a booted SD card system is really fake, some programs like Opera see through it by checking an environmental var. This could be avoided if someone wrote an app to set the environmental variable

'EXTERNAL_STORAGE_STATE'

to 'MEDIA_MOUNTED' or something, possibly using:

System.setProperty('property_name', 'value');

Once I get time I might hash up a simple app that toggles faking the SD card by `mount -o bind` in conjunction with this. Feel free to beat me to doing this, anyone; Java is not my forte...
[Nook Touch Android Development] b-m-n:
hi,

are the hints from leapinlar of any use?
[Nook Touch Android Development] yumbrad:
I found programs saw through the bind mount as well... This worked for me, though:

1. mount -o bind /media /sdcard

2. setprop EXTERNAL_STORAGE_STATE mounted

3. am broadcast -a android.intent.action.MEDIA_MOUNTED --ez read-write false -d file:///sdcard

You could put this in your init.rc or rc.local if you'd like it to happen at start up...
[Nook Touch Android Development] probbiethe1:
Very cool. Thank you for sharing.
[Nook Touch Android Development] klausef:
Yumbrad, brilliant! Thanks for the posting this. For some reason I was trying to do this through modifying Android's source. It may still be possible but there is not really a need.

If a real SD card is inserted and removed, the last two commands might need to be run again, but that is no issue. If someone has time, they could make an app to solve this. For now you could also install SManager and make a script containing these commands, put the script as a widget on your launcher, and run the script/app as needed.
[Nook Touch Android Development] probbiethe1:
I pretty much have my NST card up and running but one thing I noticed with my Glow Light card is that the mac address is always the same no matter what device i put the card into. This is not the case with my originall NST card. So I was wondering if anyone has any tips on how I could fix the mac address always being the same.
[Galaxy Tab 10.1 Q&A, Help & Troubleshooting] Camazza:
Hello guys, as you may know, the Galaxy Tab 2 10.1 is coming, hopefully, before the end of the month. Hardware-wise, apart from the SD card slot, it's exactly the same as the current Galaxy Tab.

Does this mean that ICS for our tablets will be released around the time this new tablet is released? And if this does not happen, will the new firmware run, with some minor modifications, on the current one?
[Galaxy Tab 10.1 Q&A, Help & Troubleshooting] thedoman:
Not a development thread. Move to Q&A

Edit: Thanks to the moderator for moving this out of development forums.
[Galaxy Tab 10.1 Q&A, Help & Troubleshooting] Step666:
Questions go in the Q&A section
[Galaxy Tab 10.1 Q&A, Help & Troubleshooting] requist:
If the hardware is the same, yes you can use the new software. But the simple fact the specs are (almost) the same does not necessarily mean they use the same chips.

I haven't seen a tear-down or component list of the new tablet so I believe we just have to wait a bit longer to see if they are really the same.
[Galaxy Tab 10.1 Q&A, Help & Troubleshooting] mike-y:
I don't think they will have the same hardware. what would be the point of releasing the same device again with a "2" on it?

My guess is it will have the new quad-core Tegra 3 chipset in it, as opposed to the dual core Tegra 2 we have now.
[Galaxy Tab 10.1 Q&A, Help & Troubleshooting] requist:
I thought the same but what I could find on specs looks to be almost the same as the current one except for i/o and sd.

However, they plan to introduce a high end device above this one which I believe has the Tegra quad core.
[Samsung Galaxy Nexus] Twiggeh:
So im waiting for my Gnex to be delivered, and meanwhile i cant help myself but to look for all sorts of stuff for it, be it roms or accessories.

One thing i stumbled upon was this battery :

http://www.ebay.co.uk/itm/New-2300m...EXUS-PRIME-i9250-/190620223411#ht_3468wt_1396

Now it's a 2300 mAh battery, but it is supposedly not any larger than the original which strikes me quite odd..

Especially since the 2k mAh battery comes with a custom backpane because of the added size.

So, are these noname chinese batteries a scam? My spider-sense is ringing all over but i'd love some confirmation.
[Samsung Galaxy Nexus] SKYLINESSUCK:
Scam. You aren't going to do much better than OEM for size vs. mAH. If a fleabay company is advertising a battery that's the same size of factory with LOTS more juice, they are full of it---especially when it's only $5.
[Samsung Galaxy Nexus] housry23:
They are kinda hit or miss. I have had some that are good and some that are a bust. They are ALWAYS rated higher than what they actually are though. At least you will have a spare to carry around. Sometimes they will come with a charger that allows you to plug it into the wall and charge your spare battery. I would look for one like that. That way you can charge your spare battery and carry it with you in case you need it.
[Samsung Galaxy Nexus] Twiggeh:
Thanks, ill just stick to the official 2k mAh battery instead.
[Samsung Galaxy Nexus] snab321:
Where can I find this I looked in eBay but they are around 40$

Sent from my Galaxy Nexus
[Samsung Galaxy Nexus] kms108:
try the first post.
[Android Q&A, Help & Troubleshooting] brainimpact:
anyone know of any good apps that can clean up folders and files that are left behind by un-installed apps?

thanks for an time taken to reply and help out
[Android Q&A, Help & Troubleshooting] sdw79:
Try Sd Maid. It works good.
[T-Mobile Samsung Galaxy S II SGH-T989] izayani:
Hello,

I was wondering is someone could walk me through how to change the boot loader on the SGH T-989 please?

Thank you,

Bella.
[T-Mobile Samsung Galaxy S II SGH-T989] atan2k10:
Why would you want to change it? The bootloader is already unlocked and only displays for about 1 second at most, not to mention the risks of flashing the bootloader.
[T-Mobile Samsung Galaxy S II SGH-T989] capcanuck:
I think he means bootanimation. Is that correct?
[T-Mobile Samsung Galaxy S II SGH-T989] capcanuck:
Sorry... Double post
[T-Mobile Samsung Galaxy S II SGH-T989] izayani:
yes I mean't boot animation. My apologies.
[T-Mobile Samsung Galaxy S II SGH-T989] jim93:
http://www.addictivetips.com/mobile/how-to-change-customize-create-android-boot-animation-guide/
[T-Mobile Samsung Galaxy S II SGH-T989] hiz99:
Or you could install ROM Toolbox. Its super easy that way