yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] rom1nux:
sambwel,

Normally we just have to adjust "main.h" and "Makefile" for porting to OSX platform.

(I put notes in the files headers)

main.h

I add 'define' test to detect OSX platform (APP_PLATFORM/APP_OSX). I don't know if this work. I leave the APP_ARCH (32/64bits) test as-it but i don't know if this work on OSX (it's not very important for now, we can correct after)

Makefile

I add "Darwin" detection mechanism for OSX.

I start to add options to unpack/repack logo.bin, this use "zlib" and "libpng1.6", you can disable this to don't be bother with externals dependencies. In Makefile, put LOGO_SUPPORT=0 in the LINUX/CYGWIN/OSX section (Line ~92) for first build.

Big Thanks for your help
[Miscellaneous Android Development] sambwel:
Okay, good news! mtkimg builds and runs now! I did have to put LOGO_SUPPORT=0 in the Makefile otherwise I get the error "error: png.h: No such file or directory".

So I did a quick test to see if it works. info and unpack seem to work correctly (tested on ~7mb stock boot.img). However when I repack the same image the result is a ~4.3gb boot.img!! Not sure what happened... headers are intact on the new image. No more time to test right now but I will check back here soon.
[Miscellaneous Android Development] rom1nux:
Hip Ha ! Good news !

For the size, look at the "image.cfg" if the size is right

You can use '-v' and '-d' options to see what append and look at the "layout" part display on the screen.

(Suspect image.cfg not being read correctly, i'm goind to look about "End of line" on MAC.

Many thanks for your try
[Miscellaneous Android Development] rom1nux:
Hello,

I push the MTKIMG Bêta 0.38 with compiled version for (Linux64,Cygwin64 and Windows64) that support logo unpacking. (logo repack in progres...)

Have fun.....
[Miscellaneous Android Development] rom1nux:
Hello sambwel,

Hum, indeed, it doesn't sound right, it smell a "capacity overflow"...

I'm focus to correct this problem and keep you updated

Thanks for the clarity of your report
[Miscellaneous Android Development] rom1nux:
Ok, i create two layout to see what append.

First with the original parts, the ramdisk size is 991716 bytes, all fit into the original "boot.img", no room, just the "page align" space for kernel (1770) and ramdisk (1052). No extra padding.

====================================================================
ORIGINAL | PART | BLOCKS |
LAYOUT | Offset Size (B) | Pages Size(B) |
====================================================================
Image Header | 0x00000000 596 | |
Page align padding | 1452 | 1 2048 |
--------------------------------------------------------------------
Kernel Header | 0x00000800 512 | |
Kernel | 6151958 | |
Page align padding | 1770 | 3005 6154240 |
--------------------------------------------------------------------
Ramdisk Header | 0x005DF000 512 | |
Ramdisk | 991716 | |
Page align padding | 1052 | 485 993280 |
====================================================================
Total | | 3491 7149568 |
Original Image size | | 7149568 |
Image size padding | | 0 |
--------------------------------------------------------------------
Total ramdisk padding | | 1052 |
====================================================================

Now for the repacked new_boot.img, the ramidsk is now 994466 bytes, 2750 bytes more than the original (>1052), the ramdisk take one page more than the original (i take 1698/2048 of the new needed page) but with this page all dont fit into the 7149568 original size. The ramdisk is too big !

====================================================================
REPACKED | PART | BLOCKS |
LAYOUT | Offset Size (B) | Pages Size(B) |
====================================================================
Image Header | 0x00000000 596 | |
Page align padding | 1452 | 1 2048 |
--------------------------------------------------------------------
Kernel Header | 0x00000800 512 | |
Kernel | 6151958 | |
Page align padding | 1770 | 3005 6154240 |
--------------------------------------------------------------------
Ramdisk Header | 0x005DF000 512 | |
Ramdisk | 994466 | |
Page align padding | 350 | 486 995328 |
====================================================================
Total | | 3492 7151616 |
Original Image size | | 7149568 |
Image size padding | | -2048 |
--------------------------------------------------------------------
Total ramdisk padding | | -1682 |
====================================================================

Now it's clear the "re" compressed ramidsk is too big for the image size but :

The "size checkup" function of MTKIMG is buggy, i have to fix this.

Your original ramdisk is probably compressed with higher compression rate (it's 6 by default) try to put "-z 9" (9 is the maximum gzip compression rate)

It's hard to get the exact same size after re-compression because of timestamp of files, etc... gzip it's not very predictable, but you can be close with higher compression rate.

Just for information, on my Wiko (Sunset) original boot.img is ~6Mo, the kernel is ~3Mo and ramdisk is ~1Mo, i got ~2Mo of free space after ramdisk.
[Miscellaneous Android Development] rom1nux:
I push the bêta 0.40 with a correction about offsets/pages calculation.

This fix the overflow detection too for too big kernel and/or ramdisk.
[Miscellaneous Android Development] rom1nux:
Sambwel,

Ok, "png.h" come with libpng, use to convert raw logo into png.

Do you think it's possible to install a package named like "zlib-dev" (or zlib-devel) and "libpng-dev" (or libpng-devel) on OSX ?

If you can get prepackaged libraries "zlib-dev" and "libpng-dev" on OSX

If it's possible, just install them, leave LOGO_SUPPORT=1 and retry to build.

If you still cant build, gcc probably don't find the library by itself you need to adjust Makefile :

Search "zlib.h" on your OSX and set this path to gcc in CFLAGS with -I prefix (mean "Include")

Ex : CFLAGS=-Wall -I/my/zlib/inc/path

Search "libz.a", and set this path to gcc in LDFLAGS with -L prefix (mean "Library")

Ex : LDLAGS=-lm -L/my/zlib/lib/path

Search "png.h" on your OSX and set this path to gcc in CFLAGS with -I prefix (mean "Include")

Ex : CFLAGS=-Wall -I/my/zlib/inc/path -I/my/libpng/inc/path

Search "libpng.a", and set this path to gcc in LDFLAGS with -L prefix (mean "Library")

Ex : LDLAGS=-lm -L/my/zlib/lib/path -L/my/libpng/lib/path

Now gcc can find all the .h and .a files he need.

Retry to build, hop this is ok now.

If it's ok, try to build MTKIMG with static lib, add "--static" to the LDFLAGS

Ex : LDLAGS=-lm -L/my/zlib/lib/path -L/my/libpng/lib/path --static

If not to install preppackaged libraries on OSX

You have to build them manually.

Create the "externals" directory into MTKIMG source directory.

(libpng use zlib, so build zlib first)

ZLIB

Download and unpack the latest "zlib" into "externals/zlib" directory. (Rename the directory)

Open OSX terminal

Execute : cd externals/zlib

Execute : ./configure

Execute : make

Look if "zlib.h" and "libz.a" are in "externals/zlib"

LIBPNG

Download and unpack the latest "libpng" into "externals/libpng" directory. (Rename the directory)

Edit externals/libpng/scripts/makefile.darwin and change

ZLIBLIB=/usr/lib to ZLIBLIB=../externals/zlib

ZLIBINC=/usr/include to ZLIBINC=../externals/zlib

Execute : cd externals/libpng

Execute : make -f scripts/makefile.darwin

Look if "png.h" and "libpng.a" are in "externals/zlib"

Adjust the CFLAGS and LDFLAGS in the MTKIMG Makefile to tell gcc where are the lib and includes

CFLAGS=-Wall -Iexternals/zlib -Iexternals/libpng

LDFLAGS=-lm -Lexternals/zlib -Lexternals/libpng

Retry to build, hop this is ok now.

If it's ok, try to build MTKIMG with static lib, add "--static" to the LDFLAGS

LDFLAGS=-lm -Lexternals/zlib -Lexternals/libpng --static

In all case, send me your modified Makefile and/or information about how you do.

I will merge it into master branch and/or create a procedure for OSX into readme.txt

Courrage :)
[Miscellaneous Android Development] rom1nux:
I push the bêta 0.41 with a fix of repack issue on Windows, i also replace the GNU externals utilities by the Cygwin compiled utilities on Windows bundle version too keep unpacked ramdisk permission as original.
[Miscellaneous Android Development] rom1nux:
I push the bêta 0.42 with a fix of repack error when kernel already have MTK header.

(This update is strongly recommended)
[Miscellaneous Android Development] rom1nux:
I push the bêta 0.43 with support for unpack/repack logo.bin image.
[Miscellaneous Android Development] rom1nux:
I push beta 0.44 with 32 bits OS support, i build Cygwin32/64, Win32/64 and Linux64.

I hop a day we got a OSX build :)
[Miscellaneous Android Development] bovirus:
[MENTION=4624962]rom1nux[/MENTION]

Sorry but the zip archive on

https://github.com/rom1nux/mtkimg/tree/master/releases

are really available?

Done. Tos ave the file I ahve tos elect "View RAW"...
[Miscellaneous Android Development] rom1nux:
Hello [MENTION=637263]bovirus[/MENTION],

Yes you have to click on "View Raw", let me know what you think about this tools

Thanks in advance
[Miscellaneous Android Development] bovirus:
I believe taht could be useful to add the info "View RAW" in first post jist below the link

Ex. Select the package that you want then select "Vie RAW" to downlaod it.

I will test it with some inages. Thanks.
[Miscellaneous Android Development] rom1nux:
Hello [MENTION=637263]bovirus[/MENTION],

Yes, you are right, i believe there is as proper way to put release on github but i believe i need to create a "release" status (in github meaning) i'm going to look at this soon

Thank for you returns and your tests
[Miscellaneous Android Development] erlucky:
Hi rom1nux

I have used your linux script with my boot.img MT6795

mtkimg-0.44-linux64$ ./mtkimg unpack boot.img

MTKIMG V0.44(linux64) by rom1nux

Unpacking boot image 'boot.img'...

ERROR : Kernel header magic is not valid !

With archiKitchen is ok unpack and repack of my boot.img MT6795 ;)

You can added this cpu of MTK???

Thank you
[Miscellaneous Android Development] rom1nux:
Hello [MENTION=3081268]erlucky[/MENTION],

It's possible to put your "boot.img" online, i want to download it to adjust MTKIMG kernel checking.

Thank in advance

Rom1nux
[Miscellaneous Android Development] FuMMoD:
Here is the bootimg from my Blu Pure XL. It is running the MT6795 kernel helio x10.

https://app.box.com/s/koh1vi1qynrxbqzjojjlpn1tf6mlkbm0

I'm having the worst time trying to root this phone lol.
[Miscellaneous Android Development] rom1nux:
Thank you [MENTION=1632145]FuMMoD[/MENTION], i'm going to take look to see what append with MTKIMG and your boot.img.

I let you know.

Best regards
[Miscellaneous Android Development] rom1nux:
Hello [MENTION=1632145]FuMMoD[/MENTION] and [MENTION=3081268]erlucky[/MENTION],

MTKIMG can see a the "ANDROID!" header of image but there is a problem on the kernel header, MTKIMG tangling brushes.

MTKIMG V0.44(cygwin32) by rom1nux
Execute command 'unpack'...
Parsing arguments...
verbose : yes
debug : yes
type : boot
input : boot.img
overwrite : no
kernel : kernel.img
ramdisk : ramdisk.d
config : image.ini
no-decompress : no
keep-mtk-header : no
Unpacking boot image 'boot.img'...
Reading image header (596 bytes)...

Image header :

Signature : ANDROID!

Kernel size : 6462881 bytes
Kernel load address : 0x40080000

Ramdisk size : 889013 bytes
Ramdisk load address : 0x44000000

Second stage size : 0 bytes
Second stage load address : 0x40F00000

Tags address : 0x4E000000
Page size : 2048 bytes
Product name : '1442238937'
Command line : 'bootopt=64S3,32N2,64N2'
ID : 3E2BC49197DD5E37F40B9E8D9E03E708421C876A

Image layout :

Bloc Offset Pages Size (bytes)
------------------------------------------------
Header 0x00000000 1 2048
Kernel 0x00000800 3156 6463488
Ramdisk 0x0062A800 435 890880
Free 0x00704000 0 0
------------------------------------------------
Total 3592 7356416
------------------------------------------------

Seeking to start of kernel (0x00000800)...
Reading MTK header (512 bytes)...

Magic : 0x1F 0x8B 0x08 0x00
Size (bytes) : 0
Type :

ERROR : Kernel header magic is not valid !

I continue to investigate... i let you know
[Miscellaneous Android Development] rom1nux:
Ok,

This kind of image dont have "MTK bloc" header before Kernel or Ramdisk, it's can be unpack repack with a standard image management, no MTK specifics.

For instance with MTKIMG you can use --keep-mtk-header (-m) option like : "mtkimg unpack -m boot.img" to dont check header.

Remove ".mtk" extension from extracted kernel and ramdisk file, you can extract ramdisk with 7z after if you want.

For repack, MTKIMG are going to add the header, and you dont need that for your MT6795, i need to do deep change into MTKIMG to handle this case.

Rom1nux
[Miscellaneous Android Development] DarkHeart Z:
Never mind it's ok . It happens when you repack it again . but whenever you were extracing the boot.img from phone it will show 7mb because that's the actual size of your bootimg partition . when extracing it from phone the sector reading detects the partition and extracts it as it's original size as boot.img .
[Miscellaneous Android Development] DarkHeart Z:
Bro do your source file have 32 bit support enabled ? Or did you remove it ? My linux distribution is 32 bit so I am limited to that and my desktop is bound to 32 bit that's why asking . My device is mt6572 . Do your tools support this chipset ?

Edit : Sorry bro . My mistake . I got it :)

---------- Post added at 11:50 PM ---------- Previous post was at 11:10 PM ----------

@rom1nux bro you did it . your tool is as far as I knew the most easiest tool I have ever used it's even working without any problem in my mt6572 phone . Thanks a ton for the tool . :)
[Miscellaneous Android Development] DarkHeart Z:
bro I have successfully compiled tested the mtkimg in 32 bit linux environment :) I have attached it . Just remove .img
[Miscellaneous Android Development] DarthJabba9:
Have you managed to solve this problem?
[Miscellaneous Android Development] rom1nux:
Hello DarthJabba9,

I have a lot of work, I plan to do modification at the end of January.
[Miscellaneous Android Development] DarthJabba9:
Ok :)
[Miscellaneous Android Development] cuvetto:
I tried this program in order to unpack and modify the "logo.bin" of my mediatek 6753, but when I start the command "mtkimg unpack -t logo logo.bin", the program begin to work, but answer me that:

"WARNING: Could not find logo image size for "logos.d\img-37.rgb565"!

Possible size can be (Add one to "mtkimg-logos.ini" file):

1920x960

ecc...

Rhis warning appear to every img.
[Miscellaneous Android Development] pintu.k:
Hi,

When I do repack, I get this error:

/mtkimg$ ./build/mtkimg repack newboot.img -n -k kernel.img.mtk -r ramdisk.cpio.gz.mtk

MTKIMG V0.44(linux64) by rom1nux

Repacking image to 'newboot.img'...

ERROR : Configuration file 'image.cfg' is not a valid 'ROOTFS' or 'RECOVERY' image descriptor !

Any clue?
[Miscellaneous Android Development] pintu.k:
repack problem with MTK-8173

Hello rom1nux,

I am using your mtkimg tool for AMAZON Fire TV with MTK-8173 chipset.*

I am facing some problem during repacking. Can you help.

I did the unpack, using the following command:

#*./mtkimg unpack -m

It created 3 files:

-rw-rw-r-- 1 pintu pintu *349 Jul 31 18:15 image.cfg

-rw-rw-r-- 1 pintu pintu *14M Jul 31 18:15 kernel.img.mtk

-rw-rw-r-- 1 pintu pintu 761K Jul 31 18:15 ramdisk.cpio.gz.mtk

After that, I just tried to repack the same image again.

#*./mtkimg repack newboot.img -n -k kernel.img.mtk -r ramdisk.cpio.gz.mtk

MTKIMG V0.44(linux64) by rom1nux

Repacking image to 'newboot.img'...

ERROR : Configuration file 'image.cfg' is not a valid 'ROOTFS' or 'RECOVERY' image descriptor !

But it gives the above error.

Can you help me, what is the problem. And how to fix it.

If possible, CC me in this mail id: pintu_agarwal@yahoo.com*

Thanks,

Pintu
[Miscellaneous Android Development] gerhardmlzr:
i think i have similar problems with a

Vernee Thor E Android 7.0 latest update 5.5.17 Creation version Thor_E_20170607 Kernel version 3.18.35

unpack boot.img downloaded from

http://www.vernee.cc/products/thore/rom/

show´s this result.....

./mtkimg unpack /home/ger/MKT/quelle/boot.img

MTKIMG V0.44(linux32) by rom1nux

Unpacking boot image '/home/ger/MKT/quelle/boot.img'...

ERROR : Kernel header magic is not valid !

mtkimg unpack boot.img -v

MTKIMG V0.44(linux32) by rom1nux

Unpacking boot image 'boot.img'...

Reading image header (596 bytes)...

Image header :

Signature : ANDROID!

Kernel size : 7363513 bytes

Kernel load address : 0x40080000

Ramdisk size : 2338439 bytes

Ramdisk load address : 0x44000000

Second stage size : 0 bytes

Second stage load address : 0x40F00000

Tags address : 0x4E000000

Page size : 2048 bytes

Product name : 'Thor_E_20170615'

Command line : 'bootopt=64S3,32N2,64N2'

ID : 72E66DB98E30AFF5AA4602B440E55D7538E074B8

Image layout :

Bloc Offset Pages Size (bytes)

------------------------------------------------

Header 0x00000000 1 2048

Kernel 0x00000800 3596 7364608

Ramdisk 0x00706800 1142 2338816

Free 0x00941800 1 2304

------------------------------------------------

Total 4740 9707776

------------------------------------------------

Seeking to start of kernel (0x00000800)...

Reading MTK header (512 bytes)...

Magic : 0x1F 0x8B 0x08 0x00

Size (bytes) : 0

Type : �[{t�U���~��A��@k鐤�c#mi��

ERROR : Kernel header magic is not valid !

did anyone know a solutoin, or can i do it in the same way as erlucky, thaks in forward

gerhard
[Miscellaneous Android Development] pintu.k:
Hi gerhardmlzr,

I think you can go away with this error with "-m" option.

We check if repack is working.

I am facing problem in repacking.
[Miscellaneous Android Development] RootedLee:
Is there a link to the package for macOS?
[XDA Assist] takenbr:
http://imgur.com/EjvvivQ

is this normal? I mean, doesn’t it mean this led manager is hogging battery big time?

It is set so every notification it flashes, but the screen is set not to wake..

cheers!
[XDA Assist] takenbr:
Galaxy S6 running 5.1.1 on XtreStoLite

Greenifying almost all apps, ncluding the light manager
[XDA Assist] Razvan:
You'd be best served asking for help from the experts who own your device here:

[[FAQ][HELP THREAD][GUIDES LIST] Ask Any Question for S6 - http://xdaforums.com/galaxy-s6/help/help-thread-question-s6-t3110220

Good luck
[Android Themes] Nik_:
This is Flintstones theme made by me... also added with Jonny bravo boot animation which is also made by me

This theme works on all*cm devices that have cm theme engine. or say all custom ROMs having cm theme engine. i have not tested it on touchwiz or any other ROM

Themed Content:-

1. Settings*

2. status bar

3. status bar icons

4. navigation bars

5. jonny bravo boot animation.

6. you check the rest m too lazy to write*[https://s3]

Credits:-

Sony

HTC

Samsung

RV

XDAView attachment 3399258View attachment 3399259View attachment 3399260View attachment 3399261

will be adding more names soon*[http://forums]

MediaFire link: nik_flinstones_jonnybravo_bootanimation.apk -http://www.mediafire.com/download/b5pvbwidzd96x1q/nik_flinstones_jonnybravo_bootanimation.apk

If you like my work do comment and like... i will work further accordingly*[http://forums]
[Fire HD 6 and 7 Q&A, Help & Troubleshooting] Maxwell175:
Hello,

I have a Kindle Fire HD 7 4th Generation. I found that my device "ARIEL" is not anywhere.

I would like to get CyanogenMod (or really just a generic Android OS) installed there. I would like to think I have pretty advanced knowledge of Linux so I can compile stuff if needed.

Thank you,

Maxwell.
[Fire HD 6 and 7 Q&A, Help & Troubleshooting] DoLooper:
http://xdaforums.com/fire-hd/help/fire-hd-7-4th-generation-4-5-4-rooted-t3152122
[Fire HD 6 and 7 Q&A, Help & Troubleshooting] Maxwell175:
Well, it was worth a try.
[Fire HD 6 and 7 Q&A, Help & Troubleshooting] JUSTINMARMER:
There is no such device as a Kindle Fire 4th gen. The kindle branding was dropped. As of now, Cyanogenmod or any other Rom for that matter has not been ported to the Amazon Fire HD 6 or7.
[Fire HD 6 and 7 Q&A, Help & Troubleshooting] benjaniah:
I also have the "ariel" version of the Kindle Fire HD 7. I can't find ANY information on what the differences are between tate and ariel, and why there is no CM rom's for ariel.

Is there any way to force the tate CM rom to install on my ariel? Or trick my kindle into thinking it's a tate?
[Fire HD 6 and 7 Q&A, Help & Troubleshooting] Pix12:
Tate has No front facing camera, different hardware, alot more!

there is cyanogenmod 11 for ariel!!!!!
[Fire HD 6 and 7 Q&A, Help & Troubleshooting] lolnotaba7s:
NO I WANT ANDROID 5 CMMOD 12
[One (M9) Q&A, Help & Troubleshooting] solsearch:
Okay, so searched and didn't seem to find any matches to this issue.

Here's the sitch:

I backed up no problem to dropbox. I then reset the phone and tried to restore, only it won't.

What happens is I choose to restore, then it gives me the choice of backups, I choose the one on dropbox (the other choice is one on my drive account from a year ago) and then it asks me to grant it permission on dropbox (which I do) but then it sends me back to choose which backup, if I try again it signs me out of dropbox. It just refuses to work.

Technical service was no help at all (they thought the backup files on dropbox consisted of photos and text files for the messages and I just had to save them to internal storage and it'd be fixed).

If anyone can help it'd be great. I'd upload the files directly to google drive and see if that'd work if there were anyway to access it directly. Any ideas of how to fix/circumvent this would rock.

Thanks in advance and hope to get some responses. Oh, if anyone else has experienced this it would be good to know.

Cheers.
[One (M9) Q&A, Help & Troubleshooting] clsA:
I use HTC backup and it saves to the Google account and I have never had a problem. I think HTC cut ties with Dropbox after the M7 and have used Google Drive since.
[Mi 3 Q&A, Help & Troubleshooting] :
Hi all, i dont know if someone has/had a similar issue but here goes: i have not been able to get FM radio working on any custom so far. All i get is static, and searching radio stations takes very long. I don't know if it helps, but i have Viper4Android installed (but same happens when it is uninstalled). And yes, I have plugged in my earphones :p. Does anybody have any suggestions? I am all of ideas :confused:
[Mi 3 Q&A, Help & Troubleshooting] a.broken.star:
FM works fine on Mokee...
[Mi 3 Q&A, Help & Troubleshooting] mGforCe:
Stock FM radio doesn't work.

but Alternative to FM, which is working on Mokee is Spirit FM. Its free & require only root access . Credits to [MENTION=3575078]mikereidis[/MENTION].
[Mi 3 Q&A, Help & Troubleshooting] rajib4:
[MENTION=6464088]krcovsky[/MENTION] [MENTION=719438]mGforCe[/MENTION] Here is the link for the FM fix (for both AOSP and CM based ROMs).

Cheers :cool:
[Galaxy Note 4 Q&A, Help & Troubleshooting] Nefalem:
Hi there,

how can I install the original Note 4 Camera to my Note 4?

I've searched the web a lot, but did not find a solution.

I even tried to back it up with Titanium- did not work.

I've also tried to extract it from a Nandroid Backup.

Any ideas for me, please?
[Galaxy Note 4 Q&A, Help & Troubleshooting] kylothow:
Always the same question, and the answer is always the same: it is not possible unless you port various parts of the system from Touchwiz to the AOSP ROM.

No one achieved that so...

Inviato dal mio SM-N910F utilizzando Tapatalk
[Galaxy Note 4 Q&A, Help & Troubleshooting] Nefalem:
thanks for your quick reply!