ug802, how I can partionate the all Flash RAM memor

Stock and Custom Firmware Development For the UG802.
SplinterGU
Posts: 7
Joined: Wed Oct 17, 2012 9:22 pm

ug802, how I can partionate the all Flash RAM memor

Postby SplinterGU » Fri Oct 19, 2012 9:09 pm

I want a firmware with all memory as internal memory and real sd as /sdcard.

how I can do it?

maybe finless can help me with it?

deadhp1
Posts: 677
Joined: Thu Sep 20, 2012 5:22 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby deadhp1 » Sat Oct 20, 2012 12:27 am

It's actually pretty difficult, and you'll need to work some things out.
First off is your plan to remove the listing of the internal sd card(to use as space for apps) and to mount the micro-sd card to /sdcard/?
Keep in mind I have not done this or tested it.

Off the top of my head You'll have to modify 2-3 things and build a custom rom.

1) /system/etc/vold.fstab
you need to take the lines

Code: Select all

dev_mount flash /mnt/sdcard auto /devices/virtual/mtd/mtd9/mtdblock9
dev_mount sdcard /mnt/external_sd auto /devices/platform/rk29_sdmmc.0/mmc_host/mmc0

and change it to read

Code: Select all

#dev_mount flash /mnt/sdcard auto /devices/virtual/mtd/mtd9/mtdblock9
#dev_mount sdcard /mnt/external_sd auto /devices/platform/rk29_sdmmc.0/mmc_host/mmc0
dev_mount flash /mnt/sdcard auto /devices/platform/rk29_sdmmc.0/mmc_host/mmc0

The # sign comments out the older lines. The new line mounts the micro sd card to /sdcard/ .

2) In order to use the left over space you'll need to change the parameter file used to flash the rom.
This is a bit harder because you need to calculate the values.
I use wendal's tool to unpack the rom and in the temp directory you'll find the parameter file.
The stock parameter file looks like this:

Code: Select all

FIRMWARE_VER:4.0.4
MACHINE_MODEL:rk30sdk
MACHINE_ID:007
MANUFACTURER:RK30SDK
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE: console=ttyFIQ0 androidboot.console=ttyFIQ0 init=/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00004000@0x00004000(kernel),0x00008000@0x00008000(boot),0x00008000@0x00010000(recovery),0x000C0000@0x00018000(backup),0x00040000@0x000D8000(cache),0x00100000@0x00118000(userdata),0x00002000@0x00218000(kpanic),0x000A0000@0x0021A000(system),-@0x0033A000(user)


So it's basically a partition map. The values look like this: size_of_partition@location_of_partition(partition_name)
As you can see adding the size to the location brings you to the next location #.

So what is normally used for app data is the line 0x00100000@0x00118000(userdata).
This has a size of 0x00100000 and is located at memory space 0x00118000.

What is normally used for /sdcard/ is -@0x0033A000(user).
This means it uses any space left over and starts at location 0x0033A000.

So our goal is to eliminate the user partition and have the userdata partition use the left over space.
We need to recalculate the values and locations for userdata, kpanic, and system.
We'll be placing userdata at the end in order to use all the left over space and removing the entry for user.

0x00002000@0x00118000(kpanic),0x000A0000@0x0011A000(system),-@0x0023A000(userdata)


You'll need to change it to look like this:

Code: Select all

FIRMWARE_VER:4.0.4
MACHINE_MODEL:rk30sdk
MACHINE_ID:007
MANUFACTURER:RK30SDK
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE: console=ttyFIQ0 androidboot.console=ttyFIQ0 init=/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00004000@0x00004000(kernel),0x00008000@0x00008000(boot),0x00008000@0x00010000(recovery),0x000C0000@0x00018000(backup),0x00040000@0x000D8000(cache),0x00002000@0x00118000(kpanic),0x000A0000@0x0011A000(system),-@0x0023A000(userdata)


Keep in mind I have not tested this, and for all I know it might not even boot. I'm not very good at modifying the parameter file. So take this all with a grain of salt. Finless has much more experience doing this.
You do not have the required permissions to view the files attached to this post.

SplinterGU
Posts: 7
Joined: Wed Oct 17, 2012 9:22 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby SplinterGU » Sat Oct 20, 2012 1:46 pm

thanks lot of...

I knew that I need change the vold.fstab and (maybe others files)... my question is how I do partitionate of memory in 1 partition...

The original serious firmwares roms are as I want... I have a coby 7015 tablet, and the stock firmware have 1 only partition, but I flash it with a custom firmware and then I only have this damn fake sdcard on flash memory... I was read that this change was made for users that don't have a real sdcard... but I want use a real sdcard, than I want all 4gb memory for internal memory usage.

(sorry for my bad english, I'm an argentinian guy... and my english isn't fine...)

well, I'll read with care your post and I'll try make the changes....

I think that most important stuff is how I make the partition of memory...

oh, other question... exists flash tools for linux? I'm a linux user.

SplinterGU
Posts: 7
Joined: Wed Oct 17, 2012 9:22 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby SplinterGU » Sat Oct 20, 2012 2:00 pm

oh, I understand... calculate the offsets is easy... then for my better understanding... you say that the sdcard is the "user" partition? and that user apps (they that I install with .apks) are installed on "userdata"?

EDIT: oh, now I understand what the mtd devices are referenced... thanks! (I was learn a lot of with your reply, thanks!)

deadhp1
Posts: 677
Joined: Thu Sep 20, 2012 5:22 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby deadhp1 » Sat Oct 20, 2012 3:18 pm

Just be careful as changes like this could soft brick your device requiring you to open it up and short the 2 pads in order to get into flash mode.
I've made a hole in the top of my case so I don't have to constantly open it up to recover.

SplinterGU
Posts: 7
Joined: Wed Oct 17, 2012 9:22 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby SplinterGU » Sat Oct 20, 2012 3:52 pm

I'll do it in several stages...
I'll do first the change of mount point... I'll flash it, and then I'll check that it take the real sdcard... if it is fine, then I'll partition the memory and remove user partition.

any other suggestion?

thanks!

deadhp1
Posts: 677
Joined: Thu Sep 20, 2012 5:22 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby deadhp1 » Sat Oct 20, 2012 4:26 pm

I won't be able to test this until I'm back on monday. So you're on your own until then.

SplinterGU
Posts: 7
Joined: Wed Oct 17, 2012 9:22 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby SplinterGU » Sat Oct 20, 2012 4:30 pm

thanks... I'll test it...

in the poor case, I'll need buy a new ug802...

thanks, again.

SplinterGU
Posts: 7
Joined: Wed Oct 17, 2012 9:22 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby SplinterGU » Sat Oct 20, 2012 7:50 pm

well, the experiment works... but I replace the vold.fstab for this

#dev_mount flash /mnt/sdcard auto /devices/virtual/mtd/mtd9/mtdblock9
#dev_mount sdcard /mnt/external_sd auto /devices/platform/rk29_sdmmc.0/mmc_host/mmc0
dev_mount sdcard /mnt/sdcard auto /devices/platform/rk29_sdmmc.0/mmc_host/mmc0

the config storage space, show me it as RAM FLASH, but applications show me it as SDCARD.

I now need partition whole memory as internal memory.

SplinterGU
Posts: 7
Joined: Wed Oct 17, 2012 9:22 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby SplinterGU » Sat Oct 20, 2012 11:21 pm

well, I made it!!!!

the right parameters was

Code: Select all

FIRMWARE_VER:4.0.4
MACHINE_MODEL:rk30sdk
MACHINE_ID:007
MANUFACTURER:RK30SDK
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE: console=ttyFIQ0 androidboot.console=ttyFIQ0 init=/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00004000@0x00004000(kernel),0x00008000@0x00008000(boot),0x00008000@0x00010000(recovery),0x000C0000@0x00018000(backup),0x00040000@0x000D8000(cache),0x00002000@0x00118000(kpanic),0x000A0000@0x0011A000(system),-@0x001BA000(userdata)


vold.fstab

Code: Select all

#dev_mount flash /mnt/sdcard auto /devices/virtual/mtd/mtd9/mtdblock9
#dev_mount sdcard /mnt/external_sd auto /devices/platform/rk29_sdmmc.0/mmc_host/mmc0
dev_mount sdcard /mnt/sdcard auto /devices/platform/rk29_sdmmc.0/mmc_host/mmc0


I use the finless tool, and replace the firmware the finless for my files...

It works excelent!

thanks a lot of mate for your help!

I'm very happy!

mrrog
Posts: 6
Joined: Mon Oct 08, 2012 4:20 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby mrrog » Wed Nov 14, 2012 4:52 am

Any chance of writing up some detailed instructions for this?

I have rooted my device, and applied the play store fix, I know the 'hard way' finless ROM will do this but I am reluctant to flash a ROM because my device WiFi and sync (for my needs anyway) are OK.

I use apex launcher so my only outstanding wish is to use the memory in a more sensible fashion.

And I am a noob at this flashing malarky.

?

krizz07
Posts: 25
Joined: Tue Oct 02, 2012 2:18 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby krizz07 » Wed Nov 14, 2012 12:39 pm

mrrog wrote:Any chance of writing up some detailed instructions for this?

I have rooted my device, and applied the play store fix, I know the 'hard way' finless ROM will do this but I am reluctant to flash a ROM because my device WiFi and sync (for my needs anyway) are OK.

I use apex launcher so my only outstanding wish is to use the memory in a more sensible fashion.

And I am a noob at this flashing malarky.

?


the Finless 1.6 ROM is nice. i have a parameter file for that ROM to give you 2.65GB of internal memory. i will have to wait until i go home since my file is saved on my computer.

mrrog
Posts: 6
Joined: Mon Oct 08, 2012 4:20 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby mrrog » Thu Nov 15, 2012 5:53 am

That would be great 'krizz07' of course I don't really know what a parameter file is so if you could include guidance on how to implement as well I'll give it a go

usiek
Posts: 6
Joined: Tue Oct 02, 2012 9:18 am

Re: ug802, how I can partionate the all Flash RAM memor

Postby usiek » Thu Nov 15, 2012 4:49 pm

I also join to the request :)

krizz07
Posts: 25
Joined: Tue Oct 02, 2012 2:18 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby krizz07 » Thu Nov 15, 2012 9:44 pm

ok since you guys asked nicely, here are the steps on how to allocate the flash memory to your internal memory.

before you start, make sure you save everything that's not in your sdcard. we will be re-mapping the partition in your nand memory so anything that's not in your external sdcard will be wiped out..

1. download the Finless 1.6 Jelly Bean rom here:
http://www.freaktab.com/showthread.php? ... om-MK802-3

2. Extract the ROM zip file to your desktop (or anywhere you want).

3. open the extracted folder and go to the folder "FinlessROM"

4. You will see the files "parameter1gb" and "parameter2gb". but we will be replacing both so you can delete them and download my parameter file here:
parameter1gb.rar
and extract the content to the FinlessROM folder.

FinlessROM files.jpg


5. Flash the ROM ***follow the instructions from the README FIRST.TXT to flash the rom, make sure you do the hard way***

6. Boot your device and download ES File Explorer from the Play store

7. Open the Es File Explorer app and click on the MENU from the status bar and go to Settings.

8. Scroll down and choose Root settings and check Root Explorer, Up to Root, and Mount File System.

Es File Explorer settings.jpg
You do not have the required permissions to view the files attached to this post.

krizz07
Posts: 25
Joined: Tue Oct 02, 2012 2:18 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby krizz07 » Thu Nov 15, 2012 9:48 pm

9. Now go back and browse to the folder /system/etc and you will find the file vold.fstab. open the file as text.

10. Here you will need to edit this line:
voldfstab.jpg

Change: dev_mount flash /mnt/sdcard auto /devices/virtual/mtd/mtd9/mtdblock9
to: dev_mount flash /mnt/sdcard auto /devices/platform/rk29_sdmmc.0/mmc_host/mmc0

11. And save it!


12. Reboot and have fun with your 2GB internal storage. your external SDcard will now be labeled NAND FLASH under settings but the apps sees this as your external storage :)
You do not have the required permissions to view the files attached to this post.

usiek
Posts: 6
Joined: Tue Oct 02, 2012 9:18 am

Re: ug802, how I can partionate the all Flash RAM memor

Postby usiek » Fri Nov 16, 2012 3:45 am

krizz07 many thanks for the very clear tutorial :!:

Runner68
Posts: 3
Joined: Sun Nov 11, 2012 9:47 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby Runner68 » Fri Nov 16, 2012 7:51 am

Thank Krizz07 , do we need need to block(#) the line below?
"dev_mount sdcard /mnt/external_sd auto /devices/platform/rk29_sdmmc.0/mmc_host/mmc0"

krizz07
Posts: 25
Joined: Tue Oct 02, 2012 2:18 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby krizz07 » Fri Nov 16, 2012 10:37 am

Runner68 wrote:Thank Krizz07 , do we need need to block(#) the line below?
"dev_mount sdcard /mnt/external_sd auto /devices/platform/rk29_sdmmc.0/mmc_host/mmc0"


just let it be so that the sdcard folder will be read as your external sdcard

mrrog
Posts: 6
Joined: Mon Oct 08, 2012 4:20 pm

Re: ug802, how I can partionate the all Flash RAM memor

Postby mrrog » Sat Nov 17, 2012 10:10 am

Krizz

Not so clear to me sorry, I specifically do not want to flash a ROM with the changed memory, or:

1. am i misunderstanding, or

2. am I mistaken in believing this can be done without flashing a new ROM, which is what I thought Splinter's process was about

?


Return to “Firmware”

Who is online

Users browsing this forum: No registered users and 1 guest