[GUIDE] OTA Tools LPUnpack - OnePlus 7T Guides, News, & Discussion

Please see this URL https://android.googlesource.com/platform/build.git/+/eec4a7cba4face3370acb6293ab357879920b467 and this for more information.
Hi everyone. I'm surprised I havent seen a thread about ota tools yet and lpunpack. This zip file contains a lot of useful tools for modifying super.img and making super.img as well as other tools found in other toolkits. This was just compiled using aosp master. The most useful function is the lpunpack tool which can extract a super.img into system, vendor, odm and product images.
Browse individual files
Download HERE
Extract super.img from device
Code:
adb shell
Code:
su
Code:
dd if=/dev/block/by-name/super of=/sdcard/super.img
Code:
exit
Code:
exit
Code:
adb pull /sdcard/super.img
Extract super.img with lpunpack
Usage on PC(linux):
Code:
./lpunpack - command-line tool for extracting partition images from super
Usage:
./lpunpack [options...] SUPER_IMAGE [OUTPUT_DIR]
Options:
-p, --partition=NAME Extract the named partition. This can
be specified multiple times.
-S, --slot=NUM Slot number (default is 0).
**Make sure <output_directory> already exists as this tool will not create a directory for you and will error if not found.**
**If you run this command with no slot specified, it will output 0 byte empty b images.
To extract all A images:
Code:
./lpunpack --slot=0 <path-to-super.img> <output_dir>
To extract all B images:
Code:
./lpunpack --slot=1 <path-to-super.img> <output_dir>
This program can take a couple minutes to run. After it is complete, your $output_dir will contain vendor, system, product and odm with either _a or _b.
Thanks for reading!
ALL CREDIT GOES TO HANETZER @ntzrmtthihu777 FOR ALL OF THIS INFORMATION
He taught me, I just wrote this!​

We are waiting for good dev support to build twrp, custom roms and kernel.

manan001 said:
We are waiting for good dev support to build twrp, custom roms and kernel.
Click to expand...
Click to collapse
Most kernels already support 7T/Pro. (Except Smurf)
Not that much on the ROM side but some are there.
Sent from my OnePlus7TPro using XDA Labs

manan001 said:
We are waiting for good dev support to build twrp, custom roms and kernel.
Click to expand...
Click to collapse
I agree. I just felt like a lot of people don't know about lpmake/lpunpack and wanted to share it. Think its a pretty cool tool.

Bit of a clarification. If you call lpunpack without any flags, it will extract
{odm,product,system,vendor}_a.img properly without issue, but will create 'empty'
0 byte images for {odm,product,system,vendor}_b.img. In order to get the b-sides,
you must call it again like so:
Code:
./lpunpack --slot=1 super.img
@bynarie

hello @All
How to repack super.img file from Odm.img.Product.img, system.img, vender.img
Pls help me , Thanks !

Any idea how I could build an arm version of lpunpack ?

oslo83 said:
build an arm version of lpunpack ?
Click to expand...
Click to collapse
For android?
You can take the build tree from my github (I cannot post external links due to the small number of posts).

holedinh said:
hello @All
How to repack super.img file from Odm.img.Product.img, system.img, vender.img
Pls help me , Thanks !
Click to expand...
Click to collapse
+1

I did not understand: this tool can extract .img partition or only extract them from phone?
Example: I want to extract product.img partition to edit it and then reconvert to .img and then flash it to phone. Is this possible?

Hitman478™ said:
I did not understand: this tool can extract .img partition or only extract them from phone?
Example: I want to extract product.img partition to edit it and then reconvert to .img and then flash it to phone. Is this possible?
Click to expand...
Click to collapse
you need to convert it using simg2img then mount the img to edit it then when done use img2simg to convert back into android sparse img then can b flashed

Invalid sparse file format at header magic, how to fix this?
Code:
./lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:4294967296 --group main:2647101440 --partition system:readonly:1962512384:main --image system=./system.img --partition vendor:readonly:680239104:main --image vendor=./vendor.img --partition odm:readonly:4349952:main --image odm=./odm.img --sparse --output ./super.img
lpmake I 08-24 00:29:52 598 598 builder.cpp:1012] [liblp]Partition system will resize from 0 bytes to 1962512384 bytes
lpmake I 08-24 00:29:52 598 598 builder.cpp:1012] [liblp]Partition vendor will resize from 0 bytes to 680239104 bytes
lpmake I 08-24 00:29:52 598 598 builder.cpp:1012] [liblp]Partition odm will resize from 0 bytes to 4349952 bytes
Invalid sparse file format at header magic
Invalid sparse file format at header magic

VladSector said:
Invalid sparse file format at header magic, how to fix this?
Code:
./lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:4294967296 --group main:2647101440 --partition system:readonly:1962512384:main --image system=./system.img --partition vendor:readonly:680239104:main --image vendor=./vendor.img --partition odm:readonly:4349952:main --image odm=./odm.img --sparse --output ./super.img
lpmake I 08-24 00:29:52 598 598 builder.cpp:1012] [liblp]Partition system will resize from 0 bytes to 1962512384 bytes
lpmake I 08-24 00:29:52 598 598 builder.cpp:1012] [liblp]Partition vendor will resize from 0 bytes to 680239104 bytes
lpmake I 08-24 00:29:52 598 598 builder.cpp:1012] [liblp]Partition odm will resize from 0 bytes to 4349952 bytes
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Click to expand...
Click to collapse
It is not an error

VladSector said:
Invalid sparse file format at header magic, how to fix this?
Code:
./lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:4294967296 --group main:2647101440 --partition system:readonly:1962512384:main --image system=./system.img --partition vendor:readonly:680239104:main --image vendor=./vendor.img --partition odm:readonly:4349952:main --image odm=./odm.img --sparse --output ./super.img
lpmake I 08-24 00:29:52 598 598 builder.cpp:1012] [liblp]Partition system will resize from 0 bytes to 1962512384 bytes
lpmake I 08-24 00:29:52 598 598 builder.cpp:1012] [liblp]Partition vendor will resize from 0 bytes to 680239104 bytes
lpmake I 08-24 00:29:52 598 598 builder.cpp:1012] [liblp]Partition odm will resize from 0 bytes to 4349952 bytes
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Click to expand...
Click to collapse
can you upload lpmake ! i cant find it anywhere

download link is broken, can you reupload it again bro?

mohamedfaky said:
download link is broken, can you reupload it again bro?
Click to expand...
Click to collapse
My bad, link is fixed in post. - https://drive.google.com/file/d/1h4sGXNI1Al5Y_Te9T8xMWrp3mHw1tke-/view?usp=sharing

M.sapry said:
can you upload lpmake ! i cant find it anywhere
Click to expand...
Click to collapse
Here is a link to a shared folder containing all of the ota tools. LPMake is located under bin/lpmake
https://drive.google.com/drive/folders/1BmBmFuYZXbISAncrnrMybQ0uQk0-cZXl?usp=sharing

can't get it to work... it always says "bash: ./lpunpack: Permission denied"
can someone help?
trying to run it in mint4kitchen with all updates

Sir, can you please expand on super image repack?

osahitzelgsngar said:
can't get it to work... it always says "bash: ./lpunpack: Permission denied"
can someone help?
trying to run it in mint4kitchen with all updates
Click to expand...
Click to collapse
Probably need to chmod it..
Code:
chmod +x lpunpack
OR
Code:
chmod 755 lpunpack

Related

[DEVs ONLY] Flash Galaxy S without computer : introducing redbend_ua

Hello there
This is a surprise, but software able to flash the phone without any computer intervention was already on it, since the beginning.
Searching for a way to install my future lag fix easily, I remember that there was an "OTA" boot mode.
I know, today nobody saw an OTA on any Galaxy S smartpone (except maybe One on the AT&T Captivate?), but the software is still there.
How does this work :
Basically Linux boots a ramdisk, loading kernel modules and running an init process who start the whole Android experience (bootmode=) or just the recovery mode (bootmode=2).
Other bootmodes are used for battery loading only and Over The Air updates.
In this case, init.rc ask init to start "/sbin/redbend_ua all".
By default this software search for software updates in /data/fota and on similar places in the /sdcard.
It could prove useful another day, but you still have to be root to ask your device to reboot in a specific bootmode
The nice part is that we can use redbend_ua manually too, to do many impossible things before :
command list, pretty comprehensive.
Code:
img [partition name] [delta file] [device node] [temp path]
fs [partition name] [delta file] [mount point] [temp path]
all
dump <source dev> <dest file>
restore <source file> <dest dev>
compare <dev1> <dev2>
png [png file name]
all
Possible usages :
- Flashing the kernel without Odin or any computer
- Backuping and Restoring a whole firmware, including stock one
- Doing more than one operation before automatic reboot through a list of commands in /data/fota/command (not tested yet)
- Messing with bootloaders and bricking your phone for good
Yeah, you must be really carefull this time. Samsung made some partitions read-only for a reason
Hopefully this new tool will be used by most ROM cooker, CyanogenMod, and ClockWorkMod
I'll make a update.zip + redbend_ua template soon if nobody comes up with one.
My Twitter for next news
Joined to this post : redbend_ua working binary. (some firmware ship a new binary that does not accept command line parameters)
-----
Old post, for the record :
Our Galaxy S in Eclair firmwares come with software able to provide update Over The Air.
This firmware is in /sbin directory, which means that it's in the kernel ramdisk.
Look at the output when running the binary without argument or appropriate file:
Code:
# redbend_ua
RedBend Update Agent 6,1,14,1
FOTA : Make Block Device Nodes
UA/(MakeBMLNodes): mknod path=/dev/block/bml4, dev_no=35076
UA/(MakeBMLNodes): mknod path=/dev/block/bml5, dev_no=35077
UA/(MakeBMLNodes): mknod path=/dev/block/bml7, dev_no=35079
UA/(MakeBMLNodes): mknod path=/dev/block/bml8, dev_no=35080
UA/(MakeBMLNodes): mknod path=/dev/block/bml11, dev_no=35083
lcd_init(498): start!
lcd_init(507): fb0 open success
lcd_init(514): width = 480, height = 800
UA/ check_existence: /data/fota/delta.Sbl
UA/(update_all): Check Delta : path_idx(0), part_idx(0), file_path((null)), cnt(0)
UA/ check_existence: /data/fota/delta.zImage
UA/(update_all): Check Delta : path_idx(0), part_idx(1), file_path((null)), cnt(0)
UA/ check_existence: /data/fota/delta.modem
UA/(update_all): Check Delta : path_idx(0), part_idx(2), file_path((null)), cnt(0)
UA/ check_existence: /data/fota/delta.platform
UA/(update_all): Check Delta : path_idx(0), part_idx(3), file_path((null)), cnt(0)
UA/ check_existence: /sdcard/Android/data/temp.fota.delta/delta.Sbl
UA/(update_all): Check Delta : path_idx(1), part_idx(0), file_path((null)), cnt(0)
UA/ check_existence: /sdcard/Android/data/temp.fota.delta/delta.zImage
UA/(update_all): Check Delta : path_idx(1), part_idx(1), file_path((null)), cnt(0)
UA/ check_existence: /sdcard/Android/data/temp.fota.delta/delta.modem
UA/(update_all): Check Delta : path_idx(1), part_idx(2), file_path((null)), cnt(0)
UA/ check_existence: /sdcard/Android/data/temp.fota.delta/delta.platform
UA/(update_all): Check Delta : path_idx(1), part_idx(3), file_path((null)), cnt(0)
fail!
Open /data/fota/fota.status
fsync after write: 0
And here is the result when you provide a fake zImage delta file:
Code:
RedBend Update Agent 6,1,14,1
FOTA : Make Block Device Nodes
UA/(MakeBMLNodes): mknod path=/dev/block/bml4, dev_no=35076
UA/(MakeBMLNodes): mknod path=/dev/block/bml5, dev_no=35077
UA/(MakeBMLNodes): mknod path=/dev/block/bml7, dev_no=35079
UA/(MakeBMLNodes): mknod path=/dev/block/bml8, dev_no=35080
UA/(MakeBMLNodes): mknod path=/dev/block/bml11, dev_no=35083
lcd_init(498): start!
lcd_init(507): fb0 open success
lcd_init(514): width = 480, height = 800
UA/ check_existence: /data/fota/delta.Sbl
UA/(update_all): Check Delta : path_idx(0), part_idx(0), file_path((null)), cnt(0)
UA/(update_all): Check Delta : path_idx(0), part_idx(1), file_path(/data/fota/delta.zImage), cnt(1)
UA/(update_all): Check Delta : path_idx(0), part_idx(1), file_path(/data/fota/delta.zImage), cnt(1)
UA/ check_existence: /data/fota/delta.modem
UA/(update_all): Check Delta : path_idx(0), part_idx(2), file_path((null)), cnt(1)
UA/ check_existence: /data/fota/delta.platform
UA/(update_all): Check Delta : path_idx(0), part_idx(3), file_path((null)), cnt(1)
page_msize: 4096, phy_unit_size: 262144
UA/ Sbl delta does NOT exist! Skip.
page_msize: 4096, phy_unit_size: 262144
UA/ check_existence: /data/fota/fota_zImage
page_msize: 4096, phy_unit_size: 262144
dev: /dev/block/bml8 partition size: 0x780000
40180008: ffff ffff ffff ffff ffff ffff ffff ffff ................
40180018: ffff ffff ffff ffff ffff ffff ffff ffff ................
40180028: ffff ffff ffff ffff ffff ffff ffff ffff ................
40180038: ffff ffff ffff ffff ffff ffff ffff ffff ................
signature: 0xffffffff
page_msize: 4096, phy_unit_size: 262144
common mark dev : /dev/block/bml8 partition size: 0x780000
0xffffffff
page_msize: 4096, phy_unit_size: 262144
page_msize: 4096, phy_unit_size: 262144
UA/(backup_devbml) src: /dev/block/bml7 partition size: 0x780000
UA/(backup_devbml) dst: /dev/block/bml8 partition size: 0x780000
UA/(backup_devbml) backup 128KB at 0x0
UA/(backup_devbml) backup 128KB at 0x40000
UA/(backup_devbml) backup 128KB at 0x80000
UA/(backup_devbml) backup 128KB at 0xc0000
UA/(backup_devbml) backup 128KB at 0x100000
UA/(backup_devbml) backup 128KB at 0x140000
UA/(backup_devbml) backup 128KB at 0x180000
UA/(backup_devbml) backup 128KB at 0x1c0000
UA/(backup_devbml) backup 128KB at 0x200000
UA/(backup_devbml) backup 128KB at 0x240000
UA/(backup_devbml) backup 128KB at 0x280000
UA/(backup_devbml) backup 128KB at 0x2c0000
UA/(backup_devbml) backup 128KB at 0x300000
UA/(backup_devbml) backup 128KB at 0x340000
UA/(backup_devbml) backup 128KB at 0x380000
UA/(backup_devbml) backup 128KB at 0x3c0000
UA/(backup_devbml) backup 128KB at 0x400000
UA/(backup_devbml) backup 128KB at 0x440000
UA/(backup_devbml) backup 128KB at 0x480000
UA/(backup_devbml) backup 128KB at 0x4c0000
UA/(backup_devbml) backup 128KB at 0x500000
UA/(backup_devbml) backup 128KB at 0x540000
UA/(backup_devbml) backup 128KB at 0x580000
UA/(backup_devbml) backup 128KB at 0x5c0000
UA/(backup_devbml) backup 128KB at 0x600000
UA/(backup_devbml) backup 128KB at 0x640000
UA/(backup_devbml) backup 128KB at 0x680000
UA/(backup_devbml) backup 128KB at 0x6c0000
UA/(backup_devbml) backup 128KB at 0x700000
UA/(backup_devbml) backup 128KB at 0x740000
page_msize: 4096, phy_unit_size: 262144
common mark dev : /dev/block/bml8 partition size: 0x780000
0xffffffff
page_msize: 4096, phy_unit_size: 262144
common mark dev : /dev/block/bml8 partition size: 0x780000
0xffffffff
UA/(RB_ImageUpdateMain): ++
UA/(RB_ImageUpdateMain) uPartitionName[zImage]
RB_GetBlockSize: returning 0x40000 (262144)
UA/(RB_UpdateImage): ++
UA/(RB_UpdateImage): Delta file name-/data/fota/delta.zImage
unicode_to_char : zImage
pDeviceDatum.pFirstPartitionData->partition_name: zImage
pDeviceDatum.pFirstPartitionData->partition_type: 0
pDeviceDatum.pFirstPartitionData->file_system_type: 0
unicode_to_char : /data/fota/delta.zImage
RB_OpenFile: Path:/data/fota/delta.zImage | Mode: RDONLY
Successful open() *pwHandle:4
[RB] Illegal field in the delta, or that the given delta is invalid
UA/(RB_UpdateImage) return value from RB_vRM_Update: 0x80000539
UA/(RB_UpdateImage): -- ret=-2147482311
UA/(RB_ImageUpdateMain) pCustomerPartData.updated = -1, rest = -1
UA/(RB_ImageUpdateMain): -- ret=-2147482311
page_msize: 4096, phy_unit_size: 262144
common mark dev : /dev/block/bml8 partition size: 0x780000
0xdeade002
UA/(update_all) Kernel update fail
fail!
Open /data/fota/fota.status
fsync after write: 0
Promising ! This software definitely has the ability to write on protected bml partitions.
Now wee need to find how to produce the .delta files
Sounds great Lets hope you guys can figure it all out.
I just send a message to Red Bend Software through their site.
Actually it may help to find any other delta file for their software. Without sample we won't go anywhere...
I hope they will be kind and answer!
Here is a list of interesting strings found in the binary :
Code:
UA/ Platform delta does NOT exist! Skip.
Can not open src file : %s
Can not open dst file : %s
UA/(%s) write %dbytes
UA/(%s) copy file %s->%s
fsync failed with return value: %d
fsync after write: %d
UA/ %s: %s
/dev/block/bml4
/data/fota/dump_sbl
/dev/block/bml7
/data/fota/dump_kernel
/dev/block/bml12
/data/fota/dump_modem
FOTA : Make Block Device Nodes
UA/(%s): mknod path=%s, dev_no=%u
Failed to open %s: %s
Open %s
lseek failed with return value: %d
read failed with return value: %d
success!
DONE
fail!
FAIL
FOTA
UA/ modem delta does NOT exist! Skip.
/data/fota/backup.modem
UA/ zImage delta does NOT exist! Skip.
/dev/block/bml8
UA/ Sbl delta does NOT exist! Skip.
UA/ERROR(%s) get dual sbl siginfo fail!!
/dev/block/bml5
UA/ERROR(%s) can't find vaild Sbl partitions
UA/ERROR(%s) SBL RAM partition alloc fail
UA/ERROR(%s) RB_ImageUpdateMain Fail ret=(0x%d)
/data/fota/command
/sdcard/Android/data/temp.fota.delta/command
UA/(%s) cache download
/cache/recovery
UA/(%s) create /cache/recovery directory
/cache/recovery/command
reboot recovery
UA/(%s): Check Delta : path_idx(%d), part_idx(%d), file_path(%s), cnt(%d)
SBL update fail
UA/(%s) %s
Kernel update fail
Modem update fail
Platform update fail
Post update fail
WARNNIG
Delta Not Exist
/data/fota
/sbin/images/fota.png
UA/(%s) test
Update Fail!!
/data/fota/fota.status
/data/fota/delta.Sbl
/data/fota/delta.zImage
/data/fota/delta.modem
/data/fota/delta.platform
/sdcard/Android/data/temp.fota.delta/delta.Sbl
/sdcard/Android/data/temp.fota.delta/delta.zImage
/sdcard/Android/data/temp.fota.delta/delta.modem
/sdcard/Android/data/temp.fota.delta/delta.platform
RedBend Update Agent %s
commands:
img [partition name] [delta file] [device node] [temp path]
fs [partition name] [delta file] [mount point] [temp path]
all
dump <source dev> <dest file>
restore <source file> <dest dev>
compare <dev1> <dev2>
png [png file name]
all
unknown
/data/fota/fota_Sbl
/data/fota/fota_zImage
Modem
/data/fota/fota_modem
/data/fota/fota_platform
/dev/block/bml11
OFNI
main
update_all
post_update
update_platform
update_modem
update_zImage
update_Sbl
file_copy
check_existence
MakeBMLNodes
UA/(%s): +
UA/(%s): %s (%lx %x)
UA/(%s): -
UA/(%s): %s (%lx %lx)
UA/(%s): memcpy(0x%x, 0x%x, 0x%x)
%07x:
%02x
%02x
BML_GET_DEV_INFO
page_msize: %d, phy_unit_size: %d
open device file
%s: bmldevice_open failed!
%s: bmldevice_info failed!
src: %s
dst: %s partition size: 0x%x
part_size: 0x%x
failed to read from %s (%s)
read finished
read %d bytes
src: %s partition size: 0x%x
dst: %s
failed to write to %s (%s)
done
UA/(%s) src: %s
UA/(%s) dst: %s partition size: 0x%x
UA/(%s) part_size: 0x%x
UA/(%s) read finished
UA/(%s) read %d bytes
UA/(%s) src: %s partition size: 0x%x
UA/(%s) dst: %s
UA/(%s) signature: 0x%x
*WARN* %s partition is already marked as invalid!
UA/(%s) done
page at 0x%x differ!
UA/(%s) backup 128KB at 0x%x
UA/(%s): ++
UA/(%s) 0x%x
UA/ERROR(%s) Valid partition signature is not invalid
UA/(%s): --
%s, invalide magic key(%x)!!
common mark dev : %s partition size: 0x%x
dev: %s partition size: 0x%x
signature: 0x%x
UA/(%s) dev: %s partition size: 0x%x
UA/ERROR(%s) Signature is not validate (%x)
UA/(%s) SBL, SBL2 partition are diffierent size, check your bml device node name
UA/ERROR(%s) Both partition has valid or invalid signature
UA/(%s) Valid Partition-%s, Update Partition-%s
restore_file
backup_block_file
restore_devbml
backup_devbml
store_dualsbl_partition
load_partition
mark_common_recovery
find_valid_partition
check_dualpartition_validation
ram_write_block
ram_read_block
nand_write_block
nand_read_block
bmldevice_get_size
Image size is bigger than partition!
reading NAND page
BML_UNLOCK_ALL
writing NAND page
6,1,14,1
RB_GetBlockSize
%s: returning 0x%x (%d)
RB_ReadBackupBlock
UA/(%s): %s: offset 0x%lx(%ld), size 0x%lx(%ld)
UA/ERROR(%s) open file %s failed.
UA/ open %s file success
UA/ERROR(%s) error in read size
RB_WriteBackupBlock
UA/(%s): offset 0x%lx(%ld), size 0x%lx(%ld)
UA/ERROR(%s) error in write size
RB_ImageUpdateMain
UA/(%s): ++
UA/(%s) uPartitionName[%s]
UA/(%s) pCustomerPartData.updated = %d, rest = %d
UA/(%s): -- ret=%d
RB_UpdateImage
UA/(%s): Delta file name-%s
pDeviceDatum.pFirstPartitionData->partition_name: %s
pDeviceDatum.pFirstPartitionData->partition_type: %d
pDeviceDatum.pFirstPartitionData->file_system_type: %d
UA/(%s) return value from RB_vRM_Update: 0x%x
unicode_to_char
%s : %s
RecursiveFolderCreater
%s path: %s
temppath: %s
mkdir result: %d errno: %d
RB_CopyFile
%s: %s -> %s
NULL file name find. Abort.
Open %s ENOENT %d
Open %s failed. Abort.
read %d, but write %d, abort.
RB_DeleteFile
%s: %s
unlink value: %d, errno: %d
RB_DeleteFolder
rmdir value: %d, errno: %d
RB_CreateFolder
%s: %s, mode:0x%x
RDONLY
WRONLY
RDWR
Unknown
RB_OpenFile
%s: Path:%s | Mode:
First open() with error %d
copy dir[]=%s
remove dir[]=%s
Fail create folder, Leave RB_OpenFile
After successful creating folder, fail open() with error %d
Successful open() *pwHandle:%ld
RB_ResizeFile
%s: handle %ld, dwSize %d
%s: ret %d handle %ld %d
RB_CloseFile
%s: wHandle = %ld
RB_WriteFile
%s: Handle:%ld , Pos:%ld , Size: %ld
lseek failed with return value: %d
Failed with return value: %d
Bytes Write: %d
fsync Failed with return value: %d
fsync after write: %d
RB_ReadFile
%s: Handle:%ld , Pos:%ld , Size: %ld
read failed with return value: %d
RB_GetFileSize
%s: %ld
lseek errno: %d
Returning Size = 0x%x
RB_Unlink
unlink failed with return value: %d
unlink with return value: %d
RB_Link
symlink failed with return value: %d, errno: %d
symlink with return value: %d
RB_VerifyLinkReference
readlink failed with return value: %d
not same linked path
same linked path
RB_GetFileType
stat failed with return value: %d errno: %d
sbuf.st_mode: %d
S_ISREG(sbuf.st_mode): %d
S_ISLNK(sbuf.st_mode): %d
stat->st_mode = symbolic link file
stat->st_mode = regular file
failed to lstat, err : %d
a2ch
%s : %d
Wrong attribute value: %d
a2ch : %c
chtoa
RB_SetFileAttributes
stat failed with return value: %d
sbuf.st_mode value: %d
ui8pAttribs value: %s
ui32AttribSize value: %ld
attrib_user value: %d
attrib_group value: %d
attrib_other value: %d
att_type value: %d
sbuf.st_mode | attrib: %d
chmod failed with return value: %d
chmod with return value: %d
pUserId value: %s
user_id value: %d
aGroupId value: %s
pGroupId value: %s
group_id value: %d
failed chown %d
success chown %d
RB_FSUpdateMain
UA/(%s) Partition name(%s), mount point(%s)
UA/(%s) pCustomerPartData.updated = %ld, rest = %ld
pDeviceDatum.pFirstPartitionData->partition_name: %s
pDeviceDatum.pFirstPartitionData->partition_type: %d
pDeviceDatum.pFirstPartitionData->file_system_type: %d
return value from RB_vRM_Update: 0x%x
%s/flagsFile
return value from unlink(%s): 0x%x
Installing software
Don't turn off the
phone and
connect the power
cable as possible.
System updated &
reboot now
gui_progress
UA/(%s): ++ uPercent(%d%), gv_delta_count=(%ld)
UA/(%s): -- Print Percent(%d%)
%3d %%
lcd_init
%s(%d): start!
/dev/graphics/fb0
%s(%d): fb0 open fail
%s(%d): fb0 open success
%s(%d): width = %d, height = %d
%s(%d): ioctl set info fail
%s(%d): Error: failed to map framebuffer device to memory.
%s(%d): ioctl start fail
Allocation error-
Current start: %d
Current finish: %d
Requested size: %d
Allocation error:
Current start: %d
Current finish: %d
Requested size: %d
It may accept commands somehow, like those :
img [partition name] [delta file] [device node] [temp path]
fs [partition name] [delta file] [mount point] [temp path]
all
dump <source dev> <dest file>
restore <source file> <dest dev>
compare <dev1> <dev2>
png [png file name]
all
I tried writing commands in /data/fota/command and /cache/recovery/command but the program does not follow my orders
ok it works when i flashed zImage
Code:
# redbend_ua restore /sdcard/jm5.zImage /dev/block/bml7
redbend_ua restore /sdcard/jm5.zImage /dev/block/bml7
RedBend Update Agent 6,1,14,1
FOTA : Make Block Device Nodes
lcd_init(498): start!
lcd_init(507): fb0 open success
lcd_init(514): width = 480, height = 800
page_msize: 4096, phy_unit_size: 262144
src: /sdcard/jm5.zImage
dst: /dev/block/bml7 partition size: 0x780000
part_size: 0x780000
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 247184 bytes
read finished
Wow, this is looking promising.
it seems like htc's flash_image,but much more difficult than it.
raspdeep said:
ok it works when i flashed zImage
Code:
# redbend_ua restore /sdcard/jm5.zImage /dev/block/bml7
redbend_ua restore /sdcard/jm5.zImage /dev/block/bml7
RedBend Update Agent 6,1,14,1
FOTA : Make Block Device Nodes
lcd_init(498): start!
lcd_init(507): fb0 open success
lcd_init(514): width = 480, height = 800
page_msize: 4096, phy_unit_size: 262144
src: /sdcard/jm5.zImage
dst: /dev/block/bml7 partition size: 0x780000
part_size: 0x780000
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 247184 bytes
read finished
Click to expand...
Click to collapse
Nice raspdeep
How did you do ? Every attempt fails here (in recovery or standard mode).
Which initramfs version do you use ?
Code:
redbend_ua restore zImage /dev/block/bml7
RedBend Update Agent 6,1,14,1
FOTA : Make Block Device Nodes
lcd_init(498): start!
lcd_init(507): fb0 open success
lcd_init(514): width = 480, height = 800
page_msize: 4096, phy_unit_size: 262144
src: zImage
dst: /dev/block/bml7 partition size: 0x780000
part_size: 0x780000
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 262144 bytes
read 247184 bytes
read finished
Ok yo don't respond but it works here to, booting on your OC kernel. Now i'll find what is different between our setups
supercurio, you are rapidly becoming one of my Android heros...
distortedloop said:
supercurio, you are rapidly becoming one of my Android heros...
Click to expand...
Click to collapse
Don't know if I can live with that
Code:
ll */*
-rwxr-xr-x 1 root curio 313888 2010-08-26 21:14 oc128uv1/redbend_ua*
-rwxr-xr-x 1 curio curio 314004 2010-08-26 21:16 XWJM5/redbend_ua*
md5sum */*
74f5793536c3cdc902ec269c3f51a165 oc128uv1/redbend_ua
b1ba258a5d673c537a95167267afd6b8 XWJM5/redbend_ua
Different binaries !
Edit : attached working redbend_ua
A diff between strings included in binaries (raw infos, not analyzed yet ^^)
Code:
--- not-working 2010-08-26 21:22:39.594984596 +0200
+++ working 2010-08-26 21:22:20.370634450 +0200
@@ -4,7 +4,6 @@
@F2A
bB,2
H{DYX
-/Q{;
/Qs;
/Qk;
/Qc;
@@ -452,71 +451,52 @@
%mB(
@ #!
!1C "
-reboot
-UA/ Platform delta does NOT exist! Skip.
-Can not open src file : %s
-Can not open dst file : %s
-UA/(%s) write %dbytes
-UA/(%s) copy file %s->%s
- fsync failed with return value: %d
- fsync after write: %d
-UA/ %s: %s
+/data/fota/delta.Sbl
/dev/block/bml4
-/data/fota/dump_sbl
+/dev/block/bml5
+/data/fota/fota_Sbl
+/data/fota/delta.zImage
/dev/block/bml7
-/data/fota/dump_kernel
+/data/fota/backup.zImage
+/data/fota/fota_zImage
+Modem
+/data/fota/delta.modem
/dev/block/bml12
+/data/fota/backup.modem
+/data/fota/fota_modem
+/data/fota/delta.platform
+/data/fota/backup.platform
+/data/fota/fota_platform
+platform delta does NOT exist! Skip.
+existence: s1[%d].existence; %d
+%s: %s
+/data/fota/dump_sbl
+/data/fota/dump_kernel
/data/fota/dump_modem
FOTA : Make Block Device Nodes
-UA/(%s): mknod path=%s, dev_no=%u
Failed to open %s: %s
Open %s
lseek failed with return value: %d
read failed with return value: %d
+ fsync failed with return value: %d
+ fsync after write: %d
success!
DONE
fail!
FAIL
FOTA
-UA/ modem delta does NOT exist! Skip.
-/data/fota/backup.modem
-UA/ zImage delta does NOT exist! Skip.
+modem delta does NOT exist! Skip.
+zImage delta does NOT exist! Skip.
/dev/block/bml8
-UA/ Sbl delta does NOT exist! Skip.
-UA/ERROR(%s) get dual sbl siginfo fail!!
-/dev/block/bml5
-UA/ERROR(%s) can't find vaild Sbl partitions
-UA/ERROR(%s) SBL RAM partition alloc fail
-UA/ERROR(%s) RB_ImageUpdateMain Fail ret=(0x%d)
-/data/fota/command
-/sdcard/Android/data/temp.fota.delta/command
-UA/(%s) cache download
-/cache/recovery
-UA/(%s) create /cache/recovery directory
-/cache/recovery/command
-reboot recovery
-UA/(%s): Check Delta : path_idx(%d), part_idx(%d), file_path(%s), cnt(%d)
-SBL update fail
-UA/(%s) %s
-Kernel update fail
-Modem update fail
-Platform update fail
-Post update fail
-WARNNIG
-Delta Not Exist
-/data/fota
-/sbin/images/fota.png
-UA/(%s) test
-Update Fail!!
+Sbl delta does NOT exist! Skip.
+get dual sbl siginfo fail!!
+can't find vaild Sbl partitions
+reboot
+gv_delta_count[%d]
+dump
+restore
+compare
/data/fota/fota.status
-/data/fota/delta.Sbl
-/data/fota/delta.zImage
-/data/fota/delta.modem
-/data/fota/delta.platform
-/sdcard/Android/data/temp.fota.delta/delta.Sbl
-/sdcard/Android/data/temp.fota.delta/delta.zImage
-/sdcard/Android/data/temp.fota.delta/delta.modem
-/sdcard/Android/data/temp.fota.delta/delta.platform
RedBend Update Agent %s
commands:
img [partition name] [delta file] [device node] [temp path]
@@ -527,29 +507,7 @@
compare <dev1> <dev2>
png [png file name]
all
-unknown
-/data/fota/fota_Sbl
-/data/fota/fota_zImage
-Modem
-/data/fota/fota_modem
-/data/fota/fota_platform
-/dev/block/bml11
OFNI
-main
-update_all
-post_update
-update_platform
-update_modem
-update_zImage
-update_Sbl
-file_copy
-check_existence
-MakeBMLNodes
-UA/(%s): +
-UA/(%s): %s (%lx %x)
-UA/(%s): -
-UA/(%s): %s (%lx %lx)
-UA/(%s): memcpy(0x%x, 0x%x, 0x%x)
%07x:
%02x
%02x
@@ -568,71 +526,67 @@
dst: %s
failed to write to %s (%s)
done
-UA/(%s) src: %s
-UA/(%s) dst: %s partition size: 0x%x
-UA/(%s) part_size: 0x%x
-UA/(%s) read finished
-UA/(%s) read %d bytes
-UA/(%s) src: %s partition size: 0x%x
-UA/(%s) dst: %s
-UA/(%s) signature: 0x%x
-*WARN* %s partition is already marked as invalid!
-UA/(%s) done
page at 0x%x differ!
-UA/(%s) backup 128KB at 0x%x
-UA/(%s): ++
-UA/(%s) 0x%x
-UA/ERROR(%s) Valid partition signature is not invalid
-UA/(%s): --
+signature: 0x%x
+*WARN* %s partition is already marked as invalid!
+backup 128KB at 0x%x
+backup 128KB at 0x%x without signature
+clear mark dev : %s partition size: 0x%x
%s, invalide magic key(%x)!!
-common mark dev : %s partition size: 0x%x
dev: %s partition size: 0x%x
-signature: 0x%x
-UA/(%s) dev: %s partition size: 0x%x
-UA/ERROR(%s) Signature is not validate (%x)
-UA/(%s) SBL, SBL2 partition are diffierent size, check your bml device node name
-UA/ERROR(%s) Both partition has valid or invalid signature
-UA/(%s) Valid Partition-%s, Update Partition-%s
-restore_file
-backup_block_file
-restore_devbml
-backup_devbml
-store_dualsbl_partition
-load_partition
+%s:clear:%s partition size: 0x%x
+%s : write and clear signature done
+%s:write:%s partition size: 0x%x
+%s: Signature is not validate (%x)
+%s signature: 0x%x
+%s +
+%s: SBL, SBL2 partition are diffierent size, check your bml device node name
+Both partition has valid or invalid signature
+Valid Partition-%s, Update Partition-%s
+Siginfo error partition $s (0x%x, 0x%x)
mark_common_recovery
+clear_dualpartition_signature
+write_dualpartition_signature
find_valid_partition
check_dualpartition_validation
-ram_write_block
-ram_read_block
-nand_write_block
-nand_read_block
bmldevice_get_size
Image size is bigger than partition!
reading NAND page
BML_UNLOCK_ALL
writing NAND page
6,1,14,1
+RB_Progress
+%s: (%lu %%)
+RB_GetDelta
+%s: offset 0x%lx(%ld), size 0x%lx(%ld)
+%s: open file %s failed.
+%s: error in read size
RB_GetBlockSize
%s: returning 0x%x (%d)
+RB_ReadImage
+%s: node-%s (%lx %lx)
+RB_WriteBlock
+%s: node-%s (%lx %x)
RB_ReadBackupBlock
-UA/(%s): %s: offset 0x%lx(%ld), size 0x%lx(%ld)
-UA/ERROR(%s) open file %s failed.
-UA/ open %s file success
-UA/ERROR(%s) error in read size
+%s: offset 0x%lx(%ld), size 0x%lx(%ld)
+%s: open file %s failed.
+%s: error in read size
RB_WriteBackupBlock
-UA/(%s): offset 0x%lx(%ld), size 0x%lx(%ld)
-UA/ERROR(%s) error in write size
+%s: error in write size
+RB_ImageUpdateCommon
+uPartitionName[%s]
+%s: pCustomerPartData.updated = %d, rest = %d
RB_ImageUpdateMain
-UA/(%s): ++
-UA/(%s) uPartitionName[%s]
-UA/(%s) pCustomerPartData.updated = %d, rest = %d
-UA/(%s): -- ret=%d
-RB_UpdateImage
-UA/(%s): Delta file name-%s
+%s: backup_file is %s
+%s: size of %s(%s) is %d bytes
+RB_ImageUpdateDualPartition
+%s: backup file(%s) / Valid Partition(%s) / Update Partition(%s)
+%s : RB Image Update Fail
+%s : RB Image Update Done %s
pDeviceDatum.pFirstPartitionData->partition_name: %s
pDeviceDatum.pFirstPartitionData->partition_type: %d
pDeviceDatum.pFirstPartitionData->file_system_type: %d
-UA/(%s) return value from RB_vRM_Update: 0x%x
+return value from RB_vRM_Update: 0x%x
unicode_to_char
%s : %s
RecursiveFolderCreater
@@ -726,8 +680,7 @@
failed chown %d
success chown %d
RB_FSUpdateMain
-UA/(%s) Partition name(%s), mount point(%s)
-UA/(%s) pCustomerPartData.updated = %ld, rest = %ld
+%s: pCustomerPartData.updated = %ld, rest = %ld
pDeviceDatum.pFirstPartitionData->partition_name: %s
pDeviceDatum.pFirstPartitionData->partition_type: %d
pDeviceDatum.pFirstPartitionData->file_system_type: %d
@@ -741,9 +694,9 @@
cable as possible.
System updated &
reboot now
-gui_progress
-UA/(%s): ++ uPercent(%d%), gv_delta_count=(%ld)
-UA/(%s): -- Print Percent(%d%)
+Update is ok.
+Update is failed.
+Restoring...
%3d %%
lcd_init
%s(%d): start!
@@ -962,12 +915,6 @@
insufficient memory
buffer error
incompatible version
-RB_Progress
-%s: (%lu %%)
-RB_GetDelta
-%s: offset 0x%lx(%ld), size 0x%lx(%ld)
-%s: open file %s failed.
-%s: error in read size
Pure virtual function called. Are you calling virtual methods from a destructor?
libc-abort
abort() called in pid %d
@@ -1120,6 +1067,7 @@
/dev/log/main
/dev/log/radio
/proc/self/exe
+unknown
/dev/urandom
stack corruption detected: aborted
ANDROID_PROPERTY_WORKSPACE
Whilst we're talking about retrieving information from binaries...
Does anyone know any good disassembly tools. I managed to compile objdump for ARM (ELF) and run it on the Galaxy S secondary bootloader but it only partially works. It doesn't look like it is handling the binary layout correctly. It's unsure how much of the binary is data and how much is actual instructions so it ends up converting the whole thing to instructions (most of which are obviously bogus).
Benjamin Dobell said:
Whilst we're talking about retrieving information from binaries...
Does anyone know any good disassembly tools. I managed to compile objdump for ARM (ELF) and run it on the Galaxy S secondary bootloader but it only partially works. It doesn't look like it is handling the binary layout correctly. It's unsure how much of the binary is data and how much is actual instructions so it ends up converting the whole thing to instructions (most of which are obviously bogus).
Click to expand...
Click to collapse
Under Linux i use the minimalist tool named "strings". You can learn so much just by reading strings extracted ^^.
Otherwise you have IDA Pro (Windows), which is very powerful.
Benjamin, like you i found objdump quite challenging to use.. and.. not that fun.
supercurio said:
Under Linux i use the minimalist tool named "strings". You can learn so much just by reading strings extracted ^^.
Otherwise you have IDA Pro (Windows), which is very powerful.
Benjamin, like you i found objdump quite challenging to use.. and.. not that fun.
Click to expand...
Click to collapse
Unfortunately IDA Pro doesn't seem to work either. IDA Pro Free doesn't support ARM at all and I tried with IDA Pro Advanced but it seemed to have similar issues to objdump, it couldn't determine the entry point etc.
If I could just get the assembler with comments next to it that indicate which pieces of data (strings in particular) are being referenced that would make my day.
Do you think Sbl.bin is a single unique binary ?
Considering everything that this Second Boot Loader is able to do, i would not be surprised if it's more complex than that.
Anyway I can't say much more about the tools, i'm just a rookie hacker
supercurio said:
Do you think Sbl.bin is a single unique binary ?
Considering everything that this Second Boot Loader is able to do, i would not be surprised if it's more complex than that.
Click to expand...
Click to collapse
It wouldn't be a very reliable boot loader if it depended on other binaries (other than data passed to it by the primary boot loader). However the information I'm after, the Loke protocol, is definitely in there cause I can see the handshake strings I send and receive with Heimdall.
working this into SRE RIGHT NOW!!!!
--edit
scripted, and working
release coming soon!!
designgears said:
working this into SRE RIGHT NOW!!!!
Click to expand...
Click to collapse
Nice
Remember being EXTRA careful manipulating raw bml partitions. You can easily brick your phone for good writing bad data in place of first and second bootloader.
NON-RECOVERABLE
please say that to every potential redbend_ua users
This was the required warning, now enjoy
supercurio said:
Nice
Remember being EXTRA careful manipulating raw bml partition. You can easily
brick your phone for good writing bad data in place of first and second bootloader.
NON-RECOVERABLE
please say that to every potential redbend_ua users
This was the required warning, now enjoy
Click to expand...
Click to collapse
I have borked bml17 before.. was able to go into download and restore stock.

[DEV ONLY]Xperia Z1 kernel building instructions

I think the time has come to share the info about kernel development we've been keeping for ourselves until now. just be sure to ready the complete thread and not just execute everything without thinking. I won't be responsible for any bricks etc.
Warnings!!
- Only start with a kernel if you are a developer with knowledge about kernel developping.
- Always use the specific dt.img build for your kernel!!!!! Very important!
- Don't complain if it doesn't work when you do something wrong!
== Information ==
Let's start with some info first.
MSM8974 needs something new to build a kernel, this is called a dt.img. This basically is an img file which holds information about the board pagesize, kernel version and some other kernel related things. You can only use a specific dt.img with a kernel, this file needs to be generated by a binary called dtbTool. This bin4ry can be found in the Cyanogen repo's or you can download a prebuild one in this thread.
== Compiling a kernel ==
I'll skip this part for now, every kernel dev should know this part maybe I'll add it later.
== Generating a dt.img ==
Basically you will only need your kernel sources and the dtbTool binary, then you need to generate it using a command like this:
Code:
./dtbTool -o ~/dt_files/dt.img -s 2048 -p ./scripts/dtc/ ./arch/arm/boot/
This seems very simple but it's quite important when building a kernel for MSM8974, or other S800 boards.
After this step has been completed you will find your dt.img in a folder callled dt_files, this folder should be in your home of linux now.
== Making the actual boot.img ==
After making the zImage and dt.img you need to have your ramdisk and an mkbootimg adapted for the dt.img to make a booting/working kernel for our rhine board.
be sure the naming of your files is correct:
- zImage
- dt.img
- intrd.img for your ramdisk
You can generate it by using the following command:
Code:
./mkbootimg --base 0x00000000 --kernel zImage --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --pagesize 2048 --cmdline "androidboot.hardware=qcom user_debug=31 maxcpus=2 msm_rtb.filter=0x3F ehci-hcd.park=3 msm_rtb.enable=0 lpj=192598 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y" --ramdisk initrd.img --dt dt.img -o boot.img
Let's get kernel development started for everyone!
== Extra ==
If you like my work consider donating me a beer
binary files attached
krabappel2548 said:
binary files attached
Click to expand...
Click to collapse
Awesome! Thanks! Will tinker around with it tonight!
@krabappel2548 : Thanks for the tutorial
I've been trying to compile the kernel using Linaro, and I'm constantly getting this error :
Code:
scripts/mod/empty.c:1: error: bad value (cortex-a15) for -mcpu= switch
kernel/bounds.c:1: error: bad value (cortex-a15) for -mcpu= switch
Could you please tell me what I am missing out on here?
Thanks
Pwng3 said:
@krabappel2548 : Thanks for the tutorial
I've been trying to compile the kernel using Linaro, and I'm constantly getting this error :
Code:
scripts/mod/empty.c:1: error: bad value (cortex-a15) for -mcpu= switch
kernel/bounds.c:1: error: bad value (cortex-a15) for -mcpu= switch
Could you please tell me what I am missing out on here?
Thanks
Click to expand...
Click to collapse
try this
https://github.com/faux123/Galaxy_Note_3/commit/8ad5dd6f969bb76ef970cbf101a255bb093efe5f
If you want to compil kernel, but with a full automation, you can use this script
"scriptZ1" : http://forum.xda-developers.com/attachment.php?attachmentid=2346163&stc=1&d=1382568778
With this script you have an automatic download/configuration (Toolchain, dtbTool, etc...)
You must go to $HOME, and "mkdir kernel"
cd kernel
unzip file (only 1 script) => scriptZ1
chmod 777 scriptZ1
./scriptZ1
Follow instructions
that's all
DooMLoRD said:
try this
https://github.com/faux123/Galaxy_Note_3/commit/8ad5dd6f969bb76ef970cbf101a255bb093efe5f
Click to expand...
Click to collapse
That resolved the issue. Thanks
Update :
I was getting this error :
Code:
ERROR: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
make[1]: *** [vmlinux.o] Error 1
make: *** [vmlinux.o] Error 2
So I went on to make the build with make CONFIG_DEBUG_SECTION_MISMATCH=y.
After which, when I tried generating the dt.img, I'm stuck up on this error that says :
Code:
Generating master DTB... error writing output file, please rerun: size mismatch 530432 vs -566
Could someone help please?
@krabappel2548
Hey,after repacking whole kernel I'm getting this error when I try to boot it:
Code:
fastboot boot boot.img
downloading 'boot.img'...
OKAY [ 0.319s]
booting...
FAILED (remote: dtb not found)
How do I create a dt.img? I always get Found 0 Unique dtbs.
Shoaib05 said:
How do I create a dt.img? I always get Found 0 Unique dtbs.
Click to expand...
Click to collapse
first download Doom-Lords kernel build tools
then copy dtbtool from msm8978aa folder in to you kernel source directory
then open terminal and cd to your kernel directory and enter these codes:
Code:
./dtbTool -o dt.img -s 2048 -p scripts/dtc/ arch/arm/boot/
instruction by DoomLord
Red-code said:
first download Doom-Lords kernel build tools
then copy dtbtool from msm8978aa folder in to you kernel source directory
then open terminal and cd to your kernel directory and enter these codes:
Code:
./dtbTool -o dt.img -s 2048 -p scripts/dtc/ arch/arm/boot/
instruction by DoomLord
Click to expand...
Click to collapse
Managed to get past it but now it is giving a size-mismatch error. :/
Shoaib05 said:
Managed to get past it but now it is giving a size-mismatch error. :/
Click to expand...
Click to collapse
Does this work? binary is x86_64
dt_dir is arch/arm/boot/ on 3.4 - arch/arm/boot/dts on 3.10
Code:
mkqcdtbootimg --kernel arch/arm/boot/zImage --ramdisk ramdisk.bz2 --base 0x00000000 --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --pagesize 2048 --cmdline "androidboot.hardware=qcom user_debug=31 maxcpus=2 msm_rtb.filter=0x3F ehci-hcd.park=3 msm_rtb.enable=0 lpj=192598 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y" --dt_dir arch/arm/boot/ -o boot-.img

help

using prebuilt boot.img from IMAGES...
boot size (19613696) is 58.45% of limit (33554432)
warning radio-update: no radio image in input target_files; not flashing radio
running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
running: java -Xmx2048m -jar /home/pranav18062001/roms/pac/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp
/tmpI0uIDc /home/pranav18062001/roms/pac/out/target/product/lettuce/pac_lettuce-ota-1cdea6516f.zip
done.
ln: failed to access ‘/home/pranav18062001/roms/pac/out/target/product/lettuce/pac_lettuce-ota-1cdea6516f.zip’: No such file or directory
build/core/Makefile:1759: recipe for target 'bacon' failed
make: *** [bacon] Error 1
#### make failed to build some targets (01:38:40 (hh:mm:ss)) ####
jasonhosu said:
using prebuilt boot.img from IMAGES...
boot size (19613696) is 58.45% of limit (33554432)
warning radio-update: no radio image in input target_files; not flashing radio
running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
running: java -Xmx2048m -jar /home/pranav18062001/roms/pac/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp
/tmpI0uIDc /home/pranav18062001/roms/pac/out/target/product/lettuce/pac_lettuce-ota-1cdea6516f.zip
done.
ln: failed to access ‘/home/pranav18062001/roms/pac/out/target/product/lettuce/pac_lettuce-ota-1cdea6516f.zip’: No such file or directory
build/core/Makefile:1759: recipe for target 'bacon' failed
make: *** [bacon] Error 1
#### make failed to build some targets (01:38:40 (hh:mm:ss)) ####
Click to expand...
Click to collapse
tried a lot still same
no dev to help
jasonhosu said:
using prebuilt boot.img from IMAGES...
boot size (19613696) is 58.45% of limit (33554432)
warning radio-update: no radio image in input target_files; not flashing radio
running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
running: java -Xmx2048m -jar /home/pranav18062001/roms/pac/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp
/tmpI0uIDc /home/pranav18062001/roms/pac/out/target/product/lettuce/pac_lettuce-ota-1cdea6516f.zip
done.
ln: failed to access ‘/home/pranav18062001/roms/pac/out/target/product/lettuce/pac_lettuce-ota-1cdea6516f.zip’: No such file or directory
build/core/Makefile:1759: recipe for target 'bacon' failed
make: *** [bacon] Error 1
#### make failed to build some targets (01:38:40 (hh:mm:ss)) ####
Click to expand...
Click to collapse
no dev to help me?
repo sync will help ?
jasonhosu said:
repo sync will help ?
Click to expand...
Click to collapse
Did you try make clean && make clobber?

Classpath error while building LineageOS

I've been trying to build LineageOS on my laptop, but I get this error:
Code:
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Here is a part of the log:
Code:
including vendor/cm/vendorsetup.sh
Looking for dependencies in device/xiaomi/kenzo
Looking for dependencies in device/xiaomi/msm8956-common
Looking for dependencies in device/qcom/common
Dependencies file not found, bailing out.
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
LINEAGE_VERSION=14.1-20170819-UNOFFICIAL-kenzo
TARGET_PRODUCT=lineage_kenzo
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53.a57
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.12.4-1-ARCH-x86_64-with-glibc2.2.5
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NJH47F
OUT_DIR=/home/vinayak/android/lineage/out
============================================
make: Entering directory '/home/vinayak/android/lineage'
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
LINEAGE_VERSION=14.1-20170819-UNOFFICIAL-kenzo
TARGET_PRODUCT=lineage_kenzo
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53.a57
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.12.4-1-ARCH-x86_64-with-glibc2.2.5
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NJH47F
OUT_DIR=/home/vinayak/android/lineage/out
============================================
Running kati to generate build-lineage_kenzo.ninja...
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
LINEAGE_VERSION=14.1-20170819-UNOFFICIAL-kenzo
TARGET_PRODUCT=lineage_kenzo
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53.a57
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.12.4-1-ARCH-x86_64-with-glibc2.2.5
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NJH47F
OUT_DIR=/home/vinayak/android/lineage/out
============================================
build/core/binary.mk:37: camera.msm8952 uses kernel headers, but does not depend on them!
build/core/binary.mk:1253: external/deqp/Android.mk: libdeqp: Unused source files: \
build/core/binary.mk:1253: external/deqp/Android.mk: libdeqp: Unused source files: \
build/core/binary.mk:1253: external/pdfium/third_party/pdfiumbigint.mk: libpdfiumbigint: Unused source files: bigint/BigInteger.cc bigint/BigIntegerUtils.cc bigint/BigUnsigned.cc bigint/BigUnsignedInABase.cc
build/core/binary.mk:1253: external/pdfium/third_party/pdfiumbigint.mk: libpdfiumbigint: Unused source files: bigint/BigInteger.cc bigint/BigIntegerUtils.cc bigint/BigUnsigned.cc bigint/BigUnsignedInABase.cc
./external/speex/Android.mk:56: TODOArm64: enable neon in libspeex
build/core/package_internal.mk:143: Empty argument supplied to find-subdir-assets
build/core/package_internal.mk:143: Empty argument supplied to find-subdir-assets
Starting build with ninja
ninja: Entering directory `.'
[ 0% 6/49508] Aidl: framework <= frameworks/base/telephony/java/com/android/internal/telephony/ISmsSecurityAgent.aidl
[ 0% 7/49508] Aidl: framework <= frameworks/base/telephony/java/com/android/internal/telephony/ISmsSecurityService.aidl
[ 0% 8/49508] Aidl: org.cyanogenmod.platform.sdk <= vendor/cmsdk/sdk/src/java/cyanogenmod/themes/IThemeProcessingListener.aidl
[ 0% 9/49508] Aidl: org.cyanogenmod.platform.sdk <= vendor/cmsdk/sdk/src/java/cyanogenmod/weather/IRequestInfoListener.aidl
[ 0% 10/49508] Aidl: org.cyanogenmod.platform.internal <= vendor/cmsdk/sdk/src/java/org/cyanogenmod/internal/themes/IIconCacheManager.aidl
[ 0% 11/49508] Aidl: org.cyanogenmod.platform.sdk <= vendor/cmsdk/sdk/src/java/cyanogenmod/themes/IThemeService.aidl
[ 0% 12/49508] Aidl: org.cyanogenmod.platform.sdk <= vendor/cmsdk/sdk/src/java/cyanogenmod/media/ICMAudioService.aidl
[ 0% 13/49508] Aidl: org.cyanogenmod.platform.sdk <= vendor/cmsdk/sdk/src/java/cyanogenmod/weather/ICMWeatherManager.aidl
[ 0% 14/49508] target Java: framework-protos (/home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes)
FAILED: /bin/bash -c "(rm -f /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes-full-debug.jar ) && (rm -rf /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes ) && (mkdir -p /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/ ) && (mkdir -p /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes ) && (for f in /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/libprotobuf-java-nano_intermediates/javalib.jar; do if [ ! -f \$f ]; then echo Missing file \$f; exit 1; fi; unzip -qo \$f -d /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes; done ) && (rm -rf /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes/META-INF ) && (rm -f /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes/java-source-list ) && (touch /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes/java-source-list ) && (if [ -d \"/home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/src\" ]; then find /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/src -name '*.java' -and -not -name '.*' >> /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes/java-source-list; fi ) && (tr ' ' '\\n' < /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes/java-source-list | build/tools/normalize_path.py | sort -u > /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes/java-source-list-uniq ) && (if [ -s /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes/java-source-list-uniq ] ; then javac -J-Xmx1024M -Xmaxerrs 9999999 -encoding UTF-8 -bootclasspath \"\" -classpath /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jar:/home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/core-oj_intermediates/classes.jar:/home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/libprotobuf-java-nano_intermediates/javalib.jar -extdirs \"\" -d /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes -g -source 1.8 -target 1.8 \\@/home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes/java-source-list-uniq || ( rm -rf /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes ; exit 41 ) fi ) && (rm -f /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes/java-source-list ) && (rm -f /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes/java-source-list-uniq ) && (jar -cf /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes-full-debug.jar -C /home/vinayak/android/lineage/out/target/common/obj/JAVA_LIBRARIES/framework-protos_intermediates/classes . )"
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
[ 0% 14/49508] host C: libexpat <= external/expat/lib/xmltok.c
[ 0% 14/49508] host C: libexpat <= external/expat/lib/xmlparse.c
[ 0% 14/49508] host Java: rmtypedefs (/home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/rmtypedefs_intermediates/classes)
[ 0% 14/49508] host Java: jarjar (/home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/jarjar_intermediates/classes)
[ 0% 14/49508] host Java: doclava (/home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes)
FAILED: /bin/bash -c "(rm -f /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes-full-debug.jar ) && (rm -rf /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes ) && (mkdir -p /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/ ) && (mkdir -p /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes ) && (for f in /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/tagsouplib_intermediates/javalib.jar; do if [ ! -f \$f ]; then echo Missing file \$f; exit 1; fi; unzip -qo \$f -d /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes; done ) && (rm -rf /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes/META-INF ) && (rm -f /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes/java-source-list ) && (touch /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes/java-source-list ) && (echo -n 'external/doclava/src/com/google/doclava/AnnotationInstanceInfo.java external/doclava/src/com/google/doclava/AnnotationValueInfo.java external/doclava/src/com/google/doclava/AtLinksNavTree.java external/doclava/src/com/google/doclava/AttrTagInfo.java external/doclava/src/com/google/doclava/AttributeInfo.java external/doclava/src/com/google/doclava/ClassInfo.java external/doclava/src/com/google/doclava/ClearPage.java external/doclava/src/com/google/doclava/CodeTagInfo.java external/doclava/src/com/google/doclava/Comment.java external/doclava/src/com/google/doclava/ContainerInfo.java external/doclava/src/com/google/doclava/Converter.java external/doclava/src/com/google/doclava/DocFile.java external/doclava/src/com/google/doclava/DocInfo.java external/doclava/src/com/google/doclava/Doclava.java external/doclava/src/com/google/doclava/Doclava2.java external/doclava/src/com/google/doclava/DoclavaDiff.java external/doclava/src/com/google/doclava/Errors.java external/doclava/src/com/google/doclava/FederatedSite.java external/doclava/src/com/google/doclava/FederationTagger.java external/doclava/src/com/google/doclava/FieldInfo.java external/doclava/src/com/google/doclava/Hierarchy.java external/doclava/src/com/google/doclava/InfoBuilder.java external/doclava/src/com/google/doclava/InheritedTags.java external/doclava/src/com/google/doclava/JarUtils.java external/doclava/src/com/google/doclava/KeywordEntry.java external/doclava/src/com/google/doclava/LinkReference.java external/doclava/src/com/google/doclava/LiteralTagInfo.java external/doclava/src/com/google/doclava/MemberInfo.java external/doclava/src/com/google/doclava/MethodInfo.java external/doclava/src/com/google/doclava/NavTree.java external/doclava/src/com/google/doclava/PackageInfo.java external/doclava/src/com/google/doclava/PageMetadata.java external/doclava/src/com/google/doclava/ParamTagInfo.java external/doclava/src/com/google/doclava/ParameterInfo.java external/doclava/src/com/google/doclava/ParsedTagInfo.java external/doclava/src/com/google/doclava/Proofread.java external/doclava/src/com/google/doclava/Resolution.java external/doclava/src/com/google/doclava/Resolvable.java external/doclava/src/com/google/doclava/SampleCode.java external/doclava/src/com/google/doclava/SampleTagInfo.java external/doclava/src/com/google/doclava/Scoped.java external/doclava/src/com/google/doclava/SeeTagInfo.java external/doclava/src/com/google/doclava/SinceTagger.java external/doclava/src/com/google/doclava/Sorter.java external/doclava/src/com/google/doclava/SourcePositionInfo.java external/doclava/src/com/google/doclava/Stubs.java external/doclava/src/com/google/doclava/TagInfo.java external/doclava/src/com/google/doclava/TextTagInfo.java external/doclava/src/com/google/doclava/ThrowsTagInfo.java external/doclava/src/com/google/doclava/TodoFile.java external/doclava/src/com/google/doclava/TypeInfo.java external/doclava/src/com/google/doclava/apicheck/AbstractMethodInfo.java external/doclava/src/com/google/doclava/apicheck/ApiCheck.java external/doclava/src/com/google/doclava/apicheck/ApiFile.java external/doclava/src/com/google/doclava/apicheck/ApiInfo.java external/doclava/src/com/google/doclava/apicheck/ApiParseException.java external/doclava/src/com/google/doclava/apicheck/XmlApiFile.java external/doclava/src/com/google/doclava/parser/JavaLexer.java external/doclava/src/com/google/doclava/parser/JavaParser.java ' >> /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes/java-source-list ) && (if [ -d \"/home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/src\" ]; then find /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/src -name '*.java' -and -not -name '.*' >> /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes/java-source-list; fi ) && (tr ' ' '\\n' < /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes/java-source-list | build/tools/normalize_path.py | sort -u > /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes/java-source-list-uniq ) && (if [ -s /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes/java-source-list-uniq ] ; then javac -J-Xmx1024M -Xmaxerrs 9999999 -encoding UTF-8 -classpath /home/vinayak/android/lineage/out/host/linux-x86/framework/antlr-runtime.jar:/home/vinayak/android/lineage/out/host/linux-x86/framework/guavalib.jar:/home/vinayak/android/lineage/out/host/linux-x86/framework/jsilver.jar:/home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/tagsouplib_intermediates/javalib.jar:/usr/lib/jvm/java-8-openjdk/bin/../lib/tools.jar -extdirs \"\" -d /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes -g -source 1.8 -target 1.8 \\@/home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes/java-source-list-uniq || ( rm -rf /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes ; exit 41 ) fi ) && (rm -f /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes/java-source-list ) && (rm -f /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes/java-source-list-uniq ) && (jar -cf /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes-full-debug.jar -C /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes . ) && (rm -f /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes-full-debug.jar.jar-arg-list ) && (touch /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes-full-debug.jar.jar-arg-list ) && (echo -n '-C \"external/doclava/res\" \"assets/customizations/assets/customizations.css\" -C \"external/doclava/res\" \"assets/customizations/assets/customizations.js\" -C \"external/doclava/res\" \"assets/customizations/customizations.cs\" -C \"external/doclava/res\" \"assets/templates/assets/doclava-developer-core.css\" -C \"external/doclava/res\" \"assets/templates/assets/doclava-developer-docs.css\" -C \"external/doclava/res\" \"assets/templates/assets/doclava-developer-docs.js\" -C \"external/doclava/res\" \"assets/templates/assets/doclava-developer-reference.js\" -C \"external/doclava/res\" \"assets/templates/assets/images/bg_fade.jpg\" -C \"external/doclava/res\" \"assets/templates/assets/images/bg_logo.png\" -C \"external/doclava/res\" \"assets/templates/assets/images/body-gradient-tab.png\" -C \"external/doclava/res\" \"assets/templates/assets/images/body-gradient.png\" -C \"external/doclava/res\" \"assets/templates/assets/images/grad-rule-qv.png\" -C \"external/doclava/res\" \"assets/templates/assets/images/hr_gray_main.jpg\" -C \"external/doclava/res\" \"assets/templates/assets/images/hr_gray_side.jpg\" -C \"external/doclava/res\" \"assets/templates/assets/images/left_off.jpg\" -C \"external/doclava/res\" \"assets/templates/assets/images/left_on.jpg\" -C \"external/doclava/res\" \"assets/templates/assets/images/preliminary.png\" -C \"external/doclava/res\" \"assets/templates/assets/images/resizable-e.gif\" -C \"external/doclava/res\" \"assets/templates/assets/images/resizable-e2.gif\" -C \"external/doclava/res\" \"assets/templates/assets/images/resizable-eg.gif\" -C \"external/doclava/res\" \"assets/templates/assets/images/resizable-s.gif\" -C \"external/doclava/res\" \"assets/templates/assets/images/resizable-s2.gif\" -C \"external/doclava/res\" \"assets/templates/assets/images/resizable-sg.gif\" -C \"external/doclava/res\" \"assets/templates/assets/images/right_off.jpg\" -C \"external/doclava/res\" \"assets/templates/assets/images/right_on.jpg\" -C \"external/doclava/res\" \"assets/templates/assets/images/sidenav-rule.png\" -C \"external/doclava/res\" \"assets/templates/assets/images/spacer.gif\" -C \"external/doclava/res\" \"assets/templates/assets/images/triangle-closed-small.png\" -C \"external/doclava/res\" \"assets/templates/assets/images/triangle-closed.png\" -C \"external/doclava/res\" \"assets/templates/assets/images/triangle-opened-small.png\" -C \"external/doclava/res\" \"assets/templates/assets/images/triangle-opened.png\" -C \"external/doclava/res\" \"assets/templates/assets/jquery-history.js\" -C \"external/doclava/res\" \"assets/templates/assets/jquery-resizable.min.js\" -C \"external/doclava/res\" \"assets/templates/assets/prettify.js\" -C \"external/doclava/res\" \"assets/templates/assets/search_autocomplete.js\" -C \"external/doclava/res\" \"assets/templates/assets/style.css\" -C \"external/doclava/res\" \"assets/templates/assets/triangle-none.gif\" -C \"external/doclava/res\" \"assets/templates/at_links_navtree.cs\" -C \"external/doclava/res\" \"assets/templates/class.cs\" -C \"external/doclava/res\" \"assets/templates/classes.cs\" -C \"external/doclava/res\" \"assets/templates/components.cs\" -C \"external/doclava/res\" \"assets/templates/components/api_filter.cs\" -C \"external/doclava/res\" \"assets/templates/components/left_nav.cs\" -C \"external/doclava/res\" \"assets/templates/components/masthead.cs\" -C \"external/doclava/res\" \"assets/templates/components/search_box.cs\" -C \"external/doclava/res\" \"assets/templates/data.hdf\" -C \"external/doclava/res\" \"assets/templates/designpage.cs\" -C \"external/doclava/res\" \"assets/templates/diff.cs\" -C \"external/doclava/res\" \"assets/templates/docpage.cs\" -C \"external/doclava/res\" \"assets/templates/doctype.cs\" -C \"external/doclava/res\" \"assets/templates/footer.cs\" -C \"external/doclava/res\" \"assets/templates/head_tag.cs\" -C \"external/doclava/res\" \"assets/templates/header.cs\" -C \"external/doclava/res\" \"assets/templates/hierarchy.cs\" -C \"external/doclava/res\" \"assets/templates/index.cs\" -C \"external/doclava/res\" \"assets/templates/jd_lists.cs\" -C \"external/doclava/res\" \"assets/templates/jd_lists_unified.cs\" -C \"external/doclava/res\" \"assets/templates/keywords.cs\" -C \"external/doclava/res\" \"assets/templates/lists.cs\" -C \"external/doclava/res\" \"assets/templates/macros.cs\" -C \"external/doclava/res\" \"assets/templates/navtree_data.cs\" -C \"external/doclava/res\" \"assets/templates/nosidenavpage.cs\" -C \"external/doclava/res\" \"assets/templates/package-list.cs\" -C \"external/doclava/res\" \"assets/templates/package.cs\" -C \"external/doclava/res\" \"assets/templates/packages.cs\" -C \"external/doclava/res\" \"assets/templates/sample.cs\" -C \"external/doclava/res\" \"assets/templates/sampleindex.cs\" -C \"external/doclava/res\" \"assets/templates/timestamp.cs\" -C \"external/doclava/res\" \"assets/templates/todo.cs\" -C \"external/doclava/res\" \"assets/templates/trailer.cs\" -C \"external/doclava/res\" \"assets/templates/yaml_navtree.cs\" ' >> /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes-full-debug.jar.jar-arg-list ) && (jar uf /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes-full-debug.jar @/home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes-full-debug.jar.jar-arg-list ) && (rm -f /home/vinayak/android/lineage/out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes-full-debug.jar.jar-arg-list )"
external/doclava/src/com/google/doclava/AnnotationInstanceInfo.java:19: error: package com.google.clearsilver.jsilver.data does not exist
import com.google.clearsilver.jsilver.data.Data;
^
external/doclava/src/com/google/doclava/ClassInfo.java:19: error: package com.google.clearsilver.jsilver.data does not exist
import com.google.clearsilver.jsilver.data.Data;
^
external/doclava/src/com/google/doclava/DocInfo.java:19: error: package com.google.clearsilver.jsilver.data does not exist
import com.google.clearsilver.jsilver.data.Data;
^
external/doclava/src/com/google/doclava/AnnotationInstanceInfo.java:127: error: cannot find symbol
public static void makeLinkListHDF(Data data, String base, AnnotationInstanceInfo[] annotations) {
^
symbol: class Data
location: class AnnotationInstanceInfo
external/doclava/src/com/google/doclava/TypeInfo.java:19: error: package com.google.clearsilver.jsilver.data does not exist
import com.google.clearsilver.jsilver.data.Data;
.
.
.
.
.
symbol: class BitSet
location: class JavaParser
external/doclava/src/com/google/doclava/TodoFile.java:67: error: cannot find symbol
Data data = Doclava.makeHDF();
^
symbol: class Data
location: class TodoFile
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
10844 errors
ninja: build stopped: subcommand failed.
make: Leaving directory '/home/vinayak/android/lineage'
#### make failed to build some targets (53 seconds) ####
va6996 said:
I've been trying to build LineageOS on my laptop, but I get this error...
Click to expand...
Click to collapse
The following link reflects a possible solution that is similar to your error within it.
https://forum.xda-developers.com/showthread.php?t=2259929&page=3
Good Luck!
~~~~~~~~~~~~~~~
I Am The Egg Man,
They Are The Egg Men.
I Am The Walrus!
Coo Coo Cachoo!
Ibuprophen said:
The following link reflects a possible solution that is similar to your error within it.
https://forum.xda-developers.com/showthread.php?t=2259929&page=3
Good Luck!
~~~~~~~~~~~~~~~
I Am The Egg Man,
They Are The Egg Men.
I Am The Walrus!
Coo Coo Cachoo!
Click to expand...
Click to collapse
Thanks a lot! I also realized I had to make clean because it wasn't removing the regenerated files.
va6996 said:
Thanks a lot! I also realized I had to make clean because it wasn't removing the regenerated files.
Click to expand...
Click to collapse
There's also a bunch of threads out there that are very helpful for building ROM's.
Here's just a few of them that could help you out too in case the other link may not work out for you.
[NEW][GUIDE] How-to build LineageOS 14.1 [SIMPLE][USER-FRIENDLY] by FSadino
[HOW TO] Beginners Guide to Android ROM Development by isidromxz
[GUIDE][COMPLETE] Android ROM Development From Source To End by jackeagle
To be honest, I've got an understanding on ROM development but, I've never, personally, developed any. I've only really stuck to developing apps.
Good Luck!
~~~~~~~~~~~~~~~
I Am The Egg Man,
They Are The Egg Men.
I Am The Walrus!
Coo Coo Cachoo!
Ibuprophen said:
There's also a bunch of threads out there that are very helpful for building ROM's.
Here's just a few of them that could help you out too in case the other link may not work out for you.
[NEW][GUIDE] How-to build LineageOS 14.1 [SIMPLE][USER-FRIENDLY] by FSadino
[HOW TO] Beginners Guide to Android ROM Development by isidromxz
[GUIDE][COMPLETE] Android ROM Development From Source To End by jackeagle
To be honest, I've got an understanding on ROM development but, I've never, personally, developed any. I've only really stuck to developing apps.
Good Luck!
~~~~~~~~~~~~~~~
I Am The Egg Man,
They Are The Egg Men.
I Am The Walrus!
Coo Coo Cachoo!
Click to expand...
Click to collapse
Thanks a lot! I was finally able to build it. However, I see that ccache isn't working for me for some reason. The ccache directory size is just 56MB. The build takes the same amount of time ~5hr(on my laptop). I've even set the cache size as 70GB. However, my out directory is 55.7GB. What am I doing wrong?
Probable relevant parts:
Code:
[ 99% 40898/40912] Target cache fs ima...age/out/target/product/kenzo/cache.img
BuildImage: in_dir = /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/cache, out_file = /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/cache.img
fs type is not ext4
Running: mkuserimg.sh -s /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/cache /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/cache.img ext4 cache 268435456 -D /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/system -L cache /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/root/file_contexts.bin
make_ext4fs -s -T -1 -S /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/root/file_contexts.bin -L cache -l 268435456 -a cache /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/cache.img /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/cache /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/system
Creating filesystem with parameters:
Size: 268435456
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 1024
Label: cache
Blocks: 65536
Block groups: 2
Reserved block group size: 15
Created filesystem with 11/16384 inodes and 2089/65536 blocks
Running ['mkuserimg.sh', '-s', '/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/cache', '/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/cache.img', 'ext4', 'cache', '268435456', '-D', '/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/system', '-L', 'cache', '/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/root/file_contexts.bin'] command, exit code = 0
/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/cache.img maxsize=273985536 blocksize=135168 total=6398184 reserve=2838528
[ 99% 40904/40912] Construct recovery from boot
failed to reconstruct target deflate chunk 1 [(null)]; treating as normal
chunk 0: type 0 start 0 len 9041930
chunk 1: type 2 start 9041930 len 4148992
chunk 2: type 0 start 10711741 len 1347
Construct patches for 3 chunks...
patch 0 is 205 bytes (of 9041930)
patch 1 is 5082118 bytes (of 1669811)
patch 2 is 152 bytes (of 1347)
chunk 0: normal ( 0, 9041930) 205
chunk 1: deflate ( 9041930, 7662273) 5082118 (null)
chunk 2: normal ( 16704203, 1333) 152
[ 99% 40904/40912] Target userdata fs .../out/target/product/kenzo/userdata.img
BuildImage: in_dir = /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/data, out_file = /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/userdata.img
fs type is not ext4
Running: mkuserimg.sh -s /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/data /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/userdata.img ext4 data 26838785024 -D /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/system -L data /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/root/file_contexts.bin
make_ext4fs -s -T -1 -S /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/root/file_contexts.bin -L data -l 26838785024 -a data /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/userdata.img /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/data /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/system
Creating filesystem with parameters:
Size: 26838781952
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 32768
Label: data
Blocks: 6552437
Block groups: 200
Reserved block group size: 1024
Created filesystem with 38/1638400 inodes and 150074/6552437 blocks
Running ['mkuserimg.sh', '-s', '/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/data', '/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/userdata.img', 'ext4', 'data', '26838785024', '-D', '/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/system', '-L', 'data', '/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/root/file_contexts.bin'] command, exit code = 0
/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/userdata.img maxsize=27400671936 blocksize=135168 total=155432808 reserve=276824064
[ 99% 40908/40912] Target system fs im...G/systemimage_intermediates/system.img
BuildImage: in_dir = /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/system, out_file = /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/obj/PACKAGING/systemimage_intermediates/system.img
fs type is not ext4
Running: mkuserimg.sh -s /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/system /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 2684354560 -D /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/system -L system /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/root/file_contexts.bin
make_ext4fs -s -T -1 -S /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/root/file_contexts.bin -L system -l 2684354560 -a system /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/obj/PACKAGING/systemimage_intermediates/system.img /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/system /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/system
Creating filesystem with parameters:
Size: 2684354560
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 10240
Label: system
Blocks: 655360
Block groups: 20
Reserved block group size: 159
Created filesystem with 3340/163840 inodes and 292571/655360 blocks
Running ['mkuserimg.sh', '-s', '/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/system', '/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/obj/PACKAGING/systemimage_intermediates/system.img', 'ext4', 'system', '2684354560', '-D', '/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/system', '-L', 'system', '/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/root/file_contexts.bin'] command, exit code = 0
[ 99% 40909/40912] Install system fs i...ge/out/target/product/kenzo/system.img
/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/system.img+/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=2740531200 blocksize=135168 total=1160426351 reserve=27709440
[ 99% 40910/40912] Package target file...eage_kenzo-target_files-d4b338b746.zip
using prebuilt recovery.img from BOOTABLE_IMAGES...
using prebuilt boot.img from BOOTABLE_IMAGES...
putting script in bin/install-recovery.sh
running: unzip -o -q /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/obj/PACKAGING/target_files_intermediates/lineage_kenzo-target_files-d4b338b746.zip -d /tmp/targetfiles-cmkmqI
++++ boot ++++
using prebuilt boot.img from BOOTABLE_IMAGES...
++++ recovery ++++
using prebuilt recovery.img from BOOTABLE_IMAGES...
++++ recovery (two-step image) ++++
building image from target_files RECOVERY...
running: mkbootfs -f /tmp/targetfiles-cmkmqI/META/recovery_filesystem_config.txt /tmp/targetfiles-cmkmqI/RECOVERY/RAMDISK
running: minigzip
running: /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/host/linux-x86/bin/mkbootimg --kernel /tmp/targetfiles-cmkmqI/RECOVERY/kernel --cmdline androidboot.hardware=qcom ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 ramoops_memreserve=4M buildvariant=userdebug --base 0x80000000 --pagesize 2048 --ramdisk_offset 0x01000000 --tags_offset 0x00000100 --os_version 7.1.2 --os_patch_level 2017-08-05 --ramdisk /tmp/tmpFzhpAo --output /tmp/tmpBQOvrL
++++ system ++++
creating system.img...
BuildImage: in_dir = /tmp/targetfiles-cmkmqI/system, out_file = /tmp/system-d7Wo62.img
fs type is not ext4
Running: mkuserimg.sh -s /tmp/targetfiles-cmkmqI/system /tmp/system-d7Wo62.img ext4 system 2684354560 -T 1230748200 -C /tmp/targetfiles-cmkmqI/META/filesystem_config.txt -B /tmp/system-blocklist-OsEPwM.map -L system /tmp/targetfiles-cmkmqI/META/file_contexts.bin
make_ext4fs -s -T 1230748200 -S /tmp/targetfiles-cmkmqI/META/file_contexts.bin -C /tmp/targetfiles-cmkmqI/META/filesystem_config.txt -B /tmp/system-blocklist-OsEPwM.map -L system -l 2684354560 -a system /tmp/system-d7Wo62.img /tmp/targetfiles-cmkmqI/system
loaded 3332 fs_config entries
Creating filesystem with parameters:
Size: 2684354560
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 10240
Label: system
Blocks: 655360
Block groups: 20
Reserved block group size: 159
Created filesystem with 3342/163840 inodes and 292951/655360 blocks
Running ['mkuserimg.sh', '-s', '/tmp/targetfiles-cmkmqI/system', '/tmp/system-d7Wo62.img', 'ext4', 'system', '2684354560', '-T', '1230748200', '-C', '/tmp/targetfiles-cmkmqI/META/filesystem_config.txt', '-B', '/tmp/system-blocklist-OsEPwM.map', '-L', 'system', '/tmp/targetfiles-cmkmqI/META/file_contexts.bin'] command, exit code = 0
++++ userdata ++++
creating userdata.img...
BuildImage: in_dir = /tmp/tmpbdwQbq/data, out_file = /tmp/tmpucca6X
fs type is not ext4
Running: mkf2fsuserimg.sh /tmp/tmpucca6X 26838785024
in mkf2fsuserimg.sh PATH=/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/host/linux-x86/bin:/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/host/linux-x86/bin/:/usr/lib/jvm/java-8-openjdk/bin:/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/host/linux-x86/bin:/run/media/vinayak/6FA49F144DC575A7/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/run/media/vinayak/6FA49F144DC575A7/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/run/media/vinayak/6FA49F144DC575A7/android/lineage/development/scripts:/run/media/vinayak/6FA49F144DC575A7/android/lineage/prebuilts/devtools/tools:/run/media/vinayak/6FA49F144DC575A7/android/lineage/external/selinux/prebuilts/bin:/run/media/vinayak/6FA49F144DC575A7/android/lineage/prebuilts/android-emulator/linux-x86_64:/home/vinayak/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
make_f2fs -l 26838785024 /tmp/tmpucca6X
Info: zone aligned segment0 blkaddr: 512
Info: Overprovision ratio = 1.250%
Info: Overprovision segments = 323 (GC reserved = 167)
Running ['mkf2fsuserimg.sh', '/tmp/tmpucca6X', '26838785024'] command, exit code = 0
userdata size (14) is 0.00% of limit (26838785024)
++++ extrauserdata ++++
++++ cache ++++
creating cache.img...
BuildImage: in_dir = /tmp/tmpQp6j5q/cache, out_file = /tmp/tmpPUYQ9G
fs type is not ext4
Running: mkf2fsuserimg.sh /tmp/tmpPUYQ9G 268435456
in mkf2fsuserimg.sh PATH=/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/host/linux-x86/bin:/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/host/linux-x86/bin/:/usr/lib/jvm/java-8-openjdk/bin:/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/host/linux-x86/bin:/run/media/vinayak/6FA49F144DC575A7/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/run/media/vinayak/6FA49F144DC575A7/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/run/media/vinayak/6FA49F144DC575A7/android/lineage/development/scripts:/run/media/vinayak/6FA49F144DC575A7/android/lineage/prebuilts/devtools/tools:/run/media/vinayak/6FA49F144DC575A7/android/lineage/external/selinux/prebuilts/bin:/run/media/vinayak/6FA49F144DC575A7/android/lineage/prebuilts/android-emulator/linux-x86_64:/home/vinayak/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
make_f2fs -l 268435456 /tmp/tmpPUYQ9G
Info: zone aligned segment0 blkaddr: 512
Info: Overprovision ratio = 15.000%
Info: Overprovision segments = 35 (GC reserved = 21)
Running ['mkf2fsuserimg.sh', '/tmp/tmpPUYQ9G', '268435456'] command, exit code = 0
cache size (14) is 0.00% of limit (268435456)
done.
[ 99% 40911/40912] Package OTA: /run/m...kenzo/lineage_kenzo-ota-d4b338b746.zip
unzipping target target-files...
running: unzip -o -q /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/obj/PACKAGING/target_files_intermediates/lineage_kenzo-target_files-d4b338b746.zip -d /tmp/targetfiles-Rnr8Wy
--- target info ---
blockimgdiff_versions = (str) 1,2,3,4
blocksize = (int) 131072
boot_size = (int) 67108864
build.prop = (dict) {'persist.audio.dirac.speaker': 'true', 'ro.sys.sdcardfs': 'true', 'persist.audio.fluence.speaker': 'true', 'bluetooth.hfp.client': '1', 'audio.safx.pbe.enabled': 'true', 'dalvik.vm.isa.arm.variant': 'cortex-a53.a57', 'ro.product.cpu.abilist': 'arm64-v8a,armeabi-v7a,armeabi', 'debug.enable.sglscale': '1', 'ro.build.product': 'kenzo', 'persist.data.iwlan.enable': 'true', 'ro.build.id': 'NJH47F', 'ro.hwui.gradient_cache_size': '1', 'dalvik.vm.stack-trace-file': '/data/anr/traces.txt', 'ro.product.cpu.abilist32': 'armeabi-v7a,armeabi', 'ro.build.selinux': '1', 'ro.qc.sdk.audio.fluencetype': 'fluence', 'tunnel.audio.encode': 'false', 'ro.frp.pst': '/dev/block/bootdevice/by-name/config', 'af.fast_track_multiplier': '1', 'dalvik.vm.lockprof.threshold': '500', 'ro.build.fingerprint': 'Xiaomi/kenzo/kenzo:6.0.1/MMB29M/V8.2.1.0.MHOCNDL:user/release-keys', 'ro.product.manufacturer': 'Xiaomi', 'dalvik.vm.isa.arm64.features': 'default', 'audio.offload.pcm.24bit.enable': 'false', 'persist.radio.cs_srv_type': '1', 'ro.hwui.layer_cache_size': '48', 'ro.build.description': 'kenzo-user 6.0.1 MMB29M V8.2.1.0.MHOCNDL release-keys', 'ro.bootimage.build.fingerprint': 'Xiaomi/lineage_kenzo/kenzo:7.1.2/NJH47F/d4b338b746:userdebug/test-keys', 'ro.product.cpu.abi': 'arm64-v8a', 'ro.sys.fw.dex2oat_thread_count': '4', 'ro.product.brand': 'Xiaomi', 'wifi.interface': 'wlan0', 'ro.cm.build.version.plat.sdk': '7', 'ro.product.model': 'Redmi Note 3', 'persist.radio.redir_party_num': '0', 'media.camera.ts.monotonic': '1', 'ro.cmlegal.url': 'https://lineageos.org/legal', 'persist.audio.fluence.voicecall': 'true', 'persist.cne.feature': '1', 'media.msm8956hw': '1', 'audio.offload.multiple.enabled': 'false', 'persist.demo.hdmirotationlock': 'false', 'ro.build.host': 'skynet', 'ro.build.version.security_patch': '2017-08-05', 'telephony.lteOnCdmaDevice': '1', 'media.sf.extractor-plugin': 'libffmpeg_extractor.so', 'ro.product.locale': 'en-US', 'audio.offload.min.duration.secs': '30', 'ro.btconfig.vendor': 'qcom', 'persist.audio.fluence.voicerec': 'true', 'audio.offload.video': 'false', 'dalvik.vm.isa.arm64.variant': 'generic', 'mmp.enable.3g2': 'true', 'persist.radio.NO_STAPA': '1', 'persist.hwc.downscale_threshold': '1.15', 'persist.sys.dalvik.vm.lib.2': 'libart.so', 'persist.loc.nlp_name': 'com.qualcomm.location', 'ro.board.platform': 'msm8952', 'voice.playback.conc.disabled': 'true', 'persist.data.qmi.adb_logmask': '0', 'ro.product.cpu.abilist64': 'arm64-v8a', 'audio.playback.mch.downsample': 'true', 'net.tcp.2g_init_rwnd': '10', 'ro.vendor.extension_library': 'libqti-perfd-client.so', 'persist.radio.multisim.config': 'dsds', 'persist.rild.nitz_long_ons_3': '', 'persist.rild.nitz_long_ons_2': '', 'persist.rild.nitz_long_ons_1': '', 'persist.rild.nitz_long_ons_0': '', 'ro.build.flavor': 'lineage_kenzo-userdebug', 'dalvik.vm.isa.arm.features': 'default', 'audio.deep_buffer.media': 'true', 'rild.libargs': '-d /dev/smd0', 'ro.gps.agps_provider': '1', 'persist.rild.nitz_short_ons_0': '', 'ro.build.version.release': '7.1.2', 'ro.build.version.codename': 'REL', 'DEVICE_PROVISIONED': '1', 'audio.offload.disable': '1', 'net.bt.name': 'Android', 'persist.data.netmgrd.qos.enable': 'true', 'ro.hwui.text_large_cache_width': '2048', 'persist.audio.fluence.audiorec': 'false', 'persist.radio.VT_HYBRID_ENABLE': '1', 'ro.opengles.version': '196610', 'use.voice.path.for.pcm.voip': 'true', 'persist.rild.nitz_plmn': '', 'ro.hwui.text_small_cache_height': '1024', 'ro.build.display.id': 'lineage_kenzo-userdebug 7.1.2 NJH47F d4b338b746 test-keys', 'audio.offload.pcm.16bit.enable': 'false', 'persist.radio.hw_mbn_update': '0', 'ro.config.ringtone': 'Orion.ogg', 'persist.radio.force_on_dc': 'true', 'persist.gps.qc_nlp_in_use': '1', 'debug.egl.hw': '0', 'ro.storage_manager.enabled': 'true', 'ro.carrier': 'unknown', 'ro.product.board': 'msm8952', 'ro.build.version.preview_sdk': '0', 'ro.com.google.clientidbase': 'android-xiaomi', 'persist.radio.start_ota_daemon': '1', 'ro.cm.build.version.plat.rev': '0', 'persist.timed.enable': 'true', 'ro.build.date': 'Tue Aug 22 13:26:20 IST 2017', 'ro.use_data_netmgrd': 'true', 'persist.radio.sib16_support': '1', 'qcom.bluetooth.soc': 'smd', 'ro.build.date.utc': '1503388580', 'audio.offload.buffer.size.kb': '64', 'keyguard.no_require_sim': 'true', 'ro.qc.sdk.audio.ssr': 'false', 'voice.conc.fallbackpath': 'deep-buffer', 'persist.dpm.feature': '5', 'ro.cm.display.version': '14.1-20170822-UNOFFICIAL-kenzo', 'ro.build.version.all_codenames': 'REL', 'mm.enable.smoothstreaming': 'true', 'ro.btconfig.if': 'smd', 'persist.dbg.vt_avail_ovr': '1', 'dev.pm.dyn_samplingrate': '1', 'ro.build.type': 'userdebug', 'ro.hwui.text_small_cache_width': '1024', 'voice.record.conc.disabled': 'false', 'ro.cm.version': '14.1-20170822-UNOFFICIAL-kenzo', 'persist.radio.sw_mbn_update': '0', 'ro.product.name': 'lineage_kenzo', 'ro.hwui.drop_shadow_cache_size': '6', 'ro.build.version.base_os': '', 'ro.telephony.call_ring.multiple': 'false', 'voice.voip.conc.disabled': 'true', 'persist.data.mode': 'concurrent', 'media.sf.omx-plugin': 'libffmpeg_omx.so', 'ro.expect.recovery_id': '0x22ab51ee62435272df9ab420618c4be9c94727ed000000000000000000000000', 'ro.telephony.default_network': '22,20', 'ro.wifi.channels': '', 'ro.hwui.r_buffer_cache_size': '8', 'persist.camera.HAL3.enabled': '1', 'ro.modversion': '14.1-20170822-UNOFFICIAL-kenzo', 'ro.build.characteristics': 'default', 'debug.mdpcomp.logs': '0', 'audio.offload.gapless.enabled': 'true', 'ro.build.version.incremental': 'd4b338b746', 'ro.config.alarm_alert': 'Hassium.ogg', 'ro.hwui.text_large_cache_height': '1024', 'rild.libpath': '/vendor/lib64/libril-qc-qmi-1.so', 'ro.build.tags': 'test-keys', 'ro.sf.lcd_density': '480', 'ro.build.version.sdk': '25', 'ro.cm.releasetype': 'UNOFFICIAL', 'audio.dolby.ds2.enabled': 'true', 'persist.audio.fluence.spk.mono': 'true', 'ril.subscription.types': 'RUIM', 'persist.dpm.nsrm.bkg.evt': '3955', 'ro.build.user': 'vinayak', 'persist.dbg.volte_avail_ovr': '1', 'ro.hwui.path_cache_size': '32', 'ro.product.device': 'kenzo', 'debug.sf.hw': '0', 'persist.rild.nitz_short_ons_1': '', 'persist.rild.nitz_short_ons_2': '', 'persist.rild.nitz_short_ons_3': '', 'persist.radio.rat_on': 'combine', 'ro.btconfig.dev': '/dev/smd3', 'ro.hwui.texture_cache_flushrate': '0.4', 'ro.hwui.texture_cache_size': '72', 'ro.cm.device': 'kenzo', 'audio_hal.period_size': '192', 'ro.btconfig.chip': 'WCN3680', 'ro.telephony.default_cdma_sub': '0', 'persist.radio.apm_sim_not_pwdn': '1', 'persist.hwc.mdpcomp.enable': 'true', 'persist.radio.custom_ecc': '1', 'persist.sys.dun.override': '0', 'ro.config.notification_sound': 'Argon.ogg', 'audio.offload.track.enable': 'false', 'media.aac_51_output_enabled': 'true'}
cache_fs_type = (str) ext4
cache_size = (int) 268435456
default_system_dev_certificate = (str) build/target/product/security/testkey
device_type = (str) MMC
extfs_sparse_flag = (str) -s
extra_recovery_keys = (str) vendor/cm/build/target/product/security/lineage
fs_type = (str) ext4
fstab = (dict) {'/cache': <common.Partition object at 0x7f2d76e445d0>, '/boot': <common.Partition object at 0x7f2d76e44050>, '/system': <common.Partition object at 0x7f2d76e44950>, '/dsp': <common.Partition object at 0x7f2d76e44210>, '/frp': <common.Partition object at 0x7f2d76e44110>, '/persist': <common.Partition object at 0x7f2d76e44810>, '/recovery': <common.Partition object at 0x7f2d76e44750>, '/firmware': <common.Partition object at 0x7f2d76e44610>, '/data': <common.Partition object at 0x7f2d76e44550>, '/misc': <common.Partition object at 0x7f2d76e44790>}
fstab_version = (int) 2
mkbootimg_args = (str) --ramdisk_offset 0x01000000 --tags_offset 0x00000100
mkbootimg_version_args = (str) --os_version 7.1.2 --os_patch_level 2017-08-05
multistage_support = (str) 1
ota_override_device = (str) kate,kenzo
recovery_api_version = (int) 3
recovery_as_boot = (str)
recovery_mount_options = (str) ext4=max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc
recovery_size = (int) 67108864
selinux_fc = (str) /tmp/targetfiles-Rnr8Wy/META/file_contexts.bin
squashfs_sparse_flag = (str) -s
system_size = (int) 2684354560
tool_extensions = (str) device/xiaomi/kenzo/../common
update_rename_support = (str) 1
use_set_metadata = (str) 1
userdata_size = (int) 26838785024
unable to load device-specific module; assuming none
using prebuilt recovery.img from BOOTABLE_IMAGES...
using system.img from target-files
Total of 655360 4096-byte output blocks in 6263 input chunks.
Finding transfers...
Generating digraph...
Finding vertex sequence...
Reversing backward edges...
0/0 dependencies (0.00%) were violated; 0 source blocks stashed.
Improving vertex order...
Revising stash size...
Total 0 blocks (0 bytes) are packed as new blocks due to insufficient cache size.
Reticulating splines...
1156825088 1156825088 (100.00%) new __DATA
max stashed blocks: 0 (0 bytes), limit: 214748364 bytes (0.00%)
using prebuilt boot.img from BOOTABLE_IMAGES...
boot size (10713088) is 15.96% of limit (67108864)
running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
running: java -Xmx2048m -Djava.library.path=/run/media/vinayak/6FA49F144DC575A7/android/lineage/out/host/linux-x86/lib64 -jar /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmpOsziEC /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/lineage_kenzo-ota-d4b338b746.zip
done.
[100% 40912/40912] build bacon
Package Complete: /run/media/vinayak/6FA49F144DC575A7/android/lineage/out/target/product/kenzo/lineage-14.1-20170822-UNOFFICIAL-kenzo.zip
make: Leaving directory '/run/media/vinayak/6FA49F144DC575A7/android/lineage'
#### make completed successfully (04:59:23 (hh:mm:ss)) ####

How To Guide Create your own super.img for your own Alioth fastboot / MiFlash custom ROM package

What you need is the following:
bash command line (if you have windows you can install ubuntu linux bash)
a working lpmake executable (you can use https://github.com/asura99/lpunpack_and_lpmake install the plugins, and run the make shell script)
Your set of images that came for your Custom Rom, it should be similar to the following set:
system.img
system_ext.img
product.img
vendor.img
odm.img
Steps:
1. Boot on a custom recovery that has ADB access e.g. TWRP and execute the following on windows CMD:
Code:
adb shell lpdump --slot 0 /dev/block/bootdevice/by-name/super
The command will print all the sector allocations but we're after the natural file size of your super.img based on how stock ROM sized it. That will be our basis to size the image. Get the exact number of the super image file size in bytes. You should see a number within the ballpark of 9126805504. Save that number for later step.
2. Extract the attached file into the same location where your images above are placed. This represents the _b partitions (which is 0 bytes by default on the original MIUI super.img)
3. Get the file sizes of the image files above in bytes. It will be best to get them using "ls -l" command on bash command prompt so that you can get the precise sizes. Store the values somewhere.
4. Redirect your bash command prompt to the directory where the images are located. Execute the following command:
Code:
./lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:<the super file size from step 1> --group main:<sum of all images in bytes> --partition system_a:readonly:<system image size>:main --image system_a=./system.img --partition system_b:readonly:0:main --image system_b=./system_b.img --partition system_ext_a:readonly:<system_ext image size>:main --image system_ext_a=./system_ext.img --partition system_ext_b:readonly:0:main --image system_ext_b=./system_ext_b.img --partition product_a:readonly:<product image size>:main --image product_a=./product.img --partition product_b:readonly:0:main --image product_b=./product_b.img --partition vendor_a:readonly:<vendor image size>:main --image vendor_a=./vendor.img --partition vendor_b:readonly:0:main --image vendor_b=./vendor_b.img --partition odm_a:readonly:<odm image size>:main --image odm_a=./odm.img --partition odm_b:readonly:0:main --image odm_b=./odm_b.img --sparse --output ./super.new.img
Below is an example of the command using the format above:
Code:
./lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:9126805504 --group main:7815139328 --partition system_a:readonly:2308665344:main --image system_a=./system.img --partition system_b:readonly:0:main --image system_b=./system_b.img --partition system_ext_a:readonly:1509330944:main --image system_ext_a=./system_ext.img --partition system_ext_b:readonly:0:main --image system_ext_b=./system_ext_b.img --partition product_a:readonly:2656813056:main --image product_a=./product.img --partition product_b:readonly:0:main --image product_b=./product_b.img --partition vendor_a:readonly:1307881472:main --image vendor_a=./vendor.img --partition vendor_b:readonly:0:main --image vendor_b=./vendor_b.img --partition odm_a:readonly:32448512:main --image odm_a=./odm.img --partition odm_b:readonly:0:main --image odm_b=./odm_b.img --sparse --output ./super.new.img
Notice that this has a different partition structure compared to this thread. This is because MIUI has a different structure and strategy on how _a and _b partitions are split. I guess the ROM knows that _b partitions are only needed to be resized when you do the recovery or seamless updates.
Hope this helps anyone who want to create a super.img file. This has helped me a lot.

Categories

Resources