Lanchon / REPIT

A Device-Only Data-Sparing Repartitioning Tool For Android
159 stars 25 forks source link

i9300 port #22

Closed ElPumpo closed 8 years ago

ElPumpo commented 8 years ago

How on Earth are you supposed to run the script on non-samsung galaxy s2 devices? I found NO universital builds that works for other phones.

The source is to no help for me :/ Trying to make a guide on how to re-partition a samsung galaxy s3 (due to large /cache and /preload partitions), and this is setting me back.

Lanchon commented 8 years ago

hi!

there is a /device tree, where device specific ports live. if you want the i9300 supported, we need a i9300 port.

i can do it with your help. get a recent TWRP working on your device. then flash my device dump tool, grab the output logfile, post it here, and i'll take it from there.

ElPumpo commented 8 years ago

Wait, where's the device dump tool? I'd love to help you out. Thing is that, I'm not running stock, but that's not a issue right?

ElPumpo commented 8 years ago

Can you release a version of the device dump tool?

Lanchon commented 8 years ago

not an issue. it's in the repo! https://github.com/Lanchon/REPIT/tree/master/device-dump/zip

ElPumpo commented 8 years ago

One sec, flashing..

ElPumpo commented 8 years ago

repit-dump-out.txt .. It is 1305 lines of code..

Lanchon commented 8 years ago

ok thanks!

please tell me your twrp version and point me to where did you get that build.

ElPumpo commented 8 years ago

3.0.0-2, .tar file from twrp.me https://dl.twrp.me/i9300/twrp-3.0.0-2-i9300.img.tar.html

Lanchon commented 8 years ago

ok, and the device codename is?

Lanchon commented 8 years ago

i9300?

ElPumpo commented 8 years ago

i9300, 16gb

ElPumpo commented 8 years ago

apparently also m0

Lanchon commented 8 years ago

yes i was puzzled by the m0 thing. but i assume that you have the regular international i9300.

ElPumpo commented 8 years ago

yes

ElPumpo commented 8 years ago

this is turning into a chat rather than a thread, no shit your thread on XDA got shit on by a mod (no offence) :D

Lanchon commented 8 years ago

lol. thanks! i'll look into this ASAP.

ElPumpo commented 8 years ago

You should also add the device dump tool to README.md so people can contribute easier.

ElPumpo commented 8 years ago

Keep in mind that there are also 32 and 64gb models..

ElPumpo commented 8 years ago

I got some questions,

  1. Would you recommend if people format all their partitions to ext4? What's the default? Edit: found out that almost all partitions already are ext4, except /sdcard (internal storage)??
  2. Is this a valid filename? twrp_repit-system=1-data=same-sdcard=max-preload=min+wipe-cache=0.2-i9300.zip Trying to clear up storage by minimizing both the /preload and /cache partitions.
  3. Is there any ways of DELETING partitions, for example the /preload which is useless for anyone running AOSP?
Lanchon commented 8 years ago

should! should! :) the problem is that i dont have time!

Lanchon commented 8 years ago

well, let me do the port to the i9300 and then ill be able to answer. 3) you shouldn't delete partitions. it can cause compatibility issues. shrinking them to their minimum size is the safe way of obtaining the same result.

ElPumpo commented 8 years ago

Aight. But I don't get it, why must there be official support for x device?

Lanchon commented 8 years ago

1) all partitions in the device are already ext4

Lanchon commented 8 years ago

But I don't get it, why must there be official support for x device?

well it has to be ported to the device to work! officially or not

ElPumpo commented 8 years ago

Wait what, a /ota partition?? mmcblk0p11?? edit: /efs?! i would never touch that shit. yey new version out. edit: or maybe not..

Lanchon commented 8 years ago

ok i ported it, it's here: https://www.androidfilehost.com/?fid=24459283995310549

the default config will shrink cache to 32MB and preload to minimum (8MB) the gained space (around 1.5GB) will be dumped into /data (the main storage), including space for apps and the emulated sdcard. system will be left at its current size. system and data will keep their data. backup data if your data is vital to you (nothing should happen to it though). PLUG TO POWER SOURCE.

WARNING: resizing /data without wiping it in this phone is an extremely costly operation !!! you can expect about an hour of work!! don't do this often! it adds wear to the emmc. you can expect the "life cost" of this operation to be similar to storing 13GB of files in the phone and then deleting them (not a big deal if you dont do it every day).

ElPumpo commented 8 years ago

What's inside /data? Installed apps or ROM? edit: never mind.

Thanks for adding support for i9300!

Lanchon commented 8 years ago

lol

/data contains everything in your phone that you added to it that is not the rom: -all non-system apps -all app upgrades (including sys apps) -all data of all apps -all phone settings -all files you store in the internal (emulated) sdcard

if you wipe /data, only the rom will survive. it will boot like a new device. all your files lost.

ElPumpo commented 8 years ago

Ok, final thing:

  1. What is the -ota=whatever?
  2. If you set /cache too small, play store wont be able to download apps. Right?
Lanchon commented 8 years ago

1) the ota partition. leave it alone, it's already as small as it can be. 2) nope. cache was used by the ota mechanism. it is not used at all in android. recoveries need a little bit of cache.

ElPumpo commented 8 years ago

You may now close this. You have been very cooperative. EDIT: dont, haven't tried it yet.

Lanchon commented 8 years ago

hell no!

did it work? what happened?

ElPumpo commented 8 years ago

haha just editied my post before i saw your comment

it better not eat my phone..

ElPumpo commented 8 years ago

Keep getting a "cannot unmount /sdcard" error...

ElPumpo commented 8 years ago

I manually unmounted /data in TWRP, works now. I Think you need un mount /data in your script. UPDATE: wait what the f***, can NOT reproduce it.. I'll keep you updated in one comment.

UPDATE 1: it's wiping data..? UPDATE 2. It's because I added +wipe at the end of the filename UPDATE 3. Done. Rebooting to CM now... UPDATE 4. works Can't give you the log as I accedently rebooted without copying log @-_-

BEFORE: Filesystem Total Used Available Use% Mounted on mmcblk0p8 1032088 17732 1014356 2% /cache mmcblk0p12 11901576 6355436 5546140 53% /data mmcblk0p12 11901576 6355436 5546140 53% /sdcard mmcblk0p10 564416 8964 555452 2% /preload mmcblk0p9 1548144 632704 915440 41% /system mmcblk0p3 20144 9568 10576 47% /efs

AFTER: Filesystem Total Used Available Use% Mounted on mmcblk0p8 32240 4200 26404 14% /cache mmcblk0p12 13457732 574316 12199796 4% /data mmcblk0p12 13457732 574316 12199796 4% /sdcard mmcblk0p10 8048 4120 3520 54% /preload mmcblk0p9 1548144 638168 909976 41% /system mmcblk0p3 20144 9568 10576 47% /efs

Works flawless.

Lanchon commented 8 years ago

cool... but you wiped data!!! i guess this was intentional?

ElPumpo commented 8 years ago

Are you kidding me, I did it for no reason?! "WARNING: resizing /data without wiping it in this phone is an extremely costly operation !!! you can expect about an hour of work!!", that is what YOU said.

A real headache trying to reinstall all my apps and configure them -_-

Lanchon commented 8 years ago

well... reinstalling a phone is much more work than waiting for an hour lol!!!

the idea was to tell you to expect a hour or so of work (probably more like 30 minutes) and that you don't repartition around for fun, certainly not telling you to wipe your phone! :-/

anyway, glad it worked :) later!

Lanchon commented 8 years ago

credit: https://github.com/Lanchon/REPIT/commit/396f24f708fb0c1e0d8e8457c4871c98e2cd0766

thanks!

ElPumpo commented 8 years ago

Thanks I guess. Keep up the great work!