Coder Social home page Coder Social logo

repit's Introduction

Lanchon REPIT

A Device-Only Data-Sparing Repartitioning Tool For Android

Powered by Flashize.


General Information (All Devices)

WHAT IS THE PROBLEM ?

many older devices, especially the ones originally released before emulated storage was available, were partitioned by the OEM in ways that hinder the installation and use of newer Android versions. for example, the Galaxy S2 GT-I9100 comes with a 0.5 GiB /system partition that is unable to fit CM 13.0 and Open GApps, even if you choose the pico version. though its flash is typically a generous 16 GiB, the stock /data partition is only 2 GiB which means that with today's ART you run out of space to install applications in no time. it also comes with a 0.5 GiB /preload partition that goes unused on custom ROMs.

people have typically solved this by repartitioning. on Samsung devices this is a tricky process that involves the use of download mode, a Windows PC, Windows device drivers that support the device's download mode, a 'pirated' proprietary PC software called Odin, the right PIT and other files, and correct configuration. (a free software alternative to Odin called Heimdall works on many devices and is cross platform and supports Linux PCs, but the rest of the hurdles remain.) the procedure has potential for hard-bricking if the wrong files are flashed. after repartitioning, all affected partitions must be reflashed or formatted anew, a procedure that many get wrong. and of course, all data in the affected partitions gets wiped (typically the complete device) making this an ultra-inconvenient affair.

WHAT IS REPIT ?

REPIT is a simple, safe, device-only, data-sparing, and easily portable repartitioning tool for Android devices:

  • device-only: just flash a zip file in recovery to repartition the device.
  • simple: rename the zip file before flashing to configure your choice of partition sizes, file systems, wipes, etc.
  • safe:
    • a correctly ported REPIT can never hard-brick your device.
    • before starting, REPIT checks for the existence of all the tools that will be needed for the task at hand, verifies that the current partition layout passes several sanity checks, checks and fixes all the involved file systems, and verifies that the new partition layout will meet its sanity checks too. REPIT performs a dry-run of the complete repartitioning process to detect possible problems early on.
    • if REPIT fails, it will nonetheless try to restore your device to a working in-between state. you can solve the blocking issue and REPIT again towards your goal, or otherwise REPIT back to your original configuration. (keeping the in-between state is not recommended as it usually involves 'wasted' unpartitioned space.)
    • my estimate is that between 500 to 1000 users already used REPIT for 'major' changes on the i9100 and no incidents of data loss were reported. (note: these are very stale numbers dating from March 2016, when REPIT was still in its infancy.)
  • easily portable: a simple configuration file is all that is needed to port REPIT to a new device.

you can look at the log of a demo run to get a feel for what REPIT can do. in this run on a Galaxy S2 it grows the /system and /data ext4 partitions to 1 and 6 GiB respectively, it wipes and shrinks the unused /preload partition to a minimum size, and it adjusts the size of the internal /sdcard vfat partition to occupy whatever space is left. REPIT plans, orders and undertakes a safe series of partition resize and move operations to reach its goal, all the while keeping and eye on details such as alignments and retaining the data present in the /system, /data and /sdcard partitions.

LIMITATIONS

  • REPIT requires TWRP 2 or TWRP 3. some recoveries unnecessarily hold device or partition locks during flashing, which prevents all repartitioning tools from working (parted, fdisk, gdisk, and of course REPIT). unfortunately the recoveries bundled with CM 11, 12.0, 12.1 and 13.0 display this issue and are incompatible. recent TWRP 2.8.7.* and 3.0.0.* recoveries comply with this requirement, but only when flashing zips from /tmp. (REPIT will automatically copy itself to /tmp if it detects locks, to help you relaunch from there.)
  • REPIT does not support encrypted phones.
  • REPIT will cause data loss if the repartitioning process is externally interrupted. plug into a power source!

HOW TO REPIT

  1. if you think your data is invaluable then treat it as such: make a backup!
  2. get TWRP running on your device.
  3. make sure your battery is mostly charged.
  4. get the zip for your device from the link below.
  5. rename it to express your desired configuration (see below).
  6. PLUG INTO A POWER SOURCE. this operation might take a long time and must not be interrupted.
  7. flash the zip locally on the phone. (if you want to sideload instead, please see the note below.)

finally, go get a coffee or two. do not, under any circumstance, interrupt this script !!!

in case the script fails to start:

  • if the script cannot unmount all partitions, it will copy itself to the /tmp directory and ask you to flash it a second time from there.
  • if it still fails to unmount all partitions, or if it fails to lock the eMMC ('unable to reread the partition table'), then unplug the device from USB hosts such as PCs, reboot TWRP, and reflash the script immediately after boot up. (you may actually need to reflash twice, the second time from '/tmp'.) do not do anything after booting up and before flashing! in particular, do not connect the device to a PC or USB host as this might auto-mount the sdcard via MTP, and do not mount the sdcard as USB mass storage via TWRP's UI. in some rare cases you might need to use TWRP's UI to disable MTP before rebooting and to manually unmount all partitions before flashing the script from '/tmp'.
  • if locking issues remain, your phone is probably encrypted; this script is not compatible with encrypted phones.

if you want to sideload:

  • sideloading conceals the filename from the device, and thus filename-based configuration will not work.
  • to sideload you need to add a file called 'flashize/repit-settings' to the zip containing the full intended filename, or otherwise just the configuration part of it. for example, a file containing -system=1G is enough (the - is required). note that your recovery might require you to resign the zip after that change.
  • otherwise you can add the file directly to the device before sideloading, for example via adb push. in that case it must be named '/tmp/repit-settings'.

HOW TO CONFIGURE

configure the script by renaming the zip file before flashing it.

valid zip names: <prefix>[-partition1=<conf>][-partition2=<conf>]...<suffix>

valid partition <conf> values: [<size>(G|M)|same|min|max][+[keep|wipe][+[ext4|vfat|f2fs|swap|raw]]]

the defaults are device-dependent. please look inside your device's configuration file for more information. for configuration samples please see the i9100 section below.

Partition Data
  • keep: retain the data in the partition. if the partition needs to be moved or resized, this option usually makes the operation significantly slower, even if the partition is mostly empty.
  • wipe: wipe the partition. always wipe partitions that are empty or carry data that you do not care about: it will make REPIT faster and will result in less wear on the flash memory.
Partition Sizes
  • same: do not alter the size of this partition.
  • min: make this unused partition a minimum yet formattable size (typically 8 MiB, but device-dependent).
  • max: make this partition as big as possible (at most one partition per 'heap' can have its size set to 'max').
  • <size>(G|M): fractional number followed by a size unit expressing the desired partition size. the unit is either G for GiB or M for MiB. this value gets rounded to the nearest acceptable discreet value. the size granularity is device-dependent, but typically set to match the device-dependent partition alignment (which typically is 1 or 4 MiB).
Partition Types
  • ext4 and vfat: these partitions have full move, resize and wipe support.
  • f2fs: f2fs partitions can be moved and wiped, and can only be resized while wiping them.
    (tools to resize f2fs file systems do not exist for now.)
  • swap: swap partitions can be wiped, and can only be moved or resized while wiping them.
    (it makes no sense to retain their content.)
  • raw: raw partitions are treated as opaque blobs and can only be moved.
    (neither resizing nor wiping is supported.)
Supported Features
wipe keep + move keep + resize keep + move + resize crypto footer
ext4 YES YES (brute force) YES (efficient) YES (brute force) YES
vfat YES YES (efficient) YES (efficient) YES (efficient) no
f2fs YES YES (brute force) no no YES
swap YES no no no no
raw no YES no no no
  • brute force: the complete partition extent is operated upon.
  • efficient: only the stored data within the partition is operated upon.
  • crypto footer: support for encryption metadata at the end of the partition.

IN CASE OF ISSUES

if there are any problems, read the log! you can scroll it on TWRP. most likely it will tell you what is wrong and what to do about it. if not, make sure to somehow record the log. REPIT logs to file '/tmp/lanchon-repit.log'. otherwise, you can obtain a copy of TWRP's log (which includes REPIT's log), or if not at least take a picture of it with your camera. in TWRP 2.8.7.* you can see a full screen log by hitting the back button once, then the center button at the bottom of the screen that looks like a TV screen. after recording the log, you can try reflashing the script if you understand what happened and flashing it again makes sense.

PLEASE NOTE: your 'did not work' report is useless unless you post info from your log.


Device-Specific Information

each supported device has a unique targeted build of REPIT in the download section. you can also find device-specific information in the device tree; try searching by device codename using Github's find file. all configuration options for a specific device are defined in the corresponding <device-codename>.sh file and the common.sh files that might exist in the same directory and in directories above it. you might also find device-specific readme files with relevant information.

IF YOUR DEVICE IS NOT SUPPORTED

so your device is unsupported, tough luck... but porting REPIT to a new device is an easy job; you can either do it yourself or request that i do it for you. to request a new port, please follow this steps; port requests are welcome. if you want to get your hands dirty, check the configuration files for i9100 (1, 2), they are the most complete and commented. but usually you can get away with much less, take a look at i9300. for an example of how to handle out-of-order partitions, check out janice.


The Galaxy S2 Family

REPIT started its life as i9100-only tool and it inherits this doc section from the good old days.

IMPORTANT NOTE: this script will not work if your phone is encrypted. you need to decrypt your phone first. this was found and reported by XDA user jer194 here. if you run the script on an encrypted phone anyway, no damage will come: it will just refuse to start, complaining that it cannot reread the partition table.

IF... your stock-partitioned device cannot flash gapps after updating to CM 13.0

download and flash the file as it is. it will get most space from the unused /preload partition and only 8 MiB for the internal sdcard, and then make /system 1 GiB in size. it will keep you current /data size constant, whatever it is. it will retain all data except data in /preload, which is unused in custom roms (but some multi-boot setups use it).

IF... your device is usable

you can nonetheless use this script to do general repartitioning, file system fixing, wiping, and/or file system type changes. download the script, rename it to express your desired configuration (see below), and then flash it.

Galaxy S2 HOW TO

first get official TWRP running on your device, then follow the generic how-to.

valid zip names: <prefix>[-system=<conf>][-data=<conf>][-sdcard=<conf>][-preload=<conf>]<suffix>

for this device, partition alignment is 4 MiB and partition sizes get rounded to the nearest 4 MiB boundary. (it is typical for all devices to use the same value for partition alignment and granularity.)

Galaxy S2 Defaults
  • -system=same+keep+ext4
  • -data=same+keep+ext4
  • -sdcard=same+keep+vfat <-- note vfat here
  • -preload=same+keep+ext4
Galaxy S2 Samples
  • repartition to stock, wiping preload (in case you used a very small preload before):
    (note: in general it is not recommended to resize file systems by large factors.)
    lanchon-repit-XXXXXXXX-system=0.5G-data=2G-sdcard=max-preload=0.5G+wipe-i9100.zip
  • repartition to stock (without wiping preload):
    -system=0.5G-data=2G-sdcard=max-preload=0.5G
  • wipe data:
    -data=+wipe
  • wipe/change internal sdcard to ext4 (not recommended):
    -sdcard=+wipe+ext4
  • repartition to 1 GiB system, 6 GiB data, no preload...
    • ...keeping all other data:
      -system=1G-data=6G-sdcard=max-preload=min+wipe
    • ...keeping all other data, for phones with ext4-formatted internal sdcard:
      -system=1G-data=6G-sdcard=max++ext4-preload=min+wipe
    • ...keeping system and sdcard but WIPING DATA:
      (note: wiping data is much faster than moving it around if system is being resized and data is large.)
      -system=1G-data=6G+wipe-sdcard=max-preload=min+wipe

Disclaimer

i believe this software to be very safe and i exercised it a lot before posting it. but i accept no responsibility if your data is lost or your device is bricked.



for historical information regarding the CHEF-KOCH incident (and XDA's response), please follow this link.

repit's People

Contributors

jeremyvignelles avatar lanchon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

repit's Issues

partition #11 'sdcard' (UMS) could not be fixed

SPH-D710

Recovery: TWRP 3.0.2-1 - patched with lanchon-twrp-patcher-20160417-crossflash-d710.zip
ROM + Kernel: CM11 Nightly 20160612 d710

Tried flashing:
lanchon-repit-20160415-system=1.0-data=same-sdcard=max-preload=min+wipe-d710.zip

From my external SD card and ran into the following error.

Installing zip file '/sdcard1/lanchon-repit-20160415-system=1.0-data=same-sdcard=max-preload=min+wipe-d710.zip'
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment initialized.

 ####################################
  Lanchon REPIT
  A Data-Sparing Repartitioning Tool
  Version: 2016-04-15
  Device: d710
  Copyright 2016, Lanchon (GPLv3)
 ####################################

=====  PRELIMINARY CHECKS  =====
info: valid package names: <prefix>[-(system|data|sdcard|preload)=<conf>]...<suffix>
info: valid partition <conf> values: [<size-in-GiB>|same|min|max][+[keep|wipe][+[ext4|vfat|f2fs|swap|raw]]]

-----  DEFAULTS  -----
system = size:same + content:keep + fs:ext4
data = size:same + content:keep + fs:ext4
sdcard = size:same + content:keep + fs:vfat
preload = size:same + content:keep + fs:ext4

info: parsing package name

-----  CONFIGURATION  -----
system = size:1.0 + content:keep + fs:ext4
data = size:same + content:keep + fs:ext4
sdcard = size:max + content:keep + fs:vfat
preload = size:min + content:wipe + fs:ext4

info: disabling swap
info: copying package to '/tmp'
info: unmounting all partitions
info: rereading partition table

=====  PREPARATION  =====
info: determining usable sector range of block device
info: checking existing partitions
#####  processing heap 'main'
info: checking existing partition layout
info: current size: partition #9 'system' (FACTORYFS): 1024 MiB
info: current size: partition #10 'data' (DATAFS): 6144 MiB
info: current size: partition #11 'sdcard' (UMS): 7480 MiB
info: current size: partition #12 'preload' (HIDDEN): 8 MiB
info: checking new partition layout
info: new size: partition #9 'system' (FACTORYFS): 1024 MiB
info: new size: partition #10 'data' (DATAFS): 6144 MiB
info: new size: partition #11 'sdcard' (UMS): 7480 MiB
info: new size: partition #12 'preload' (HIDDEN): 8 MiB

=====  DRY-RUN  =====
#####  processing heap 'main'
-----  analyzing partition #9 'system' (FACTORYFS)
*****  processing partition #9 'system' (FACTORYFS)
info: will resize the ext4 file system if needed to fit its partition
info: checking and trimming the file system
/dev/block/mmcblk0p9: 1794/65536 files (0.5% non-contiguous), 114031/262144 blocks
-----  analyzing partition #10 'data' (DATAFS)
*****  processing partition #10 'data' (DATAFS)
info: will resize the ext4 file system if needed to fit its partition
info: checking and trimming the file system
/dev/block/mmcblk0p10: 1357/393216 files (11.5% non-contiguous), 99691/1572864 blocks
-----  analyzing partition #11 'sdcard' (UMS)
*****  processing partition #11 'sdcard' (UMS)
info: checking the file system
Logical sector size is zero.
fsck.fat 3.0.28 (2015-05-16)
info: errors detected, retrying the file system check
Logical sector size is zero.
fsck.fat 3.0.28 (2015-05-16)

FATAL: file system errors in partition #11 'sdcard' (UMS) could not be fixed

[ERROR 1]

Updater process ended with ERROR: 1
I:Legacy property environment disabled.
Error installing zip file '/sdcard1/lanchon-repit-20160415-system=1.0-data=same-sdcard=max-preload=min+wipe-d710.zip'

Not sure what to do from here. I don't have anything I need to save on internal storage, so I can wipe/format anything necessary to try again.

Full log: recovery.log.txt

"Unable to satisfy all constraints on the partition"/"Not all space ... appears to be used"

Hi Lanchon,

Not sure whether the following warning and error are related. If not, I don't know what to do, else I don't know how to do it. :-) I wouldn't care for eight wasted megabytes (2048 blocks), but I don't know how to convince REPIT2 to continue.

info: moving/resizing the vfat partition
Warning: Not all of the space available to /dev/block/mmcblk0 appears to be used, you can fix the GPT to use all of the space (an extra 2048 blocks) or continue with the current setting?
Error: Unable to satisfy all constraints on the partition.

Logfile attached. Btw, obviously partition no. 11 'sdcard' (UMS) contains more data than its size after repartitioning will be. How would REPIT deal with that?

Many many thanks for your great work!

recovery_log.zip

Install fails

I'm trying to apply REPIT from Cyanogen 12.1 Recovery on my GT-I9100.
I get:

ln: /sbin/linker: Permission denied
/tmp/update_binary: eval: line 1: /tmp/flashize/env/sbin/sh: not found

What could be wrong?

i9300 port

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.

Failed to sysmapfile

I always get errormessage:
Failed to sysMAPFile "/file/path"
Nothing else in the logs....

Do you know this error? Google doesnt know the answer 😞

partition 11 corrupted

Hello,
First of all, Thank you for your work. It's very much appreciated.

I have the following error (in logs). I am running the latest NightOwl CM13 on my Note N7000.

lanchon-repit.txt
recovery.txt

I re-partitioned months ago. Yesterday I flashed the bauner's ROM (I was with the NightOwl CM12) using the Philz Recovery and the sdcard0 is corrupted now. I flashed the TWRP recovery, tried to re-format, re-partition with your tool and I have the error in logs. So now my Note works fine but without sdcard0 and I have only 6GB available :(((

Solved: I just needed to format the partition. Sorry for opening the issue :-)

Cheers,
Engmux

Migrate (mostly) from parted to sgdisk

sgdisk would allow retention of much more GPT metadata than parted, when erasing and recreating partitions.

also, i'd avoid the constant useless warnings and questions output by parted even when running in script mode, when it should just shut up.

BTW, i wish these silly tools would just let you edit the extent (start/end) of partitions without having to delete and recreate them, but hell...

Port request for j5lte (Samsung Galaxy J500F Duos)

Hi Lanchon,
this is a port request for one of the variants of the Samsung Galaxy J5.

  • 'repit-dump.log' file atttached

file attached and also here http://pastebin.com/7yFv2553

  • your exact device and device codename.

Samsung Galaxy SM-J500F/DS codename j5lte

  • your recovery (version? official? if not where did you get it?).

TWRP 3.0.2.0 unofficial by Nick Verse http://forum.xda-developers.com/android/development/recovery-samsung-galaxy-j5-t3338869

  • your kernel

CM kernel see below

  • your rom

CM12.1 unofficial by Nick Verse
repit-dump.log.txt
http://forum.xda-developers.com/android/development/rom-cyanogenmod-samsung-galaxy-j5-t3404569
I am running the 20160621 version from here https://www.androidfilehost.com/?w=files&flid=55526

  • is your device running the stock partition layout or is it already modified?

stock (LP) layout

  • other

please note that the J5 comes in myriad of variants (SM-J500F / SM-J500FN / SM-J500H / SM-J500M / SM-J50007 / SM-J500G / SM-J50008 / SM-J500Y) which may or may not differ in partition layouts.
Should you want to postpone this request until we gather the relevant logs for all the variants, I am happy to accept this and gather the logs.

Regards
ajislav
(ex i9100 user)
repit-dump.log.txt

Tool Failing

Hello! I hope you are well. I am running TWRP 2.8.7.0 and I also tried with 3.0.0.0 and the same thing happens. The zip file fails to install. I copy to /tmp, unmount all filesystems but still the same happens. It fails without any obvious reason why.

Thank you for your help!

unified storage?

Hi,
Hence the thread has been moved from xda to github I'm posting this here.

Is it possible to unify the storage on i9100? As currently I have around 2GB internal storage and the rest 10+GB appears as an SD card. Thanks.

Force unmounting of partitions

Hi Lanchon,

Thanks for your hard work - it's very much appreciated.

I've been attempting to flash 'lanchon-repit-20160415-system=1-data=6-sdcard=max++ext4-preload=min+wipe-i9100.zip' using TWRP 3.0.2-1 (for CM13), booted afresh, but I receive an error that sdcard0 can't be unmounted. The same happens when flashing a second time from /tmp, and my phone is not encrypted according to my Security settings. I've also tried TWRP 2.8.7.0 (recovery-Lanchon-IsoRec-TWRP-2.8.7.0-20160113-i9100-(by-arnab)), and the error I receive then is that /emmc can't be unmounted.

If it's of any relevance, my i9100 has previously been repartitioned (twice) using Odin (currently 1GB /system and 4GB /data, with /preload still present), and my sdcard0 has been reformatted as ext4 using the terminal, with permissions set correctly.

Possibly also of note: I've been trying to use the 'EFS Professional' tool from XDA recently to make an EFS backup, and that wouldn't display any partitions to back up (although it said that the partition table was read correctly). I have been able to make an EFS backup using the Partitions Backup Application from the Play Store, however.

Thanks for any assistance!

twrp log.txt

Port Request. Galaxy SHV-E120S

repit-dump.txt

This is korean version of Galaxy S2.

Device Name : Smasung Galaxy S2 SHV-E120s
ROM : Stock 4.1.2
Kernel : Stock
Recovery : Team Win Recovery Project v 2.8.6.0
Partition layout : Running the stock partition layout

its possible to change partition layout of my device if so pleas tell how its possible.

Thanks

Sideload compatibility

sideloading a package conceals its filename from the device, and thus filename-based configuration does not work.

implement an alternative configuration method compatible with sideload, or at least detect sideloading and fail with a proper explanation.

Port Request for HUAWEI Honor 4X Che1-CL20

Hi Lanchon,
Can I have a REPIT configuration file for my HUAWEI Honor 4X Che1-CL20? Thanks.

your exact device and device codename.
http://www.phonemore.com/phone/huawei-honor-4x-che1-cl20/2184
HUAWEI Honor 4X Che1-CL20

your recovery (version? official? if not where did you get it?).
http://forum.xda-developers.com/android/development/recovery-twrp-2-8-7-0-touch-recovery-t3199386
[RECOVERY][cherry] TWRP 2.8.7.0 touch recovery for Huawei G620S, Honor 4/4X

your kernel.
Stock CM12.1 kernel, Linux 3.10.x

your rom.
http://forum.xda-developers.com/android/development/rom-cyanogenmod-12-1-nightlies-huawei-t3203635
[ROM][Official][5.1.1][Nightly]CyanogenMod 12.1 Nightly for Huawei G620S,Honor 4/4X

is your device running the stock partition layout or is it already modified?
Stock partition layout

Honor 4X Che1-CL20 repit-dump.zip

Had an issue with mmblck09, sorted

Hi, just wanted to post it if others have the same problem:
I wanted to update my phone from CM12.1 to 13.
Installing the script gave the error that mmblck09 (or similar, do not know the exact name) was mounted.
This gave an error in the end. Installing e.g. the CM13 zip was not possible.

Solved in the end by manually unmounting everything. Navigating to the script on my external(!) sdcard made the error come back. Fortunately, the script was ALSO visible on the /tmp folder, and so I could in the end install it while NOT having either the emmc or the external SDcard mounted (not even by default through twrp 2.7.something).

So I was able to fix it in the end (but I was sweating in the meantime though).

Perhaps an option(?) is to have people copy the script to /tmp, then have the script unmount everything including the external SDcard?

Anyways, thanks for your script, have a functioning phone now!

Kind regards,
Roel

Galaxy Ace Plus GT-S7500 (trebon) (was: Unable to flash repit-dump.zip)

Hi, I tried to flash repit-dump file in order to send you the log and support my galaxy ace plus (GT-S7500, trebon) but give me this error in the repit-dump.log:

flashize-ext: unable to extract package contents

[ERROR 1]

I use CM 11 by Liam D and the integrated kernel (http://forum.xda-developers.com/galaxy-ace-plus/development/wip-cyanogenmod-11-0-gt-s7500-t2957544)
The TWRP version is 2.7.0.0 and it is unofficial (http://forum.xda-developers.com/galaxy-ace-plus/development/twrp-2-7-00-recommended-recovery-cm11-t3073271)
I am using standard partition layout.
I have the same error on my ace 2, maybe I am doing something wrong, i have also tried adb sideload in both devices with no success.Thanks.

Update handling of partition size parameters

  • eliminate per-device configurability of size unit.
  • make GiB the default size unit.
  • accept G and M suffixes to explicit sizes.
  • change default filenames to use M (and maybe G too).

Support F2FS in recoveries with partial F2FS support

official TWRP for i9100 has mkfs.f2fs but no fsck.f2fs. it is a strange combination and definitely a bug. REPIT does not currently support F2FS partition with in that recovery.

given that this is the official TWRP, implement a workaround to support F2FS anyway.

REPIT on i9100 with non-standard CACHE partition

Hi Lanchon!

This is a follow up on the issue you were helping me on XDA.

I finally got my hands on my son´s i9100 and ran repit with the "heapStart=532480" mod.

Flashed custom-repit-20160225-system=1-data=4-sdcard=max-preload=min+wipe-i9100.

The script ended with error, complaining "Partition /dev/block/mmcblk0p9 is being used", but was able to resize the data partition, keeping all existing files.

The system (FACTORYFS) partition remained the same size (832MB) but free space was left in the partition table (192MB). I guess this is 1GB that I requested in repit filename (832+192=1024).

Here is a parted print:

Number Start End Size File system Name Flags
7 106496s 499711s 393216s ext4 CACHE
8 499712s 532479s 32768s MODEM
9 532480s 2236415s 1703936s ext4 FACTORYFS
2236416s 2629631s 393216s Free Space

10 2629632s 11018239s 8388608s ext4 DATAFS
11 11018240s 30752767s 19734528s fat32 UMS msftres
12 30752768s 30769151s 16384s ext4 HIDDEN
30769152s 30777310s 8159s Free Space

I tried to use parted to manually include the free space in system partition but it kept complaining "Error: Partition /dev/block/mmcblk0p9 is being used.".

I checked with "mount" in adb and with twrp mount menu option. In both system was not mounted. Tried to reboot twrp and restard adb but no success.

This is not a big issue. I can live with the phone the way it is. My main goal, to increase data to 4GB was acomplished, thanks to you.

Anyway I am enclosing the repit recovery log and a full parted print.

parted-print-2016-0228.txt

recovery-repit-error-2016-0228.txt

Fails to resize SYSTEM partition

I was executing -system=0.6+keep-data=2.3+keep-sdcard=max+keep-preload=min+keep but after 10 minutes the process aborted and nothing was done.

The only change is to SYTEM actually at 0.5Gb to 0.6Gb for more space

Where do I find the LOGs to paste here?

Partition reverting to old size - maguro i9250

I have successfully installed lanchon-repit-20160415-system=1.0-cache=0.0605+wipe-data=same-maguro but i'm having issue with my system partition reverting to old size after installing cm-12.1-20160417-NIGHTLY-maguro

Before:
http://i.imgur.com/7DE9fDZ.jpg
After:
http://i.imgur.com/3T5GAsR.jpg

Install log: (second time)
http://i.imgur.com/bH5OhnV.jpg
http://i.imgur.com/v8PjNlq.jpg
http://i.imgur.com/OYgXluT.jpg
http://i.imgur.com/O2wCRY3.jpg
http://i.imgur.com/G4lYNbD.jpg

recovery.zip

And after i try to install open_gapps-arm-5.1-mini-20160423 i get this error:
http://i.imgur.com/HMRulN0.jpg
http://i.imgur.com/YtgDLqg.jpg

Huawei Y560 (y560)

Huawei Y560-L01
TWRP 3.0.2-0 unofficial TWRP

Kernel: 3.10.49-g5997823-00001-gcef6b5d
release221@yep #1

CM 13: CM 13

Stocks partitions.

Dump: DUMP

Port Request to i9100G

Hello Lanchon,

Thanks for your in-depth description of how to obtain a log under windows.

As promising as it seemed to get the adb connection working at the moment I just didnt have the time to do it; so I went with option 2) (flashable dump tool) that seems to have worked very fine - thanks for this invaluable option.

I tried to attach the log file renamed as txt and also packed to a zip but github kept insisting I should "try again" - so here is the link to the file on my dropbox:

https://dl.dropboxusercontent.com/u/1500968/recovery.log

Thanks again for making this happen.

Unable to download the latest version

image
Getting

no mirrors found

for the latest i9100 version.
Previous version downloaded fine, but the current documentation is not valid for it, so I spent some time to figure out that G should be omitted from the spec.

Error installing zip file

screenshot_2016-07-16-22-25-51

Phone: Samsung Galaxy S2 i9100
Same error with the following Software in all combinations:
TRWP: 2.8.7.0 / 3.0.2.1
OS: TRIM-IsoRec cm-12.1-i9100 / Isorec-TWRP2.8.7.0 12.1 / CM 13 / CM12.1
Repit Version: 2016-04-15

I feel like I missed something on the way while reading tons of pages how to use REPIT but I'm really at the end of my abilities here and hope you can help.

I see that I can't even get into the process of the script but I have absolutely no idea why.

I started out with CM 10.2 and worked my way through all of the above mentioned ROMs and Recoverys tried different filenames and whatnot. I also tried several solutions for mount issues but I think this is an entirely different problem.

Sorry for wasting your time.

FATAL: file system errors in partition #11 / sdcard (UMS) could not be automaticly fixed

Hello, First of all thank you for this great tool.
I successfully used it once but i wanted a bigger data partition so i tried it again with your recommended "-system=1-data=6-sdcard=max-preload=min+wipe". Now im getting an error.
The error was something like this:

Analyzing partition #11 /sdcard (UMS)
info: will move/resize the vfat partition
info checking file system
Logical sector size (127 bytes) is not a multiple of the physical sector size.
dosfsck 3.0.12, 29 oct 2011, FAT32, LFN
info: errors detected, retrying the file system check
Logical sector size (127 bytes) is not a multiple of the physical sector size.
dosfsck 3.0.12, 29 oct 2011, FAT32, LFN

FATAL: file system errors in partition #11 / sdcard (UMS) could not be automaticly fixed

[ERROR 1]

I dont really know what to do now. I tried running again. Tried doing it again with the stock partition. But that didnt help. Thanks for help!

Port Request for Xiaomi Redmi Note 4G (Dior)

Hi Lanchon,
May I have REPIT file for Xiaomi Redmi Note 4G (Dior)?

your exact device and device codename
http://www.gsmarena.com/xiaomi_redmi_note_4g-6561.php

your recovery (version? official? if not where did you get it?).
https://twrp.me/devices/xiaomiredminote4gsinglesim.html
Offical TWRP 3.0.2 for Dior

your kernel.
your rom.

I haven't got any ROM yet, just installed TWRP and wipe the phone, but I was trying to install this ROM from here: http://forum.xda-developers.com/redmi-note/development/rom-aicp-11-dior-t3273430
ROM OS Version: 6.0.x Marshmallow
ROM Kernel: Linux 3.4.x
Based On: CyanogenMod

is your device running the stock partition layout or is it already modified?
Yes, it is still running the stock partition layout.

The reason I want to do a REPIT is that the current /system is too small for me, only 800MB. I was trying to install a CM13 and Micro Gapps but resulted in a Error Code 70: insufficient space, so I'm wondering maybe I can get more from REPIT? Thanks.

27 320MiB 1120MiB 800MiB ext4 system
28 1120MiB 1504MiB 384MiB ext4 cache
1504MiB 1536MiB 32.0MiB Free Space
29 1536MiB 7456MiB 5920MiB ext4 userdata
7456MiB 7456MiB 0.01MiB Free Space

repit-dump.zip

Moto G 2013 (falcon) 8GB CM 12.1 hang on "rereading partition table"

Here is the log before hanging http://pastebin.com/4BkcQRif and http://pastebin.com/SjASrEjG

After that i did:
disable mtp from twrp mount menu and restarted recovery
repeated flashing repit, it failed with same error and copied itself to /tmp
flashed repit from /tmp, got same error
entered twrp terminal and umounted /sdcard and /data manualy

Tried all of the above with twrp 3.0.0-0, 3.0.1-0 and 3.0.2-0 with adb debuging on and off, still hangs on same position.
And here is where it hangs: http://imgur.com/a/n1vkp
I left it over night (8h) and still nothing.
Also tried to unmount all partitions by ticking mounts in twrp mount menu, still no progress.

What can i do next? Thanks!

Dumpfile maguro i9250

As requested here the recovery log obtained on unofficial twrp 3.0 on my i9250.

recovery.txt

Im open to further testing of course, pls let me know if you need sth. else.
Thanks !

Partition aligment improvements

  • make partition min size and granularity configurable per device.
  • ensure heap start and partition min size are multiples of granularity.
  • correctly align partitions following a same sized partition which could not be a multiple of granularity.
  • ensure heap end is a multiple of granularity or else handle alignment issues.
  • make partition min size, granularity and alignment configurable per partition.

FATAL: this package is for 'i9100'

Hi. I don't really know the best way to contact you, i hope this is the right one. I got this error message, can you help me? The script seems to think I'm not running it on a Galaxy S2, although the device has been rightfully identified a few lines above the error. I attached the screenshot.

I have a stock ROM with TWRP 2.6.3.0 and I launched the script named: lanchon-repit-20160225-system=0.5-data=2.2-sdcard=max-preload=0.3-i9100.zip

01

Support F2FS partitions

F2FS support would only allow moving and wiping partitions. AFAIK, a tool for resizing F2FS partitions has not been implemented yet.

[Info] workaround for 'Fatal: Logical disk size 0'

Hello and first of all a huge thanks goes out for your excellent work! You saved my a**. :)

This is not an issue but can't find a Q&A section or a forum (sadly, i've red what's happened...) where i can post so writing here, apologising if it's not the correct place.

So, i messed with partitions on GT-I9100 using Irwenzhao's method 1 (http://forum.xda-developers.com/galaxy-s2/orig-development/repartition-memory-s2-t3018749) which did the partitioning but unfortunately left system partition untouched at factory 512 MiB, left preload untouched and messed up something with emmc in my case. So i ended up at Repit.

Used

lanchon-repit-20160415-system=1.0-data=same-sdcard=max-preload=min+wipe-i9100.zip

with TWRP 3 and got the error message 'Fatal: Logical disk size 0' for sdcard while flashing from /tmp (flashing from external SD failed with unable to unmount internal sd).

While Repit was unable to cope with the situation with the above config, simply adding +wipe for every partition solved the issue: flashing

lanchon-repit-20160415-system=1.0+wipe-data=same+wipe-sdcard=max+wipe-preload=min+wipe-i9100.zip

went smoothly (from /tmp of course), Repit deleted and recreated the partitions in the correct way and now everything's as it should be (hopefully :) ).

Unfortunately i've forgot to copy the log file from /tmp in the run, all i can remember the partition was exFAT and the above given error message. I hope it's helpful in some way.

Feel free to modify or cut this post in case it's too wordy.

Again, thank you for being and writing awesome software!

GT-I9105P / Galaxsy S2 Plus

Hello there, sorry for bothering, but I'm looking for an advice.

I9105P is the older brother of I9100. It is actually Galaxsy S2 Plus, with a limit of 8GB memory.

I have tried running repit in multiple ways, not worked, all with the same error.

Last I tried looks like lanchon-repit-20160415-system=2.0-data=3.0-sdcard=max-preload=min+wipe-i9100.zip.

Error I get always is:

flashize-ext: unable to extract package contents

[ERROR 1]

Any ideas ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.