[Q]Error building cyanogenmod - Android Q&A, Help & Troubleshooting

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:

Related

[Q] Unpacking and repacking stock rom .img files

hello,
Question on this post, I have no access to answer
http://forum.xda-developers.com/showthread.php?t=1081239
Thanks, good work to unpack the .img file.
I have a problem
repacking factoryfs_custom.img only 10,2*Mio (10678552 octets)
Code:
[email protected]:/home/max/ext4_utils# mkdir tempdir; mount -o loop output.img tempdir
[email protected]:/home/max/ext4_utils# ./mkuserimg.sh -s /some/directory/with/files ./factoryfs_custom.img ext4 ./temp 512M
in mkuserimg.sh PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
./make_ext4fs -s -l 512M -a ./temp ./factoryfs_custom.img /some/directory/with/files
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
Created filesystem with 10/32768 inodes and 4205/131072 blocks
[email protected]:/home/max/ext4_utils# ls -l factoryfs_custom.img
-rw-r--r-- 1 root root 10678552 2011-05-28 09:57 factoryfs_custom.img
[email protected]:/home/max/ext4_utils#
what is the problem?
sorry for my bad English
Thanks
Can we move my question in the original post?
http://forum.xda-developers.com/showthread.php?t=1081239
Thank
max30 said:
Can we move my question in the original post?
http://forum.xda-developers.com/showthread.php?t=1081239
Thank
Click to expand...
Click to collapse
It remains for me to write the six missing messages to be able to ask my question in the right place
max30 said:
It remains for me to write the six missing messages to be able to ask my question in the right place
Click to expand...
Click to collapse
I can go post in the right place now

making a nook-bootable SD card (in general) on Linux

It took me a while to figure out why verygreen's image worked, but I was not able to reproduce the result by creating my own partitions and copying his files over. Looking more closely at verygreen's image and my own, I noticed that the first partitions started at different positions. I was able to get my homebrew SD card working just by making the first partition start at the 63rd sector:
Code:
$ sudo fdisk -l /dev/sdb
Disk /dev/sdb: 15.9 GB, 15931539456 bytes
64 heads, 32 sectors/track, 15193 cylinders, total 31116288 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e525a
Device Boot Start End Blocks Id System
/dev/sdb1 * 63 329790 164864 e W95 FAT16 (LBA)
/dev/sdb2 329791 1312830 491520 83 Linux
/dev/sdb3 1312831 3409982 1048576 83 Linux
/dev/sdb4 3409983 31116287 13853152+ c W95 FAT32 (LBA)
How do you do this using fdisk? After you create the first partition, type 'x' for extra functionality (experts only). From there, you could then type 'b', then '1', then '63' to make your first partition start at the right place. Press 'r' to return to the main menu, and make the rest of your partitions from there. Note that this operation breaks whatever filesystem was originally on the first partition, so it would need to be reformatted. MAKE BACKUPS. Don't forget to write changes!
FatTire and nemith confirmed that the first partition needed to be special, and pointed to this informational page. It even contains a nifty script. I didn't need most of that, since tweaking the beginning-of-data worked for me every time, but give it a read anyway.
You know, I'm sure this was something very simple for the ones that knew. But I too struggled with creating a bootable sdcard from scratch. I would set up all the correct partitions with the correct flags and still nogo. Who would've thought it would be something as simple as that. Thanks for this!
-Racks
Now I can create my own "Verygreen" installer img, muah ha hah... It was that whole formatting the uSD thing with those special considerations that has been tripping me up the whole time.
This didnt work for me, anyone have a script that could format a boot partition and an ext 3 partition with it? one with custom boot size like 4Gb fat or 3GB fat or 5GB fat prefferably 4.5GB but if you know how to customise the script below to create 4.5 GB fat partiton right now this creates only a 73 Mb fat partition the rest ext3
#! /bin/sh
# mkcard.sh v0.5
# (c) Copyright 2009 Graeme Gregory <[email protected]>
# Licensed under terms of GPLv2
#
# Parts of the procudure base on the work of Denys Dmytriyenko
# http://wiki.omap.com/index.php/MMC_Boot_Format
export LC_ALL=C
if [ $# -ne 1 ]; then
echo "Usage: $0 <drive>"
exit 1;
fi
DRIVE=$1
dd if=/dev/zero of=$DRIVE bs=1024 count=1024
SIZE=`fdisk -l $DRIVE | grep Disk | grep bytes | awk '{print $5}'`
echo DISK SIZE - $SIZE bytes
CYLINDERS=`echo $SIZE/255/63/512 | bc`
echo CYLINDERS - $CYLINDERS
{
echo ,9,0x0C,*
echo ,,,-
} | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE
sleep 1
if [ -x `which kpartx` ]; then
kpartx -a ${DRIVE}
fi
# handle various device names.
# note something like fdisk -l /dev/loop0 | egrep -E '^/dev' | cut -d' ' -f1
# won't work due to https://bugzilla.redhat.com/show_bug.cgi?id=649572
PARTITION1=${DRIVE}1
if [ ! -b ${PARTITION1} ]; then
PARTITION1=${DRIVE}p1
fi
DRIVE_NAME=`basename $DRIVE`
DEV_DIR=`dirname $DRIVE`
if [ ! -b ${PARTITION1} ]; then
PARTITION1=$DEV_DIR/mapper/${DRIVE_NAME}p1
fi
PARTITION2=${DRIVE}2
if [ ! -b ${PARTITION2} ]; then
PARTITION2=${DRIVE}p2
fi
if [ ! -b ${PARTITION2} ]; then
PARTITION2=$DEV_DIR/mapper/${DRIVE_NAME}p2
fi
# now make partitions.
if [ -b ${PARTITION1} ]; then
umount ${PARTITION1}
mkfs.vfat -F 32 -n "boot" ${PARTITION1}
else
echo "Cant find boot partition in /dev"
fi
if [ -b ${PARITION2} ]; then
umount ${PARTITION2}
mke2fs -j -L "Angstrom" ${PARTITION2}
else
echo "Cant find rootfs partition in /dev"
fi
DroidisLINUX said:
This didnt work for me, anyone have a script that could format a boot partition and an ext 3 partition with it? one with custom boot size like 4Gb fat or 3GB fat or 5GB fat prefferably 4.5GB but if you know how to customise the script below to create 4.5 GB fat partiton right now this creates only a 73 Mb fat partition the rest ext3
#! /bin/sh
# mkcard.sh v0.5
# (c) Copyright 2009 Graeme Gregory <[email protected]>
# Licensed under terms of GPLv2
#
# Parts of the procudure base on the work of Denys Dmytriyenko
# http://wiki.omap.com/index.php/MMC_Boot_Format
export LC_ALL=C
if [ $# -ne 1 ]; then
echo "Usage: $0 <drive>"
exit 1;
fi
DRIVE=$1
dd if=/dev/zero of=$DRIVE bs=1024 count=1024
SIZE=`fdisk -l $DRIVE | grep Disk | grep bytes | awk '{print $5}'`
echo DISK SIZE - $SIZE bytes
CYLINDERS=`echo $SIZE/255/63/512 | bc`
echo CYLINDERS - $CYLINDERS
{
echo ,9,0x0C,*
echo ,,,-
} | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE
sleep 1
if [ -x `which kpartx` ]; then
kpartx -a ${DRIVE}
fi
# handle various device names.
# note something like fdisk -l /dev/loop0 | egrep -E '^/dev' | cut -d' ' -f1
# won't work due to https://bugzilla.redhat.com/show_bug.cgi?id=649572
PARTITION1=${DRIVE}1
if [ ! -b ${PARTITION1} ]; then
PARTITION1=${DRIVE}p1
fi
DRIVE_NAME=`basename $DRIVE`
DEV_DIR=`dirname $DRIVE`
if [ ! -b ${PARTITION1} ]; then
PARTITION1=$DEV_DIR/mapper/${DRIVE_NAME}p1
fi
PARTITION2=${DRIVE}2
if [ ! -b ${PARTITION2} ]; then
PARTITION2=${DRIVE}p2
fi
if [ ! -b ${PARTITION2} ]; then
PARTITION2=$DEV_DIR/mapper/${DRIVE_NAME}p2
fi
# now make partitions.
if [ -b ${PARTITION1} ]; then
umount ${PARTITION1}
mkfs.vfat -F 32 -n "boot" ${PARTITION1}
else
echo "Cant find boot partition in /dev"
fi
if [ -b ${PARITION2} ]; then
umount ${PARTITION2}
mke2fs -j -L "Angstrom" ${PARTITION2}
else
echo "Cant find rootfs partition in /dev"
fi
Click to expand...
Click to collapse
Code:
# fdisk /dev/sdb
Command (m for help): o
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Print card info:
Command (m for help): p
Disk /dev/sdb: 128 MB, 128450560 bytes
....
Note card size in bytes. Needed later below.
Then go into "Expert mode":
Command (m for help): x
Now we want to set the geometry to 255 heads, 63 sectors and calculate the number of cylinders required for the particular SD/MMC card:
Expert command (m for help): h
Number of heads (1-256, default 4): 255
Expert command (m for help): s
Number of sectors (1-63, default 62): 63
Warning: setting sector offset for DOS compatiblity
Expert command (m for help): c
Number of cylinders (1-1048576, default 1011): 15
In this case 128MB card is used (reported as 128450560 bytes by fdisk above), thus 128450560 / 255 / 63 / 512 = 15.6 rounded down to 15 cylinders. Numbers there are 255 heads, 63 sectors, 512 bytes per sector.
Now, return to main mode and create a new partition:
Expert command (m for help): r
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-15, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-15, default 15): 15
Mark it bootable:
Command (m for help): a
Partition number (1-4): 1
And change its type to FAT32:
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (W95 FAT32 (LBA))
The result is:
Command (m for help): p
Disk /dev/sdb: 128 MB, 128450560 bytes
255 heads, 63 sectors/track, 15 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 15 120456 c W95 FAT32 (LBA)
Now, really write configuration to card (until here, card is not changed):
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
Done! What's left is to format our partition as FAT32 to be mounted and populated:
# mkfs.vfat -F 32 /dev/sdb1
mkfs.vfat 2.11 (12 Mar 2005)
Note: before running mkfs.vfat (included in the dosfstools package in Debian) make sure /dev/sdb is not mounted.
# mount /dev/sdb1 /mnt/tmp
Note: If you use additional mkfs.vfat parameter -n you can give the card a name, e.g. for easier identification (i.e. mkfs.vfat -n omap3 -F 32 /dev/sdb1)
The SD/MMC card is now ready to be used to boot OMAP3 boards.
sfdisk
In order to format same card using sfdisk, one needs to do the following:
# sfdisk -H 255 -S 63 -C 15 /dev/sdb << EOF
> ,,b,*
> EOF
This worked for me, once I used mkcard.sh I deleted the partitions then created a new partition following these steps and now I have a 4.5 Gb boot partition and a 3.0 ext3 Angstrom partition and a 500 Mb swap partition I found that the angstrom only needed about 2.7 to 2.8 Gb or space so that was why I wanted it this way so I could still have a large sdcard when I boot normaly.
I did have to do some math as my sdcard is a 8 GB sdcard not a 128 megs but once i did the math the cyclenders came out to be 966 and then I did everything else like it said make sure to add bootable flag and edit first sector at 63 on the first partition then it works, if you have problems try to change id to option e worked (W95 FAT16 (LBA)) and use mkfs.vfat -F 16 /dev/sdb1 other wise try option c mkfs.vfat -F 32 /dev/sdb1. I got the fat 32 to work so I am happy

How to make Odin package for ex4 devices

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?

Make Cyanogenmod ROM zip without creating the .img files

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

The most Powerful Feature of the HP Touchpad (LVM)

Flash files are available here to automatically create the swap partition:
https://forum.xda-developers.com/hp-touchpad/general/how-to-create-swap-partition-size-t3892060#post78939182
How to configure the Hp Touchpad internal storage
The most important feature that was ahead of its time and still until today is the use of LVM (Logical Volume Manager) for managing the internal storage.
To the regular user it will be insignificant but it can provide great benefits if deploy properly.
I could be wrong, but the TP could be the first and only mobile device ever shipped with LVM even now. (someone can correct me on this)
What is LVM?
https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)
I am a regular user and not an expert on LVM in Linux, the only device that I have to play with LVM is the TP and will show you the basics usage and it may not even have the full potential settings.
In webOS there is a program (app) call Tailor ( Formerly Known as Resizah ), a graphical interface to manage LVM.
http://preware.pivotce.com/package/org.webosinternals.tailor
https://www.webos-internals.org/wiki/Application:Tailor
https://forums.webosnation.com/webos-internals/304871-tailor-device-live-partition-filesystem-editor-beta-testing.html
https://github.com/rwhitby/tailor
The last alpha version 0.3.1 allows for creating a LuneOS partition.
Also you can create all Android partitions inside WebOS, create and resize all partitions while running WebOS.The magic of LVM!
Attached is a screen shot of my TP running Taylor.
Think of it as creating, deleting , moving, expanding or reducing (files and folders) with your file manager. Instead it will be the actual storage card, partitions, volumes. All done withing the OS no need to reboot or enter any commands. Resizing the android system, cache or data partition live inside android with just touch input.! That is how easy it could have been, but Android does not use LVM and the TP had to follow the rest of the herd. The reason that WebOS, Android, LuneOS (and more OS) can be install together is due to the flexibility of LVM.
The ToolBox by jcsullins provides scripts to create webOS and Android volumes and resize system, cache and data. But is not a live system and limited to pre-configure settings.
All the flexibility and easy to use comes with a risk of data lost as we know not everything in the computer world works as intended, due to the endless configuration and uses of each user.
Code:
This is a 32G Touchpad with WebOS, Android and LuneOS install and perfectly running.
Factory install WebOS (original)
Used ToolBox to create Android system, cache and data
Used Taylor to create luneos-root
List of physical volumes
/dev/store/root [ 568.00 MB]
/dev/store/var [ 64.00 MB]
/dev/store/update [ 16.00 MB]
/dev/store/log [ 24.00 MB]
/dev/store/mojodb [ 256.00 MB]
/dev/store/filecache [ 136.00 MB]
/dev/store/media [ 19.44 GB]
/dev/store/swap [ 400.00 MB]
/dev/store/cm-cache [ 200.00 MB]
/dev/store/cm-data [ 4.88 GB]
/dev/store/cm-system [ 1.17 GB]
/dev/store/luneos-root [ 1.95 GB]
12 disks
0 partitions
0 LVM physical volume whole disks
0 LVM physical volumes
LVM is reporting to each OS its own disks and each OS mounts its own Disk using f stabs. In reality there is only one storage, not 12 ( the magic of LVM !
This is a 32G Touchpad that was completely reset using the Toolbox.
/dev/block/mmcblk0p8 [ 10.00 MiB]
/dev/block/mmcblk0p9 [ 1.46 MiB]
/dev/block/mmcblk0p1 [ 100.00 MiB]
/dev/block/mmcblk0p10 [ 3.00 MiB]
/dev/block/mmcblk0p11 [ 3.00 MiB]
/dev/block/mmcblk0p3 [ 1.46 MiB]
/dev/block/mmcblk0p12 [ 4.00 MiB]
/dev/block/mmcblk0p13 [ 32.00 MiB]
/dev/block/mmcblk0p14 [ 29.09 GiB] LVM physical volume
/dev/block/mmcblk0p6 [ 750.00 KiB]
/dev/store/media [ 29.09 GiB]
/dev/block/mmcblk0p7 [ 2.44 MiB]
1 disk
10 partitions
0 LVM physical volume whole disks
1 LVM physical volume
/dev/block/mmcblk0p13 ( is the boot partition ) 32 MB where all the uImages are boot it from.
This is the physical volume the real internal storage.
PV VG Fmt Attr PSize PFree
/dev/block/mmcblk0p14 store lvm2 a- 29.09g 0
This is the logical volume of the physical volume which is part of the volume group "store"
The media USB storage in Android. This is the logical volume to resize and create other logical volume.
--- Logical volume ---
LV Name /dev/store/media
VG Name store
LV UUID WhFWig-xwTY-0SK3-OnrS-32mq-gADG-7mLY7c
LV Write Access read/write
LV Status available
# open 1
LV Size 29.09 GiB
Current LE 3723
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 4096
Persistent major 254
Persistent minor 6
Block device 253:6
This is all done loading TWRP mounting /boot and adb shell.
The working directory for lvm.static is:
/boot/usr/sbin
to execute ./lvm.static plus command.
Resizing Logical volume /dev/store/media to 1GB
./lvm.static lvresize --size 1G /dev/store/media
PV VG Fmt Attr PSize PFree
/dev/block/mmcblk0p14 store lvm2 a- 29.09g 28.09g
Now there is 28.09g free to be allocated to any volume (disk) we want to create
Keep in mind the Persistent minor is 6 of the major 254 ( the next disk can be from 0 to 5 and 7 to 254 ) but 6 is already taken.
Creating Android volume cm-system
./lvm.static lvcreate -L 1.3G -M y --major 254 --minor 0 -n /dev/store/cm-system
Creating Android volume cm-cache
./lvm.static lvcreate -L 200M -M y --major 254 --minor 1 -n /dev/store/cm-cache
Creating Android volume cm-data (4GB)
./lvm.static lvcreate -L 4G -M y --major 254 --minor 2 -n /dev/store/cm-data
Activating the new logical volume
/boot/usr/sbin # ./lvm.static vgchange -ay
4 logical volume(s) in volume group "store" now active
/boot/usr/sbin # ./lvm.static pvs
PV VG Fmt Attr PSize PFree
/dev/block/mmcblk0p14 store lvm2 a- 29.09g 22.59g
There is 22.59GB free to create more volume or disk!
Let's create volumes to install Linux as chroot
./lvm.static lvcreate -L 2G -M y --major 254 --minor 5 -n /dev/store/Linux-root
Another chroot as Debian!
./lvm.static lvcreate -L 2G -M y --major 254 --minor 7 -n /dev/store/debian-root
Create LuneOS volume
./lvm.static lvcreate -L 2G -M y --major 254 --minor 4 -n /dev/store/luneos-root
There is 16.59GB free
/boot/usr/sbin # ./lvm.static pvs
PV VG Fmt Attr PSize PFree
/dev/block/mmcblk0p14 store lvm2 a- 29.09g 16.59g
Let's create another Android installation ( completely independent )
Android PIE system
./lvm.static lvcreate -L 1.3G -M y --major 254 --minor 8 -n /dev/store/A_PIE-system
Android PIE cache
./lvm.static lvcreate -L 200M -M y --major 254 --minor 9 -n /dev/store/A_PIE-cache
Android PIE Data (4GB)
./lvm.static lvcreate -L 4G -M y --major 254 --minor 10 -n /dev/store/A_PIE-data
There is 11.09GB free
/boot/usr/sbin # ./lvm.static pvs
PV VG Fmt Attr PSize PFree
/dev/block/mmcblk0p14 store lvm2 a- 29.09g 11.09g
Let's create SailFishOS!
./lvm.static lvcreate -L 2G -M y --major 254 --minor 11 -n /dev/store/Sailfish_OS
Another Installation Android 10 Queso!
A_Queso-system
./lvm.static lvcreate -L 1.3G -M y --major 254 --minor 12 -n /dev/store/A_Queso-system
A_Queso-cache
./lvm.static lvcreate -L 200M -M y --major 254 --minor 13 -n /dev/store/A_Queso-cache
A_Queso_data
./lvm.static lvcreate -L 2G -M y --major 254 --minor 14 -n /dev/store/A_Queso_data
There is 5.59GB free
PV VG Fmt Attr PSize PFree
/dev/block/mmcblk0p14 store lvm2 a- 29.09g 5.59g
What about a swap volume!
./lvm.static lvcreate -L 1G -C y -M y --major 254 --minor 15 -n /dev/store/swap
Now we can give the command to LVM to extend media to use the 4.59GB available and use it all.
/lvm.static lvresize -l 100%FREE /dev/store/media
15 logical volume(s) in volume group "store" now active
Here is the summary of all the disks available:
/boot/usr/sbin # ./lvm.static lvmdiskscan
/dev/block/mmcblk0p8 [ 10.00 MiB]
/dev/store/cm-system [ 1.30 GiB]
/dev/block/mmcblk0p9 [ 1.46 MiB]
/dev/block/mmcblk0p1 [ 100.00 MiB]
/dev/store/cm-cache [ 200.00 MiB]
/dev/block/mmcblk0p10 [ 3.00 MiB]
/dev/store/cm-data [ 4.00 GiB]
/dev/block/mmcblk0p11 [ 3.00 MiB]
/dev/block/mmcblk0p3 [ 1.46 MiB]
/dev/block/mmcblk0p12 [ 4.00 MiB]
/dev/store/luneos-root [ 2.00 GiB]
/dev/block/mmcblk0p13 [ 32.00 MiB]
/dev/store/Linux-root [ 2.00 GiB]
/dev/block/mmcblk0p14 [ 29.09 GiB] LVM physical volume
/dev/block/mmcblk0p6 [ 750.00 KiB]
/dev/store/media [ 4.59 GiB]
/dev/block/mmcblk0p7 [ 2.44 MiB]
/dev/store/debian-root [ 2.00 GiB]
/dev/store/A_PIE-system [ 1.30 GiB]
/dev/store/A_PIE-cache [ 200.00 MiB]
/dev/store/A_PIE-data [ 4.00 GiB]
/dev/store/Sailfish_OS [ 2.00 GiB]
/dev/store/A_Queso-system [ 1.30 GiB]
/dev/store/A_Queso-cache [ 200.00 MiB]
/dev/store/A_Queso_data [ 2.00 GiB]
/dev/store/swap [ 1.00 GiB]
15 disks
10 partitions
0 LVM physical volume whole disks
1 LVM physical volume
Now we can format every disk with ext2, ext3, ext4 and vfat
Example to format Android system volumen
mke2fs -E lazy_itable_init=0 -t ext4 /dev/store/cm-system
mke2fs -E lazy_itable_init=0 -t ext4 /dev/store/cm-cache
mke2fs -E lazy_itable_init=0 -t ext4 /dev/store/cm-data
To make swap
mkswap /dev/store/swap
This is very easy to create, and quick there is no waitting time is done as soon as you press enter.
We have create it a Touchpad that is capable of running the following OS independently.
Current Version of Android
A version of Android PIE 9
A version of Android Queso 10
LuneOS
SailfishOS
Linux-root (to run as chroot or native)
debian-root (to run as chroot or native)
A 1GB swap file
The volume size of the disk created are minimum or below requirement but this is to show how powerful and simple LVM is to set up.
Hi @HP_TOUCHPAD !
Good to see someone with your structured approach sharing tutorials and hints! Cheers for that!
I stumbled upon my 16GB and 32GB Touchpads on the weekend and I want to give them a new spin.
Especially LuneOS was not known to me before your post!
Any chance of you sharing your current setup and how you managed to set it up?
I am curious to factory reset my Touchpads (at least the 32GB one) and set them up with webOS + LuneOS + Android (which ROM do you use?)...
You being the knowledgable 'tutor' around here - would you share your 'webOS + LuneOS + Android' experience and how to set it up?
Cheers!
Curious greetings, raimerik
Thank you for your comments!
As of right now I am working on just that, a simple way for anyone just to flash a zip file and have everything that you need to have the Tablet set up. There is a lot of steps to do and gets confusing, hopefully the new process will work for everyone.
I will post when done!
HP_TOUCHPAD said:
Thank you for your comments!
As of right now I am working on just that, a simple way for anyone just to flash a zip file and have everything that you need to have the Tablet set up. There is a lot of steps to do and gets confusing, hopefully the new process will work for everyone.
I will post when done!
Click to expand...
Click to collapse
Wow - cheers! - looking forward to testing it once it's done! :] raimerik
I will try it and test it out too. My Touchpad is afraid of nothing.

Categories

Resources