hey guys,
For the past few days I've tried building Cyanogenmod 12 for my device. The build process seems to finish but my build is stuck at 'creating system.img' file. my terminal output is:
Code:
Install: /home/ishtiaque/CM12/android/system/out/target/product/codina/system/app/Email/Email.apk
build/tools/generate-notice-files.py /home/ishtiaque/CM12/android/system/out/target/product/codina/obj/NOTICE.txt /home/ishtiaque/CM12/android/system/out/target/product/codina/obj/NOTICE.html "Notices for files contained in the filesystem images in this directory:" /home/ishtiaque/CM12/android/system/out/target/product/codina/obj/NOTICE_FILES/src
Combining NOTICE files into HTML
Combining NOTICE files into text
Installed file list: /home/ishtiaque/CM12/android/system/out/target/product/codina/installed-files.txt
Target system fs image: /home/ishtiaque/CM12/android/system/out/target/product/codina/obj/PACKAGING/systemimage_intermediates/system.img
Running: mkuserimg.sh -s /home/ishtiaque/CM12/android/system/out/target/product/codina/system /home/ishtiaque/CM12/android/system/out/target/product/codina/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 641728512 /home/ishtiaque/CM12/android/system/out/target/product/codina/root/file_contexts
make_ext4fs -s -T -1 -S /home/ishtiaque/CM12/android/system/out/target/product/codina/root/file_contexts -l 641728512 -a system /home/ishtiaque/CM12/android/system/out/target/product/codina/obj/PACKAGING/systemimage_intermediates/system.img /home/ishtiaque/CM12/android/system/out/target/product/codina/system
Creating filesystem with parameters:
Size: 641728512
Block size: 4096
Blocks per group: 32768
Inodes per group: 7840
Inode size: 256
Journal blocks: 2448
Label:
Blocks: 156672
Block groups: 5
Reserved block group size: 39
Created filesystem with 2570/39200 inodes and 106418/156672 blocks
now I've tried re-downloading the sources and building again after waiting overnight at this step but it just doesn't finish.
So my question is: can I skip the creation of these .img files and proceed to making the flashable zip in any way? I don't have fastboot option for my device afterall so its quite unnecessary to create these image files (it seems to me)
Thanks
Edit: according to the above output, a system.img file is actually produced in the systemimage_intermediates but it doesn't ge tcopied in the /product/codina folder
ishtiaque9 said:
hey guys,
Code:
Install: /home/ishtiaque/CM12/android/system/out/target/product/codina/system/app/Email/Email.apk
build/tools/generate-notice-files.py /home/ishtiaque/CM12/android/system/out/target/product/codina/obj/NOTICE.txt /home/ishtiaque/CM12/android/system/out/target/product/codina/obj/NOTICE.html "Notices for files contained in the filesystem images in this directory:" /home/ishtiaque/CM12/android/system/out/target/product/codina/obj/NOTICE_FILES/src
Combining NOTICE files into HTML
Combining NOTICE files into text
Installed file list: /home/ishtiaque/CM12/android/system/out/target/product/codina/installed-files.txt
Target system fs image: /home/ishtiaque/CM12/android/system/out/target/product/codina/obj/PACKAGING/systemimage_intermediates/system.img
Running: mkuserimg.sh -s /home/ishtiaque/CM12/android/system/out/target/product/codina/system /home/ishtiaque/CM12/android/system/out/target/product/codina/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 641728512 /home/ishtiaque/CM12/android/system/out/target/product/codina/root/file_contexts
make_ext4fs -s -T -1 -S /home/ishtiaque/CM12/android/system/out/target/product/codina/root/file_contexts -l 641728512 -a system /home/ishtiaque/CM12/android/system/out/target/product/codina/obj/PACKAGING/systemimage_intermediates/system.img /home/ishtiaque/CM12/android/system/out/target/product/codina/system
Creating filesystem with parameters:
Size: 641728512
Block size: 4096
Blocks per group: 32768
Inodes per group: 7840
Inode size: 256
Journal blocks: 2448
Label:
Blocks: 156672
Block groups: 5
Reserved block group size: 39
Created filesystem with 2570/39200 inodes and 106418/156672 blocks
Click to expand...
Click to collapse
I'm having same problem, do you know how to fix?
hastalafiesta said:
I'm having same problem, do you know how to fix?
Click to expand...
Click to collapse
hey hastalafiesta,
apparently I managed to get past this point. there are several files you need to edit:
1. build/core/Makefile: here you have to enter several lines which allow you to skip recovery_from_boot.p file (which wasn't created on Cyanogenmod 11 idk why)
Code:
# The system partition needs room for the recovery image as well. We
# now store the recovery image as a binary patch using the boot image
# as the source (since they are very similar). Generate the patch so
# we can see how big it's going to be, and include that in the system
# image size check calculation.
ifneq ($(INSTALLED_RECOVERYIMAGE_TARGET),)
intermediates := $(call intermediates-dir-for,PACKAGING,recovery_patch)
ifndef BOARD_CUSTOM_BOOTIMG_MK
ifeq ($(CM_BUILD),)
RECOVERY_FROM_BOOT_PATCH := $(intermediates)/recovery_from_boot.p
else
RECOVERY_FROM_BOOT_PATCH :=
endif
else
RECOVERY_FROM_BOOT_PATCH :=
endif
$(RECOVERY_FROM_BOOT_PATCH): $(INSTALLED_RECOVERYIMAGE_TARGET) \
$(INSTALLED_BOOTIMAGE_TARGET) \
$(HOST_OUT_EXECUTABLES)/imgdiff \
$(HOST_OUT_EXECUTABLES)/bsdiff
@echo -e ${CL_CYN}"Construct recovery from boot"${CL_RST}
mkdir -p $(dir [email protected])
PATH=$(HOST_OUT_EXECUTABLES):$$PATH $(HOST_OUT_EXECUTABLES)/imgdiff $(INSTALLED_BOOTIMAGE_TARGET) $(INSTALLED_RECOVERYIMAGE_TARGET) [email protected]
endif
$(INSTALLED_SYSTEMIMAGE): $(BUILT_SYSTEMIMAGE) $(RECOVERY_FROM_BOOT_PATCH) | $(ACP)
@echo -e ${CL_CYN}"Install system fs image: [email protected]"${CL_RST}
$(copy-file-to-target)
$(hide) $(call assert-max-image-size,[email protected] $(RECOVERY_FROM_BOOT_PATCH),$(BOARD_SYSTEMIMAGE_PARTITION_SIZE),yaffs)
systemimage: $(INSTALLED_SYSTEMIMAGE)
.PHONY: systemimage-nodeps snod
systemimage-nodeps snod: $(filter-out systemimage-nodeps snod,$(MAKECMDGOALS)) \
| $(INTERNAL_USERIMAGES_DEPS)
@echo "make [email protected]: ignoring dependencies"
$(call build-systemimage-target,$(INSTALLED_SYSTEMIMAGE))
$(hide) $(call assert-max-image-size,$(INSTALLED_SYSTEMIMAGE),$(BOARD_SYSTEMIMAGE_PARTITION_SIZE),yaffs)
ifneq (,$(filter systemimage-nodeps snod, $(MAKECMDGOALS)))
ifeq (true,$(WITH_DEXPREOPT))
$(warning Warning: with dexpreopt enabled, you may need a full rebuild.)
endif
endif
#######
## system tarball
match the first and last comment to find the relevant sections in the file, then replace.
2. build/tools/post_process_props.py: add the lines that start with '+'
Code:
def mangle_default_prop(prop):
# If ro.debuggable is 1, then enable adb on USB by default
# (this is for userdebug builds)
+ prop.put("ro.secure", "0")
+ prop.put("ro.adb.secure", "0")
if prop.get("ro.debuggable") == "1":
val = prop.get("persist.sys.usb.config")
if val == "":
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 7908b70..732c8c1 100755
3. build/tools/releasetools/common.py: same as post_process_props
Code:
def MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img,
info_dict=None):
+ pass
+
+def MakeRecoveryPatch2(input_dir, output_sink, recovery_img, boot_img,
+ info_dict=None):
"""Generate a binary patch that creates the recovery image starting
with the boot image. (Most of the space in these images is just the
kernel, which is identical for the two, so the resulting patch
and voila! your build will finish and a zip will form. try flashing it :good:
credits for the edits: @nieltg
~ishtiaque
ishtiaque9 said:
Code:
def mangle_default_prop(prop):
# If ro.debuggable is 1, then enable adb on USB by default
# (this is for userdebug builds)
+ prop.put("ro.secure", "0")
+ prop.put("ro.adb.secure", "0")
if prop.get("ro.debuggable") == "1":
val = prop.get("persist.sys.usb.config")
if val == "":
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 7908b70..732c8c1 100755
Click to expand...
Click to collapse
Actually, I use this part of code to force-enable ADB debugging in my build..
So, this part of code isn't mandatory.. Sorry!
nieltg said:
Actually, I use this part of code to force-enable ADB debugging in my build..
So, this part of code isn't mandatory.. Sorry!
Click to expand...
Click to collapse
any developer needs ADB
Related
Hey fellow guys!!!
I have been trying to make ODIN roms for my device (Galaxy NOTE).
I have tried making system.img using adb using this command:
Code:
dd if=/dev/block/mmcblk0p9 of=/sdcard/system.img bs=4096
And got system.img in my sdcard.When I made tar ball of the img and tried to flash with ODIN it said failed!!
So I continued searching and found this thread.
what I made was:
extract my previously created system.img into a folder called system and used this command in terminal:
Code:
[email protected]:~/ext4_utils$ ./mkuserimg.sh -s ~/system/ ./factoryfs_custom.img ext4 ./temp 512M
But I get this error:
Code:
in mkuserimg.sh PATH=/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
./make_ext4fs -s -l 512M -a ./temp ./factoryfs_custom.img /home/vijai/system/
./mkuserimg.sh: line 52: ./make_ext4fs: No such file or directory
Where am I going wrong??Or someone could guide me in right direction??
Thanks.
You need the make_ext4fs tool, get it by googling and place it in the directory the script is.
Sent from my GT-P1000
cdesai said:
You need the make_ext4fs tool, get it by googling and place it in the directory the script is.
Sent from my GT-P1000
Click to expand...
Click to collapse
thanks Will report after trying
Now I get this error:
Code:
./mkuserimg.sh: line 52: ./make_ext4fs: cannot execute binary file
vijai2011 said:
Now I get this error:
Code:
./mkuserimg.sh: line 52: ./make_ext4fs: cannot execute binary file
Click to expand...
Click to collapse
chmod +x ./make_ext4fs
Sent from my GT-P1000
cdesai said:
chmod +x ./make_ext4fs
Sent from my GT-P1000
Click to expand...
Click to collapse
Sorry the file was a wrong one .
I put in the correct file and type the command and I got this error:
[email protected]:~/ext4_utils$ ./mkuserimg.sh -s ~/system/ ./factoryfs_custom.img ext4 ./temp 512M
in mkuserimg.sh PATH=/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
./make_ext4fs -s -l 512M -a ./temp ./factoryfs_custom.img /home/vijai/system/
Creating filesystem with parameters:
Size: 536870912
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 2048
Label:
Blocks: 131072
Block groups: 4
Reserved block group size: 31
error: do_inode_allocate_extents: Failed to allocate 134 blocks
Click to expand...
Click to collapse
vijai2011 said:
Sorry the file was a wrong one .
I put in the correct file and type the command and I got this error:
Click to expand...
Click to collapse
hello
i have the same error, have you solved?
I am getting these errors while the system.img is being made. Making for an ARMv6 device . Samsung Galaxy Fit aka Beni
I am getting these errors
+ FC=
+ case $EXT_VARIANT in
+ '[' -z system ']'
+ '[' -z 229938816 ']'
+ '[' -n '' ']'
+ MAKE_EXT4FS_CMD='make_ext4fs -s -l 229938816 -a system /home/yajnavalkya/cm10/out/target/product/beni/obj/PACKAGING/systemimage_intermediates/system.img /home/yajnavalkya/cm10/out/target/product/beni/system'
+ echo make_ext4fs -s -l 229938816 -a system /home/yajnavalkya/cm10/out/target/product/beni/obj/PACKAGING/systemimage_intermediates/system.img /home/yajnavalkya/cm10/out/target/product/beni/system
make_ext4fs -s -l 229938816 -a system /home/yajnavalkya/cm10/out/target/product/beni/obj/PACKAGING/systemimage_intermediates/system.img /home/yajnavalkya/cm10/out/target/product/beni/system
+ make_ext4fs -s -l 229938816 -a system /home/yajnavalkya/cm10/out/target/product/beni/obj/PACKAGING/systemimage_intermediates/system.img /home/yajnavalkya/cm10/out/target/product/beni/system
Creating filesystem with parameters:
Size: 229937152
Block size: 4096
Blocks per group: 32768
Inodes per group: 7024
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 56137
Block groups: 2
Reserved block group size: 15
error: do_inode_allocate_extents: Failed to allocate 2006 blocks
+ '[' 1 -ne 0 ']'
+ exit 4
error: failed to build /home/yajnavalkya/cm10/out/target/product/beni/obj/PACKAGING/systemimage_intermediates/system.img from /home/yajnavalkya/cm10/out/target/product/beni/system
make: *** [/home/yajnavalkya/cm10/out/target/product/beni/obj/PACKAGING/systemimage_intermediates/system.img] Error 1
make: *** Deleting file `/home/yajnavalkya/cm10/out/target/product/beni/obj/PACKAGING/systemimage_intermediates/system.img'
I have a AMD fx-6100(3.4GHZ), 4GB RAM and 50GB free space on HDD but i am getting this error. How to solve this
Not enough memory.
Yeah...not enough HDD space...once everything is downloaded, extracted, then built...it takes close to 70gb...the out directory alone ends up being about 25gb...
Sent from my SGH-I997 using Tapatalk 2
mg2195 said:
Yeah...not enough HDD space...once everything is downloaded, extracted, then built...it takes close to 70gb...the out directory alone ends up being about 25gb...
Sent from my SGH-I997 using Tapatalk 2
Click to expand...
Click to collapse
Still 50 GB of Diskspace is left:laugh:
Since our the G Watch uses the SquashFS for it's system image, I thought it would be helpful to know, how to modify it (Tested on Ubuntu 16.04).
Download and build googles squashfs tools:
Important: Yes, squashfs-tools/squashfs-tools is correct.
Code:
git clone https://android.googlesource.com/platform/external/squashfs-tools/
cd squashfs-tools/squashfs-tools/
make
Unsquash the image
Important: Use 'sudo' to preserve ownership of files
Code:
sudo unsquashfs -d path/to/unpacked/dir path/to/image
Modify the contents
Resquash
Code:
mksquashfs path/to/unpacked/dir path/to/final/image.img -comp gzip -b 131072 -no-exports
Final things:
There is a difference in blocks if you only unsquash and resquash the image (2869 for the original to 2873 for the resquashed one).
The links are not perfectly recreated, some permissions are lost, and times are modified.
The options for resquasing (-comp gzip -b 131072 -no-exports) are from the output of
Code:
unsquashfs -s path/to/image
You can preview the image and the permissions with
Code:
unsquashfs -ll path/to/image
I tried on both windows and ubuntu.
First I try to flash the original cache.img
Code:
heimdall flash --CACHE cache.img
Works, no errors and everything goes fine. Now when I do...
Code:
>file cache.img
cache.img: Android sparse image, version: 1.0, Total of 16384 4096-byte output blocks in 14 input chunks.
>simg2img cache.img cache.raw
>img2simg cache.raw cache2.img
>file cache2.img
cache2.img: Android sparse image, version: 1.0, Total of 16384 4096-byte output blocks in 74 input chunks.
Without changing (or even mounting) the raw file at all! I just converted it to raw and back.
Then I tried to flash the new file again, fails. And as you can see they are obviously very different, even though I did absolutely no changes!
I verified the block size, the default one (4096) is the correct one.
Also, the original cache.img is 49.4 MB, the cache2.img file is 39.6 MB
The output when trying to flash the new cache.img file:
Code:
Uploading CACHE
100%
ERROR: Failed to confirm end of file transfer sequence!
ERROR: CACHE upload failed!
It should be the same file, but isn't. What am I doing wrong?
Edit:
Instead of using img2simg, I used mkuserimg.sh which created a file that's NEARLY identical to my original file:
Code:
>sudo ./mkuserimg.sh -s ./cache ./cache2.img ext4 cache 64M
in mkuserimg.sh PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
make_ext4fs -s -l 64M -a cache ./cache2.img ./cache
Creating filesystem with parameters:
Size: 67108864
Block size: 4096
Blocks per group: 32768
Inodes per group: 4096
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 16384
Block groups: 1
Reserved block group size: 7
Created filesystem with 15/4096 inodes and 12062/16384 blocks
>file *.img
cache2.img: Android sparse image, version: 1.0, Total of 16384 4096-byte output blocks in 14 input chunks.
cache.img: Android sparse image, version: 1.0, Total of 16384 4096-byte output blocks in 14 input chunks.
>ls -l *.img
-rw-r--r-- 1 root root 49406148 Aug 20 13:19 cache2.img
-rwxrw-rw- 1 ae ae 49406208 May 19 09:24 cache.img
As you see they slightly differ now, but flashing still fails. Adding --verbose to heimdall adds this:
Code:
ERROR: Failed to unpack received packet.
Edit 2:
I'm using a Samsung device (Galaxy S7)
Fixed it in the end using manually compiled and modified binaries of the sim2img and img2sim. The original source is obtained from
github .com/ASdev/android_img_repack_tools/tree/android-6.0.1
and then apply this patch
gist. github .com/jedld/4f388496bda03b349f5744f367749a67
(had to add spaces because i'm a new user, but wanted to put this here in case someone else has this problem)
then build it, and it flashes now properly. (using simg2img and img2simg)
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.