yashsingh1/xdaforums huggingface dataset:
[Nook Color Android Development] hliew88:
Swap SD Card and EMMC

Great work devs - running the 9/2 nightly very, very smoothly!

I have had my emmc and sdcard swapped for a very long time (because I kept the 2GB card I had since I got this using the old trick of editing the vold.fstab and rebooting. Apparently, according to this: http://source.android.com/devices/tech/storage/ , in android 4.3 the storage configuration is now managed by init.encore.rc and fstab.encore.

I tried swapping sdcard0 and sdcard1 in those files, but on each boot, the original file is restored instead.

Is there any way to swap the storage? I have many apps stored in the emmc (because it used to be sdcard0) that I can't use anymore.
[Nook Color Android Development] leapinlar:
Those files get restored because they are in the ramdisk that gets loaded on each boot. You can run a boot script from /etc/unit.d that will swap them each boot. Let me research a little and I will give you the commands.

Sent from my Nook HD+ running CM10.1 on emmc.
[Nook Color Android Development] steven676:
The best way is to unpack the initramfs (/boot/uRamdisk) and modify it (see, for example, this post for instructions).

The script has to run before vold starts -- a cursory examination of the init scripts says they might, but if not, this won't work. Worth a shot, though, since if it works it's much easier than the alternative.
[Nook Color Android Development] leapinlar:
I have made it work, it is delayed until after vold initiates the first time. I just need to test it further on the NC. I use it all the time on CM10.2 on the HD+.

Edit: ok here it is:

#!/system/bin/sh
sleep 10
mount -o remount,rw /
mount -t vfat -o umask=0000 /dev/block/vold/179:8 /storage/sdcard1
mount -t vfat -o umask=0000 /dev/block/vold/179:49 /storage/sdcard0

Put this text inside a text file and name it 11sdswap. Then create a folder in /data/local named userinit.d. Place the new text file inside the new folder. Set the permissions for the new file to execute in all three boxes. Reboot and the SDs will be swapped. It should survive a flash to a new updated ROM as long as you don't wipe data. To remove the swap just delete the file and reboot. This should work on CM10.1 too.

Sent from my Nook HD+ running CM10.1 on emmc.
[Nook Color Android Development] aperezdc:
This did not work for me on the NC using the 20130902 nightly build of CM10.2; I tried changing the sleep delay to several values up to 30 seconds with no luck. The best I got was the internal emmc partition /dev/block/vold/179:8 mounted both at /storage/sdcard0 and /storage/sdcard1, but the applications would still do not consider the internal emmc as an SD card.

Modifying the initramfs does work for me, indeed.
[Nook Color Android Development] leapinlar:
Did you have your external SD formatted to fat32?

Sent from my Nook HD+ running CM10.1 on emmc.
[Nook Color Android Development] JoshMcMadMac:
I recently updated from 10.1 to this version. I did a clean install, but am still experiencing an issue that I have had for awhile now. If left for several hours not plugged in, it becomes unresponsive i.e. it will not power back on. I have to hold the power button down for ~10 seconds to get it to reboot. I do not believe this happens when it is plugged in. I am also losing battery power while it is in standby by a couple percent per hour. Any ideas what is happening?
[Nook Color Android Development] steven676:
I'll be very surprised if this works reliably -- you're essentially racing vold here, since you can't mount a filesystem more than once and vold will attempt to mount both of these filesystems on startup. Also, the permissions would allow any app (not just ones with WRITE_EXTERNAL_STORAGE) to modify the storage -- you want umask=0702,uid=1000,gid=1015.

If you can get the script to run before vold starts, I'd suggest making a modified copy of /fstab.encore somewhere, then bind mounting over that file (mount -t bind -o bind /path/to/new/fstab.encore /fstab.encore).

Nope -- that said, we can try to find out. Could you please check the last two questions in the FAQ (particularly the entry "For problems involving system freezes, crashes, or SOD") and provide the information requested there? Also, if there was a CM10/10.1/10.2 release in the past where this didn't happen, if you can provide a date for that build, we may be able to pin down the cause.
[Nook Color Android Development] hliew88:
Yeah, I couldn't get that script to run properly, and I got lost halfway through the initramfs steps. The script doesn't seem to run before vold starts...

What could be another option?
[Nook Color Android Development] wmuflyer:
For the power drain I'm about 3% per hour with WiFi on but less than 1% with WiFi off with screen off. Something in Google services is keeping a wake lock preventing deep sleep with wifi on.
[Nook Color Android Development] leapinlar:
I don't know if it is reliable in this version or not. All I know is it works for me. My other versions do use bind to mount it better. And the purpose of the sleep command it to delay the mounts until vold has mounted the first time. It can be successfully remounted after the first time. I have done it many times. You are probably right about setting the umask options. I don't really understand them and just copied them from swaps from other devices.

Sent from my Nook HD+ running CM10.1 on emmc.
[Nook Color Android Development] RallyStyle2003:
I had the same issue. I noticed in battery stats it showed wifi never went to sleep. After some troubleshooting, I turned off location services and kept wifi on and changed the wifi setting to only stay on during sleep when plugged in. Then I tested it and it slept as expected. I lose like 1% per day now if I don't use it. It's crazy. Maybe that helps. I figured it was working as designed but maybe not.
[Nook Color Android Development] aperezdc:
As I do not have an SD card in the slot, I commented out the line that mounts /dev/block/vold/179:49. Anyway, having to modify the initramfs is not a big deal for me. After all I am not flashing every single nightly build, just the ones that have interesting changes, so I can bear having to spend five extra minutes to get the initramfs modified :)
[Nook Color Android Development] JoshMcMadMac:
Is it possible I resolved it all with NSR? It is probably too soon to tell, but that is the only change I made last night. This morning it fired up just fine, and battery drain was greatly reduced. I will check it out this evening!
[Nook Color Android Development] steven676:
September 7 nightly is broken, do not flash

Quick heads-up: do not flash the September 7 nightly -- it's broken and will not boot. (Proprietary blobs were omitted from the build for some reason.)
[Nook Color Android Development] pastordl:
Thought I was losing it.

Two downloads, multiple md5 checks, and installs. Thanks for the heads up on this.

:eek:
[Nook Color Android Development] steven676:
I've landed a change to reduce memory usage in the Dalvik heap, which should hopefully reduce memory consumption systemwide. The behavior which this knob enables has been in use on other 512MB devices for a while now, reportedly with good results. This change should be part of nightlies starting September 8; please test and report your experience, particularly if you have any issues (crashes, performance regressions, or the like).
[Nook Color Android Development] andtron:
Anyone having their Gmail app crashes when trying to reply? I am having this issue since the first time I flashed mine to 10.2.
[Nook Color Android Development] EAK128:
No issues here. Maybe try clearing app data.

Just flashed it this morning and everything is working as it should. Did notice the extra free RAM and every little bit helps with our NC. Thanks again.
[Nook Color Android Development] bowguy:
Did you update the gapps? See first few posts on this thread.
[Nook Color Android Development] andtron:
Yes, I did, using the 0813 version.

Clearing app data didn't help.

My problem could be because I dirty flashed it from 10.1.

Thanks for all the replies.
[Nook Color Android Development] aperezdc:
No crashes or regressions for me so far. The Nook seems to be slightly more responsive, specially with heavy applications (for example: Hangouts). Something that is clearly better is going back to the launcher (Action Launcher Pro, it is): usually it was taking 2-3 seconds for Action Launcher to show the icons and a cLock widget, after flashing the September 8th nightly most of the time it takes less than a second.

:good:
[Nook Color Android Development] pastordl:
No problems so far.

Smoother and a little quicker. Really shows in return to launcher (Nova). Screen refreshing a couple of seconds faster. Change gets my "yes" vote.

:D
[Nook Color Android Development] koopakid08:
Flashed the latest nightly today and saw some modest improvements with smoothness and speed. It seems to be much faster when going to the launcher or when switching between two apps. Great addition!
[Nook Color Android Development] webyrd:
I agree with the other reports, smoother, noticeable improvement returning to launcher. Nice iob, as usual, thanks again.
[Nook Color Android Development] kwyrt:
Firstly, THANKS to all who have worked on this. I still can't believe how quick and smooth this runs on my old NC. Now a question: The NC is shared between different members of the family. I have heard about profiles and restricted profiles in newer version of Jelly Bean. I have looked around but have not figured out how to enable this on the NC in CM10.2. Is this not an option or am I just missing something?
[Nook Color Android Development] steven676:
Multiuser is unsupported on the Nook Color at the moment. If you want to play with it anyway, set fw.max_users > 1 in /system/build.prop (or /data/local.prop if you want the change to persist through ROM flashes) and reboot.
[Nook Color Android Development] boggsie:
This really is quite remarkable. The Nook Color is now as responsive and reliable as it has ever been, and it gets more versatile with each new release of android.

I can't say how impressed I am and grateful for the new lease on life my Nook Color has been given.
[Nook Color Android Development] mvsroot:
Hi, I've just upgraded from 10.1.3 to 10.2 and got a problem in the Terminal app: After switching to root (su) I can't use the tab and cursor keys anymore (command history and completion). I am using the Hacker Keyboard. In cm-10.1.3-RC2 this works just fine. There is no problem with the regular user just with root after su.
[Nook Color Android Development] kwood129:
I believe I've looked everywhere and did everything I can to make this work but I can't seem to keep the asop keyboard from crashing. I've wiped everything I can think of multiple times, I've used the 9-09 and the 9-10 nightly with the latest gapps. If there is something else I'm supposed to do can anyone please help?
[Nook Color Android Development] leapinlar:
Did you manually wipe /system with CWM and reflash the ROM and 20130813 gapps? That is sometimes necessary to get rid of the old gapps which cause the keyboard failure.

Sent from my Nook HD+ running CM10.1 on emmc.
[Nook Color Android Development] kwood129:
I did exactly that twice. I've had problems when I dirty flashed from 10.1 but it was manageable. Right now I can't type anything at all and usually can't use the back buttons cause the keyboard continuously crashes.
[Nook Color Android Development] leapinlar:
Well, keyboard failure is usually caused by gapps. Try wiping /system and reflashing the ROM w/o flashing the gapps. See if you still have keyboard problems.

Sent from my Nook HD+ running CM10.1 on emmc.
[Nook Color Android Development] Mikito1976:
I use this keyboard in my Nook Color and I'm running the 10.2 9/9 nightly and it works better than the stock keyboard, at least for me. The swipe it's smoother than the stock one. Again that's based on my experience. Here you go:

https://play.google.com/store/apps/details?id=com.cootek.smartinputv5

Sent from LG Spirit 4G.
[Nook Color Android Development] kwood129:
I'll have to sideload it. Mine is so bad that I can't even enter a password for wireless access or login to my gmail for the play store.
[Nook Color Android Development] Mikito1976:
Hey kwood129,

I'm not sure what have you done but I read that you did a dirty flash. If I was you, and please don't get me wrong, I would go back and start from scratch.

1. Backup any app that you wish to back up, like games so you don't lose progress, etc. with Titanium Backup.

2. Download a fresh build and gapps.

3. Get into recovery mode and in this order do as follow:

-wipe dalvik cache

-wipe cache

-do a data/factory rest

4.Flash new build and gapps and reboot.

I have always do that when moving from a different ROMs. I do that to prevent any hiccups. Now I'm running the 10.2 nightly build (came from ParanoidAndroid 3.69 and it was good but this nightly builds are great) and before I flash a new build all I do is wipe dalvik cache and cache without flashing the gapps and so far I haven't had a problem.

Hope this can be helpful.

CM10.2 Nightly 9/9-NookColor
[Nook Color Android Development] Der_Neger:
Swap SD with internal storage

Hi, Nook Devs,

I've got a problem. I'm not using a µ SD card so I want to use the internal starage as an SD card but since android 4.3 there isn't any vold.fstab to change the behavior of the storage. How am I suppposed to get around this.

It would be nice if you could help me.

Thanks in advance :laugh:
[Nook Color Android Development] steven676:
This is a known bug with the new 10.2 su. (Background: to work around the new process sandbox restrictions in Android 4.3, su no longer executes your commands itself -- instead, it passes them on to a "superuser daemon", which runs them and returns the results. As of now, su and the daemon do not provide any facilities for handling the terminal, so you won't get any features beyond what a hard-copy terminal can offer.)

Do you have "enable gesture typing" selected in the AOSP keyboard settings? Despite the presence of the config option, gesture typing depends on proprietary code which isn't shipped with AOSP. (If you do want gesture typing with the stock keyboard, get Google Keyboard from Market.)

This was discussed earlier in the thread.
[Nook Color Android Development] aperezdc:
If you have a GNU/Linux system with the needed tools (or any Unix-like thing with adb and u-Boot's mkimage installed) you can use this script I have written to automate editing the ramdisk to swap the partitions: https://gist.github.com/aperezdc/6533546
[Nook Color Android Development] EAK128:
My AOSP keyboard is working just fine on my nook, gesture typing and everything. I dirty flashed from 10.1 and flashed the official 4.3 gapps.
[Nook Color Android Development] kwood129:
I've installed 3 different keyboards including the Google keyboard. I can't configure anything in the aosp keyboard settings because it will crash every time. Even with these other keyboards installed I still get popups saying the aosp keyboard has crashed. Its not as bad as before so my nook is usable now but its damn annoying. I've wiped everything manually to be safe, flashed just the ROM and gapps. When I do that they keyboard never works. I can only use the keyboard after I install some other kind of keyboard and as mentioned above i still get keyboard errors.
[Nook Color Android Development] leapinlar:
Did you take my earlier advice and wipe /system and just flash the ROM and not gapps to see if gapps is the problem?

Sent from my Nook HD+ running CM10.1 on emmc.
[Nook Color Android Development] mvsroot:
Thanks. That explains everything. It's a bit annoying to type mountpoints without a bluetooth keyboard. But I can use su -c"command" as a work around if I don't need quotes and apostrophes in my command.
[Nook Color Android Development] pastordl:
Question - clipboard bug

Been reading about 4.3 clipboard bug. Also got an update and notice on clipper about the bug. Tried searching on Nook forums with no results. Is this a dealt with issue or is it "in the works"? Had noticed some clipboard problems but sporatic.
[Nook Color Android Development] kwood129:
I did that too before posting on here. My final resolution was to freeze the aosp keyboard in titanium backup. No more errors but I'm still stumped as to why it is such a problem.
[Nook Color Android Development] leapinlar:
Are you saying you had the keyboard crashing after you did a factory reset, wipe /system and only flashed the ROM with no gapps?

Sent from my Nook HD+ running CM10.1 on emmc.
[Nook Color Android Development] kwood129:
I tried wiping manually, tried just the basic rom without any gapps, with the last 2 gapps packages ( the one in march and the one in august) and several different rom packages. Nothing would correct the problem. I was only able to get the aosp keyboard has stopped message to completely go away by installing another keyboard and freezing the aosp keyboard.
[Nook Color Android Development] leapinlar:
I guess we are not communicating. You say manual wipe, I say factory reset and wipe /system. They may mean different things.

There are two August versions of gapps, 8/12 for CM10.1.x and 8/13 for CM10.2.x. And they definitely need to match the version of ROM or your keyboard will fail.

At least you have a solution.

Edit: The reason I keep asking if you wiped /system before you flashed the ROM is there is built in routine in the installer zip to save your previously installed gapps when you flash a new ROM. So the only way to get rid of a previously installed incorrect version of gapps is to manually wipe /system. So if you reflash a ROM without wiping /system first and don't flash gapps, you will still have your old gapps, potentially causing a keyboard issue.

Sent from my Nook HD+ running CM10.1 on emmc.
[Nook Color Android Development] kwood129:
I totally appreciate the suggestions. I though about all of that and that's why I wiped everything and started from scratch. I'm glad I thought to freeze the keyboard. Browsing on tapatalk was getting to be a nightmare ;)
[Nook Color Android Development] andtron:
To leapinlar and kwood,

I reported a day or two ago that I was having problem with my gmail reply.

My issue is similar for that I dirty flashed from 10.1 to 10.2, so I did what leapinlar suggested to wipe the /system first, but that did not fix the issue.

Eventually I did the factory wipe, then the system. Of course I had to reinstall all my app and gapp.

Now I am back to happyness :)
[Nook Color Android Development] leapinlar:
Deleted

Edit: scratch what I just said about swapping SDs by changing a property. It does not work on CM10.2. I still had my old swap when I tested it. Sorry for the confusion.

Sent from my Nook HD+ running CM10.1 on emmc.
[Nook Color Android Development] leapinlar:
Steven676:

According to what I have been reading that should have worked on CM10.2. According to what I read, adding persist.sys.vold.switchexternal=1 should have worked and it did not. Can you investigate this a little in the github?

Edit: I figured it out. Because you have fstab.encore set to mount /storage/sdcard0 and /storage/sdcard1 and the ro.vold.switchable pair in build.prop set to /mnt/sdcard,/mnt/sdcard, it does not know what to do. I changed the switchable pair to /storage/sdcard0,/storage/sdcard1 in build.prop and put the persist property in /data/property and it worked.

So all you need to do is change that switchable pair property in build.prop in the git and folks can use this property to swap the SDs.

Now I wish I had not deleted my instructions in my last post. I just have to write them again. LOL.

Sent from my Nook HD+ running CM10.1 on emmc.
[Nook Color Android Development] leapinlar:
Ok, I will write the instructions again.

In CM7 there used to be a setting that would allow users to swap internal and external SDs. This was useful for users that had no external SDs and wanted their apps to use internal memory as sdcard. Starting with CM9, CM changed it so the setting was no longer in settings, but was moved to the CMParts app. And now the CMParts app has been removed. But users can make manual modifications to activate the swap.

There are two ways to do it. One is to edit build.prop to add this line:

persist.sys.vold.switchexternal=1

The second way is to add a property file to /data/property. That way it sticks with a ROM upgrade. Add this file:

persist.sys.vold.switchexternal

And insert the value 1 in the file.

After making one of these edits, just reboot and they should be swapped. To return to normal just change the 1 to 0 and reboot again.

But there is a problem with the current build.prop file that prevents this from working properly. Hopefully steven676 will fix this for future nightlies. But until then, you can fix it yourself by editing this line:

ro.vold.switchablepair=/mnt/emmc,/mnt/sdcard

to

ro.vold.switchablepair=/storage/sdcard0,/storage/sdcard1

I have tested this swap on CM10.2 and know it works on both emmc and SD installs. It should work on CM10.1 but I have not tested it.

Sent from my Nook HD+ running CM10.1 on emmc.
[Nook Color Android Development] steven676:
Thanks, committed (CM10.2, CM10.1). This should be in nightly builds starting from September 16, as well as CM10.1.3 final.
[Nook Color Android Development] aperezdc:
Works like a charm in the 20130916 nightly (or by editing build.prop to set the proper value for ro.vold.switchablepair manually before that nightly).

:good:
[Nook Color Android Development] FordPrefect:
After a rather long time where I used my Nook only as an ebook reader, today I installed the 20130917 nightly. It's simply amazing! This turns my good old Nook into a decent mini tablet! Not the speediest of all, but way good enough for everyday usage. A big thank you to everyone who contributed!

Just wanted to give you an observation. After a clean instal I let the device just sit there for 2 hours or so to let it re-load my apps from the Google synchronization. Among the apps I'm using there is CalDAV Sync and CardDAV Sync. The apps were installed and I wanted to add the accounts needed. Now, when I went to "Settings -> Accounts -> Add account" this crashed. When I started the app itself and added the account from there it worked. This new account shows up, and also from this point in time I could create other accounts using the Settings page.

This is really a minor glitch, just curious to hear if other people had the same problem.
[Nook Color Android Development] highnoteuser:
What is everyones opinion on 10.2 vs 10.1.3 as far as smoothness? Same, better, worse?
[Nook Color Android Development] SirRastusBear:
Slightly faster & smoother. All credit to devs for making it work on older device. However, if you want speed & stability you may want to stick with CM7 builds.

Cheers
[Nook Color Android Development] dparrothead1:
Very, very nice. Just switched over from Chameleon because they were taking too long updating to 4.3. Just as with the rest of my devices, 4.3 seems to run better than 4.2.

I guess a sign of the times as what CM announced, when my sign in screen came up....it was a white CM registration screen to set up a CM account.
[Nook Color Android Development] pastordl:
Prefer 10.2

I have a couple on 10.1.3 that I'll be updating when I get time.
[Nook Color Android Development] aperezdc:
CM 10.2 feels definitely snappier than 10.1.3, and recently some more tweaks have been applied to make the Nook work better and have some extra niceties. For me having the possibility of setting persist.sys.vold.switchexternal and keep using the internal memory as SD card (even across nightlies being flashed) is a killer feature. Also, some tune-ups have been done in making the Dalvik heap size smaller and leave a bit more of memory for applications and (in my experience) some heave apps/games are less prone to crashing. The only thing that is smoother than 10.2 is going back to CM7.
[Nook Color Android Development] dparrothead1:
Seems to be much smoother and less lag than 10.1. I have found that 4.3 runs much smoother on all my devices than 4.2 did. Rumors are, that 4.4 will be even smoother on older devices.