[Q] GT-P7320T custom rom creation with rom kitchen - Android Q&A, Help & Troubleshooting

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?

Related

[Q] VEGAn Boot Sequence

With VEGAn 5.11 and Pershoot kernel. I want to do a few things when it boots up. I don't see the usual /etc/init.d kind of structure.
I did find init.rc and even found a link that describes its peculiar syntax. But editing that file (after remounting) doesn't "take" -- I assume it is on initfs and gets copied to a RAM disk on boot.
Is there anywhere easily user writeable where you can stick something in the boot sequence? Seems like that would be a common enough thing to need to do.
Thanks!
The init.rc is in the ramdisk, and the ramdisk is in the boot.img (found in all the stock and modded ROMs).
Here's a good guide on how unpack / repack that file: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
(obviously it's a bit technical) What I can tell you is that you don't need any cmdline options for the boot.img
Here's a real quick breakdown of what I do (Ubuntu user):
Code:
./unpack-bootimg.pl boot.img
go to the extracted ramdisk folder, make my changes and then:
Code:
find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
cd ..
mkbootimg --kernel boot.img-kernel.gz --ramdisk newramdisk.cpio.gz -o newboot.img
"newboot.img" being my new boot.img. That's how the boot.img in all my mods are created.
Thank you and yeah I figured that was it. Technical is not an issue as I sling unix/linux for ages. Salute to you for all your work on this platform.
Well I cheated a little. Here's what I did:
I noticed that you had added to the bottom of /init.rc a one shot service for /system/etc/shuttle_ins.sh.
So I just remounted rw for /system and added the following to the TOP of /system/etc/shuttle_ins.sh:
# added by aaw
if [ -f /system/etc/rc.local ]; then
sh /system/etc/rc.local &
fi
# end aaw
So now I can put what I want in rc.local -- start up sshd or whatever. In this case here's what I actually wanted:
#!/bin/sh
# this is run at the end of the init.rc sequence if it exists
until mount | grep -m1 sdcard2 ; do sleep 5 ; done # wait for sdcard2 mount
mkdir /mnt/sdcard/sdcard2 # make mount point (might fail, but who cares?)
mount -o bind /mnt/sdcard2 /mnt/sdcard/sdcard2
Of course, this assumes I will always have sdcard2 or it spins. Could put a timeout in I guess, but for me this is always the case. Now things like players that only look in /sdcard can find stuff on sdcard2 as well.
A bit of a hack. I wonder if the release DEVs would consider adding an rc.local in user land in a nicer way? Maybe have a system rc.0 that does the -f test for rc.local and that way if you wanted to add an rc.local you could but if you didn't no harm or foul.
Or did I miss a smarter way to do this?
Thanks for the help (and the great releases, of course!).
I found this in the market: https://market.android.com/details?id=os.tools.scriptmanager
Lets you run scripts at boot time. Haven't tried it for that though, but it could work instead of my rc.local fix. A little different since I assume it runs late (after Android is up) unlike the rc.local which runs before Android, unless I'm mistaken.

S3 kitchen edify file

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

Please review new device edify_defs file for DSIXDA kitchen

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!!!

Need help with Android Kitchen (Unsupported device)

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

Samsung Galaxy S2 Plus (I9105) - Repartitioning with REPIT successful

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.

Categories

Resources