Can someone assist with reviewing my file? (below)
I am following the instructions listed over here for how to add new devices
http://forum.xda-developers.com/showthread.php?t=633246
I have copied the template file into my own file and named the file the same as ro.product.device in build.prop. I have some questions about the configuration needed. My device is a BLU Studio C 5+5 LTE.
Here are the contents of my recovery.fstab
Code:
/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered wait,check
/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc wait,check,length=-16384
/dev/block/mmcblk1p1 /sdcard vfat nosuid,nodev,barrier=1,data=ordered,nodelalloc wait
/dev/block/bootdevice/by-name/boot /boot emmc defaults defaults
/dev/block/bootdevice/by-name/recovery /recovery emmc defaults defaults
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
My defs file looks like this so far. In places where I have questions I marked the section with leading >>>
Code:
#
# The values below should be set in each file in this folder.
#
# Each file represents a device name (set in ro.product.device of
# build.prop)
#
# If yes, then this device requires changing the mount point
# names in the new updater-script or update-script
# DO NOT SET TO 'yes' IF DEVICE IS BY DELL
change_mnt=yes
>>> Do I change this value or comment it out by adding a pound sign?
# If yes, the device is by Dell and requires changing the mount
# point names in the new updater-script or update-script
change_mnt_dell=no
#
# NOTE: The update-script will be converted to updater-script if the
# definition file for the device exists. If 'change_mnt' or
# 'change_mnt_dell' are set to 'yes' then the mount names will
# also be changed.
#
# Mention the mount point names if change_mnt=yes
# Use '\/' instead of '/'
# e.g. sys_mnt=\/dev\/block\/mcblk0p25
#
# If unknown, set to: ???
sys_mnt=\/dev\/block\/bootdevice\/by-name\/system
cache_mnt=\/dev\/block\/bootdevice\/by-name\/cache
boot_mnt=\/dev/block\/bootdevice\/by-name\/boot
data_mnt=\/dev\/block\/bootdevice\/by-name\/userdata
sdcard_mnt=\/dev\/block\/mmcblk1p1
>>> Comment this out?
# Set this mount point for the modem.bin in Samsung devices like the Galaxy S2
modem_mnt=
>>> Comment this out?
# Set this mount point for the preload partition on some Samsung devices like the Galaxy S2
preload_mnt=
>>> Comment this out?
# Set this mount point if you know what it is (e.g. on Motorola Atrix)
webtop_mnt=
# Filesystem info for SYSTEM/DATA/CACHE/etc.
# e.g. param1=ext3, param2=EMMC
param1=ext4
param2=EMMC
>>> DO I have the correct value for pram2?
# If SDCARD filesystem is different from above, then mention it
# e.g. param1_sdcard=vfat, param2_sdcard=MTD
param1_sdcard=vfat
param2_sdcard=EMMC
>>> Do I have the correct values here? I'm not sure...
# If CACHE filesystem is different from above, then mention it
param1_cache=ext4
param2_cache=EMMC
>>> How can I find out from my device?
# If yes, the device does not require using a 'tmp' folder when
# flashing the boot.img in the updater-script
#
# e.g. package_extract_file("boot.img", "/dev/block/blah1");
fix_boot=no
>>> How can I find out from my device?
# If yes, the device requires a 'tmp' folder when flashing the
# boot.img in the updater-script, PLUS the boot partition name
# needs to be used, rather than just 'boot'
#
# e.g. Replace: write_raw_image("/tmp/boot.img", "boot")
# with: write_raw_image("/tmp/boot.img", "/dev/block/blah1")
fix_boot2=no
>>> How can I find out from my device?
# If yes, the device requires a 'dd' command to write the boot.img
#
# e.g. Replace: write_raw_image("/tmp/boot.img", "boot")
# with: run_program("/sbin/busybox", "dd", "if=/tmp/boot.img", "of=/dev/block/blah")
fix_boot3=no
>>> How can I find out from my device?
# Device uses /cache instead of /tmp, e.g. when writing boot.img
use_cache_not_tmp=no
Many thanks in advance for your advice!!!
Related
Hello!
I was hoping someone could help me create an edify file for dsixda's Kitchen to get the S3 working in the kitchen.
I don't know all these mount points etc.
#
# The values below should be set in each file in this folder.
#
# Each file represents a device name (set in ro.product.device of
# build.prop)
#
# If yes, then this device requires changing the mount point
# names in the new updater-script or update-script
# DO NOT SET TO 'yes' IF DEVICE IS BY DELL
change_mnt=no
# If yes, the device is by Dell and requires changing the mount
# point names in the new updater-script or update-script
change_mnt_dell=no
#
# NOTE: The update-script will be converted to updater-script if the
# definition file for the device exists. If 'change_mnt' or
# 'change_mnt_dell' are set to 'yes' then the mount names will
# also be changed.
#
# Mention the mount point names if change_mnt=yes
# Use '\/' instead of '/'
# e.g. sys_mnt=\/dev\/block\/mcblk0p25
#
# If unknown, set to: ???
sys_mnt=
cache_mnt=
boot_mnt=
data_mnt=
sdcard_mnt=
# Set this mount point for the modem.bin in Samsung devices like the Galaxy S2
modem_mnt=
# Set this mount point if you know what it is (e.g. on Motorola Atrix)
webtop_mnt=
# Filesystem info for SYSTEM/DATA/CACHE/etc.
# e.g. param1=ext3, param2=EMMC
param1=
param2=
# If SDCARD filesystem is different from above, then mention it
# e.g. param1_sdcard=vfat, param2_sdcard=MTD
param1_sdcard=
param2_sdcard=
# If CACHE filesystem is different from above, then mention it
param1_cache=
param2_cache=
# If yes, the device does not require using a 'tmp' folder when
# flashing the boot.img in the updater-script
#
# e.g. package_extract_file("boot.img", "/dev/block/blah1");
fix_boot=no
# If yes, the device requires a 'tmp' folder when flashing the
# boot.img in the updater-script, PLUS the boot partition name
# needs to be used, rather than just 'boot'
#
# e.g. Replace: write_raw_image("/tmp/boot.img", "boot")
# with: write_raw_image("/tmp/boot.img", "/dev/block/blah1")
fix_boot2=no
# If yes, the device requires a 'dd' command to write the boot.img
#
# e.g. Replace: write_raw_image("/tmp/boot.img", "boot")
# with: run_program("/sbin/busybox", "dd", "if=/tmp/boot.img", "of=/dev/block/blah")
fix_boot3=no
# Device uses /cache instead of /tmp, e.g. when writing boot.img
use_cache_not_tmp=no
Help is appreciated.
Regards,
dejong12
Hi guys,
After years of using this site to read up on how-tos for my g1 and desire hd, I have finally hit a brick wall and need to post a question.
My mum won this GT-P7320T branded to telstra ( Australia) and overall, the hardware specs werent too bad, but before the ics update came out finally in january it was terribe to use.
The update has actually been a massive improvement, but being branded and all that junk is as annoying as hell, so i have decided to build my own rom. this is my first time building a rom. ive flashed plenty, but its a different kettle of fish.
i am using the telstra branded stock ics rom with rom kitchen to try to build something acceptable, but first things first, the compiled rom must boot.
because the device isnt supported i have to create i file in the /directory_to_kitchen/tools/edify_defs named GT-P7320T defining all the mount points.
this is where it gets tricky,
here is the contents of the /directory_to_kitchen/tools/edify_defs named GT-P7320T that i have created
#
# The values below should be set in each file in this folder.
#
# Each file represents a device name (set in ro.product.device of
# build.prop)
#
# If yes, then this device requires changing the mount point
# names in the new updater-script or update-script
# DO NOT SET TO 'yes' IF DEVICE IS BY DELL
change_mnt=yes
# If yes, the device is by Dell and requires changing the mount
# point names in the new updater-script or update-script
change_mnt_dell=no
#
# NOTE: The update-script will be converted to updater-script if the
# definition file for the device exists. If 'change_mnt' or
# 'change_mnt_dell' are set to 'yes' then the mount names will
# also be changed.
#
# Mention the mount point names if change_mnt=yes
# Use '\/' instead of '/'
# e.g. sys_mnt=\/dev\/block\/mcblk0p25
#extract from recovery.fstab
#/boot emmc /dev/block/mmcblk0p8
#/efs ext4 /dev/block/mmcblk0p21
#/cache ext4 /dev/block/mmcblk0p25
#/data ext4 /dev/block/mmcblk0p26 length=-16384
#/misc mtd misc
#/recovery emmc /dev/block/mmcblk0p22
#/sdcard vfat /dev/block/mmcblk0p28 /dev/block/mmcblk0
#/system ext4 /dev/block/mmcblk0p24
#
# If unknown, set to: ???
sys_mnt=\/dev\/block\/mmcblk0p24
cache_mnt=\/dev\/block\/mmcblk0p25
boot_mnt=\/dev\/block\/mmcblk0p8
data_mnt=\/dev\/block\/mmcblk0p26 #length=-16384
sdcard_mnt=\/dev\/block\/mmcblk0p28 #\/dev\/block\/mmcblk0
# Set this mount point for the modem.bin in Samsung devices like the Galaxy S2
modem_mnt=
# Set this mount point for the preload partition on some Samsung devices like the Galaxy S2
preload_mnt=
# Set this mount point if you know what it is (e.g. on Motorola Atrix)
webtop_mnt=
# Filesystem info for SYSTEM/DATA/CACHE/etc.
# e.g. param1=ext3, param2=EMMC
param1=ext4
param2=EMMC
# If SDCARD filesystem is different from above, then mention it
# e.g. param1_sdcard=vfat, param2_sdcard=MTD
param1_sdcard=vfat
param2_sdcard=
# If CACHE filesystem is different from above, then mention it
param1_cache=
param2_cache=
# If yes, the device does not require using a 'tmp' folder when
# flashing the boot.img in the updater-script
#
# e.g. package_extract_file("boot.img", "/dev/block/blah1");
fix_boot=no
# If yes, the device requires a 'tmp' folder when flashing the
# boot.img in the updater-script, PLUS the boot partition name
# needs to be used, rather than just 'boot'
#
# e.g. Replace: write_raw_image("/tmp/boot.img", "boot")
# with: write_raw_image("/tmp/boot.img", "/dev/block/blah1")
fix_boot2=no
# If yes, the device requires a 'dd' command to write the boot.img
#
# e.g. Replace: write_raw_image("/tmp/boot.img", "boot")
# with: run_program("/sbin/busybox", "dd", "if=/tmp/boot.img", "of=/dev/block/blah")
fix_boot3=no
# Device uses /cache instead of /tmp, e.g. when writing boot.img
use_cache_not_tmp=no
as you can see,
i have copied and pasted the contets of my recovery.fstab and commented it out as a reference.
this should be quite straight foward, but the mount points for data and sdcard hve additional parameters, which i dont know what to do with.
the parameters are currently commented out and i cannot get it to flash i've tried lots of different combinations but to no avail.
During flashing attempts it is giving me error 7, which to me seems to indicate a problem with setting the mount points.
could sombody please at least point me in the right direction? there is only one other custom rom for this device and i personally don't like it.
many thanks in advnce and i hope i have posted this in the right spot. im all new to this posting stuff and i cant post in any development forums yet
all good i sussed it. it just didnt like a few comments for some reason. ended up writing it by hand.
i am an engineering student and i would really like to look into this rom development a little further.
im thinking of porting cyanogenmod to it, would it be do-able? or is there a reason it hasnt been ported to it before?
Im trying to make my Samsung Galaxy Tab S SMt-700 (klimtwifi) compatible with android kitchen. I would like to if i am doing everything right so far
My devices Fstab
Code:
"# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# data partition must be located at the bottom for supporting device encryption
/dev/block/platform/dw_mmc.0/by-name/BOOT /boot emmc defaults defaults
/dev/block/platform/dw_mmc.0/by-name/RECOVERY /recovery emmc defaults defaults
/dev/block/platform/dw_mmc.0/by-name/SYSTEM /system ext4 ro,errors=panic wait
/dev/block/platform/dw_mmc.0/by-name/EFS /efs ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check
/dev/block/platform/dw_mmc.0/by-name/CACHE /cache f2fs noatime,nosuid,nodev,discard,nodiratime,inline_xattr,inline_data,flush_merge wait,check
/dev/block/platform/dw_mmc.0/by-name/CACHE /cache ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check
/dev/block/platform/dw_mmc.0/by-name/USERDATA /data f2fs noatime,nosuid,nodev,discard,nodiratime,inline_xattr,inline_data,flush_merge wait,check,encryptable=footer,length=-16384
/dev/block/platform/dw_mmc.0/by-name/USERDATA /data ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
# VOLD
/devices/platform/dw_mmc.2/mmc_host/mmc2* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
/devices/platform/exynos-dwc3.0/exynos-xhci.0* auto auto defaults voldmanaged=usbdisk:auto
"
What I have in my klimtwifi file
Code:
"change_mnt=yes
use_cache_not_tmp=no
param1_cache=ext4
param2_cache=f2fs
sys_mnt=\/dev\/block\/mmcblk0p18
cache_mnt=\/dev\/block\/mmcblk0p19
boot_mnt=\/dev\/block\/mmcblk0p9
data_mnt=\/dev\/block\/mmcblk0p21
sdcard_mnt=???
"
the template im using
Code:
"#
# The values below should be set in each file in this folder.
#
# Each file represents a device name (set in ro.product.device of
# build.prop)
#
# If yes, then this device requires changing the mount point
# names in the new updater-script or update-script
# DO NOT SET TO 'yes' IF DEVICE IS BY DELL
change_mnt=no
# If yes, the device is by Dell and requires changing the mount
# point names in the new updater-script or update-script
change_mnt_dell=no
#
# NOTE: The update-script will be converted to updater-script if the
# definition file for the device exists. If 'change_mnt' or
# 'change_mnt_dell' are set to 'yes' then the mount names will
# also be changed.
#
# Mention the mount point names if change_mnt=yes
# Use '\/' instead of '/'
# e.g. sys_mnt=\/dev\/block\/mcblk0p25
#
# If unknown, set to: ???
sys_mnt=???
cache_mnt=???
boot_mnt=???
data_mnt=???
sdcard_mnt=???
# Set this mount point for the modem.bin in Samsung devices like the Galaxy S2
modem_mnt=
# Set this mount point for the preload partition on some Samsung devices like the Galaxy S2
preload_mnt=
# Set this mount point if you know what it is (e.g. on Motorola Atrix)
webtop_mnt=
# Filesystem info for SYSTEM/DATA/CACHE/etc.
# e.g. param1=ext3, param2=EMMC
param1=
param2=
# If SDCARD filesystem is different from above, then mention it
# e.g. param1_sdcard=vfat, param2_sdcard=MTD
param1_sdcard=
param2_sdcard=
# If CACHE filesystem is different from above, then mention it
param1_cache=
param2_cache=
# If yes, the device does not require using a 'tmp' folder when
# flashing the boot.img in the updater-script
#
# e.g. package_extract_file("boot.img", "/dev/block/blah1");
fix_boot=no
# If yes, the device requires a 'tmp' folder when flashing the
# boot.img in the updater-script, PLUS the boot partition name
# needs to be used, rather than just 'boot'
#
# e.g. Replace: write_raw_image("/tmp/boot.img", "boot")
# with: write_raw_image("/tmp/boot.img", "/dev/block/blah1")
fix_boot2=no
# If yes, the device requires a 'dd' command to write the boot.img
#
# e.g. Replace: write_raw_image("/tmp/boot.img", "boot")
# with: run_program("/sbin/busybox", "dd", "if=/tmp/boot.img", "of=/dev/block/blah")
fix_boot3=no
# Device uses /cache instead of /tmp, e.g. when writing boot.img
use_cache_not_tmp=no
"[/CODE]
and a picture of my mount points : http://imgur.com/a/c3d8h
help will be very much appreciated
Hi all,
I've been looking around to solve my /cache problem of it being only 17MB.
Found a temporary fix but that needed to be implemented or executed every boot up.
And since I am to lazy or stupid to remember that every boot I search for another solution ...
Combined a script from someone else with some stuf I found somewhere else...
Descriptions are in the code....
This code works on my samsung I9000 with Full Advance Rom final 6.0.1:good::good:
Code:
#!/system/bin/sh
# stratosk - 27/07/2011
# Modified by Dutchpatriot 26/06/2017
# Works on Full advance Rom with I9000
# Change params
# Check your partitions name /cache
# Need to be root via ADB or root via device
# with the command : mount
# This fix is only needed when /cache has arround 17mb!!!
# run this command as root in ADB shell as root
# To be able to execute this you need to change file system from read-only to rewritable
# as root exec this command: mount -o rw,remount /system
# Paste this text in a file called cachefix.sh
# command : vi cachefix.sh
# If you like me, and arn't that good with vi
# I will attach a cachefix.sh to this post as
# cachefix.txt rename it to cachefix.sh
# give the cachefix.sh the right permissions
# chmod 777 cachefix.sh
# Run this once!
# sh /LOCATION_OF_SCRIPT/cachefix.sh
# or
# ./LOCATION_OF_SCRIPT/cachefix.sh
#
# when ran once the /data/local
# and all went well has a
# cache.img file
# This is now mounted as /cache
# command to see or verfy: mount
# /cache is now as big as you made it under
# CREATE A FILE 500mb
# Every time you reboot the 99Tcachefix script in /etc/init.d/ will be executed!
#
# adb root
# adb shell
# remount / and /system writable
mount -o rw,remount /
mount -o rw,remount /system
# EDIT the right old cache partitio /dev/block/mtdblock3 to fit yours!!!
# Makes script in /etc/init.d named 99Tcachefix so it will be executed on boot
echo "#!/system/bin/sh \n umount /dev/block/mtdblock3 \n losetup /dev/block/loop7 /data/local/cache.img \n mount -t ext4 /dev/block/loop7 /cache \n chown system.cache /cache \n chmod 770 /cache" >> /system/etc/init.d/99Tcachefix
# assign the right permissions to be executed as root but not edited
#There is a very neat trick in every Linux which will allow you to do so. It is called the SetUI bit.
#Keep in mind that you will need to have the permissions locked down tight in this file for this to be secure.
#Make the file owned by root and group root:
#sudo chown root.root <my script>
#Now set the SetUID bit, make it executable for all and writable only by root:
#sudo chmod 4755 <my script>
# Keep in mind if this script will allow any input or editing of files, this will also be done as root.
# source https://askubuntu.com/questions/167847/how-to-run-bash-script-as-root-with-no-password
# Leave as is!
chown root.root /system/etc/init.d/99Tcachefix
chmod 4755 /system/etc/init.d/99Tcachefix
# Check if dir is there else Create Dir LEAVE AS IS
if [ -d "/data/local" ]; then
echo "directory /data/local already there!"
echo "Showing dir /data/local"
sleep 3
ls "/data/local"
sleep 2
else
# create dir
mkdir /data/local
echo "Directory /data/local created"
fi
# create a file 500mb (change if you like count=XXXXXX)
dd if=/dev/zero of=/data/local/cache.img bs=1024 count=500000
# create ext4 filesystem LEAVE AS IS!!
mke2fs -F -T ext4 /data/local/cache.img
# my cache partition is called /dev/block/mtdblock3 see whats yours is called and
# change this to yours!!!
umount /dev/block/mtdblock3
# mount LEAVE AS IS!!!
losetup /dev/block/loop7 /data/local/cache.img
mount -t ext4 /dev/block/loop7 /cache
chown system.cache /cache
chmod 770 /cache
# Remount / and /system as read-only again
mount -o ro,remount /system
mount -o ro,remount /
sleep 3
echo "Now after reboot this (cache) partition will be back!"
sleep 10
echo "All done, if there where no errors you can now delete cachefix.sh"
echo "If your new /cache partition is mounted with the given size than all is good"
echo "These are the configurations now"
# exec df command to show config now
df
sleep 10
exit
With this your /cache will be changed to whatever values you give in the code...
For safety remove the cachefix.sh afterwards...
Added cachefix.txt, download and rename to cachefix.sh
Greets,
Dutchpatriot
This post is an information for other users who want to repartition their Samsung Galaxy S2 Plus (i9105 or i9105p).
After reading this post:
[TOOL] Lanchon REPIT: The Data-Sparing Repartitioning Tool For Android
and some modifications to the repit template zip for i9100 provided by Lanchon I have successfully repartitioned my i9105.
Now i have 1 GB system and 5,25 GB data partition size.
Here are the changed parts of the file /env/script which I rezipped into the repit template zip named lanchon-repit-20170115-system=1G-data=max-preload=min+wipe-i9105.zip (now for i9105):
Code:
...
#####################################################
# Lanchon REPIT - Device Handler #
# Copyright 2016, Lanchon #
#####################################################
#####################################################
# Lanchon REPIT is free software licensed under #
# the GNU General Public License (GPL) version 3 #
# and any later version. #
#####################################################
### galaxy-s2-plus
device_makeFlashizeEnv="env/arm.zip"
#device_makeFilenameConfig="system=1G-data=same-sdcard=max-preload=min+wipe"
device_makeFilenameConfig="system=1G-data=max-preload=min+wipe"
device_init() {
device_checkDevice
# the block device on which REPIT will operate (only one device is supported):
# exynos 4210:
#sdev=/sys/devices/platform/dw_mmc/mmc_host/mmc0/mmc0:0001/block/mmcblk0
# omap 4430:
#sdev=/sys/devices/platform/omap/omap_hsmmc.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0
sdev=/sys/block/mmcblk0
spar=$sdev/mmcblk0p
ddev=/dev/block/mmcblk0
dpar=/dev/block/mmcblk0p
sectorSize=512 # in bytes
# a grep pattern matching the partitions that must be unmounted before REPIT can start:
# unmounting the partitions of the selected block device seems to be enough:
#unmountPattern="${dpar}[0-9]\+"
# but we will unmount the external sdcard too (due to some reports that i was so far unable to reproduce):
#unmountPattern="/dev/block/mmcblk\(0\|1\)\(p[0-9]\+\)\?"
unmountPattern="/dev/block/mmcblk[^ ]*"
}
device_initPartitions() {
# the crypto footer size:
local footerSize=$(( 16384 / sectorSize ))
# not all partition types support crypto footers; those that do not will ignore the value passed to initPartition.
# also, not all devices use crypto footers; on those devices, pass a value of zero to initPartition for all partitions.
# the set of partitions that can be modified by REPIT:
# <gpt-number> <gpt-name> <friendly-name> <conf-defaults> <crypto-footer>
#initPartition 7 CACHE cache "same keep ext4" 0
#initPartition 8 MODEM modem "same keep raw" 0
#initPartition 9 FACTORYFS system "same keep ext4" 0
#initPartition 10 DATAFS data "same keep ext4" $footerSize
#initPartition 11 UMS sdcard "same keep vfat" 0
#initPartition 12 HIDDEN preload "same keep ext4" 0
initPartition 19 system system "same keep ext4" 0
initPartition 21 userdata data "same keep ext4" $footerSize
initPartition 20 HIDDEN preload "same keep ext4" 0
# resizing cache is disabled for now since i am not sure that the modem partition can be safely moved simply by updating
# the GPT and not changing the PIT. it is possible that whatever code boots up the modem might read the partition offset
# from the PIT and not the GPT. it is also possible that the device might brick if the modem cannot be brought up.
# the set of modifiable partitions that can be configured by the user (overriding <conf-defaults>):
#configurablePartitions="7 $(seq 9 12)"
#configurablePartitions="$(seq 9 12)"
configurablePartitions="$(seq 19 21)"
# for some partitions it may be unsafe to do anything besides moving them around; those should be left out of this set.
}
device_setup() {
### this is the first function that can access block devices and/or their metadata.
# the number of partitions that the device must have:
#partitionCount=12
partitionCount=21
# the set of defined heaps:
allHeaps="main"
# the partition data move chunk size (must fit in memory):
moveDataChunkSize=$(( 256 * MiB ))
# only call this if you will later use $deviceHeapStart or $deviceHeapEnd:
detectBlockDeviceHeapRange
### the following settings are actually per-heap, but can be defined here instead if their values are constant.
# the size of partitions configured with the 'min' keyword:
#heapMinSize=$(( 8 * MiB ))
# this defaults to 8 MiB, the smallest power-of-2 size that will fit a standard ext4 file system.
# note: this setting only applies to the 'min' keyword; partition sizes all the way down to $heapSizeGranularity
# can still be manually defined even if they are smaller than $heapMinSize.
# the partition alignment:
heapAlignment=$(( 4 * MiB ))
# for best results it is recommended that you use the same alignment chosen by the device OEM.
# you can determine its value by analyzing the stock partitioning, for example with this command:
# > parted /dev/block/whatever -s unit MiB print free
# if in doubt, use 1 or 4 MiB.
# user-configured partition sizes will be rounded (to nearest) to multiples of this value:
#heapSizeGranularity=$heapAlignment
# this defaults to $heapAlignment and should normally not be changed.
}
device_setupHeap_main() {
# each heap is a set of partitions that are physically contiguous in the block device.
# all partition manipulation works exclusively within a heap.
# the set of contiguous partitions that form this heap, in order of ascending partition start address:
#heapPartitions="$(seq 7 12)"
#heapPartitions="$(seq 9 12)"
heapPartitions="$(seq 19 21)"
# the disk area (as a sector range) to use for the heap partitions:
# (the sector range is from heapStart to heapEnd-1 inclusive.)
#heapStart=$deviceHeapStart # the first usable sector of the device
#heapStart=$(parOldEnd 6) # or one past the end of a specific partition
#heapStart=$(parOldEnd 8) # or one past the end of a specific partition
heapStart=$(parOldEnd 18) # or one past the end of a specific partition
#heapStart=344064 # or a fixed sector number
heapEnd=$deviceHeapEnd # one past the last usable sector of the device
#heapEnd=$(parOldStart 13) # or the start of a specific partition
#heapEnd=30769152 # or a fixed sector number
}
#####################################################
# Lanchon REPIT - Device Handler #
# Copyright 2016, Lanchon #
#####################################################
#####################################################
# Lanchon REPIT is free software licensed under #
# the GNU General Public License (GPL) version 3 #
# and any later version. #
#####################################################
### i9100
#
#device_checkDevice() {
#
# checkTool getprop
#
# case ":$(getprop ro.product.device):$(getprop ro.build.product):" in
# *:galaxys2:*) ;;
# *:i9100:*) ;;
# *:GT-I9100:*) ;;
# *:GT-I9100M:*) ;;
# *:GT-I9100P:*) ;;
# *:GT-I9100T:*) ;;
# *:SC-02C:*) ;;
# *)
# fatal "this package is for '$deviceName' devices; this device is '$(getprop ro.product.device)'"
# ;;
# esac
#
#}
### i9105
device_checkDevice() {
checkTool getprop
case ":$(getprop ro.product.device):$(getprop ro.build.product):" in
*:s2ve:*) ;;
*:s2vep:*) ;;
*)
fatal "this package is for '$deviceName' devices; this device is '$(getprop ro.product.device)'"
;;
esac
}
### code after this comment is old and no longer used. it is here for documentation purposes only.
device_detectBlockDeviceSize_i9100() {
# this is unused code from when detectBlockDeviceHeapRange had not yet been implemented.
# it is here for documentation purposes only, ports to other devices should delete this function.
info "detecting eMMC size"
local deviceSize=$(cat $sdev/size)
local heapEnd8GB=15261696
local heapEnd16GB=30769152
local heapEnd32GB=62513152
if [ $(( deviceSize < heapEnd8GB )) -ne 0 ]; then
fatal "eMMC size too small"
elif [ $(( deviceSize < heapEnd16GB )) -ne 0 ]; then
heapEnd=$heapEnd8GB
info "eMMC size is 8 GB"
elif [ $(( deviceSize < heapEnd32GB )) -ne 0 ]; then
heapEnd=$heapEnd16GB
info "eMMC size is 16 GB"
else
heapEnd=$heapEnd32GB
info "eMMC size is 32 GB"
fi
}
device_configureStockLayout_i9100() {
# this is unused code from when the configuration parser had not yet been implemented.
# it is here for documentation purposes only, ports to other devices should delete this function.
# stock partition layout for i9100:
system_size=1
data_size=4
#sdcard_size=11.5078
sdcard_size=max
preload_size=0.5
system_fs=ext4
data_fs=ext4
sdcard_fs=vfat
preload_fs=ext4
}
#####################################################
#deviceName=i9100
deviceName=i9105
main "[email protected]"
Hope this is useful for anyone.
you are the first person ever other than me that ported REPIT to a device, congrats!!!
if you want an official port however, you still have to follow the docs and post a repit-dump of your stock phone... which unfortunately you can't do because you already repartitioned...
anyway, thanks so much!!!
Lanchon said:
you are the first person ever other than me that ported REPIT to a device, congrats!!!
if you want an official port however, you still have to follow the docs and post a repit-dump of your stock phone... which unfortunately you can't do because you already repartitioned...
anyway, thanks so much!!!
Click to expand...
Click to collapse
Hi, I've got the same device, I'm attaching the LOG here. I've raised an issue in GitHub, but I was unable to attach the file (unspecified error).
I'll monitor Github and this post, if nothing happens I'll implement the code from the OP; looking at the cat proc/partitions the numbers do match. :good:
As a sidenote, I think it could be possible to reduce the partition 18 too, 1GB is too much for CSC.
Code:
18 138MB 1212MB 1074MB ext4 CSC
On my s2 (i9100) is already 100MB - what do you think?
Hi!
Small update, I correctly resized my CACHE partition down to 100Mb, from 1Gb (!).
Attached to this post is the "script" file you need to replace in the Lanchon Repit zip file, this will work for the Galaxy i9105/p.
Relevant changes are these ones:
Code:
initPartition 18 CSC cache "same keep ext4" 0
initPartition 19 system system "same keep ext4" 0
initPartition 20 HIDDEN preload "same keep ext4" 0
initPartition 21 userdata data "same keep ext4" $footerSize
and
Code:
configurablePartitions="$(seq 18 21)"
..and a couple more just to work on this partitions ordering (just replace entierly the original file with this one attached).
Naturally, rename the Lanchon script to:
Code:
lanchon-repit-20170115-cache=100M+wipe-system=1.1G+wipe-data=max+wipe-preload=min+wipe-i9105.zip
This will give you a system partition of 1.1G, max Data partition and minimal 100Mb Cache. I think it's possible to downsize to 50Mb or less, might do it later. The phone works well, I'm using the RR 5.84 (7.1.2).
FULL credit to Lanchon original Repit and the OP of this post.