Author Topic: Repartitioning JXD 7800 Stock firmware (Paging Skelton)  (Read 11742 times)

Joe Sixpack (OP)

  • ***
  • Posts: 1413
Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« on: January 12, 2014, 10:06:03 pm »
Starting a new thread as not to polite the one this conversation started in (unrelated)

Skeleton, I couldn't get Lua to work on my desktop xp x64.. which is needed for the tool you suggested. (Rk29 Wendal tools), I'll have to try it on my laptop that runs win7 later.

In the mean time I did find a img tool by RedScorpio

Probably not needed but here's the log, odd it lists firmware as 4.1.1 instead of 1.1.4?
Code: [Select]
2014.01.12 16:40:25   imgRePackerRK (v. 1.02 windows)
2014.01.12 16:40:25   (c) RedScorpio, Moscow, 2013
2014.01.12 16:40:25   
2014.01.12 16:40:25   Command parameters: "J:\jxd7800\S7800 V1.1.4\S7800 V1.1.4\update.img"
2014.01.12 16:40:25   
2014.01.12 16:40:25   Run parameters:
2014.01.12 16:40:25      log = 1
2014.01.12 16:40:25      debug = 0
2014.01.12 16:40:25      quiet = 0
2014.01.12 16:40:25      mono = 0
2014.01.12 16:40:25      md5 = 0
2014.01.12 16:40:25      rkcrc = 0
2014.01.12 16:40:25      rkaf = 0
2014.01.12 16:40:25      skip = 0
2014.01.12 16:40:25      2nd = 0
2014.01.12 16:40:25      memsize = 134217728
2014.01.12 16:40:25   
2014.01.12 16:40:25   ==========================[ START ]==========================
2014.01.12 16:40:25   
2014.01.12 16:40:25   --- Firmware unpacking ---
2014.01.12 16:40:25   
2014.01.12 16:40:26   "RKFW" image file detected
2014.01.12 16:40:26   
2014.01.12 16:40:26   Image properties:
2014.01.12 16:40:26      Type      RockChip batch image (RKFWf)
2014.01.12 16:40:26      Version      4.1.1
2014.01.12 16:40:26      Date      2013.11.08
2014.01.12 16:40:26      Time      16:18:15
2014.01.12 16:40:26      ChipID      0x00000070
2014.01.12 16:40:26      Code(?)      0x01060000
2014.01.12 16:40:26   
2014.01.12 16:40:26   -- boot.img processing --
2014.01.12 16:40:26   
2014.01.12 16:40:26   -- update.img processing --
2014.01.12 16:40:26   Image properties:
2014.01.12 16:40:26      Type      RockChip update image (RKAF)
2014.01.12 16:40:26      Id      "007"
2014.01.12 16:40:26      Model      "S7800"
2014.01.12 16:40:26      Manufacturer   "JXD"
2014.01.12 16:40:26      Version      4.1.1
2014.01.12 16:40:26   
2014.01.12 16:40:26   - Files extracting -
2014.01.12 16:40:26   Image files count = 11
2014.01.12 16:40:26   
2014.01.12 16:40:26   package-file (package-file)   extracted (format: unknown)
2014.01.12 16:40:26   bootloader (RK3188Loader(L)_V1.24.bin)   extracted (format: RockChip bootloader image)
2014.01.12 16:40:26   PARM file (parameter) found
2014.01.12 16:40:26      Length checking:
2014.01.12 16:40:26      Stored file length      = 0x00000254
2014.01.12 16:40:26      Real file length (in image)   = 0x00000254
2014.01.12 16:40:26      rkCRC summ checking:
2014.01.12 16:40:26      Stored rkCRC         = 0xd0405832
2014.01.12 16:40:26      Calculated rkCRC      = 0xd0405832
2014.01.12 16:40:26   parameter (parameter)   extracted (format: RockChip PARM signed file)
2014.01.12 16:40:26   misc (Image/misc.img)   extracted (format: unknown)
2014.01.12 16:40:29   KRNL file (Image\kernel.img) found
2014.01.12 16:40:29      Length checking:
2014.01.12 16:40:29      Stored file length      = 0x00b10024
2014.01.12 16:40:29      Real file length (in image)   = 0x00b10024
2014.01.12 16:40:29      rkCRC summ checking:
2014.01.12 16:40:29      Stored rkCRC         = 0x430b063a
2014.01.12 16:40:29      Calculated rkCRC      = 0x430b063a
2014.01.12 16:40:29   kernel (Image/kernel.img)   extracted (format: RockChip KRNL signed file)
2014.01.12 16:40:29   KRNL file (Image\boot.img) found
2014.01.12 16:40:29      Length checking:
2014.01.12 16:40:29      Stored file length      = 0x000fd25a
2014.01.12 16:40:29      Real file length (in image)   = 0x000fd25a
2014.01.12 16:40:29      rkCRC summ checking:
2014.01.12 16:40:29      Stored rkCRC         = 0xd04e382d
2014.01.12 16:40:29      Calculated rkCRC      = 0xd04e382d
2014.01.12 16:40:29   boot (Image/boot.img)   extracted (format: RockChip KRNL signed file)
2014.01.12 16:40:30   recovery (Image/recovery.img)   extracted (format: Android boot image)
2014.01.12 16:40:53   system (Image/system.img)   extracted (format: ext3 image)
2014.01.12 16:40:55   backup (backupimage/backup.img)   extracted (format: RockChip update image)
2014.01.12 16:40:55   update-script (update-script)   extracted (format: unknown)
2014.01.12 16:40:55   recover-script (recover-script)   extracted (format: unknown)
2014.01.12 16:40:55   
2014.01.12 16:40:55   - rkCRC summ of update.img checking -
2014.01.12 16:40:55   Stored rkCRC      = 0xe7e837e6
2014.01.12 16:40:55   Calculated rkCRC   = 0xe7e837e6
2014.01.12 16:40:55   
2014.01.12 16:40:55   - md5 summ checking -
2014.01.12 16:40:55   MD5 summ (J:\jxd7800\S7800 V1.1.4\S7800 V1.1.4\update.img.dump\image.md5)      saved
2014.01.12 16:40:55   Stored MD5      = "ca11959377fe2d70698456f687edb46c"
2014.01.12 16:40:55   Calculated MD5      = "ca11959377fe2d70698456f687edb46c"
2014.01.12 16:40:55   
2014.01.12 16:40:55   - image.cfg creating -
2014.01.12 16:40:55   image.cfg created
2014.01.12 16:40:55   
2014.01.12 16:40:55   ==========================[ STOP  ]==========================

parameter file
Code: [Select]
FIRMWARE_VER:4.1.1
MACHINE_MODEL:S7800
MACHINE_ID:007
MANUFACTURER:JXD
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:[email protected](misc),[email protected](kernel),[email protected](boot),[email protected](recovery),[email protected](backup),[email protected](cache),[email protected](userdata),[email protected](kpanic),[email protected](system),[email protected](user)

Ok so im looking at the file and right away "mtdparts" catches my eye.. is this what needs edited?
Is it really that simple to repartition android? or at least Rockchip?

near as I can tell "initrd=0x62000000,0x00800000" is the size of the flash (800000(hex)/8388608(dec-KByte) / 1024 = (8192MB/8GB?) although not sure what 62000000 means?

And Mtdparts is a list of partitions?
Near as I can figure the first part is the size (in KB / Hex) and the second part is the starting point / offset in flash?

Quote
[email protected](misc)
[email protected](kernel)
[email protected](boot)
[email protected](recovery)
[email protected](backup)
[email protected](cache)
[email protected](userdata)
[email protected](kpanic)
[email protected](system)
[email protected](user)

Quote
Partition #/Name    Size (Dec-KByte?)    Offset/Start point in flash? (Hex)
1 / Misc                               8192                        2000 (If starting point what happen to 0-2000? protected?)
2 / Kernel                            40960                     4000
3 / Boot                               65536                     e000
4 / Recovery                        65536                    1e000
5 / Backup                          131072                   2e000
6 / Cache                            262144                   4e000
7 / UserData (apps)            2097152(2gb?)      8e000 (Wait, that can't be right, user part is only 1gb not 2gb WTF?)
8 / Kpanic                            8192                      28e000
9 / System                          1572864                 290000
10? ? User?                        ??? ?                        410000

That last one is confusing.. what is that? and it has no size? or maybe it's everything that is left on the flash?
That would be 410000 - 800000 (3735552 KByte?, maybe the external SD partition? But that's over 4GB.. so it doesn't seem large enough for that)

Am I barking up the right tree?

They way I figure it I will have to move kpanic and system down since it comes after userdata and then I can fill the gap by expanding userdata.. Ideally What I'd like to do is take the external SD (actually the flash sd partition) and resize(shrink) it to say 250-500mb.. expand userdata to take up the slack.., flash the device, then use root explorer to go in and swap the mountings making the physical sdcard list as internal..

Let me know how far off base I am, And I appreciate the help.

skelton

  • *****
  • Posts: 6842
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #1 on: January 12, 2014, 10:22:38 pm »
It is as you explain, what you need to change is the hex value for userdata, taking into account that next partition will start at a different offset. This is a way to repartition used in RK, in other devices is not so easy, since most of the times depend on kernel (amlogic) or bootloader (allwinner)

So , 7800 comes with :

[email protected](userdata),[email protected](kpanic),[email protected](system),[email protected](user)

you need to change it for:

[email protected](userdata),[email protected](kpanic),[email protected](system),[email protected](user)

Basically just sum the hex value and the new offset. The user at the end is basically the remaining space, destined to nand flash or sdcard partition.

If you edit under Windows do it with a proper editor like notepad ++ . Then just repack firmware and flash it with batch tool, and data partition should be 2 GB. Probably first boot will be slow, since system will wipe internal memory to create new partition sizes.

I do these changes in my Rk3188 tvboxes, but for tablets is the same, so I suppose it should work in 7800 too. But as always, do it at your own risk.
« Last Edit: January 12, 2014, 10:53:50 pm by skelton »
Retired

Joe Sixpack (OP)

  • ***
  • Posts: 1413
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #2 on: January 13, 2014, 01:34:47 am »
aye.

Question?: Why is that data partition only 1gb in android but based off the parameter file it should be 2gb?

0x00200000(Hex) = 2097152(Dec)
If this Is KBytes then  2097152 / 1024 = 2048 = 2gb, But only 1gb in android

confusing :/

skelton

  • *****
  • Posts: 6842
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #3 on: January 13, 2014, 07:41:48 am »
It is not in KB, but 512 bytes, so it's 1 GB data. Same for system, if it were in KB partititon would be about 1,5 GB, and I suppose is about 750 MB indeed.
Retired

Joe Sixpack (OP)

  • ***
  • Posts: 1413
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #4 on: January 13, 2014, 08:19:07 am »
Ah that actually makes sense.
Ok here's what I came up with for my changes, it should give me 6gb userdata partition right?
Let me know if you see any problems with this setup.

Code: [Select]
FIRMWARE_VER:4.1.1
MACHINE_MODEL:S7800
MACHINE_ID:007
MANUFACTURER:JXD
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:[email protected](misc),[email protected](kernel),[email protected](boot),[email protected](recovery),[email protected](backup),[email protected](cache),[email protected](userdata),[email protected](kpanic),[email protected](system),[email protected](user)

skelton

  • *****
  • Posts: 6842
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #5 on: January 13, 2014, 08:32:58 am »
Seems ok to me, but be careful, not sure if with 6 GB in data you have enough space for all partitions. I personally would use 4 GB max, since google play store sometimes have issues with data partitions longer than 4 GB, so I personally would use 4 GB as a max, but you can try. As always, do all these changes at you own risk.
Retired

Joe Sixpack (OP)

  • ***
  • Posts: 1413
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #6 on: January 13, 2014, 09:22:04 am »
Yippee!, It worked!  :o
Thank you Skelton, XoXoXo

It worked perfectly.. exactly how how I wanted it.
I was expecting it to be a lot more involved (I know you said other SoC's aren't as easy)
But Im pretty happy   ;D

I'll keep an eye out for playstore weirdness.. what kinda things should I be on the lookout for?


skelton

  • *****
  • Posts: 6842
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #7 on: January 13, 2014, 09:48:58 am »

Glad you have it working. Rk is probably the easiest SoC to repartition. For the play store weirdness, sometimes has issues downoading some apps, but just take a look at that. If it downloads and works ok, then no problem at all.
Retired

Drem

  • **
  • Posts: 848
    • Russian Android/Dingo/GCW/gaming gadgets blog
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #8 on: January 13, 2014, 04:38:18 pm »
Yippee!, It worked!  :o
Thank you Skelton, XoXoXo

It worked perfectly.. exactly how how I wanted it.
I was expecting it to be a lot more involved (I know you said other SoC's aren't as easy)
But Im pretty happy   ;D

I'll keep an eye out for playstore weirdness.. what kinda things should I be on the lookout for?
Amazing! So it's 6 GB now?

stpat

  • *
  • Posts: 435
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #9 on: January 13, 2014, 05:27:09 pm »
Joe, so is your end result different than using Tan's firmware? Are you trying to achieve something different, or just exploring it yourself?

Vimtoman

  • *
  • Posts: 263
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #10 on: January 13, 2014, 07:46:32 pm »
I think he is moving the sdcard portion to the Internal storage section.
Making it 6gb
The sdcard I think is inaccessible.
Make sense.
May do this too.

Good move Joe  ;)
let us know what the results are with Google play.

Joe Sixpack (OP)

  • ***
  • Posts: 1413
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #11 on: January 13, 2014, 08:31:14 pm »
Amazing! So it's 6 GB now?
Yup!
from 1gb appps (userdata) -> 6gb
from 5.35(ish)gb "Internal SD" apparently listed as "USER" partition was shrunk down to a little under 400mb

I've got a 8gb card im going to use for now.. Im testing this out on my DX unit which is playing guinea pig.
I plan to get a 64gb card..

Like Skelton pointed out earlier this change is kinda silly if you don't have a SD card.. the bulk app data will only have 400mb to work with now if you don't use a SD card, and 6gb for apk's (program).
I have a SD card so It made sense for me.

Basically almost all of the internal flash (not being used for android OS) is now dedicated to app storage.

Joe, so is your end result different than using Tan's firmware? Are you trying to achieve something different, or just exploring it yourself?
No Tan pretty much did the same thing but Tan's has a lot more changes in addition.
This change is purely repartitioning nothing else.

Tan's is setup for 5gb / 1gb.. mine is a bit more aggressive.. 6gb / 400mb

Tan's also has more changes, While I appreciate Tan's efforts I didn't like the other system changes and apps preinstalled (of questionable origin).

Only thing different on mine is with Skeltons guidance I repartitioned the flash.. that's it.. nothing less nothing more.
I wanted a clean stock firmware just with repartitioned space.. I still have to go in and swap the mounts for internal/external sd but that should be easy using a root enabled file explorer.

let us know what the results are with Google play.
I'll keep you guys posted.

stpat

  • *
  • Posts: 435
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #12 on: January 13, 2014, 08:37:31 pm »
While I appreciate Tan's efforts I didn't like the other system changes and apps preinstalled (of questionable origin).

Ah, gotcha. Yeah, after I installed his update, I went and cleaned up (out) a bunch of those pre-installed apps.

Vimtoman

  • *
  • Posts: 263
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #13 on: January 13, 2014, 09:03:05 pm »
How would we remove the preinstalled apps?
I would prefer to choose and purchase my own.

stpat

  • *
  • Posts: 435
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #14 on: January 13, 2014, 10:57:27 pm »
How would we remove the preinstalled apps?
I would prefer to choose and purchase my own.

Use a root file explorer (Tan included one called "Root Explorer"), navigate to /system/apps, and either delete or move any apps you don't want automatically loaded (moving them is probably a better idea in case you want them back at some point.) Reboot, and they'll be gone.

Joe Sixpack (OP)

  • ***
  • Posts: 1413
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #15 on: January 13, 2014, 11:39:48 pm »
Timber also told me that this app works pretty well for uninstalling.. have'nt tried it my self.
https://play.google.com/store/apps/details?id=zsj.android.uninstall

Ok I got the internal/external partitions swapped.. everything seems ok.
I went on a playstore spree, went thru the top "free" games and downloaded anything that looked half way decent.
lol took over an hour to download them all.

I did have 1 problem.. a game called crime city gave an error, but I hit "install" again and it downloaded without issue.. Not sure if that's because of the larger then 4gb partition or just a general issue with play store or something, I haven't tried any of them out yet, gonna sit down and play some games later.

Im gonna use the 400mb left over partition to store alarm music (I use mine my 78 as an alarm clock)
And also wallpaper's, I stored a copy of my wifi key in a txt file there for easy access, not sure what else to do with it.


Vimtoman

  • *
  • Posts: 263
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #16 on: January 14, 2014, 01:35:54 pm »
How would we remove the preinstalled apps?
I would prefer to choose and purchase my own.

Use a root file explorer (Tan included one called "Root Explorer"), navigate to /system/apps, and either delete or move any apps you don't want automatically loaded (moving them is probably a better idea in case you want them back at some point.) Reboot, and they'll be gone.

Ha Ha that easy thanks spat
In settings/app section why dies it not allow for deletion?
« Last Edit: January 14, 2014, 05:13:59 pm by Vimtoman »

PcJax

  • *
  • Posts: 13
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #17 on: January 14, 2014, 04:20:58 pm »
Testing your partition scheme in supercharged, it seems to work right now.

Update: I was one of the people unable to use "The Internal SD" partition on Supercharged before even after format it to FAT32, now it works (with the same 412MB size that Joe uses) and the device has 5.91GB internal storage.

This seems like and obligated fix for me and other users with the same issue in supercharged, now testing a lot of PlayStore Apps to check if the 6GB data partition have problems with it.

VERY IMPORTANT WARNING: The packaged kernel updates from superchaged will soft brick your device with this partition scheme, you have to package your own kernel updates.

https://www.dropbox.com/s/pvkakhhbt7p19ul/SUPERCHARGED%202.0%20new%20partition%20scheme.7z

StockSpeeds Kernel Included, You can update to 2.2.1 like normal.
« Last Edit: January 14, 2014, 08:08:54 pm by PcJax »

stpat

  • *
  • Posts: 435
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #18 on: January 14, 2014, 06:36:03 pm »
Ha Ha that easy thanks spat
In settings/app section why dies it not allow for deletion?

It's the way Android works. There's the concept of "system" apps versus "user installed" apps. You can't uninstall system apps via settings/apps (however you can disable them).

Joe Sixpack (OP)

  • ***
  • Posts: 1413
Re: Repartitioning JXD 7800 Stock firmware (Paging Skelton)
« Reply #19 on: January 14, 2014, 08:12:03 pm »
VERY IMPORTANT WARNING: The packaged kernel updates from superchaged will soft brick your device with this partition scheme, you have to package your own kernel updates.

https://www.dropbox.com/s/pvkakhhbt7p19ul/SUPERCHARGED%202.0%20new%20partition%20scheme.7z
Ah, thanks for the heads up on that.
I've got a 1.4 unit, Im leery of using Tan's OC kernels because it was never explained in detail what was changed to make them reach above 1.4 on those units.. I have a fear that maybe they're juicing the CPU with more voltage then i'd be comfortable with.. but that's just speculation.

I'll live with 1.4 for now.

BTW you probably already know this but if you want to swap your internal/external sdcard
Only way this repartition makes any sense is if you have a SD card.

using rooted explorer edit: /system/etc/vold.fstab

Change:
dev_mount flash /mnt/sdcard auto /dev/block/mtd/by-name/user /dev/block/platform/emmc/by-name/user
dev_mount sdcard /mnt/external_sd auto /devices/platform/rk29_sdmmc.0/mmc_host/mmc

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

EDIT: Nvm you're using Tan's.. I forgot it's already swapped



So far no other issues with playstore other then listed above went thru the games I installed last night.
They all played fine but most of them was uninstalled after 5-10mins lol
Themepark was the most disappointing.. because I use to love that on PC
They loaded it down with in app purchases and annoying busy work, damn you EA.
« Last Edit: January 14, 2014, 08:26:34 pm by Joe Sixpack »