Thread closed. - HD2 Android Q&A, Help & Troubleshooting and Genera

Thread closed.

Thread closed.

Yank555 said:
Hi,
REMEMBER
FIRST OF ALL, do a Nandroid backup, as well as a backup of your sd-card content !
You're doing this at your very own risk, I'm not to be held responsible if something goes wrong
Now that said, let's get going
In case somebody wants to check it out, here is the swap activation script I wrote (attached) as well as explanations on how to make it all work :
1) Partition your sd-card (Minitool Partition Wizard, 4ext, CWM...)
2) Boot your system with the partitionned sd-card
3) If necessary customize the 99swap script (attached to this post) and then put it onto your sd-card's root folder, you'll need it while executing the commands in step 4.
4) Open a terminal and type the following
NB: Change "mkswap /dev/block/mmcblk0p3" accordingly to point to the swap partition you've created in step 1.
5) Reboot your phone, start a terminal again and type free, you'll need to see something different than 0 in your swap line, look at the attached print-screen
Swappiness will be set to 50 by the script, which is a rather conservative swap use, made sense to me since SD-swap is slower than ram, better not to use it too agressively. Feel free to experiment with the swappiness variable in the script (values between 0 and 100, 0 meaning "try not to swap", 100 meaning "try to swap all the time")
If you want to try and have a question, just let me know !
JP.
PS: You can find the thread for hard swap for the htc Sensation / XE here.
Click to expand...
Click to collapse
Hi JP,
This is a gem of a post! Thanks alot for the script and the detailed breakdown. Before I get into it though, I must warn you that I am more of a beginner with no coding/scripting experience (I don't know how to use adb or anything)...
Here's what I'm trying to do: I'm trying to activate hard-swap on my hd2 (currently) running the ParanoidAndroid by Xylograph. I've created 3 partitions on my 16gb class 6 sd card: first, fat32 (32k cluster), next, 1GB ext2 (default), 500MB swap.
Procedure:
1. I extracted the script and copied it directly to system/etc/init.d folder of the Rom (I looked at the terminal commands you posted and the first few lines looked like copying the file from the sd root to the init.d folder (it was just a guess though), so I figured might as well put it into the rom before I flash it)
2. Flashed the rom
3. To activate it, I typed the following into the terminal:
su
mount -o remount,rw /system
mkswap /dev/block/mmcblk0p3
mount -o remount,ro /system
exit
after the mkswap command, I did get an activation notification that a certain amount was assigned to swap. But my celebrations were cut short after I rebooted and used the free command to check. The entire swap row still read 0.
I was wondering if you can point me in the right direction... thanks!
Also, is there a way to create a cwm flashable version?

bullcrapr said:
Hi JP,
This is a gem of a post! Thanks alot for the script and the detailed breakdown. Before I get into it though, I must warn you that I am more of a beginner with no coding/scripting experience (I don't know how to use adb or anything)...
Here's what I'm trying to do: I'm trying to activate hard-swap on my hd2 (currently) running the ParanoidAndroid by Xylograph. I've created 3 partitions on my 16gb class 6 sd card: first, fat32 (32k cluster), next, 1GB ext2 (default), 500MB swap.
Procedure:
1. I extracted the script and copied it directly to system/etc/init.d folder of the Rom (I looked at the terminal commands you posted and the first few lines looked like copying the file from the sd root to the init.d folder (it was just a guess though), so I figured might as well put it into the rom before I flash it)
2. Flashed the rom
3. To activate it, I typed the following into the terminal:
su
mount -o remount,rw /system
mkswap /dev/block/mmcblk0p3
mount -o remount,ro /system
exit
after the mkswap command, I did get an activation notification that a certain amount was assigned to swap. But my celebrations were cut short after I rebooted and used the free command to check. The entire swap row still read 0.
I was wondering if you can point me in the right direction... thanks!
Also, is there a way to create a cwm flashable version?
Click to expand...
Click to collapse
Thanx
In fact you understood correctly that is was about copying the file to init.d.
By the way, these commands do the following :
mount -o remount,rw /system - Mount system partition in read-write
mount -o remount,ro /system - Mount system partition in read-only
So to format the swap partition "mkswap /dev/block/mmcblk0p3" there was no need for it, but it didn't harm in any way, so you're fine there
I guess what is missing is the "chmod 755 /system/etc/init.d/99swap" command which will set the correct file access to the script so it can get executed at boot.
You might do the following in a terminal :
su
mount -o remount,rw /system
chmod 755 /system/etc/init.d/99swap
mount -o remount,ro /system
exit
It should be fine then.
Alternatively you could set the rights with your file explorer (in root explorer mode), they must be "rwxr-xr-x" (which is Read-Write-Execute, Read-Execute, Read-Execute), most file-manager will allow you to do that as well.
I've been working on the script variant for htc Sensation, it is more advanced, dynamic so it can find the swap partition by itself.
I'll make a CWM flashable as soon as I get to it that will handle everything except partitioning the SD card, obviously, for both devices.
As soon as I'm done I'll post the HD2 version here as well (very little change, between both devices, just the access path to the sd-card partitons to change (=1 line in the script).
JP.
Edit ------------------------------------------------
I just reread your post, if in fact you put it into the ROM zipfile, then file access should be correct !?
Could you post the following file (if it exists) :
/data/swap.0.log ?
JP.

Yank555 said:
Thanx
In fact you understood correctly that is was about copying the file to init.d.
By the way, these commands do the following :
mount -o remount,rw /system - Mount system partition in read-write
mount -o remount,ro /system - Mount system partition in read-only
So to format the swap partition "mkswap /dev/block/mmcblk0p3" there was no need for it, but it didn't harm in any way, so you're fine there
I guess what is missing is the "chmod 755 /system/etc/init.d/99swap" command which will set the correct file access to the script so it can get executed at boot.
You might do the following in a terminal :
su
mount -o remount,rw /system
chmod 755 /system/etc/init.d/99swap
mount -o remount,ro /system
exit
It should be fine then.
Alternatively you could set the rights with your file explorer (in root explorer mode), they must be "rwxr-xr-x" (which is Read-Write-Execute, Read-Execute, Read-Execute), most file-manager will allow you to do that as well.
I've been working on the script variant for htc Sensation, it is more advanced, dynamic so it can find the swap partition by itself.
I'll make a CWM flashable as soon as I get to it that will handle everything except partitioning the SD card, obviously, for both devices.
As soon as I'm done I'll post the HD2 version here as well (very little change, between both devices, just the access path to the sd-card partitons to change (=1 line in the script).
JP.
Edit ------------------------------------------------
I just reread your post, if in fact you put it into the ROM zipfile, then file access should be correct !?
Could you post the following file (if it exists) :
/data/swap.0.log ?
JP.
Click to expand...
Click to collapse
Hi JP
You are incredibly helpful and I appreciate it!
I finally got some time off and tried out what you mentioned... but to no avail. I applied the necessary permissions through the terminal (chmod 755) as well as through the root browser, but it was still the same. After that I even retried the terminal commands, and included the "chown 0:2000...", but that didn't work either...
... and then I saw your post update...
About that, i just typed it into the terminal, and I got "not found".
Was that what I was supposed to do?

bullcrapr said:
Hi JP
You are incredibly helpful and I appreciate it!
I finally got some time off and tried out what you mentioned... but to no avail. I applied the necessary permissions through the terminal (chmod 755) as well as through the root browser, but it was still the same. After that I even retried the terminal commands, and included the "chown 0:2000...", but that didn't work either...
... and then I saw your post update...
About that, i just typed it into the terminal, and I got "not found".
Was that what I was supposed to do?
Click to expand...
Click to collapse
Hi,
You're welcome
The file '/data/swap.0.log' is a text-file containing info on the execution of the script...
If it's not there, then the script didn't run at all...
I should have a little time later today, will try to make the CWM flashable solution for you, should be a no fuss solution, as long as the sd-card has a swap partition
How did you partition the card ? CWM ?
JP.
Sent from my Android Revolution HD 6.6.5 XE / faux kernel 007b3 powered htc Sensation XE using xda premium

I created a 256Gb partition...
Click to expand...
Click to collapse
man thats a helluva sd card ya have there! hehe.

samsamuel said:
man thats a helluva sd card ya have there! hehe.
Click to expand...
Click to collapse
Haha I noticed that too :') I want one of those now

Nigeldg said:
Haha I noticed that too :') I want one of those now
Click to expand...
Click to collapse
Thanx for pointing that out Mb of course, but in a few years that might be possible
My first hdd had 60Mb, and that's not soooo long ago
JP.
Sent from my Android Revolution HD 6.6.5 XE / faux kernel 007b3 powered htc Sensation XE using xda premium

heh, my first was a 20mb HDD mounted on a pcb card and plugged into an ISA slot, took up the full length of the PC, weighed LOADS, could have beaten burglars to death with it.

bullcrapr said:
Hi JP
You are incredibly helpful and I appreciate it!
I finally got some time off and tried out what you mentioned... but to no avail. I applied the necessary permissions through the terminal (chmod 755) as well as through the root browser, but it was still the same. After that I even retried the terminal commands, and included the "chown 0:2000...", but that didn't work either...
... and then I saw your post update...
About that, i just typed it into the terminal, and I got "not found".
Was that what I was supposed to do?
Click to expand...
Click to collapse
+1 with this (also on Paranoid Rom 1.1a) but I think that it's something with the ROM coz on earlier build v1 this method worked verry good I hope that Yank will find a solution coz it reallly helps wit our 576 ram

samsamuel said:
heh, my first was a 20mb HDD mounted on a pcb card and plugged into an ISA slot, took up the full length of the PC, weighed LOADS, could have beaten burglars to death with it.
Click to expand...
Click to collapse
Mine was huge at the time, was on of the first to have such a big one, even partitioned it into 3 since it was just too big And it was an external device, the size of a pizza-box (it was en Atari Megafile 60, I still have it !!).

triggaz said:
+1 with this (also on Paranoid Rom 1.1a) but I think that it's something with the ROM coz on earlier build v1 this method worked verry good I hope that Yank will find a solution coz it reallly helps wit our 576 ram
Click to expand...
Click to collapse
I'm working on the CWM flashable right now, should be done within 1-2 hours at most

Yank555 said:
Hi,
You're welcome
The file '/data/swap.0.log' is a text-file containing info on the execution of the script...
If it's not there, then the script didn't run at all...
I should have a little time later today, will try to make the CWM flashable solution for you, should be a no fuss solution, as long as the sd-card has a swap partition
How did you partition the card ? CWM ?
JP.
Sent from my Android Revolution HD 6.6.5 XE / faux kernel 007b3 powered htc Sensation XE using xda premium
Click to expand...
Click to collapse
Hi JP, once you told me it was the address to the file, i just navigated there using my explorer and lo and behold!, there it was (attached). If you must know, in my earlier post, the idiot in me just typed it in the terminal and the terminal replied not found.
I made my partition using freeware called Minitool partition wizard. Is 500mb too big for swap in your opinion? I was thinking of compensating for zram, and hence the size... thanks for your speedy responses...
edit...
and hey! whadya know? in the meantime, this place is coming alive!!

bullcrapr said:
Hi JP, once you told me it was the address to the file, i just navigated there using my explorer and lo and behold!, there it was (attached). If you must know, in my earlier post, the idiot in me just typed it in the terminal and the terminal replied not found.
I made my partition using freeware called Minitool partition wizard. Is 500mb too big for swap in your opinion? I was thinking of compensating for zram, and hence the size... thanks for your speedy responses...
edit...
and hey! whadya know? in the meantime, this place is coming alive!!
Click to expand...
Click to collapse
Hmm ... strange, the content of the file looks like a logcat ?! Not what I was expecting to see
Give me a little hour, and I think I should be done with the flashable hard-swap and we'll go from there
Minitool is excellent, but did you pay attention to only create "primary" partition ? If it is a logical partition it won't work...
Can you insert your SD card into your card reader, start Minitool an post a print screen of it ?
JP.
EDIT :
About size ... I believe 256Mb is enough, even read somewhere t shouldn't be more than 256, but I think there was no specific reason given.

Yank555 said:
Hmm ... strange, the content of the file looks like a logcat ?! Not what I was expecting to see
Give me a little hour, and I think I should be done with the flashable hard-swap and we'll go from there
Minitool is excellent, but did you pay attention to only create "primary" partition ? If it is a logical partition it won't work...
Can you insert your SD card into your card reader, start Minitool an post a print screen of it ?
JP.
EDIT :
About size ... I believe 256Mb is enough, even read somewhere t shouldn't be more than 256, but I think there was no specific reason given.
Click to expand...
Click to collapse
Here we go...
Minitool image attached... I typically pay attention to the partition type and made sure both of them were primary
About the logcat, I suspect you're right... I was trying to do one from my pc for the first time using adb and tried the only few commands I know (mkswap...), I think that's what you saw then...
Incidentally, do you feel if I reduce the swap size, the script has a better chance at surviving the boot?

bullcrapr said:
Here we go...
Minitool image attached... I typically pay attention to the partition type and made sure both of them were primary
About the logcat, I suspect you're right... I was trying to do one from my pc for the first time using adb and tried the only few commands I know (mkswap...), I think that's what you saw then...
Incidentally, do you feel if I reduce the swap size, the script has a better chance at surviving the boot?
Click to expand...
Click to collapse
Don't bother, I will test 500Mb and let you know if that is the issue
JP.

I have 512mb partition and it worked without problems as I mentioned earlier so I think that opposite to the "size does matter" in this case it doesn't plus I used it with zram from marc1706.

triggaz said:
I have 512mb partition and it worked without problems as I mentioned earlier so I think that opposite to the "size does matter" in this case it doesn't plus I used it with zram from marc1706.
Click to expand...
Click to collapse
Hi triggaz, are you using the built in zram on Para1.1a? Or have you applied a script from elsewhere? I enabled the built-in zram, but get a "not found" reply when i try zram_stats in the terminal. Can you tell me how you got zram working? thanks...

bullcrapr said:
Hi triggaz, are you using the built in zram on Para1.1a? Or have you applied a script from elsewhere? I enabled the built-in zram, but get a "not found" reply when i try zram_stats in the terminal. Can you tell me how you got zram working? thanks...
Click to expand...
Click to collapse
https://www.dropbox.com/s/xr3z102gxiw2f62/marc1706_zram_100MB.zip
all credits to Dorimanx for ZRAM mod and mark1706 for modifications
I flashed this and then used the compcashe options in Paranoid (set to 26%)

Related

Minimal UI for LUKS encryption on the Wildfire

This is a basic gui I wrote to unlock my encrypted partitions during boot.
I'm running my /data and /sdcard partitions encrypted, and the "luksunlock" binary is launched from init.rc to read the password and unlock the encrypted partitions.
I have included my somewhat modified init.rc for those interested.
For more information about LUKS on Android see this blogpost, written by shawn (Seems I'm not allowed to have urls in the post, but Google for 'android luks' , first hit)
This works good on Wildfire, altough it should work fine on other phones as well. Just remember that you need to set up your partitions as in the luksunlock.c (or change the defines).
Dont forget to backup before you start playing around!
Good luck!
Thanks! i'll give a try!
Hi,
I tried to use your cryptsetup binary from your blog, but I have some issues that you'll sure have an answer:
I run ./cryptsetup luksFormat -c aes-plain /dev/block/loop2 and after i put the luks password it says 'Command failed', no logs, no other output, even using the -v flag...
Any clue?
Thanks in advance!
PS: the module dm-crypt is necessary for cryptsetup? could be this the error? I don't have it installed on the system because I can't find it for 2.6.35.9-cyanogenmod
tusabe said:
Hi,
I tried to use your cryptsetup binary from your blog, but I have some issues that you'll sure have an answer:
I run ./cryptsetup luksFormat -c aes-plain /dev/block/loop2 and after i put the luks password it says 'Command failed', no logs, no other output, even using the -v flag...
Any clue?
Thanks in advance!
PS: the module dm-crypt is necessary for cryptsetup? could be this the error? I don't have it installed on the system because I can't find it for 2.6.35.9-cyanogenmod
Click to expand...
Click to collapse
CM6.1 for wildfire uses a 2.6.32 kernel (see HCDR.jacob's post about his custom kernel for more info)
tusabe said:
PS: the module dm-crypt is necessary for cryptsetup? could be this the error? I don't have it installed on the system because I can't find it for 2.6.35.9-cyanogenmod
Click to expand...
Click to collapse
Yeah you really need dm-crypt support, either compiled into the kernel or as a module. You also need the AES ciphers support.
sigkill1337 said:
Yeah you really need dm-crypt support, either compiled into the kernel or as a module. You also need the AES ciphers support.
Click to expand...
Click to collapse
Hi! Yeah, that's what I was afraid of.... ok, but the problem is that i'm running CM6.1 with 2.6.35.9 which has no dm-crypt module neither compiled in kernel... where can i find some kernel with this modules included? Is for an HTC Desire (@Sympnotic )
Thanks in advance!
Great work and thanks for sharing @Sigkill. Working on building it here for my NexusOne with CM6.1.
BTW, I’m the lead on a project working on general secure Android distro – we’ve ported Tor, have an OTR IM app, and have supported other projects along those lines. Would love to talk more about supporting anyone working on this specific capability.
wow! awesome work!!! Very exciting news. Gonna give this a go on my MyTouch Slide
NathanFreitas said:
Great work and thanks for sharing @Sigkill. Working on building it here for my NexusOne with CM6.1.
BTW, I’m the lead on a project working on general secure Android distro – we’ve ported Tor, have an OTR IM app, and have supported other projects along those lines. Would love to talk more about supporting anyone working on this specific capability.
Click to expand...
Click to collapse
Seems really nice. I like the secure phone concept.
New Makefile and wiki info up
_hc from the @guardianproject has a new build process up for Crypsetup/LUKS which includes a Makefile compatible with Android NDK r5.
We have new instructions up on our wiki, as well.
I cannot post links under this account, but you can find the info on github if you search "LUKS" or just under our guardianproject account.
How did you create the encrypted partitions? Could you give some pointers for that. I am familiar with using dmcrypt/cryptsetup on desktop linux, I guess this works similar. What are the relevant device names? Did you run into any problems?
Calavera1 said:
How did you create the encrypted partitions? Could you give some pointers for that. I am familiar with using dmcrypt/cryptsetup on desktop linux, I guess this works similar. What are the relevant device names? Did you run into any problems?
Click to expand...
Click to collapse
Hi, sorry for the late answer,
/dev/block/mtdblock5 is the "userdata" partition. I formatted it and mount it to /encrypted-data during init:
mount yaffs2 [email protected] /encrypted-data nosuid nodev
The only file on this partition is "data.encrypted" file, which gets created in init.rc as a loopback device:
exec /system/bin/losetup /dev/block/loop0 /encrypted-data/data.encrypted
I created the "data.encrypted" file on my computer with cryptsetup and losetup, and copied all files from my old unencrypted userdata partition to it and then copied it back as a file to the formated userdata partition.
The sdcard "/dev/block/mmcblk0p2" partition is formated with "cryptsetup luksFormat", I did this also on my computer, saves some time. And then copy everything from the old unencrypted sdcard.
I did run in to one problem recently, my phone hung during boot, about 4 months after I started encrypting my phone.
Had to copy my data.encrypted file to my computer, mount it as a loopback device and do a fsck, and then copy it back to my phone.
I suspect this has to do with the filesystem not being umounted properly. (I have had this on my to do list for a while hehe)
Probably should make a script run during shutdown to cleanly "luksClose" the encrypted partition and then umount them. Not doing this is probably very crazy
I also want to fix it so my "/dev/block/mmcblk0p2" partition gets presented to my computer when i attach my usb cable (as it should do), so i can unlock it in ubuntu and copy images and files. Right now i have to take my memorycard out and put it into the computer.
I hope this post makes sense, it was written in haste =) Good luck!
sigkill1337 said:
Hi, sorry for the late answer,
/dev/block/mtdblock5 is the "userdata" partition. I formatted it and mount it to /encrypted-data during init:
mount yaffs2 [email protected] /encrypted-data nosuid nodev
The only file on this partition is "data.encrypted" file, which gets created in init.rc as a loopback device:
exec /system/bin/losetup /dev/block/loop0 /encrypted-data/data.encrypted
I created the "data.encrypted" file on my computer with cryptsetup and losetup, and copied all files from my old unencrypted userdata partition to it and then copied it back as a file to the formated userdata partition.
The sdcard "/dev/block/mmcblk0p2" partition is formated with "cryptsetup luksFormat", I did this also on my computer, saves some time. And then copy everything from the old unencrypted sdcard.
I did run in to one problem recently, my phone hung during boot, about 4 months after I started encrypting my phone.
Had to copy my data.encrypted file to my computer, mount it as a loopback device and do a fsck, and then copy it back to my phone.
I suspect this has to do with the filesystem not being umounted properly. (I have had this on my to do list for a while hehe)
Probably should make a script run during shutdown to cleanly "luksClose" the encrypted partition and then umount them. Not doing this is probably very crazy
I also want to fix it so my "/dev/block/mmcblk0p2" partition gets presented to my computer when i attach my usb cable (as it should do), so i can unlock it in ubuntu and copy images and files. Right now i have to take my memorycard out and put it into the computer.
I hope this post makes sense, it was written in haste =) Good luck!
Click to expand...
Click to collapse
I figured most of that out without your post and tried it on my desire (I created the luks partitions with adb on the phone though, worked anyway ). Then I couldn't figure out where my regular init.rc is stored (I could only find the one used by Clockwork Recovery), and then I figured I already spent enough time, tried a reboot (which of course didn't work). Then I couldn't even get into recovery (probably because its init.rc tries to mount /data which doesn't work? I didn't investigate any further). Flashed my backup with fastboot and was stuck again with my un-encrypted pre-experiment state
Oddly enough, it was no problem to unlock my encrypted SD-card from my computer (running ubuntu) while in recovery (clockword has an option to present the sd card to a computer connected via usb). Maybe the booted system handles this differently than recovery though? I didn't get a chance to try, as I couldn't boot after my encryption attempt.
I will try again after my algorithm and data structure exam this friday and report back
Is anybody using the UI on another device than the Wildfire? Does it work?
How much is the performance drain when using an encrypted /data partition?
Amazing work!
Did anyone manage to make sigkill1337's luksunlock build from source ?
I would like to change the path of the data/sdcard partitions to match my device but I tried many ways using the NDK and I can't get it to compile properly.
Is there any way to do this ?
I have been trying for days, I am getting literaly insane !
@sigkill1337 : could you give me some pointers ? I would appreciate a lot.
mount manpage said:
The bind mounts.
Since Linux 2.4.0 it is possible to remount part of the file hierarchy somewhere else. The call is
mount --bind olddir newdir
or shortoption
mount -B olddir newdir
or fstab entry is:
/olddir /newdir none bind
After this call the same contents is accessible in two places. One can also remount a single file (on a single file).
This call attaches only (part of) a single filesystem, not possible submounts. The entire file hierarchy including submounts is attached a second place using
mount --rbind olddir newdir
or shortoption
mount -R olddir newdir
Note that the filesystem mount options will remain the same as those on the original mount point, and cannot be changed by passing the -o option along with --bind/--rbind. The mount options can be changed by a separate remount command, for example:
mount --bind olddir newdir
mount -o remount,ro newdir
Click to expand...
Click to collapse
If nothing helps, you should always be able to bindmount it
I'd rather get sigkill1337's UI to compile...
Lots of nice security tweaks and settings could be done with a pre-boot GUI
Anyway, concerning encryption, I'll use the bind option for now, thanks for the tip.
But if anyone here could give me some pointers about compiling this stuff it would be great.
I managed to compile it by integrating luksunlock in Android source externals and main.mk but when I push it to my phone and modify init.rc to call it, it just does not work...
Other modifications are working (mount, mkdir, etc.) but the GUI won't show up
Sorry for the late reply.. But you could try running it from a shell when the phone is booted, just to verify that the binary starts (thats how I tested it without having to reboot my phone all the time)
My environment for building the source was setup using one of the tutorials online, nothing out of the ordinary
Im still running this on my phone, for almost 8 months now, I havent noticed that much in performance problems, the Wildfire was slow before i started using luks.
When i get a new phone (maybe SE Arc) i will be easier to see if performance is affected
There is an Issue for getting CM support for encrypted filesystems during boot:
Issue 2736: support encrypted filesystem from boot
If you want to get that feature, just "star" it, so it may get more attention.

[Recovery] ClockworkMod Recovery 1.3.4(updated 24.06.2011)

OK, here is ClockworkMod Recovery for our beloved A500
NOTE:
If you encounter a problem with the filesystem on /data like it has become corrupt, place a blank file called "eraseData" (without the quotes) in the clockworkmod folder on your external sdcard or usb storage. This will revert back to actually formatting /data.
WARNING: by doing this you will lose everything that you have in /data/media.
Installation:
use adb (PC):
adb push recovery-thor2002ro-rev1.*.img /sdcard
adb push itsmagic /data/local
from terminal (TABLET):
su
chmod 755 /data/local/itsmagic
mount -o rw,remount /system
rm /system/etc/install-recovery.sh
mount -o ro,remount /system
dd if=/sdcard/recovery-thor2002ro-rev1.*.img of=/dev/block/mmcblk0p1
./data/local/itsmagic
"recovery-thor2002ro-rev1.*.rar" - is for flashing normally with the normal method...
"update-recovery-thor2002ro-rev1.*.zip" - flashed from recovery and press reboot/power off(v1.1 don't use "Advanced" -> "Reboot Recovery" only buttons in the main menu) after its flashed(don't try to flash from any other recovery other than mine, will not work)
Acer Recovery Installer APP thanks to Euclid's Brother http://forum.xda-developers.com/showpost.php?p=14818316&postcount=109
Video installation guide by cfcoleman
http://www.youtube.com/watch?v=cuf74JP5Jgw
Changelog:
1.1:
skips /data/media in backup/restore/format of /data
integrated "itsmagic"
additional option in advanced to run itsmagic manually
itsmagic is run on every restart/poweroff or recovery as a precautionary measure
ability to use usb storage in recovery for backups and restores...(has a priority system in place if usb stick is present on mount its used as a "sdcard", if not it falls back to microsd card), unmount and mount will also trigger this.
1.2:
flexrom backup & restore
bct + ebt + pt + gp1 backup(basically the first sectors of the flash that sc2k told you to backup when itsmagic got released...)
retrieve uid
itsmagic run at startup
usb keyboard fix
1.3.2:
fixed background disappearing
removed itsmagic from reboot/poweroff, not needed itsmagic is run at startup...
fixed flexrom not being present in advanced restore menu
1.3.3:
fixed back disappearing in Mounts and Storage menu
1.3.4(still in testing...):
added sync before md5 generation
sync and unmount of /sdcard after succesful backup
sync and unmount of /sdcard at reboot/poweroff
Thanks to sc2k for testing this.
Even though this recovery has been tested, I am not liable for any loss of data or any damages done by this recovery.
tnx for this!!
great!!
thor2002ro said:
OK, here is ClockworkMod Recovery for our beloved A500
Includes:
skips /data/media in recovery/restore/format of /data
integrated "itsmagic"
additional option in advanced to run itsmagic manually
itsmagic is run on every restart/poweroff or recovery as a precautionary measure
ability to use usb storage in recovery for backups and restores...(has a priority system in place if usb stick is present on mount its used as a "sdcard") if not it falls back to microsd card), unmount and mount will also trigger this.
NOTE:
If you encounter a problem with the filesystem on /data like it has become corrupt, place a blank file called "eraseData" (without the quotes) in the clockworkmod folder on your external sdcard or usb storage. This will revert back to actually formatting /data.
WARNING: by doing this you will lose everything that you have in /data/media.
Installation:
remove /system/etc/install-recovery.sh if present
dd the image to mmcblk0p1
run itsmagic
TO DO:
flexrom backup & restore
bl + bct backup
retrieve uid
Thanks to sc2k for testing this.
Even though this recovery has been tested, I am not liable for any loss of data or any damages done by this recovery.
Click to expand...
Click to collapse
1.before we dd the image to mmcblk0p1 ,do we have to install itsmagic first
u said u had integrated itsmagic in that recovery,but how do we run that itsmagic,from where?
2. what is the “bl” and “bct” stand for?
3. is “to do……” what we can do or something else ?i cant understand it sorry。
I am all over this but please add more thorough instructions. Thanks
Awesomeness, that is all
Sent from my ADR6400L using XDA Premium App
Yea tend to agree sounds awesome. But if we could have a more clear set of instructions. So people don't brick their tablet.
Sent from my PC36100 using XDA Premium App
to do means things he wants to add to or fix in this release.
What does dd stand for?
ibila said:
to do means things he wants to add to or fix in this release.
What does dd stand for?
Click to expand...
Click to collapse
Well thanks for explaining what to do means...
dd is the termed used to dump this image to a particular block in this case block 0p1
ibila said:
to do means things he wants to add to or fix in this release.
What does dd stand for?
Click to expand...
Click to collapse
o ,I see
"dd" is a command in linux, it can write a img to a partition or block
in this case, we can use that command like this:
dd if=/sdcard/recovery-thor2002ro-rev1.1.img of=/dev/block/mmcblk0p1
thor2002ro said:
Even though this recovery has been tested, I am not liable for any loss of data or any damages done by this recovery.
Click to expand...
Click to collapse
hmm... you could not find a smaller font?
Dexter_nlb said:
hmm... you could not find a smaller font?
Click to expand...
Click to collapse
lol not very nice though.
updated instructions...
anybody know how to do it from Windows? (no DD)
Dan2552 said:
anybody know how to do it from Windows? (no DD)
Click to expand...
Click to collapse
dd is on the tablet not windows...
thor2002ro said:
updated instructions...
Click to expand...
Click to collapse
Where are the "updated instructions"
Crsdr37 said:
Well thanks for explaining what to do means...
dd is the termed used to dump this image to a particular block in this case block 0p1
Click to expand...
Click to collapse
Hmmm there is maybe a tiny one in a million chance that your not the only participator in this thread so who knows...maybe this explanation was not for you but for kimcai.
Sorry if i just burst your bubble
docfreed said:
Where are the "updated instructions"
Click to expand...
Click to collapse
OP
10char
ibila said:
OP
10char
Click to expand...
Click to collapse
Doh! Thanks
Dexter_nlb said:
hmm... you could not find a smaller font?
Click to expand...
Click to collapse
its called "the fine print"
thor2002ro said:
updated instructions...
Click to expand...
Click to collapse
what can we do in your modified recovery?

EU bug fix guide!!!!!!!!! actuall fix NOT external sd workaround

ok so first boot into recovery make a nandroid than remove your external sdcard and download the odin flashible semaphore kernel for vibrant from semaphore.gr (be sure its the newest one) now go to download mode and flash that. as soon as its done it will reboot and you want to reboot into recovery. next plug it into your pc while still in recovery mode and run the adb devices command to be sure your devie is connected and recognized now go to adb shell and run these commands hitting enter after each line
parted /dev/block/mmcblk0
print
rm 1
rm 2
and what that does is removes all your partitions so just do rm X for each partition number you have puting a space between rm and whatever number you have. now go back to download mode and flash Eugene_2E_JK2_Froyo.tar heres a link to download http://d-h.st/VGX. and your going to go through the process of everything flashing in oden. besure to flash that as pda. than you will be at stock recovery and you will get the ant mount bla bla bla or if it boots straight to the rom to thats fine. and now go to settings and format internal sdard under storage settings your external sdcard should still be REMOVED now after thats done reboot and you should have a fully working vibrant. this fixed mine. if it doesnt work tell me hope i helped
also works with captivate and facinate too!!
First and foremost, thanks for posting this guide.
I'm gonna' run through this right now. Wish me luck. :fingers-crossed:
if it doesnt work tell me
N00B_IN_N33D said:
First and foremost, thanks for posting this guide.
I'm gonna' run through this right now. Wish me luck. :fingers-crossed:
Click to expand...
Click to collapse
if it doesnt worl tell me
Would it sound messed up if I wanted to EU my phone just to try this lol nice find C looks like a really nice guide
Sent from my Nexus 7 using xda app-developers app
Not 100% working yet sorry people
But im putting alot of work into it.
Sent from my SGH-T959 using xda premium
LOL
So I attempted your guide...and the good news is that i was able to access recovery right after flashing the sephamore kernel .tar in odin. The bad news on the other hand is that I was unable to execute the adb shell commands you've listed in your guide. I got an error stating that "there is no such file or directory". So I skipped the commands and flashed ICS passion v13 and it booted!!! but only to be followed by the dreadful "Encryption Unsuccessful" screen lol.
I took a screenshot of the EU screen by pressing the power button hoping to upload it here for you guys to see...but this is where things got really strange. So I removed the battery, sdcard, and inserted the sdcard into my pc to look for the screenshot and it wasn't there!!!. So this means that the screenshot was saved to the internal memory. I can sense I am getting closer to fixing my old vibrant.
Stay tuned
Like Merio I, too, flashed the Semaphore kernel via ODIN.
But unlike him, I cannot access Recovery.
fham said:
Like Merio I, too, flashed the Semaphore kernel via ODIN.
But unlike him, I cannot access Recovery.
Click to expand...
Click to collapse
Try the following commands in adb.
adb devices
adb remount (might fail but don't worry)
adb reboot recovery
i use devil kernel to access the recovery.....but at 'parted /dev/block/mmcblk0' this step i got the same as merio90
Yeah devil or semaphore. Semaphore is just easer to boot to recovery
Sent from my SGH-T959 using xda premium
Update
Well after 5+ hours of countless rebooting and flashing/modding I have failed to bring my vibrant back to life. However... I was able to go real deep into the device's storage hardware both internal and external(sdcard) and discovered that the internal storage is alive and functioning. In other words it is not hardbricked or physically damaged as a result of the EU bug...it is just corrupted and unable to mount.
Furthermore I attempted several times to create or recreate the partions on the internal sdcard but It just would not allow me to do so. By the way this is all done using the "parted /dev/block/mmcblk0" command(s). Hopefully there is some one who understands how to use this "parted" function in adb as this can be a very useful tool in restoring our devices back to normal.
Here are some helpful details I have learned in the process of all of this...
For those who are having trouble entering the commands in the guide make sure you are entering a space in between "parted" and "/dev/..."
At first I forgot to enter the space and as a result I got an error reading "no such file or directory" so make sure to include the space.
adb shell >>>>>>>>>>> Don't forget to enter this command first...won't work otherwise.
parted /dev/block/mmcblk0 >>>>>>> mmcblk0 is the external sdcard (at least in my case it is) while mmcblk0p1 is the internal sdcard (in my case)
print >>>>>>>> This command list the specifications for the storage device mmcblk0 along with some other useful information.
rm 1 >>>>>>>> This removes partition 1
rm 2 >>>>>>>> This removes partition 2 (if existent)
While still using the "parted" function in adb shell you can simply type "help" and it will give you all the details on how to use this useful tool.
Well I guess that is all I can say for now. Thanks again cannondale...your guide was certainly helpful and allowed me to learn more about this EU bug and how it is "bricking" our devices. This is certainly a step forward in the right direction...I am confident we will have this EU bug squashed pretty soon once and for all.
signing off.
@merio90 i did a lot of research on the EU BUG read my thread.... http://forum.xda-developers.com/showthread.php?t=2176108
manu_ha2001 said:
@merio90 i did a lot of research on the EU BUG read my thread.... http://forum.xda-developers.com/showthread.php?t=2176108
Click to expand...
Click to collapse
Thanks manu...this isn't the first time I've read your thread concerning the EU bug. I simply ignored it at first because it seemed a bit too technical at the time. But now that I've gone through this guide cannondale has provided your thread certainly makes more sense. I'll get back to working on this case soon.
So has anyone besides the OP gotten this to work?
well cannondale has
Merio90 said:
... This is certainly a step forward in the right direction...I am confident we will have this EU bug squashed pretty soon once and for all.
Click to expand...
Click to collapse
@Merio90 ... Just wondering if you made any further progress on the matter. Thanks to cannondaleV2000 for opening these doors and to Merio90 for the detailed posts (esp. concerning syntax). Very interesting thread.
I gave it a go but no nookie for me. In a nutshell, GNU Parted only appears to work on the external sdcard (mmcblk0p1) and not on the internal. Here are my results (after numerous attempts).
RECOVERY ACCESS
My observations flashing Semaphore JB .tar's (after a fresh Odin to Eugene_2E_JK2_Froyo.tar).
* Hangs on Semaphore splash: 2.9.21v, 2.9.15sv, 2.9.12sv.
* Recovery access successful: 2.9.21sv, 2.6.5v, 2.5.0sv
EXTERNAL SD REMOVED:adb shell
# parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
Error: Could not stat device /dev/block/mmcblk0 - No such file or directory.
adb shell
# parted /dev/block/mmcblk0p1
parted /dev/block/mmcblk0p1
Error: Could not stat device /dev/block/mmcblk0p1 - No such file or directory.​EXTERNAL SD INSERTED:adb shell
# parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
Error: Could not stat device /dev/block/mmcblk0 - No such file or directory.
adb shell
# parted /dev/block/mmcblk0p1
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0p1
Welcome to GNU Parted! Type 'help' to view a list of commands.​So ... it's rather curious that cannondaleV2000 actually had access to his mmcblk0 while others weren't so lucky. That's the obvious key to using the parted functionality on the internal sdcard. If only we could break through that road block ... and return to the internal sdcard holy grail!! Any thoughts?
@yosup
No I have not made any progress other than the info I have already posted. My vibrant is no longer my daily driver, my Galaxy Nexus is... so my apologies for not giving this issue a higher priority.
I was only able to "fix" my vibrant to the point where I was able to use the SD card swap method many of us have attempted. In case you were unaware I had to take some extra steps as my vibrant was totally screwed up. It was unable to read either internal or external sdcard so that was an obstacle I had to overcome and that's how cannondale's guide was able to help me. So as of today no progress has been made...I haven't really worked on this problem in quite a while now so any progress has come to a halt for now...until someone comes up with a new guide On another note, the good news is that I have yet to encounter the EU bug on JB 4.2.2 (AOKP M1). So those who are using the sdcard swap method you should try a JB ROM...they seem to not be vulnerable to this EU bug.
Sent from my Galaxy Nexus using xda app-developers app
Try this
http://forum.xda-developers.com/showthread.php?p=44794873
Sent from my GT-I9505 using xda premium

[MOD][SD card switching] Vold.fstab files modified versions for Galaxy series

Attached Modified vold.fstab files for switching Internal SDCard with External SD card
USE only if you know how to overwrite existing File found in /system/etc after making a backup of original file for safe keeping.
Most of all make Nandroid Backup of your ROM before attempting to do anything on your phone
Method:- ( you can use any (root) file manger that has read write permission)
You must copy and paste all files and folders in your SD card to External SD card first before rebooting phone after this switching, for phone to function without force close
1. Download the attachment and extract it and transfer the file "Vold.fstab" to your SD card.
2. Now open root explorer/file manger with root permission. Go to System > etc and copy the original vold.fstab file to a safe location (if there is any problem or you wish to change it back, you can restore it)
3. Now copy the downloaded file vold.fstab, Go to System > etc And delete the original file and paste the duplicate one or simply paste it to overwrite existing file
4. Click on new vold.fstab file and keep it pressed to open the menu and click on permissions and set them to rw_r_r_ ( Owner = read & write - Group = read only and Others = Read only)
5. Save it and close root explorer. power down your phone/tablet and reboot into CWM or Stock recovery and wipe cache before rebooting the phone/tablet.
6. Go to settings >storage to check it
This app will also do the same for you
For i9000 Jelly Bean 4.3, swap SD kernel available here also look below for other methods.​
For i9000 Kit Kat 4.4, swap SD kernel available here ​This post is linked to My Android Solutions and will be updated
You , YES! you are an " Android ". Not your phone but U.
You Must watch this documentary concerning your privacy Terms & Conditions we agree to
How to say Thank you? If you find any post helpful on XDA, please click on the Thanks button
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
If you are using XDA App or Tapatalk, long press on the post and select :good: Thanks Its easier to give "Feedback" in this manner than make an additional post.​
Modifying fstab.aries code on Android 4.3 on i9000
xsenman said:
try switch these two lines (after you have backed up original as .bak file)
/devices/platform/s3c-sdhci.0/mmc_host/mmc0 /storage/sdcard0 auto defaults voldmanaged=sdcard0:1,nonremovable
/devices/platform/s3c-sdhci.2/mmc_host/mmc2 /storage/sdcard1 auto defaults voldmanaged=sdcard1:auto
Highlighted Blue part goes up
Highlighted red part comes down
Click to expand...
Click to collapse
Read this thread
You , YES! you are an " Android ". Not your phone but U.
You Must watch this documentary concerning your privacy Terms & Conditions we had agreed to, by using a PC or Smartphone
How to say Thank you? If you find any post helpful on XDA, please click on the Thanks button
If you are using XDA App or Tapatalk, long press on the post and select :good: Thanks Its easier to give "Feedback" in this manner than make an additional post.​
In Jelly Bean ROM version 4.3, CM 10.2 , switching fstab does not stick after reboot and @srnoth has found a solution to make it workable as quoted below
To locate your mount points easily, just install this app and look in system > mount points to get mount point details
Link http://forum.xda-developers.com/showpost.php?p=45330007&postcount=7
srnoth said:
Ok so I found a different/interim solution using an init.d script. This is specifically for my Galaxy S2 Skyrocket (with broken internal memory), but can be modified for other phones.
Create a script file in your /system/etc/init.d/ directory called something like 11sd_remount:
Code:
sleep 2
mount -t vfat -o umask=0000 /dev/block/vold/179:97 /storage/sdcard0
mount -t vfat -o umask=0000 /dev/block/vold/179:28 /storage/sdcard1
Then chmod 755 the script file. Upon reboot, the internal/external sdcards should be swapped. I've attached an update.zip which sets up the script automatically, and can be used after updating CM.
To get this to work on other devices, you really just need to figure out the mount points for your internal and external sdcards. To do this, type mount in adb shell (from within CM, not recovery), and you'll see a list of mount points. Somewhere towards the end will be the lines for /storage/sdcard0 and /storage/sdcard1, looking something like /dev/block/vold/179:97. Simply modify the script using these points, and you should be good to go. Download attachment http://forum.xda-developers.com/attachment.php?attachmentid=2237695&d=1378415056
Click to expand...
Click to collapse
another method http://forum.xda-developers.com/showpost.php?p=46825100&postcount=4 by @viiron
Since the above solution no longer works with Android 4.3, here is the new procedure you'll need to follow:
1) Pull the build.prop from /system: adb pull /system/build.prop
2) remove line ro.vold.switchablepair=/emmc,/storage/sdcard0 <--- this may or may not be present in your rom.
3) At the bottom of the build.prop paste the following:
# Switch External With Internal
persist.sys.vold.switchexternal=1
# Storage configuration
ro.vold.switchablepair=/storage/sdcard0,/storage/sdcard1
4) push the new build.prop back onto the system (from command prompt - assuming adb is in your PATH)
adb root
adb shell mount -o rw,remount /system
adb push build.prop /system/
adb reboot
You can also pull the build.prop from the Rom* zip file, modify it and place it back before flashing to save a little time and trouble.
Removing the line in #1 has has no ill effects from what I can tell. I've install 250+ apps and haven't had a problem since.
Obviously make a nandroid back before attempting this just in the rare case that something goes wrong.
Click to expand...
Click to collapse
Check this out!You , YES! you are an " Android ". Not your phone but U.
You Must watch this documentary concerning your privacy Terms & Conditions we had agreed to, by using a PC or Smartphone
How to say Thank you? If you find any post helpful on XDA, please click on the Thanks button
If you are using XDA App or Tapatalk, long press on the post and select :good: Thanks Its easier to give "Feedback" in this manner than make an additional post.​
here goes my Vold.fstab
take a look at it please and see what you can do with it
Aries2010 said:
take a look at it please and see what you can do with it
Click to expand...
Click to collapse
your vold fstab for storage is running in a series, most of them are parallel ( meaning having two mount points, yours only has one) , as such is quite different , anyway had switched, you need to test after you have safed the original you had attached and if it fails, just switch it back .
Hope it works, if it does not you may need to try the other method mentioned above.
remember to copy all the file and folders in your SD card to ext SD card for phone to work, when it is successful.
kindly also mention model of your phone and version of ROM for my record.
Check this out!You , YES! you are an " Android ". Not your phone but U.
You Must watch this documentary concerning your privacy Terms & Conditions we had agreed to, by using a PC or Smartphone
How to say Thank you? If you find any post helpful on XDA, please click on the Thanks button
If you are using XDA App or Tapatalk, long press on the post and select :good: Thanks Its easier to give "Feedback" in this manner than make an additional post.​
xsenman said:
your vold fstab for storage is running in a series, most of them are parallel ( meaning having two mount points, yours only has one) , as such is quite different , anyway had switched, you need to test after you have safed the original you had attached and if it fails, just switch it back .
Hope it works, if it does not you may need to try the other method mentioned above.
remember to copy all the file and folders in your SD card to ext SD card for phone to work, when it is successful.
kindly also mention model of your phone and version of ROM for my record.
Check this out!You , YES! you are an " Android ". Not your phone but U.
You Must watch this documentary concerning your privacy Terms & Conditions we had agreed to, by using a PC or Smartphone
How to say Thank you? If you find any post helpful on XDA, please click on the Thanks button
If you are using XDA App or Tapatalk, long press on the post and select :good: Thanks Its easier to give "Feedback" in this manner than make an additional post.​
Click to expand...
Click to collapse
it broke my phone lol everything froze at the home screen but i had a nandroid back up luckily
Aries2010 said:
it broke my phone lol everything froze at the home screen but i had a nandroid back up luckily
Click to expand...
Click to collapse
hmm. will look at it again, but like I said this script is rather different from the earlier versions used on Galaxy and will PM you if I can figure this out . Just do a search on XDA, there are other members who are helping in switching fstab scripts too.
Just one doubt, Did you reboot phone after switching contents of your internal SD card to external SD card or before that?
Check this out!You , YES! you are an " Android ". Not your phone but U.
You Must watch this documentary concerning your privacy Terms & Conditions we had agreed to, by using a PC or Smartphone
How to say Thank you? If you find any post helpful on XDA, please click on the Thanks button
If you are using XDA App or Tapatalk, long press on the post and select :good: Thanks Its easier to give "Feedback" in this manner than make an additional post.​
so, this is my vold.fstab file:
## Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
## Example of a standard sdcard mount for the emulator / Dream
# Mounts the first usable partition of the specified device
dev_mount sdcard /storage/sdcard0 [email protected] /devices/platform/goldfish_mmc.0 /devices/platform/mtk-msdc.0/mmc_host
dev_mount sdcard2 /storage/sdcard1 auto /devices/platform/goldfish_mmc.1 /devices/platform/mtk-msdc.1/mmc_host
## Example of a dual card setup
# dev_mount left_sdcard /mnt/sdcard1 auto /devices/platform/goldfish_mmc.0 /devices/platform/mtk-sd.0/mmc_host/mmc0
# dev_mount right_sdcard /mnt/sdcard2 auto /devices/platform/goldfish_mmc.1 /devices/platform/mtk-sd.2/mmc_host/mmc2
## Example of specifying a specific partition for mounts
# dev_mount sdcard /mnt/sdcard 2 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
can you tell me how to change it so i can swap cards?
is it just changing the following 2 lines, and how exactly:
dev_mount sdcard /storage/sdcard0 [email protected] /devices/platform/goldfish_mmc.0 /devices/platform/mtk-msdc.0/mmc_host
dev_mount sdcard2 /storage/sdcard1 auto /devices/platform/goldfish_mmc.1 /devices/platform/mtk-msdc.1/mmc_host
or changing the above two lines with the dual card setup up lines, and changing them how?
dev_mount left_sdcard /mnt/sdcard1 auto /devices/platform/goldfish_mmc.0 /devices/platform/mtk-sd.0/mmc_host/mmc0
dev_mount right_sdcard /mnt/sdcard2 auto /devices/platform/goldfish_mmc.1 /devices/platform/mtk-sd.2/mmc_host/mmc2
thanks
chinarabbit said:
## Example of a standard sdcard mount for the emulator / Dream
# Mounts the first usable partition of the specified device
dev_mount sdcard /storage/sdcard0 [email protected] /devices/platform/goldfish_mmc.0 /devices/platform/mtk-msdc.0/mmc_host
dev_mount sdcard2 /storage/sdcard1 auto /devices/platform/goldfish_mmc.1 /devices/platform/mtk-msdc.1/mmc_host
Click to expand...
Click to collapse
try swap red with blue, BUT FIRST make NANDROID backup, and follow above guide and ensure you have all the folders and files copied to external SD card from Internal SD card before rebooting
goodluck
Check this out! You , YES! you are an " Android ". Not your phone but U.
You Must watch this documentary concerning your privacy Terms & Conditions we had agreed to, by using a PC or Smartphone
How to say Thank you? If you find any post helpful on XDA, click on their Thanks button
If you are using XDA App or Tapatalk, long press on the post and select :good: Thanks Its easier to give "Feedback" in this manner than make an additional post.​
xsenman said:
try swap red with blue, BUT FIRST make NANDROID backup, and follow above guide and ensure you have all the folders and files copied to external SD card from Internal SD card before rebooting [/CENTER]
Click to expand...
Click to collapse
ok, i'm working on the NAND backup
You know, my sdcard1 has some of the same folders as my sdcard0, including an "Android" folder, etc
I use ES File Explorer and Total Commander, but neither have an option to "Combine", they are replace or nothing
any utility you know of to combine the contents of folders?
otherwise i have to open individual sub-folders, which go down quite deep, and copy every single file, which is a big pain... an XP-style pain
thanks
chinarabbit said:
ok, i'm working on the NAND backup
You know, my sdcard1 has some of the same folders as my sdcard0, including an "Android" folder, etc
I use ES File Explorer and Total Commander, but neither have an option to "Combine", they are replace or nothing
any utility you know of to combine the contents of folders?
otherwise i have to open individual sub-folders, which go down quite deep, and copy every single file, which is a big pain... an XP-style pain
thanks
Click to expand...
Click to collapse
Frankly you should not combine, as phone may get stuck in boot loop, since some of the files you may have in your EXT SD card can cause conflicts. Your should use a fresh EXT SD card or fully formatted EXT SD card with only what is found in the Internal SD card. once the procedure is successful than you can copy anything back into it ( so best empty your EXT SD card to your PC first, format it than copy the contents of Internal SD card after you made CWM backup.
If this procedure fails, you should be able to restore using your Nand backup ( SO use your CWM recovery to make a Nandroid backup first before the switch and save it to PC) , and you may have to try different methods of mounting.
Check this out! You , YES! you are an " Android ". Not your phone but U.
You Must watch this documentary concerning your privacy Terms & Conditions we had agreed to, by using a PC or Smartphone
How to say Thank you? If you find any post helpful on XDA, click on their Thanks button
If you are using XDA App or Tapatalk, long press on the post and select :good: Thanks Its easier to give "Feedback" in this manner than make an additional post.​
xsenman said:
Frankly you should not combine, as phone may get stuck in boot loop
Click to expand...
Click to collapse
ok, thanks, i'll try that..
also.. I've been reading that this is not a permanent solution? like it doesnt hold until reboot, is that right?
something to do with "init.d".. can you tell me what I need to do to init.d to make it permanent?
thanks again
chinarabbit said:
ok, thanks, i'll try that..
also.. I've been reading that this is not a permanent solution? like it doesnt hold until reboot, is that right?
something to do with "init.d".. can you tell me what I need to do to init.d to make it permanent?
thanks again
Click to expand...
Click to collapse
If it works, (I say this because, different builds work differently) it will be permanent, but if does not than you can try the init,d method like this
Check this out! You , YES! you are an " Android ". Not your phone but U.
You Must watch this documentary concerning your privacy Terms & Conditions we had agreed to, by using a PC or Smartphone
How to say Thank you? If you find any post helpful on XDA, click on their Thanks button
If you are using XDA App or Tapatalk, long press on the post and select :good: Thanks Its easier to give "Feedback" in this manner than make an additional post.​
ok, removed & reformatted my SD, did a clean copy from sdcard0 to sdcard1, have my vold.fstab ready to go.., and have my backup of the original
but I cant delete the original file in system/etc
I am root user, My ES File Explorer is set to Root Mode..I cant change the Files permissions, it says "sorry, operation failed"
and when I copy over to overwrite it says "Access Denied"
I cant delete it either, it says "read-only system file"
any other options?
i also tried something called "root Explorer", but that had even less options, and I couldnt do it with Total Commander either
btw, any particular reason "goldfish_mmc.1" isnt changed with goldfish_mmc.0 ??
thanks
chinarabbit said:
I cant delete it either, it says "read-only system file"
any other options?
i also tried something called "root Explorer", but that had even less options, and I couldnt do it with Total Commander either
btw, any particular reason "goldfish_mmc.1" isnt changed with goldfish_mmc.0 ??
thanks
Click to expand...
Click to collapse
Basically, you must be rooted and have busybox installed on your phone to get read write permission for ES or Root explorer to work. SO get your phone rooted first and install Busy BOX from app store and permission must be granted by SU or Superuser to the ES or Root Explorer for it to be able to read write a system file.
Yes I left the gold fish part out, and wanted to add in that IF it failed, fundamentally, the Vold Fstab on your system, says its an "example", so I have my doubts concerning it, IF its actually the mount points for your phone or its in another location. Its good you have noted it, jut add in that switch, if the first suggested one fails :fingers-crossed:
Check this out! You , YES! you are an " Android ". Not your phone but U.
You Must watch this documentary concerning your privacy Terms & Conditions we had agreed to, by using a PC or Smartphone
How to say Thank you? If you find any post helpful on XDA, click on their Thanks button
If you are using XDA App or Tapatalk, long press on the post and select :good: Thanks Its easier to give "Feedback" in this manner than make an additional post.​
well, i mounted the system drive as Read/write in es file explorer, by disabling & re-enabling Root mode.. then i could delete it
Then I used Quickboot to reboot into Recovery Mode
then I hit up to enter the recovery console, then I hit the down arrow and selected "Wipe Cache" and hit the Power button for Enter, and it completed that, then I selected Reboot, and rebooted
and now my SD card is not read at all..
it seems everything is the same, except no SD card.. I still have the same sd0card as before, but sdcard1 has disappeared..
any ideas?
thanks
chinarabbit said:
it seems everything is the same, except no SD card.. I still have the same sd0card as before, but sdcard1 has disappeared.. any ideas? thanks
Click to expand...
Click to collapse
I hope you had done this
4. Click on new vold.fstab file and keep it pressed to open the menu and click on permissions and set them to rw_r_r_ ( Owner = read & write - Group = read only and Others = Read only)
5. Save it and close root explorer. power down your phone/tablet and reboot into CWM or Stock recovery and wipe cache before rebooting the phone/tablet.
you can try including the the goldfish part (switch) and try again, if that fails than its the init.d method that you need to try, so long as you have the backup, you can be restored back to your old system, IF nothing works.
For locating the mount points you can download Android System info app from play store, that will give you the mount points for init.d switch.
Check this out! You , YES! you are an " Android ". Not your phone but U.
You Must watch this documentary concerning your privacy Terms & Conditions we had agreed to, by using a PC or Smartphone
How to say Thank you? If you find any post helpful on XDA, click on their Thanks button
If you are using XDA App or Tapatalk, long press on the post and select :good: Thanks Its easier to give "Feedback" in this manner than make an additional post.​
ok, sorry, yes I did set it to rw_r_r, saved, exited, rebooted to recovery, wiped cache, and then booted into the OS
I just tried it with goldfish also, and it gave me the same result
I also tried External 2 Internal, selected my mounting points from Android Sys Info, set my external to /dev/block/vold/179:97 vfat
I'm wondering if this has anything to do with my SD card formatted to FAT32.. and not vFAT
i'll look at init.d .. i dont see the mount point for init.d, i guess they show up after I create the file. i'll look at that tutorial next
Can someone please Edit this vold.rar for me? Its for Galaxy Mega 6.3 I9205... Please!
geniusrehan said:
Can someone please Edit this vold.rar for me? Its for Galaxy Mega 6.3 I9205... Please!
Click to expand...
Click to collapse
try attached, but make sure read and follow first post, make nandroid backup, as no guarantees it will work, but do inform result.

[MOD][SCRIPT] Get More Storage by Relocating Dalvik Cache!

DISCLAIMER: YOU AGREE TO TAKE FULL RESPONSIBILITY FOR YOUR DEVICE IF YOU PROCEED.
The original thread (http://forum.xda-developers.com/moto-g/general/mod-save-data-space-cache-partition-t2942765) was getting to cluttered up with development and testing so I decided to start a new thread with the "finished" product. The original thread will be renamed to Q&A/Development. We might even ask for the old thread to be closed down. (up to @Bert98, the thread's creator.)
Moto G's internal eMMC card has a ~600Mb partition called /cache, which is not used since the apps' cache is stored in /data, so the latter fills up and the first one stays empty.
Owning a 8Gb model, having 600Mb not available for storage really bugged me, because my phone's memory (/data partition) was always full because it's a 5.7Gb space shared between apps and microSD files.
Now, it may not work for you if:
a) you have A LOT of apps installed.
And by "a lot", I mean more than 90-100 apps, but if you have a 8Gb model, you probably don't
b) you're running ART (this is default in lollipop and newer)
Since ART uses a lot more space than dalvik, the space in the /cache partition probably won't be enough. When I was running ART, it used 1Gb more than dalvik.
Original post by @Bert98
Click to expand...
Click to collapse
This was tested on my moto g 16GB which is running RetailUS_4.4.4 kitkat with CWM recovery. The custom ROM procedure was tested on the same phone but with cm11 Nightly installed.
Prerequisites:
1. You must have "adb root" functioning. If you don't head to this thread: http://forum.xda-developers.com/showthread.php?t=1687590 and there is a free download link at the bottom of the post.
Download and install the apk on your phone. Open up adbd insecure (the new app) and grant it superuser rights PERMANENTLY. Check the box that says "enable insecure binary" and make sure to check the box
that says "enable at boot."
2. You must have a recovery that can accept adb shell commands.
3. Root Access Duh?!
4. A windows machine capable of running batch files.
5. A decent text editor, notepad will work but notepad++ is strongly recommended. (Only needed if you are using STOCK ROM procedure)
Please, please make a nandroid backup before you continue!!!!
Stock ROM procedure:
Read the directions very carefully and then read them again, before continuing.
1. Download the cachemover_v1.3.zip from: LINK REMOVED DUE TO SCRIPT ISSUES.
2. Extract the contents.
3. Connect device to PC and navigate to the extracted folder.
4. Double click/Run the cachemover_Stock.bat
5. Follow the onscreen instructions until you get to the part where it says to edit a file.
6. About halfway through the script it will pull a file called "init.qcom.post_boot.sh" to the folder.
7. Open it with a TEXT editor and navigate to about line 487 (Might be different for 8gb model). Look here for a better understanding: https://www.dropbox.com/s/jr5lyl5s5i2jtpg/where to paste code.PNG?dl=0
8. Start a new line and paste this code in the file: (Refer to the image above for help)
Code:
chmod 655 /cache
chmod 655 /cache/dalvik-cache
chmod 655 /cache/dalvik-cache/*
9. Make sure to save the file in the same folder as the cachemover_Stock.bat
10. Press any key to continue on the script and let it do its thing.
11. It will reboot several times and land you on the home screen/lock screen.
12. If the script hangs after a reboot, you need to unlock the device to reestablish a connection with your computer.
13. There might be one or two force closes but once you close the notifications they will not come back.
Custom ROM procedure:
USE THIS FOR ROMS THAT DO NOT REMOUNT OR CHANGE PERMISSIONS OF /CACHE ON BOOT
1. Download the cachemover_v1.3.zip from: https://www.dropbox.com/s/bzj34g4q1s61ojz/cachemover_v1.3.zip?dl=0
2. Extract the contents.
3. Connect device to PC and navigate to the extracted folder.
4. Double click/Run the cachemover.bat
5. Follow the onscreen instructions.
If anything goes wrong:
Go to recovery, wipe cache, then wipe dalvik-cache and reboot. This should get your device back to how it was.
(If you used STOCK ROM procedure)
The script made a backup of the "init.qcom.post_boot.sh" file to /sdcard/init_backup
You can restore the shell script to /system/etc/ via shell commands or by using a root browser. To restore permissions:
Code:
chmod 740 /system/etc/init.qcom.post_boot.sh
chown root:root /system/etc/init.qcom.post_boot.sh
Custom ROM procedure already has a restore script!
I am currently working on an auto restore script for stock and that will be relased soon, hopefully! :good:
Changelog:
v1.0 - First stable release. Does not work on STOCK ROM.
v1.1 - Added a restore script.
v1.3 - Added support for STOCK ROM. There are still a few bugs.
How it works?!?!
Coming soon...
Huge thanks to @Bert98 and @dd043
Hit the thanks button if it worked! I went through about 50 factory resets, and reflashed the ROM about 25 times, and put about 10 hours of work into this script! Really motivates me for future projects. :laugh:
Thanks for your help man and effort.
I encountered a problem, everything works up until my device boots in CWM to fix permissions, then just sits there doing not alot I don't even see the option in my CWM.
Any ideas? cheers
Sent from my XT1032 using XDA Free mobile app
When it reboots to cwm unplug the cable and replug it, if it hangs just type these commands manually from a command window.
chmod 655 /cache
chmod 655 /cache/dalvik-cache
chmod 655 /cache/dalvik-cache/*
reboot
If this does not work you may ned to go into mounts & storage in the cwm menu and click mount /cache. Then try the commands again.
I'm having some issues on stock.
I thought 0655 fixed everything but no, I can't install any app after moving the dalvik-cache to /cache. I tried chmoding 0777 on the new cache folder, on /cache itself, to no avail.
Code:
E/dexopt cannot open '/data/dalvik-cache/[email protected]' for output
Anyone can confirm it's not only my device? And/or can help find a fix?
Also does someone knows how to execute commands on a particular init step? Real init.rc scripts can do:
Code:
on post-fs-data
mount -o bind /cache/dalvik /data/dalvik-cache
It there was a way to achieve the same from post_boot/init.d we could mount -o bind /cache/dalvik /data/dalvik-cache and all permissions issues would disappear as well as the need for symlink.
You have a typo in the threads title. Just a heads up.
Vuciz said:
You have a typo in the threads title. Just a heads up.
Click to expand...
Click to collapse
Thanks for letting me know!
dd043 said:
I'm having some issues on stock.
I thought 0655 fixed everything but no, I can't install any app after moving the dalvik-cache to /cache. I tried chmoding 0777 on the new cache folder, on /cache itself, to no avail.
Code:
E/dexopt cannot open '/data/dalvik-cache/[email protected]' for output
Anyone can confirm it's not only my device? And/or can help find a fix?
Also does someone knows how to execute commands on a particular init step? Real init.rc scripts can do:
Code:
on post-fs-data
mount -o bind /cache/dalvik /data/dalvik-cache
It there was a way to achieve the same from post_boot/init.d we could mount -o bind /cache/dalvik /data/dalvik-cache and all permissions issues would disappear as well as the need for symlink.
Click to expand...
Click to collapse
Let me try and do that right now... Ill get back to you if it does!
My script works on stock btw... But the mount way seems a bit easier and might cause less errors than my way.
Try it please.
skyguy126 said:
Let me try and do that right now... Ill get back to you if it does!
My script works on stock btw... But the mount way seems a bit easier and might cause less errors than my way.
Try it please.
Click to expand...
Click to collapse
Yes I've tried your script, all went well but the result is the same. The script itself works nicely btw
Applications present before moving cache work perfectly, but I can't install anything new. I suspect it might be my device but before wiping everything I'd prefer feedback from others :fingers-crossed:.
I cannot install new apps as well. The mount command you showed me has the same effect too. I honestly don't know anymore, the sym link did not allow the install of new apps nor did the mount command you sent me. Correct me if I am wrong.
Edit: Going through all the init files on my phone to see which one remounts /cache at boot.
Why does the init.rc get overwritten at boot. Is it because the kernel (boot.img) is the one that copies it over? I have found by changing the perms/locations in this file and init.target.rc you can achieve what this mod is trying to acomplish.
I don't see the mount cache command in CWM strange
I've managed to get back to normal, thanks for everyone's help though, I will keep and eye on the thread
Sent from my XT1032 using XDA Free mobile app
non-windows version?
Thanks for this tool. It's a great idea and our Motos really need it.
However, I have a problem - I do not own a windows license (os x and ubuntu user) and I would prefer not to spend $120 just to use it for this script. Pirating is out of the question for me.
I was wondering if there is any chance of having this script written for linux and/or mac. If impossible, is there a LEGAL way of running windows in a virtual machine? Something like a trial or similar?
If you know how just convert it to shell script for osx and Linux. I give you permission to do this but you may not take credit or rehost your creation.
Ok so I have the kernel extracted and we could modify and flash that, but I believe that it's not really necessary. There are a lot of risks to flashing kernels and I am not willing to take it. So is there a way we can modify dalvik so it creates it's cache in /cache instead.
skyguy126 said:
Why does the init.rc get overwritten at boot. Is it because the kernel (boot.img) is the one that copies it over? I have found by changing the perms/locations in this file and init.target.rc you can achieve what this mod is trying to acomplish.
Click to expand...
Click to collapse
Yes the init.rc is in the boot ramdisk. I don't think it would be worth the trouble to rebuild a boot.img. The moto g is fairly unbrickable but it's quite a lot of work to setup an environment to rebuild an image :/.
Too bad for the mount command, I was sure it was working but maybe I had changed something else and don't quite remember the steps to reproduce
We could possibly implement a shell script toggler for when we need to install new apps, but I'm afraid it'd become annoying fairly quickly: I noticed the issue initially because google play services decided to update itself, failed, and broke all google apps. As far as I know this autoupate can't be disabled.
Thanks for trying!
dd043 said:
Yes the init.rc is in the boot ramdisk. I don't think it would be worth the trouble to rebuild a boot.img. The moto g is fairly unbrickable but it's quite a lot of work to setup an environment to rebuild an image :/.
Too bad for the mount command, I was sure it was working but maybe I had changed something else and don't quite remember the steps to reproduce
We could possibly implement a shell script toggler for when we need to install new apps, but I'm afraid it'd become annoying fairly quickly: I noticed the issue initially because google play services decided to update itself, failed, and broke all google apps. As far as I know this autoupate can't be disabled.
Thanks for trying!
Click to expand...
Click to collapse
How about making a simple apk that toggles this feature. Something like when you click the icon it doesn't even open but gives a little notification of success. Something like that. I myself am not experienced with apks but I can put together a shell script for the apk.
skyguy126 said:
Ok so I have the kernel extracted and we could modify and flash that, but I believe that it's not really necessary. There are a lot of risks to flashing kernels and I am not willing to take it. So is there a way we can modify dalvik so it creates it's cache in /cache instead.
Click to expand...
Click to collapse
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
dd043 said:
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
Click to expand...
Click to collapse
Ill try it. I don't mind doing a bunch of resets because I am using my moto g as a test bench anyway. My daily driver is the OnePlus One
dd043 said:
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
Click to expand...
Click to collapse
EDIT: Unfortunately it didn't work. I don't know if I modified the installd file correctly. The program I used is HxD.
Is there a way we can force dalvik to start after the directories are created. And change dalvik to create it in /cache.

Categories

Resources