Related
Plagiarism will not be tolerated on XDA-Developers:
http://forum.xda-developers.com/showpost.php?p=35640046&postcount=36
Reserved - Possible Updates Using Cygwin
I'm gonna take this one just in case as well
Thx for the app but i have an empty ramdisk folder...and all of the ramdisk files can't created or newer or same age version exists...cydwin won't let me copy the log...im using huawei not SE phone..if it has something to do!! But i can see the contents at boot.img-ramdisk.gz
Thanks but please mirror to other filehoster because mf is buggy on my phone
Sent from my WT19i using xda premium
$ ./extractboot boot.img
./extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory
what i missed here?
edit: opps. missed the REQUIRED packages. testing again.
$ ./extractboot boot.img
Android Magice not found in ./boot.img/ Giving up.
gzip: ../../boot.img-ramdisk.gz: unexpected end of file
cpio: premature end of archive
Any help with this error? I am trying to split and edit a custom CM9/ICS boot.img
very useful tool, thanks
This isn't working for me on my htc evo 4g lte. I am unpacking the stock boot.img and then repacking it with NO changes and get bootloops.
your image png should not exceed 20KB and your logo.rle should not exceed 60kb Otherwise you will almost always bootloop
stef67000 said:
your image png should not exceed 20KB and your logo.rle should not exceed 60kb Otherwise you will almost always bootloop
Click to expand...
Click to collapse
I didn't change any pngs, logos, or anything. I simply unpacked, repacked, and flashed.
maxdamage2122 said:
I didn't change any pngs, logos, or anything. I simply unpacked, repacked, and flashed.
Click to expand...
Click to collapse
Check on the way your kernel should be build.. Ours use as base 0x20 but yours may change..
Sent from my LT18i using Tapatalk
jimbo77 said:
Check on the way your kernel should be build.. Ours use as base 0x20 but yours may change..
Sent from my LT18i using Tapatalk
Click to expand...
Click to collapse
Is there a way to check without the source? Source for our kernel isn't released yet.
I've tried to unpack the last boot.img from cm9 RC2 to get the new cwm 6.x but I have an issue
Code:
$ ./extractboot boot.img
Page size: 2048 (0x00000800)
Kernel size: 3229308 (0x0031467c)
Ramdisk size: 1789254 (0x001b4d46)
Second size: 0 (0x00000000)
Board name:
Command line:
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.
./extractboot: line 17: cpio: command not found
I use this way http://forum.xda-developers.com/showthread.php?t=1477845
how to change spash screen http://forum.xda-developers.com/showthread.php?t=1140406
You need to download the cpio package through cygic in order to have it fixed..
Sent from my SGS3... Yes I have it!!!!
jimbo77 said:
You need to download the cpio package through cygic in order to have it fixed..
Sent from my SGS3... Yes I have it!!!!
Click to expand...
Click to collapse
thanks
thomas.raines said:
$ ./extractboot boot.img
Android Magice not found in ./boot.img/ Giving up.
gzip: ../../boot.img-ramdisk.gz: unexpected end of file
cpio: premature end of archive
Any help with this error? I am trying to split and edit a custom CM9/ICS boot.img
Click to expand...
Click to collapse
Hello,I'm having the same error with CM9/10 ICS/JellyBean kernel boot.img,there are chances it comes from the kernel itself as it appears to be or should we better look into our configuration?
helo, i repacket doomlord kernel v22 and when im trying to flash it i got this error :
FAILED (remote: Wrong range:0x10008000-0x103202d7. Ok:0x00200000 - 0x03dfff)
It's somethink about size of kernel and "fake size maker" file, but i dont know how to fix it.
So I pulled a working one apart and replaced the kernel with the compiled one.
Code:
[email protected] ~
$ cd /boot
[email protected] /boot
$ ./extractboot boot.img
Page size: 2048 (0x00000800)
Kernel size: 4463500 (0x00441b8c)
Ramdisk size: 372027 (0x0005ad3b)
Second size: 0 (0x00000000)
Board name:
Command line: console=ttyHSL0,115200,n8 androidboot.hardware=qcom loglevel=0
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.
2881 blocks
[email protected] /boot
$ ./packboot
Using base address 0x40200000
Using command line 'console=ttyHSL0,115200,n8 androidboot.hardware=qcom loglevel=0'
No errors
I then put it back together and I'm getting the boot.img is like half the original size (even tho the kernel files were pretty close to almost deadon the same size) and when I try to send to boot I get this
Code:
>fastboot boot boot_new.img
downloading 'boot.img'...
OKAY [ 1.168s]
booting...
FAILED (remote: incomplete bootimage)
finished. total time: 1.168s
This is for a Pantech Burst (p9070) if that helps at all
Original boot.img
New repacked boot.img
This is my own completely Off Topic Discussion thread.
A place where I will bring HW related discussions, that do not fit into
specific threads or discussions.
Please, do not post here with general questions or other junk that I have not initiated myself.
Also do not ask where to find files/programs mentioned in this thread, because if I have not linked to them, I don't know!
They will be removed. (Thanks for understanding.)
See you.
<< Better reserve for more dragons >>
Didn't see that anyone mentioned it and I'm not sure if the S4 modems are as well, but the initial container that the modems are in on the HTC used S3 chips is a fat16 format. I saw that with a simple hex editor showed it and I was able to see the modem file structure as well. I'll snag a few S4 modems later today and take a look. Couldn't unpack and repackaged though, which is probably the EFS formatting with it.
Off topic goes in off topic
Sorry it took so long
I had intended to do this at least a week ago, but had not the chance. Both the S3 HTC Radios and the S4 HTC Radios are fat 16 imgs.
As you see in the Rezound screenshot, in the first few lines of the HEX table in the bottom left mentions no volume label and a fat 16 label on the type. in addition when I use IMG viewers it shows the same with both the MDM9K image and the main IMG. This should theoretically enable us to possibly use amss imgs or other parts of the radios with other devices or even cross the modem over to other Samsung devices with the same modem chips.
In addition as per the Ville screenshot, this is the One S modem for one of the European basebands. Again the HEX shows Fat 16 as the file type, but the file structure and amount of files are much more plentiful. If this can become of any use, great. If not, oh well... but it is good food for thought either way.
On other notes, I did try to copy files from the LTE baseband (MDM9k) from the Vivid and move them to the MDM9k IMG for the rezound, but the IMG bloated. I haven't had enough time to try and mount the images in my Ubuntu environment, but doing it in Winblows caused the IMG to bloat up too much and caused radio issues and IMEI unknown blanks.
Happy perusing and happy hunting!
Very nice, but I doubt you'll be able to mix modem files (between different devices) unless you're absolutely sure that the device modem and AP HW is the same. Apparently from another recent conversation, it seem that HTC and Qualcomm are both moving to unified source code for their devices. So it can still be true that many of those files are the same across devices.
Could you write a few lines on how you go about this extraction and do it for the HTC One X (LTE)?
Also don't forget that US HTC One X (or S, or whatever) is not the same hardware and the European one!
On second thought, I think this is what you got..right?
Pretty much. Seems like another situation where I should have spoke up when I first saw it with Qualcomm S3 modems in May. On moving files though, I was planning to stay in family. S3 w/ S3 ect.
^^ BTW. Could you tell if there are any structural differences (content wise) between files of same prefix, but sequential postfix? What is strange is that they are all very different sizes, which indicate they probably have very different content...
If it was just one solid piece of firmware, it would just have been chopped up into equal sized pieces...
I'll look closer on that. I do remember that most of the sequential pieces were the same size minus either the first or the last, holding with your theory.
Maybe not the right place, but have you looked at the pit files?
COM_TAR2MSM8960
MODEM non-tlos.bin
sbl1.mbm
sbl2.mbm
sbl3.mbm
aboot.mbm
rpm.mbm
BOOT boot.img
TZ
PAD
PARAM
EFS efs.img (ext4)
MODEMST1 nvrebuild1.bin
MODEMST2 nvrebuild2.bin
system.img (ext4)
userdata.img (ext4)
persist.img (ext4)
cache.img (ext4)
recovery.img (ext4)
FOTA
BACKUP
FSG
SSD
GROW
PGPT pgpt.img
PIT MSM8960.pit
MD5 md5.img
SGPT sgpt.img
I know it is not really new, but I hadn't seen the img names.
The ones I took screenshots of were for 3rd and 4th Gen Snapdragon processors, radio.imgs for HTC devices. The Samsung pit files may give good cross references though. I'll re-unbox my Amaze this evening and check the mounts to see any information on the single file broken into pieces theory.
"eMMC Partition tools usage for msm7x30/msm8x60"
(A repost from Anyclub...)
In the eMMC boot, there are some changes in eMMC partitioning.
Code:
[SIZE=2]partition.xml - Everything begins with this file, which describes the number of
partitions desired, and how many sectors each one should be.
PartitioningTool.py - translates partition.xml into binary partitions
msp.exe - writes binary partitions to SD/eMMC cards using card reader
mjsdload.cmm - writes binary partitions to SD/eMMC cards using Trace32
msp.py - writes binary partitions to a single image file
QPST - writes binary partitions to SD/eMMC cards on Target
[/SIZE]
Helper /Debug Tools:
Code:
[SIZE=2]parseBinaryPartitionFile.pl - Decodes MBR partition tables. Run:
"Perl parseBinaryPartitionFile.pl partition.bin"
to generate the partition information
parseGPT.pl - Decodes GPT partition tables
[/SIZE]
partition.xml
These are the property entries that can be added in new partiton.xml to specify the configuration.
Code:
[SIZE=2]<parser_instructions>
WRITE_PROTECT_BOUNDARY_IN_KB = 0
GROW_LAST_PARTITION_TO_FILL_DISK = false
ALIGN_ALL_LOGICAL_PARTITIONS_TO_WP_BOUNDARY = false
</parser_instructions>[/SIZE]
WRITE_PROTECT_BOUNDARY_IN_KB: Typical boundaries are 64MB, i.e. 65536 KB. This
means that a 256MB eMMC card has 4 write protect boundaries. Any or all of
them can be marked as read-only. Different vendors allow for different sized
boundaries.
GROW_LAST_PARTITION_TO_FILL_DISK: In partition.xml the size of each partition
is specified. If this field is TRUE, then the last partition size is ignored
and set to 0. Then during patching this size is updated such that the last
partition extends to use all remaining space.
ALIGN_ALL_LOGICAL_PARTITIONS_TO_WP_BOUNDARY: To allow total flexibility, it
could be that a partition that is currently writeable might need to be marked
as read-only. This can only happen *if* that partition begins on a write
protect boundary (i.e. 64MB). Thus if this field is TRUE, then all logical
partitions are positioned such that they begin on a write protect boundary.
PartitioningTool.py
Is a new tool used to generate the the partition.xml
When run, it will output following 5 files:
1. emmc_lock_regions.xml
This hold the sector ranges that need to be marked as read-only by the
operating system (this is from readonly="true" in partition.xml) i.e. modem
code and boot images are typically on read-only partitions Typical
Write-Protect boundary is 64MB = 131072 sectors = 0x20000 sectors. The file
below is protecting the very first 64MB region of the card,
Boundary #0
Starting at sector 0
Ending at sector 131071 (for a total of 131072 sectors)
Code:
[SIZE=2]<?xml version="1.0" ?>
<protect>
<!-- NOTE: This is an ** Autogenerated file ** -->
<!-- NOTE: Sector size is 512bytes, WRITE_PROTECT_BOUNDARY_IN_KB=0, WRITE_PROTECT_BOUNDARY_IN_SECTORS=0 -->
<!-- NOTE: "num_sectors" in HEX "start_sector" in HEX, i.e. 10 really equals 16 !! -->
<program boundary_num="0" num_boundaries_covered="1"
num_sectors="20000" num_sectors_dec="131072" physical_partition_number="0"
start_sector="0" start_sector_dec="0"/>
<information WRITE_PROTECT_BOUNDARY_IN_KB="0"/>
</protect>
[/SIZE]
2. partition0.bin
This holds the partition tables, i.e. MBR followed by all EBRs. This is the
partition table in binary format. It is copied over to the storage device in a
1 to 1 manner. I.e. how it looks in partition0.bin is exactly how the
partition table will look on the storage device. partition0.bin is a "generic"
file meant to fit on *any* size SD/eMMC card, as a result, there are 0's that
need to be patched,such as EXT partition and last partition size.
3. patch0.xml
Contain the patching instructions to tailor each partition table
"partition0.bin" to a specific SD/eMMC card. I.e. the partition0.bin
partition tables can be applied to any size storage device As a result,
there are empty values (zeros) in the partition tables that must be filled
in with a specific cards sector size
There are two ways to apply this patch:
a) (patch before) When you patch the "zeros" in the partition tables held in the file partition0.bin, and then write it to the card
b) (patch after) When you write partition0.bin to the card (which still has "zeros" in it), and then patch the cards partition tables directly
4. rawprogram0.xml
precise sector details of all partitions and what files (if any) need to
be placed there. In addition to writing partition tables onto a device,
often times it is desired to write one or more files into the partition
area as well, The File has partition name (i.e. label), where it begins
(start_sector) and how big it is (num_partition_sectors). It also
describes what file(s) to write to this partition, as well as any
offsets.
Example:
Code:
[SIZE=2]<program file_sector_offset="0" filename="partition0.bin" label="MBR"
num_partition_sectors="1" physical_partition_number="0"
size_in_KB="0.5" start_sector="0"/>
<program file_sector_offset="1" filename="partition0.bin " label="EXT"
num_partition_sectors="2" physical_partition_number="0"
size_in_KB="1.0" start_sector="779"/>
[/SIZE]
The 1st line describes taking the 1st sector from partition0.bin, and writing it to sector 0 of the card.
The 2nd line describes taking the 2nd and 3rd sector from partition0.bin and writing it to sector 779 of the card.
I.e. file_sector_offset = 2 and num_partition_sectors=2
5. loadpt.cmm
This is used by the mjsdload.cmm to flash the image.
msp.exe
This is used to apply the patches
This program will program a memory card (SD/eMMC) attached to the PC as USB mass storage device
Use -d to detect the path of the memory card if you are unsure what to do first
Commands list:
Code:
[SIZE=2]-h (Print this help message) Ex. msp -h
-d (Detect which storage device ID is active) Ex. msp -d
-p (Print partition information) Ex. msp -p /dev/sdb
-pp (Print partition information - DETAILED) Ex. msp -pp /dev/sdb
-x (Write files as outlined in rawprogram.xml) Ex. msp -x rawprogram.xml /dev/sdb
-xx (Write files as outlined in rawprogram.xml - DETAILED) Ex. msp -xx rawprogram.xml /dev/sdb
-s (Write SINGLE IMAGE "singleimage.bin" as outlined in rawprogram.xml) Ex. msp -s rawprogram.xml 8192
-v (Verify file written correctly as outlined in rawprogram.xml) Ex. msp -v rawprogram.xml boot.img /dev/sdb
-f (Program single file as outlined in rawprogram.xml) Ex. msp -f rawprogram.xml boot.img /dev/sdb
[/SIZE]
To program the SD/eMMC with msp.exe in mass storage mode:
Code:
[SIZE=2]STEPS Complete example (patch after)
-------------------------------------------------------------
parse partition.xml python PartitioningTool.py partition.xml
Detect your device msp -d
Program your device msp -x rawprogram0.xml /dev/sdb
Patch your device msp -xx patch0.xml /dev/sdb
STEPS Complete example (patch before)
-------------------------------------------------------------
parse partition.xml python PartitioningTool.py partition.xml
Detect your device msp -d
Patch your files msp xx patch0.xml 15758336 (patch the 8GB card offline,this will change the partition0.bin)
Program your device msp x rawprogram0.xml /dev/sdb
[/SIZE]
The msp.py program can also used to patch the files.
For example:
python msp.py patch0.xml 15758336
This will patch the 8GB card offline, and change the partition0.bin.
Qualcomm DBL format (source Anyclub)
DBL is combined by three images.
dbl.bin - the raw DBL image
dbl.hd - the dbl header image
dbl_preamble.mbn - the preamble image with following format:
Code:
[SIZE=2]+------------+
|Dbl-preamble|
+------------+
|Dbl-header |
+------------+
|Dbl.bin |
+------------+
[/SIZE]
PBL is using the dbl_preamble to detect the NAND page size. The NAND controller
can detect 512 byte and 2 Kbyte page size automatically, but for NAND page size
more than 2K, PBL needs preamble to determine the page size, so for 512/2K
NAND,eMMC,eSD,oneNAND , the preamble is optional.
For the dbl_preamable, the first two words are same as dbl header, they are
codeword and magic,
ref image_header.c
Code:
data_ptr = autodetectpage;
*data_ptr = sbl_header.codeword;
data_ptr++;
*data_ptr = sbl_header.magic;
data_ptr++;
*data_ptr = AUTODETECT_PAGE_SIZE_MAGIC_NUM;
the third one is auto page size detection magic number.
The usage of the auto detection magic number is as below description To
understand this more clearly, for example ,if the dbl_preamble is 8KB. When we
detect the NAND page size > 2KB, we will set the default page size as 2K, then
try to read the preamble image from NAND flash, in case the page size is 4KB,
when read, can get 2 magic number in 8K size because page size will increase
with 4K byte steps, so page size is detected and that is 8K/2 = 4. For the 8K
page NAND, 1 magic number is read from the 8K size preamble image, so the page
size will be 8K/1 = 8K.
Dbl_preamble layout:
Code:
[SIZE=2]+-------------------------------------------------+
| codeword|magic|autodetection_ magic|............|
2K------------------------------------------------|
| codeword|magic|autodetection_ magic|............|
4K------------------------------------------------|
| codeword|magic|autodetection_ magic|............|
6K------------------------------------------------|
| codeword|magic|autodetection_ magic|............|
8K------------------------------------------------|
| codeword|magic|autodetection_ magic|............|
+-------------------------------------------------+
[/SIZE]
E:V:A said:
parse partition.xml python PartitioningTool.py partition.xml
Detect your device msp -d
Program your device msp -x rawprogram0.xml /dev/sdb
Patch your device msp -xx patch0.xml /dev/sdb
Click to expand...
Click to collapse
Hello, where i can find these files, i have qpst but there are no such files.
So does this explain why the pit references: pgpt.img, md5.img, sgpt.img but they aren't on any partition, (they should be after GROW blk0p23)
dviguha said:
Hello, where i can find these files, i have qpst but there are no such files.
Click to expand...
Click to collapse
I think it could be part of the Qualcomm Development Acceleration Resource Toolkit (QDART), as it supersedes QPST. But I'm not sure...
joederp said:
So does this explain why the pit references: pgpt.img, md5.img, sgpt.img but they aren't on any partition, (they should be after GROW blk0p23)
Click to expand...
Click to collapse
Where do you find these references?
I don't know, so if you find out let us know.
http://forum.xda-developers.com/showthread.php?t=1848267
If you dump the pit file you can see the references if you open in hex editor. Since it defines partition locations it appears they are either after last partition.. I haven't looked into technical pit stuff.
Sent from my SGH-T999 using xda app-developers app
Photo Place Holder Post
All images that I have not yet posted goes here...
Where can i find parseBinaryPartitionFile.pl or parseGPT.pl ?
vache said:
Where can i find parseBinaryPartitionFile.pl or parseGPT.pl ?
Click to expand...
Click to collapse
You tell me!
Hi,
I successfully built the rom for a couple months on Ubuntu 13.10 following wiki's instructions, as an exercise on learning how to 'cherry-pick' stuff into a work-tree, now wanna add Hammerhead to the working tree BUT it seems that the building system for GT-I9300 is actually broken (maybe by an update?), here's the log:
mkdir -p /media/reS28raM/android/omni/out/target/product/i9300/obj/GYP/shared_intermediates/ui/jni; cd external/chromium_org/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/WindowAndroid.java --output_dir "/media/reS28raM/android/omni/out/target/product/i9300/obj/GYP/shared_intermediates/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
[32mImport includes file:[0m /media/reS28raM/android/omni/out/target/product/i9300/obj/STATIC_LIBRARIES/ui_ui_gyp_intermediates/import_includes
[32mExport includes file:[0m external/chromium_org/GypAndroid.linux-arm.mk -- /media/reS28raM/android/omni/out/target/product/i9300/obj/STATIC_LIBRARIES/ui_ui_gyp_intermediates/export_includes
Gyp action: Generating JNI bindings from /media/reS28raM/android/omni/prebuilts/sdk/17/android.jar/android/view/Surface.class (/media/reS28raM/android/omni/out/target/product/i9300/obj/GYP/shared_intermediates/ui/gl/jni/Surface_jni.h)
Traceback (most recent call last):
File "../../base/android/jni_generator/jni_generator.py", line 1070, in <module>
sys.exit(main(sys.argv))
File "../../base/android/jni_generator/jni_generator.py", line 1066, in main
options.optimize_generation)
File "../../base/android/jni_generator/jni_generator.py", line 1001, in GenerateJNIHeader
jni_from_javap = JNIFromJavaP.CreateFromClass(input_file, namespace)
File "../../base/android/jni_generator/jni_generator.py", line 514, in CreateFromClass
jni_from_javap = JNIFromJavaP(stdout.split('\n'), namespace)
File "../../base/android/jni_generator/jni_generator.py", line 457, in __init__
contents[1]).group('class_name')
AttributeError: 'NoneType' object has no attribute 'group'
make: *** [/media/reS28raM/android/omni/out/target/product/i9300/obj/GYP/shared_intermediates/ui/gl/jni/Surface_jni.h] Errore 1
make: *** Attesa per i processi non terminati....
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
real 4m21.228s
user 4m4.210s
sys 0m53.027s
Don't understand that reference to SDK API 17 at all, are you guys still using Ubuntu 13.10 to build OmniROM for Galaxy S3? Thx
reS28raM said:
Hi,
I successfully built the rom for a couple months on Ubuntu 13.10 following wiki's instructions, as an exercise on learning how to 'cherry-pick' stuff into a work-tree, now wanna add Hammerhead to the working tree BUT it seems that the building system for GT-I9300 is actually broken (maybe by an update?), here's the log:
mkdir -p /media/reS28raM/android/omni/out/target/product/i9300/obj/GYP/shared_intermediates/ui/jni; cd external/chromium_org/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/WindowAndroid.java --output_dir "/media/reS28raM/android/omni/out/target/product/i9300/obj/GYP/shared_intermediates/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
[32mImport includes file:[0m /media/reS28raM/android/omni/out/target/product/i9300/obj/STATIC_LIBRARIES/ui_ui_gyp_intermediates/import_includes
[32mExport includes file:[0m external/chromium_org/GypAndroid.linux-arm.mk -- /media/reS28raM/android/omni/out/target/product/i9300/obj/STATIC_LIBRARIES/ui_ui_gyp_intermediates/export_includes
Gyp action: Generating JNI bindings from /media/reS28raM/android/omni/prebuilts/sdk/17/android.jar/android/view/Surface.class (/media/reS28raM/android/omni/out/target/product/i9300/obj/GYP/shared_intermediates/ui/gl/jni/Surface_jni.h)
Traceback (most recent call last):
File "../../base/android/jni_generator/jni_generator.py", line 1070, in <module>
sys.exit(main(sys.argv))
File "../../base/android/jni_generator/jni_generator.py", line 1066, in main
options.optimize_generation)
File "../../base/android/jni_generator/jni_generator.py", line 1001, in GenerateJNIHeader
jni_from_javap = JNIFromJavaP.CreateFromClass(input_file, namespace)
File "../../base/android/jni_generator/jni_generator.py", line 514, in CreateFromClass
jni_from_javap = JNIFromJavaP(stdout.split('\n'), namespace)
File "../../base/android/jni_generator/jni_generator.py", line 457, in __init__
contents[1]).group('class_name')
AttributeError: 'NoneType' object has no attribute 'group'
make: *** [/media/reS28raM/android/omni/out/target/product/i9300/obj/GYP/shared_intermediates/ui/gl/jni/Surface_jni.h] Errore 1
make: *** Attesa per i processi non terminati....
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
real 4m21.228s
user 4m4.210s
sys 0m53.027s
Don't understand that reference to SDK API 17 at all, are you guys still using Ubuntu 13.10 to build OmniROM for Galaxy S3? Thx
Click to expand...
Click to collapse
Wrong Java version or Python version.
I was using OpenJDK and was happy to see it working, maybe it is time to switch to Oracle's
Sent from my Nexus 5 using Tapatalk
Hi All,
I am working on MotoX kernel(3.4.42) , after compilation of kernel source code i am able to generate zImage. I have written zImage to original boot.img using following command
$ abootimg -u boot.img -k zImage
with this boot.img(with custom zImage) I flashed using following command
$fastboot flash boot boot.img
After booting my MotoX phone , my touch screen is not responding. I observed touch screen I2c driver is not initilized because device tree image(dt.img) is not loading by zImage during booting .
Can any one please help how to create dt.img with compiled dtb files and flash in to device???????
Thanks
Ram
516
Any one any help???????
ram1443 said:
Any one any help???????
Click to expand...
Click to collapse
im really surprised you expected most people to know the answer to your question. anyways you can rip t he prebuilt dtb from you stock boot.img using these tools right here : https://github.com/xiaolu/mkbootimg_tools and then use them to repack your zimage. abootimg isnt useful in its current form it seems.
if you wish to compile the dts files into dtb ones youll need to run a script on them, here is teh guide that taught me how to http://www.wiki.xilinx.com/Build+Device+Tree+Blob
shabbypenguin said:
im really surprised you expected most people to know the answer to your question. anyways you can rip t he prebuilt dtb from you stock boot.img using these tools right here : https://github.com/xiaolu/mkbootimg_tools and then use them to repack your zimage. abootimg isnt useful in its current form it seems.
if you wish to compile the dts files into dtb ones youll need to run a script on them, here is teh guide that taught me how to http://www.wiki.xilinx.com/Build+Device+Tree+Blob
Click to expand...
Click to collapse
Hi shabbypenguin,
Thanks for your help,
Now i am able to boot with my custom zImage and default dt.img afeter following above links. but i am unable to generate custom dt.img from my compiled dtb files.
To generate dt.img i am doing below steps:
COMMAND:
-------------
$ ./dtbTool -s 2048 -o ./dt.img -p ../../source/kernel_kitkat/out/target/product/generic/obj/kernel/scripts/dtc/ ../../source/kernel_kitkat/out/target/product/generic/obj/kernel/arch/arm/boot/
OUTPUT :
-----------
Input directory: '../../source/kernel_kitkat/out/target/product/generic/obj/kernel/arch/arm/boot/'
Output file: 'dt.img'
Found file: msm8960ab-ultra-maxx-p1.dtb ... skip, failed to scan for 'qcom,msm-id = <' tag
Found file: msm8960ab-ultram-p3.dtb ... skip, failed to scan for 'qcom,msm-id = <' tag
=> Found 0 unique DTB(s)
Can you please guide me how to generate dt.img from compiled dtb files??
Thanks
Ram
DEPRECATED because I don't have the watch anymore. Might still work, might also not. Feel free to just try and iterate on my work.
To port over TWRP, I needed a prebuilt kernel. With a little reading around the web, I managed to compile the kernel source for the Zenwatch3 from the Asus website.
Now, to make things easier for others, I created a script which handles the setup and compilation.
You can clone the script from GitHub: https://github.com/Maxr1998/asus_swift_tools
To continue, follow the instructions from the README.
Huge thanks to @joeykrim and @T10NAZ for their work in their Zenwatch2 thread, from which I got the ASUS_SW_VER fix for the Makefile and general directions.
Maxr1998 said:
To port over TWRP, I needed a prebuilt kernel. With a little reading around the web, I managed to compile the kernel source for the Zenwatch3 from the Asus website.
Now, to make things easier for others, I created a script which handles the setup and compilation.
You can clone the script from GitHub: https://github.com/Maxr1998/asus_swift_tools
To continue, follow the instructions from the README.
Huge thanks to @joeykrim and @T10NAZ for their work in their Zenwatch2 thread, from which I got the ASUS_SW_VER fix for the Makefile and general directions.
Click to expand...
Click to collapse
Thanks for the recovery and instructions.
I faces the following issue when trying to compile. Any tips to avoid this issue. thanks in advance.
drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c: In function 'hdd_RoamIbssIndicationHandler':
drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c:2170:13: warning: passing argument 3 of 'cfg80211_ibss_joined' makes pointer from integer without a cast [enabled by default]
error, forbidden warning: wlan_hdd_assoc.c:2170
/home/toffyjan/android/Test/kernel/scripts/Makefile.build:257: recipe for target 'drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.o' failed
make[3]: *** [drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.o] Error 1
/home/toffyjan/android/Test/kernel/scripts/Makefile.build:402: recipe for target 'drivers/staging/prima' failed
make[2]: *** [drivers/staging/prima] Error 2
/home/toffyjan/android/Test/kernel/scripts/Makefile.build:402: recipe for target 'drivers/staging' failed
make[1]: *** [drivers/staging] Error 2
Makefile:820: recipe for target 'drivers' failed
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
CC net/key/af_key.o
CC net/ipv6/ip6_input.o
LD net/wireless/built-in.o
LD net/built-in.o
[email protected]:~/android/Test/kernel$
janjan said:
Thanks for the recovery and instructions.
I faces the following issue when trying to compile. Any tips to avoid this issue. thanks in advance.
drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c: In function 'hdd_RoamIbssIndicationHandler':
drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c:2170:13: warning: passing argument 3 of 'cfg80211_ibss_joined' makes pointer from integer without a cast [enabled by default]
error, forbidden warning: wlan_hdd_assoc.c:2170
/home/toffyjan/android/Test/kernel/scripts/Makefile.build:257: recipe for target 'drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.o' failed
make[3]: *** [drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.o] Error 1
/home/toffyjan/android/Test/kernel/scripts/Makefile.build:402: recipe for target 'drivers/staging/prima' failed
make[2]: *** [drivers/staging/prima] Error 2
/home/toffyjan/android/Test/kernel/scripts/Makefile.build:402: recipe for target 'drivers/staging' failed
make[1]: *** [drivers/staging] Error 2
Makefile:820: recipe for target 'drivers' failed
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
CC net/key/af_key.o
CC net/ipv6/ip6_input.o
LD net/wireless/built-in.o
LD net/built-in.o
[email protected]:~/android/Test/kernel$
Click to expand...
Click to collapse
Weird. Are you using the same toolchain I use?
Maxr1998 said:
Weird. Are you using the same toolchain I use?
Click to expand...
Click to collapse
Yes I did. I using arm-eabi-4.8. I replaced the Makefile with one you linked. Then followed by.
export PATH=~/android/arm-eabi-4.8/bin:$PATH
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
make swift_defconfig
make -j `getconf _NPROCESSORS_ONLN`
Error due to 'drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.o' failed anf stopped.
janjan said:
Yes I did. I using arm-eabi-4.8. I replaced the Makefile with one you linked. Then followed by.
export PATH=~/android/arm-eabi-4.8/bin:$PATH
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
make swift_defconfig
make -j `getconf _NPROCESSORS_ONLN`
Error due to 'drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.o' failed anf stopped.
Click to expand...
Click to collapse
That explains it. You shouldn't replace the Makefile, but keep the default one, it gets patched with the fix automatically
Maxr1998 said:
That explains it. You shouldn't replace the Makefile, but keep the default one, it gets patched with the fix automatically
Click to expand...
Click to collapse
I can't get the patch to work. It seems it does not patched the makefile. It trying to patch but nothing happen.
~/android/Test/test111$ sudo ./build.sh
[sudo] password for toffyjan:
Welcome!
Extracting files..
Archive: WI503Q_kernel_5_8_0_54.zip
inflating: ASUS_Swift-5.8.0.54-kernel-src.tar
Press any key to continue, Ctrl + C to cancel.
Compiling kernel
Trying to patch Makefile..
--------------------------------------
I edit your script like following.
#!/bin/bash
ARCH=arm CROSS_COMPILE=/home/toffyjan/android/arm-eabi-4.8/bin/arm-eabi-
echo "Welcome!"
##################
# Setup
##################
if [ ! -d kernel ]; then
echo "Extracting files.."
unzip "WI503Q_kernel_*.zip"
tar -xf ASUS_Swift-*-kernel-src.tar
fi
echo "Press any key to continue, Ctrl + C to cancel."
read
##################
# Compile kernel
##################
echo "Compiling kernel"
cd kernel
# Patch Makefile
echo "Trying to patch Makefile.."
patch -N -r /home/toffyjan/android/Test/test111/Patch-Makefile.patch
# Exports
export ARCH=arm
export CROSS_COMPILE=/home/toffyjan/android/arm-eabi-4.8/bin/arm-eabi-
# Make
echo "Starting compilation.."
make clean
make swift_defconfig
make -j3
# Copy kernel
cp "arch/arm/boot/zImage-dtb" ../zImage-dtb
---
I can't get your point here..
OMNI_TREE="/home/max/Development/Android/TWRP" # Enter path of your Omni tree with the toolchain here ? Do I need OMNI_TREE? Is it necessary?
janjan said:
I can't get the patch to work. It seems it does not patched the makefile. It trying to patch but nothing happen.
~/android/Test/test111$ sudo ./build.sh
[sudo] password for toffyjan:
Welcome!
Extracting files..
Archive: WI503Q_kernel_5_8_0_54.zip
inflating: ASUS_Swift-5.8.0.54-kernel-src.tar
Press any key to continue, Ctrl + C to cancel.
Compiling kernel
Trying to patch Makefile..
--------------------------------------
I edit your script like following.
...
I can't get your point here..
OMNI_TREE="/home/max/Development/Android/TWRP" # Enter path of your Omni tree with the toolchain here ? Do I need OMNI_TREE? Is it necessary?
Click to expand...
Click to collapse
Does applying the patch manually from Terminal work?
You don't really need the whole omni tree for compiling the kernel, I only use it for the CROSS_COMPILE/toolchain. Maybe I'll update the script.
Btw, you normally don't need to run this with sudo.
Maxr1998 said:
Does applying the patch manually from Terminal work?
You don't really need the whole omni tree for compiling the kernel, I only use it for the CROSS_COMPILE/toolchain. Maybe I'll update the script.
Btw, you normally don't need to run this with sudo.
Click to expand...
Click to collapse
It seems it is working now at least the patch. Let me see if it finish compiling without error. I will report when it finish. Thanks. I edited like
#!/bin/bash
CROSS_COMPILE=/home/xxxxx/android/arm-eabi-4.8/bin/arm-eabi- # PLACE YOUR CROSS_COMPILE HERE
echo "Welcome!"
##################
# Setup
##################
if [ ! -d kernel ]; then
echo "Extracting files.."
unzip "WI503Q_kernel_*.zip"
tar -xf ASUS_Swift-*-kernel-src.tar
fi
echo "Press any key to continue, Ctrl + C to cancel."
read
##################
# Compile kernel
##################
echo "Compiling kernel"
cd kernel
# Patch Makefile
echo "Trying to patch Makefile.."
patch -N -r /home/xxxxx/android/asus_swift_tools-master/null Makefile ../Patch-Makefile.patch
# Exports
export PATH=~/android/arm-eabi-4.8/bin:$PATH
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
export CROSS_COMPILE=/home/xxxxx/android/arm-eabi-4.8/bin/arm-eabi-
# Make
echo "Starting compilation.."
make clean
make swift_defconfig
make -j `getconf _NPROCESSORS_ONLN`
# Copy kernel
cp "arch/arm/boot/zImage-dtb" ../zImage-dtb
Edit: YES It complete the compiling without any issue. Seems good. Thanks a lot. Now we need to compile a boot.img to try it out. OR maybe use AnyKernel2 Ramdisk Mod Script. The best and the safe way to try by making a boot.img and then try by fastboot boot boot.img It should not hurt the device.
Do you mind to share the stock boot.img? Thanks
janjan said:
Do you mind to share the stock boot.img? Thanks
Click to expand...
Click to collapse
I currently don't have my watch with me, but I will extract it for you tomorrow.
Don't know why my script doesn't work for you :/
Maxr1998 said:
I currently don't have my watch with me, but I will extract it for you tomorrow.
Don't know why my script doesn't work for you :/
Click to expand...
Click to collapse
Sounds good. Thank you very much. It works with a bit edit. Happy new
janjan said:
Sounds good. Thank you very much. It works with a bit edit. Happy new
Click to expand...
Click to collapse
I think that my current paths setup still needs some tweaking
Happy new year!
Maxr1998 said:
I think that my current paths setup still needs some tweaking
Happy new year!
Click to expand...
Click to collapse
We can always add tweaking afterward as long we are able to build. Really appreciate your work for script and custom recovery :good:
janjan said:
Sounds good. Thank you very much. It works with a bit edit. Happy new
Click to expand...
Click to collapse
Here you are. A little later than I wanted, but I hope it's ok
Maxr1998 said:
Here you are. A little later than I wanted, but I hope it's ok
EDIT: mirrored to Dropbox, since attachments are broken right now in XDA.
Click to expand...
Click to collapse
Thank you so much. I will play with the kernel in coming days. :good:
Hello Maxr1998.
Edit.
I tried your custom kernel. It seems everything is working fine. Backup, Restore, flash boot.img and flash zips. Great work there. Really appreciate your work. :good:
Can anyone post a quick list of what commands I would need to enter to get all the required packages/toolchain stuff? I'm fine with plugging commands in to the shell, but I don't really know what I need to get started. Was gonna give this a try to see if it fixes my problem with rebooting when I try to charge.
jobarr said:
Can anyone post a quick list of what commands I would need to enter to get all the required packages/toolchain stuff? I'm fine with plugging commands in to the shell, but I don't really know what I need to get started. Was gonna give this a try to see if it fixes my problem with rebooting when I try to charge.
Click to expand...
Click to collapse
I will upload my kernel soon. Need to upload the source first. You can try my build if you want.
janjan said:
I will upload my kernel soon. Need to upload the source first. You can try my build if you want.
Click to expand...
Click to collapse
Really looking forward to it!
I am quite interested in what the tweaks/changes are
Maxr1998 said:
Really looking forward to it!
I am quite interested in what the tweaks/changes are
Click to expand...
Click to collapse
Nothing so much now. I will add tweaks later. I disabled dm-verity and forced encryption. Possibility to modify system partition and ability to add BusyBox and SuperSu. I will play with other tweaks later. I am a bit busy with exams etc. Did you also build a kernel ?