Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
orlox
Old
(Last edited by orlox; 24th February 2012 at 11:59 PM.)
#1  
Senior Member - OP
Thanks Meter 30
Posts: 302
Join Date: Feb 2011
Lightbulb A2SD, partitioning and Nand Switching (internal to external) for Optimus 3D

Please someone more experienced than me check the prosedure!!! Till I remove this line go with extreme caution
I have an enormous amount of applications inherited from the partition-able optimus 2x. I got optimus 3D as an upgrade but I couldn’t intall not even half of them. So I was trying to find ways to repartition /data as I had done with optimus 2x but with no success.
Then I got an idea... why not A2SD style? So it begins

Disclaimer: Have in mind that I’ve done nasty stuff which could brick the phone badly. I take no responsibility for breaking your phone even if you follow my guide perfectly. I am no developer and I can make mistakes so please don’t continue if you don’t understand what I am telling you to do. Also be careful since I dont know how future lg updates will react

My composition is: Thiaiz Rom V0.1, clockworkmod touch, rooted ofc and I have installed most drivers found on this forum for o3d.

Before you begin get a backup of your internal memory, sd card, titanium backup and nand backup to a pc. You WILL loose internal memory data. The rest just to be safe....

Drawbacks: Your internal memory will be around 2-3gbs smaller and wont be able to be mounted to the pc. You could brick your phone.
While all these can be done with a cwm zip script I did it manually. Also since my phone works fine know and my time is short I dont really want to go to the reformating coping restoring backups again. This means that while I write this guide I dont actually run these command only checking them if they are correct.

Lets start.
First shutdown your phone. Open it to recovery by pressing down button and power for 7-8 seconds. Release when you see LG logo. While in recovery connect your device with the pc with a usb cable. Open command prompt on your windows pc and do a
adb shell
Now you are probably ready to send commands. If not use a guide like this http://www.addictivetips.com/mobile/what-is-adb-and-how-to-install-it-android/

at the shell do a
Code:
# cd /dev/block
#ls
you will see all your partitions. mmcblk0 is the internal memory and mmcblk1 is the sd card.
Code:
# parted mmcblk0
(parted) print
now you see the partitions
You should see something like this
Code:
Number  Start   End     Size    File system  Name      Flags
 1      131kB   262kB   131kB                x-loader
 2      262kB   393kB   131kB                nv1
 3      393kB   524kB   131kB                nv2
 4      524kB   1049kB  524kB                u-boot
 5      1049kB  11.5MB  10.5MB               kernel
 6      11.5MB  22.0MB  10.5MB               recovery
 7      22.0MB  651MB   629MB   ext3         system
 8      651MB   1725MB  1074MB  ext3         userdata
 9      1725MB  1859MB  134MB                fsswap
10      1859MB  1926MB  67.1MB  ext3         cache
11      1926MB  1928MB  2097kB  ext3         lgdrm
12      1928MB  1929MB  1049kB               divxkey
13      1929MB  1950MB  21.0MB               fota
14      1950MB  1955MB  4194kB  ext3         misc
15      1955MB  7944MB  5989MB  fat32                  msftres
we are going to work on partition 15 starting by deleting it. Be very carefull here what you delete
Code:
(parted) rm 15
now we want to create 2 more partitions. The 1955-4944 and 4944-7944 will give you around 3gb for apps and 3gb for internal memory. Tweak it at your needs but always follow the numbers. I meant if your print gave you this output
Code:
15      1955MB  7945MB  2989MB  fat32
use 7945 and not 7944
Code:
(parted) mkpartfs primary fat32 1955 4944
(parted) mkpartfs primary ext2 4944 7944
now the command print should give you two more partitions
Code:
15      1955MB  4944MB  2989MB  fat32                  msftres
16      4944MB  7944MB  3000MB  ext2
quit parted to update the ext2 to ext3
Code:
(parted) quit
#mke2fs /dev/block/mmcblk0p16
#tune2fs -j /dev/block/mmcblk0p16
Now our phone is ready for A2SD. Reboot the phone.
After finish rebooting continue via adb or terminal (I used terminal because I was in a 3 hours trip with bus :P) and es file explorer with root and rw options on

we need to tweak /etc/vold.fstab to change the mount points. You can change it with es file explorer
My file is:
Code:
dev_mount sdcard /mnt/sdcard auto /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
dev_mount extsdcard /mnt/sdcard/_ExternalSD 15 /devices/platform/mmci-omap-hs.1/mmc_host/mmc0
then we need to create the mount point for our new partition. I did it at /mnt/a2sd but you can do it anyware including the standard /system/sd
Code:
#mkdir /mnt/a2sd
#mkdir /mnt/emmc
now we need to mout our new partition everytime the system starts. I opened /etc/init.d/thiaizSDbooster and added few lines
Code:
mkdir /mnt/a2sd
mount -w /dev/block/mmcblk0p16 /mnt/a2sd
mkdir /mnt/emmc
mount -w /dev/block/mmcblk0p15 /mnt/emmc
ln -s /mnt/a2sd/data/app /data/app
ln -s /mnt/a2sd/data/data /data/data
dont forget to make the correct permitions again after the edit

now you need to mount the new partition to your mount point
Code:
#mount -w /dev/block/mmcblk0p16 /mnt/a2sd
and copy the data files you will link there
Code:
#cp -a /data /mnt/a2sd
now careful youll delete the /data/app and /data/data from /data
Code:
#rm -r /data/app
#rm -r /data/data
and create the links
Code:
#ln -s /mnt/a2sd/data/app /data/app
#ln -s /mnt/a2sd/data/data /data/data
Reboot the phone and you are ready to go!
To mount the sd card to the pc you will need an app from market https://market.android.com/details?i...rd.widget.free
Look atached images for what you get
Attached Thumbnails
Click image for larger version

Name:	2012-02-22 10.40.54.jpg
Views:	284
Size:	32.3 KB
ID:	914136   Click image for larger version

Name:	2012-02-22 10.42.30.jpg
Views:	239
Size:	18.5 KB
ID:	914137   Click image for larger version

Name:	2012-02-22 10.39.21.jpg
Views:	219
Size:	23.2 KB
ID:	914138  
The Following 4 Users Say Thank You to orlox For This Useful Post: [ Click to Expand ]
 
jimakos29
Old
#2  
Senior Member
Thanks Meter 115
Posts: 412
Join Date: Oct 2010
Location: Kilkis
want to give it a try but I need to know if there is a way to revert back if anything goes wrong. Will a restore of a previous backup return things to normal?or flashing a kdz? thanx anyway.any try to improve our phones is worth praize...
Hit the thanks button if I helped you...
 
mtvtitan
Old
(Last edited by mtvtitan; 22nd February 2012 at 08:39 PM.)
#3  
mtvtitan's Avatar
Member
Thanks Meter 13
Posts: 81
Join Date: Aug 2011
Location: Lucena

 
DONATE TO ME
Quote:
Originally Posted by jimakos29 View Post
want to give it a try but I need to know if there is a way to revert back if anything goes wrong. Will a restore of a previous backup return things to normal?or flashing a kdz? thanx anyway.any try to improve our phones is worth praize...
Make a nand back-up in another sd card, if you re lucky and can still boot upto recovery then you can restore or you can boot to download mode. Last resort will be to flash a bin or kdz file then restore your nand back up.

I bricked my phone 5 times in one month 2 times in 1 day. I still figured how to restore, just relax and think before you do crazy stuff, all the answers are in XDA.

---------- Post added at 04:44 AM ---------- Previous post was at 03:49 AM ----------

@orlox tested it and gives me phone memory damage, forgot to pull the logs and do some ss, well anyways I won't be doing this one, I was setting up for the s2e and link2sd stuff -- that one is not that risky.

You can say thanks or just press the thanks button!!!
My phones
 
SONY XPERIA PLAY --> DEAD
SGY GT-S5360 --> SOLD
LGE P920
HTC One X--> DEAD
SONY XPERIA ION

I'm using v6-supercharger -->link
coffee fund
BEST BATTERY MONITOR -->BetterBatteryStats
 
orlox
Old
#4  
Senior Member - OP
Thanks Meter 30
Posts: 302
Join Date: Feb 2011
Quote:
Originally Posted by mtvtitan View Post
tested it and gives me phone memory damage, forgot to pull the logs and do some ss, well anyways I won't be doing this one, I was setting up for the s2e and link2sd stuff -- that one is not that risky.
The "damage part" is because you probably didnt change the vold file. Its not something to worry. After you tell vold what partition to mount (15) it will be ok
 
mtvtitan
Old
#5  
mtvtitan's Avatar
Member
Thanks Meter 13
Posts: 81
Join Date: Aug 2011
Location: Lucena

 
DONATE TO ME
Quote:
Originally Posted by orlox View Post
The "damage part" is because you probably didnt change the vold file. Its not something to worry. After you tell vold what partition to mount (15) it will be ok
I figured that one...

You can say thanks or just press the thanks button!!!
My phones
 
SONY XPERIA PLAY --> DEAD
SGY GT-S5360 --> SOLD
LGE P920
HTC One X--> DEAD
SONY XPERIA ION

I'm using v6-supercharger -->link
coffee fund
BEST BATTERY MONITOR -->BetterBatteryStats
 
orlox
Old
#6  
Senior Member - OP
Thanks Meter 30
Posts: 302
Join Date: Feb 2011
have you finished the guide? all ok?
 
mtvtitan
Old
#7  
mtvtitan's Avatar
Member
Thanks Meter 13
Posts: 81
Join Date: Aug 2011
Location: Lucena

 
DONATE TO ME
Quote:
Originally Posted by orlox View Post
have you finished the guide? all ok?
not yet, got other stuff in hand... i'll try to report tom* its already 2am here and have work at 4am -- cooked.

You can say thanks or just press the thanks button!!!
My phones
 
SONY XPERIA PLAY --> DEAD
SGY GT-S5360 --> SOLD
LGE P920
HTC One X--> DEAD
SONY XPERIA ION

I'm using v6-supercharger -->link
coffee fund
BEST BATTERY MONITOR -->BetterBatteryStats
 
mtvtitan
Old
#8  
mtvtitan's Avatar
Member
Thanks Meter 13
Posts: 81
Join Date: Aug 2011
Location: Lucena

 
DONATE TO ME
I made a mistake somewhere and am stuck. Can't sleep now, I'll have to figure this thing thorough.

---------- Post added at 07:20 AM ---------- Previous post was at 07:12 AM ----------

btw you can try this --> install link2sd let it install the script needed to mount 2nd sd part, then edit it (init.d folder)

--> add this before mounting sdext2
sleep 2

mkdir /sd-ext

sleep 2

--> then after mounting sdext2 insert this
sleep 2

mount -o bind /data/sdext2 /sd-ext

-----------------------------------------
install s2e

move dl cache (dont move any apps, let link2sd do that)

reboot.
----------------------------------------------
works with thiaz boot image only

the risk is low and would not probably brick your phone but try it at your own risk (disclaimer) --> this is generic, do your mods.

any problems will discuss after I unbrick my phone lol.

You can say thanks or just press the thanks button!!!
My phones
 
SONY XPERIA PLAY --> DEAD
SGY GT-S5360 --> SOLD
LGE P920
HTC One X--> DEAD
SONY XPERIA ION

I'm using v6-supercharger -->link
coffee fund
BEST BATTERY MONITOR -->BetterBatteryStats
The Following User Says Thank You to mtvtitan For This Useful Post: [ Click to Expand ]
 
orlox
Old
(Last edited by orlox; 23rd February 2012 at 07:59 AM.)
#9  
Senior Member - OP
Thanks Meter 30
Posts: 302
Join Date: Feb 2011
Generic scripts are not working well. I was trying with dark tremors first. I think manual is safer. Also Someone may want to partition sd instead of nand. Its safer but I think its a waste of space.
The good thing is that parted works so we don't need a tool like nvflash. Also /data had a limit at 2GB I think. With a2sd there is no limit.

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Recognized Contributor Code of Conduct

During the first half of 2012, XDA initiated the Recognized Contributor (RC) program to recognize … more

Careers in Android: What Hiring Managers Won’t Tell You – XDA Developer TV

XDA Developer TV Producer Jayce released a video a … more

Coloring Your Logcat World

Getting feedback for your app during development is as simple as adding logging info where necessary and looking … more

Guide Your Sheep to Safety with Finger Shepherd

Just a coupe of days ago, we brought you news about a game calledAgent Sheep. In that … more