avatar
Welcome guest, please
Did you miss your activation email?

Ingresar con nombre de usuario, contraseña y sesión.

Author Topic: Hacking the LGL38C - More app install space - How to  

Topic Modified: 27/02/14 (05:47) pm
Update: See below for my 10 step, 10 minute guide on getting 1gb usuable app space.   :o


 I'm new to android, only having a phone for 3 days now... so be gentle (Quite frankly, I'm very impressed that I haven't bricked it yet :)

As you're probably aware if you're reading this forum, this phone has a miniscule area for installing apps - less than 100mb free on a stock phone. So, I've rooted, CWM'd, and have a clockwork backup, and I'm familiar enough now with adb that I can shell and push/pull files.  I'm a little rusty with Linux... but I can get around and compile OK.  Anyway, from what I can tell, this phone has a 2gb nand chip which is split into many partitions:

cat /proc/partitions:
 179        0    1908736 mmcblk0    <-- 1 nand chip - 2gb?
<snipped>
 179       14     389120 mmcblk0p14   <-- system is mounted from here
<snipped>
179       20    1048576 mmcblk0p20  <-- pegged for "internal storage" - (pictues, music - NOT apps)
179       21     163840 mmcblk0p21  <-- data partition mounted from here, for app installs
179       32    3872256 mmcblk1       <-- external SD card

Most of the filesytems are mounted as ext4... but the 'internal storage' p20 partition is vfat, presumably so that windows can transfer files to it nicely over USB.

Assuming I didn't want an 'internal storage' section (and I've already managed to have it unmounted and still boot and use the phone), couldn't I just repartition p20 and p21 to be 1.2g, ext4, and mount it to /data ? Is it that simple, or is there something obvious I'm missing?

I'm fighting right now with trying to mount the nandroid boot.img file. Any tips?
Unfortunately, I seemed to have picked Ubuntu for my last forage into Linuxland, with no native yaffs2 support. (why does it always feel like I'm going down the rabbit hole with I need to mess with linux. sigh).



12/30 update:
And down the rabbit hole we went... 10 hours later of playing around with boot.img (I actually did get my flashes to work after a lot of pain) and the system vold.fstab table, and init.rc and I finally got fed up and took the shortcut. Here you go:

Make sure your 'internal memory' partition is pretty clean. We're going to shrink it from 1gb to around 160mb. Anything in bold, is something you type.

1) Root the phone and install CWM from the one click update in these forums

2)  Did you complete step #1? DON'T go any further until you do. Clockwork mod is not optional! Use clockwork mod to make a full backup of your phone. You can store it on the 4gb chip that comes with the phone. The backup is fairly small.

3) adb reboot recovery

4) after the reboot...
adb shell
cat /proc/partitions
The last 4 lines for mmcblk0 must look like this. If they do not, then DON'T continue if you're blindly following steps.
For example, if you don't have a p23, or have a p24 0 - don't continue.
 179       20    1048576 mmcblk0p20
 179       21     163840 mmcblk0p21
 179       22      16384 mmcblk0p22
 179       23       4096 mmcblk0p23

#delete the last 4 partitions on the internal memory nand chip
5) fdisk /dev/block/mmcblk0
print all
d (after pressing return, it will ask for a number)
 20
d
 20
d
 20
d
 20
w

6) adb reboot recovery

#create new partitions with the space layout we want
7) after the reboot...
adb shell
print all  - you should only see 19 partitions returned! If you still see 23, you didn't complete step #5 correctly, or possibly your phone isn't rooted.
fdisk /dev/block/mmcblk0
n (after pressing return, it will ask for a number. Press return after the 1st number and it will ask for a 2nd number)
84482
 105731
n
105733
236030
n
236032
238079
n
238081
238592
w

#not even sure if this is necessary...
adb shell
mke2fs -t ext4 /dev/block/mmcblk0p21
mke2fs -t ext4 /dev/block/mmcblk0p22
mke2fs -t fat32 /dev/block/mmcblk0p20

9) adb reboot recovery

10) full nandroid restore. Reboot, and you're done. 1gb of usuable space for app storage. "internal memory" for pictures, etc is around 160mb.

Offline rjgee

  • Posts: 5
  • User Rating: +13/-0
Information topic
  • Date: 29/12/13
  • Time: 07:30 pm
  • Number of visits: 14752
  • Number of Replies: 104
  • Topic Approved: Yes
  • Topic Sticky: Yes
  • Topic Locked: No
  • Poll: No
  • Modified by: rjgee

Re: Hacking the LGL38C - More app install space - How to

« Reply #1 » Published on:January 04, 2014, 12:57:33 pm

Offline whodisname

  • Thank You
  • Given: 0    Received: 3
  • Posts: 40
  • User Rating: +4/-0
  • i like to assist when i can
  • Jr. Member
  • *
i must be a noob, im lost here, i use adb ery often but im a lil slow
  • AK51 Centura OC
  • LG-L38C
  • Clock Work Mod
  • AreaRom v1.0b
  • Rooted-Rom
Shane everydevice i get my hands on gets different

Re: Hacking the LGL38C - More app install space - How to

« Reply #2 » Published on:January 05, 2014, 11:36:58 am

Offline rjgee

  • Thank You
  • Given: 0    Received: 5
  • Posts: 5
  • User Rating: +13/-0
  • Jr. Member
  • *
It's really pretty simple. You're using ADB to shell into the phone. It then uses the fdisk command to delete, and then recreate the last 4 memory partitions -  basically swapping the 'internal memory' partition with the 'system memory' partition.

After the hack, you'll have around 1gb for app installs, and ~160mb for internal memory. (browsers like to cache here... a few other things).

What part is confusing, I will try and elaborate on it?

  • Stock
  • lgl38c
  • Clock Work Mod
  • No Rom
  • Stock-Rooted
Destruction in progress, please wait...

Follow members gave a thank to your post:


Re: Hacking the LGL38C - More app install space - How to

« Reply #3 » Published on:January 05, 2014, 12:24:28 pm

Offline SLeePYG72786

  • Thank You
  • Given: 0    Received: 18
  • Posts: 108
  • User Rating: +20/-0
  • Sr. Member
  • *
If you could put all of your commands in bold that would be awesome. I've only used adb a couple of times, and am not fully familiar with the syntax. Thanks for this post.
  • AK51-Stock
  • LG Optimus Dynamic (L38C)
  • AreaRom CWM v5
  • AreaRom v1.0b
  • Rooted-Rom
LG Optimus Dynamic (L38C)

** Mods **
Forced GPU Rendering via egl.cfg
Xposed Framework (GB-backport) w/ MasterKeyFixGB & SPDY
PurePerformances X Golden Edition (XDA, by Jeeko)
PureGraphics HD + Rendering Version (XDA, by Jeeko)
PureAudio Engine | 1.0 Studio Quality (XDA, by Jeeko)

Re: Hacking the LGL38C - More app install space - How to

« Reply #4 » Published on:January 05, 2014, 10:48:15 pm

Offline SLeePYG72786

  • Thank You
  • Given: 0    Received: 18
  • Posts: 108
  • User Rating: +20/-0
  • Sr. Member
  • *
Welp, I've done it. There were a few things I noticed along the way that weren't in the guide, and I'd like to point those out here:

Step 4:
There is in fact an extra line after "179       23       4096 mmcblk0p23", which was something similar to "179       32       4096 mmcblk0p32"

Step 5:
After entering "w", you have to Ctrl+C to get out of shell then enter "adb reboot recovery".
If I remember correctly there was also a notification similar to "disk tables not the same, device is busy" something something. It actually freaked me out, but I decided to continue anyway. Note that another Ctrl+C was needed here as well since we're still in shell.

Step 7:
Basically the same as Step 5. Required another Ctrl+C to exit shell.

Step 8:
Another Ctrl+C to exit shell.

Step 10:
While in Recovery, I followed that same steps as if I were going to install a new ROM or restore a backup.
Wipe data/factory restore
Wipe cache
Mounts and Storage > Format everything except SDCard
Advanced > Wipe Dalvik Cache

Backup and Restore > Restore > AreaRomV1.0-Default  (that's what I named my default ROM backup. Yours may be a date/time format).

======

Immediately after following this guide I went into Settings > Applications > Manage Applications. The free memory was as follows:

System Memory = 0.90GB free (77MB used)
Internal Memory = 166MB free (208KB used)

So I must say thank you very much for this guide and your contribution to users of this phone.  ;D
« Last Edit: January 05, 2014, 10:49:40 pm by SLeePYG72786 »
  • AK51-Stock
  • LG Optimus Dynamic (L38C)
  • AreaRom CWM v5
  • AreaRom v1.0b
  • Rooted-Rom
LG Optimus Dynamic (L38C)

** Mods **
Forced GPU Rendering via egl.cfg
Xposed Framework (GB-backport) w/ MasterKeyFixGB & SPDY
PurePerformances X Golden Edition (XDA, by Jeeko)
PureGraphics HD + Rendering Version (XDA, by Jeeko)
PureAudio Engine | 1.0 Studio Quality (XDA, by Jeeko)

Follow members gave a thank to your post:


Re: Hacking the LGL38C - More app install space - How to

« Reply #5 » Published on:January 10, 2014, 02:58:08 pm

Online DmC.Dante

  • Thank You
  • Given: 6    Received: 18
  • Posts: 28
  • User Rating: +19/-0
  • Jr. Member
  • *
Thx rjgee, repartitioned my phone last night. I recalculated the start/end cylinders so I have ~670MB of data & 512MB internal storage. Can't thank you enough for all your hard work.

PS- you can type *exit* & hit enter instead of CTRL+C, just sayin'
« Last Edit: January 10, 2014, 05:19:31 pm by DmC.Dante »
  • LG Custom
  • LG Optimus Dynamic
  • AreaRom CWM v5
  • AreaRom v1.0b
  • Rooted-Rom
There are 10 kinds of people in the world...
Those who understand binary, and those who don't.

Re: Hacking the LGL38C - More app install space - How to

« Reply #6 » Published on:January 12, 2014, 04:29:02 pm

Offline barrowsg

  • Thank You
  • Given: 2    Received: 0
  • Posts: 8
  • User Rating: +0/-0
  • Jr. Member
  • *
Hello, thanks for the step by step instructions, but I don't seem to have 'fdisk' in my path when in the adb shell.  I am using the stock firmware (rooted with the one-click method and CWM installed).  Step #4 (listing the current partitions) worked fine and had the expected results you mentioned.

I was a bit confused at step #3 however.  I ran the 'adb reboot recovery' and the phone rebooted to the CWM screen, at which point I had to select the 'reboot...' option from the menu before the 'adb wait-for-device' would see the phone again.  Was there another selection I should have made while the CWM menu was up?

I'm thinking if the instructions were written with the nandroid firmware in mind, there might be some extra commands included in there that are not in the stock firmware...
  • Stock
  • LG L38C
  • Stock
  • No Rom
  • n/a

Re: Hacking the LGL38C - More app install space - How to

« Reply #7 » Published on:January 13, 2014, 10:32:41 am

Offline charliegraeser1

  • Thank You
  • Given: 0    Received: 0
  • Posts: 1
  • User Rating: +0/-0
  • Newbie
  • *
I am trying this but every time for some reason it doesn't recognize the command for fdisk. A little clearer steps would be nice if possible.
  • Stock
  • lg optimus dynamic
  • Stock
  • No Rom
  • n/a

Re: Hacking the LGL38C - More app install space - How to

« Reply #8 » Published on:January 13, 2014, 02:34:55 pm

Offline barrowsg

  • Thank You
  • Given: 2    Received: 0
  • Posts: 8
  • User Rating: +0/-0
  • Jr. Member
  • *
I haven't got any clarification on that same question yet, but based on my searching other forums I think we may need to install a busybox app on our phones to get all of the required commands at the shell.  The nandroid firmware (that I think others are using) may already have busybox installed.

I'm thinking I will try one of the busybox apps off of the google play store later tonight, if I don't hear back from anyone...I'll let you know how it goes.
  • Stock
  • LG L38C
  • Stock
  • No Rom
  • n/a

Re: Hacking the LGL38C - More app install space - How to

« Reply #9 » Published on:January 13, 2014, 06:46:57 pm

Offline SLeePYG72786

  • Thank You
  • Given: 0    Received: 18
  • Posts: 108
  • User Rating: +20/-0
  • Sr. Member
  • *
I was able to do the partitioning just fine with the rooting/cwm tools and AreaRom Dynamic from this site. I'm not sure what the confusion or issues are, but just in case this is it - make sure you're not closing the command prompt during this process. Technically you *can*, but you'll lose track of the 'logs' that leaving it open would provide. If I remember correctly the 'fdisk' command would be entered while still in shell mode.
  • AK51-Stock
  • LG Optimus Dynamic (L38C)
  • AreaRom CWM v5
  • AreaRom v1.0b
  • Rooted-Rom
LG Optimus Dynamic (L38C)

** Mods **
Forced GPU Rendering via egl.cfg
Xposed Framework (GB-backport) w/ MasterKeyFixGB & SPDY
PurePerformances X Golden Edition (XDA, by Jeeko)
PureGraphics HD + Rendering Version (XDA, by Jeeko)
PureAudio Engine | 1.0 Studio Quality (XDA, by Jeeko)

Re: Hacking the LGL38C - More app install space - How to

« Reply #10 » Published on:January 14, 2014, 01:04:20 am

Offline barrowsg

  • Thank You
  • Given: 2    Received: 0
  • Posts: 8
  • User Rating: +0/-0
  • Jr. Member
  • *
I installed one of the busybox apps from the play store (tried tinybox first but the screen format made it unusable).  After it placed the added commands on the phone, I was able to find 'fdisk' (plus other commands) in the adb shell.  Prior to installing busybox, I checked and there were no 'fdisk' executables on the phone...so if you are indeed using the stock firmware, you'll need to install busybox first.

That said, the outlined steps worked like a charm and now there's 0.94GB left to install apps.
  • Stock
  • LG L38C
  • Stock
  • No Rom
  • n/a

Re: Hacking the LGL38C - More app install space - How to

« Reply #11 » Published on:January 14, 2014, 02:01:01 am

Offline SLeePYG72786

  • Thank You
  • Given: 0    Received: 18
  • Posts: 108
  • User Rating: +20/-0
  • Sr. Member
  • *
Oh, you were still on stock. That explains it. :)
  • AK51-Stock
  • LG Optimus Dynamic (L38C)
  • AreaRom CWM v5
  • AreaRom v1.0b
  • Rooted-Rom
LG Optimus Dynamic (L38C)

** Mods **
Forced GPU Rendering via egl.cfg
Xposed Framework (GB-backport) w/ MasterKeyFixGB & SPDY
PurePerformances X Golden Edition (XDA, by Jeeko)
PureGraphics HD + Rendering Version (XDA, by Jeeko)
PureAudio Engine | 1.0 Studio Quality (XDA, by Jeeko)

Re: Hacking the LGL38C - More app install space - How to

« Reply #12 » Published on:January 16, 2014, 04:49:44 pm

Offline Ciocalesku

  • Thank You
  • Given: 0    Received: 0
  • Posts: 2
  • User Rating: +0/-0
  • Jr. Member
  • *
I am sure this works, but do not try it using a linux terminal on your phone. I did that and am currently stuck at the reboot after deleting the partition. Now I am downloading adt bundle to get the adb shell ability so I can get into my phone and fix this. Basically bricked the phone for now. Hopefully I can get out
  • Custom
  • LG-L38C
  • AreaRom CWM v5
  • AreaRom v1.0b
  • Rooted-Rom

Re: Hacking the LGL38C - More app install space - How to

« Reply #13 » Published on:January 16, 2014, 06:00:05 pm

Offline SLeePYG72786

  • Thank You
  • Given: 0    Received: 18
  • Posts: 108
  • User Rating: +20/-0
  • Sr. Member
  • *
This is meant to be done using adb only, not a simple terminal or cmd prompt. ;)
  • AK51-Stock
  • LG Optimus Dynamic (L38C)
  • AreaRom CWM v5
  • AreaRom v1.0b
  • Rooted-Rom
LG Optimus Dynamic (L38C)

** Mods **
Forced GPU Rendering via egl.cfg
Xposed Framework (GB-backport) w/ MasterKeyFixGB & SPDY
PurePerformances X Golden Edition (XDA, by Jeeko)
PureGraphics HD + Rendering Version (XDA, by Jeeko)
PureAudio Engine | 1.0 Studio Quality (XDA, by Jeeko)

Re: Hacking the LGL38C - More app install space - How to

« Reply #14 » Published on:January 16, 2014, 06:33:08 pm

Offline Ciocalesku

  • Thank You
  • Given: 0    Received: 0
  • Posts: 2
  • User Rating: +0/-0
  • Jr. Member
  • *
So I went in and was able to complete it but I am not seeing anything changing, still stuck on the LG screen
Any ideas?
  • Custom
  • LG-L38C
  • AreaRom CWM v5
  • AreaRom v1.0b
  • Rooted-Rom

Tags: adb shell fdisk 



Related Topics

  Subject / Started by Replies Last post
43 Replies
17691 Views
Last post May 12, 2014, 03:13:38 pm
by pickles523
2 Replies
3008 Views
Last post March 20, 2012, 02:39:59 pm
by AzHavicx
13 Replies
7072 Views
Last post April 22, 2013, 11:50:04 pm
by monkeyboy
4 Replies
939 Views
Last post July 03, 2013, 02:17:08 pm
by Moniker76
1 Replies
1081 Views
Last post December 30, 2013, 10:45:19 pm
by blazer64
10 Replies
1229 Views
Last post January 25, 2014, 03:02:49 am
by tabbiekat

Back to top