понедельник, 4 января 2016 г.

Мои проекты: кастомные ядра Android

Custom kernels

mt6732

ZTE Blade Q Lux 4G
MTS Smart Run 4G
ZTE Blade v2 Lite

mt6735/6753

Homtom HT7 Pro / HT3 Pro
ZTE Blade Z7 / X7
Elephone P6000 Pro

mt6589

Fly IQ446
Highscreen Alpha Rage
Phillips W6500

rk3188

Prestigio PMP5785

суббота, 5 декабря 2015 г.

MTK devices database

Show device list with hardware info, drivers (LCM, TOUCHPANEL, CAMERA, SENSORS)
You can add ProjectConfig.mk after parsing it will be in database.                           
And search device with similiar drivers.
Now about 50 devices.

http://mtkdevices.site90.com

New
deviceinfohw.ru

пятница, 6 ноября 2015 г.

Build Android L mtk

mt6752

pack / unpack scripts

Carliv Image Kitchen

for 4.4
https://github.com/cofface/android-mtk-tools

Android L 5.X

GCC arm64

https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/

arm (arm64)
kernel/arch/arm/configs/project_defconfig

Projects
drivers/misc/mediatek/mach/6752

arch/arm/mach-mt6582/

for android build

1. device
device/brand/project/

ProjectConfig.mk

2. vendor
mediatek
brand

hal
mediatek/proprietary/custom/mt6752

fstab
alps/vendor/mediatek/proprietary/platform/mt6752/external/fstab/

mt6582/92

start mbr = preloader size

mach-mt6582/PROJECT/partition/cust_part_mbr.c

u64 MBR_START_ADDRESS_BYTE = 20480 * 1024;  // 0x1400000

пятница, 19 июня 2015 г.

Яркость подсветки на ноутбуке (Linux)

Идем в /sys/class/backlight

brightness     - current
max_brightness - max

HP G62 (0 - 10)


Для установки после загрузки, вписываем в /etc/rc.local
 
echo 3 >  /sys/class/backlight/acpi_video0/brightness

четверг, 28 мая 2015 г.

unpack zImage


You can also use it for boot.img

Compressed format:

gzip

stock_kernel$ path_to/arm-linux-androideabi-objdump -EL -b binary -D -m armv5t ./zImage | grep 8b1f
    4a28: 00088b1f andeq r8, r8, pc, lsl fp

4a28 =  18984(10)

stock_kernel$ dd if=./zImage of=piggy.gz bs=1 skip=18984

stock_kernel$ gunzip piggy.gz 

Источник:
http://morgue.openinkpot.org/wiki/Documentation/ZImageFormat

xz

Spec
header   FD377A585A00
footer     595A

Find header and footer offsets in hex editor (example: 16172 and 3800782)
footer

count=3800782 - 16172 + 2

dd if=./kernel of=piggy.xz bs=1 skip=16172 count=3784612

unxz piggy.xz


среда, 20 мая 2015 г.

PHP uploads permission

Ubuntu 14.04
$upload_dir = $_SERVER['DOCUMENT_ROOT'] . "/site/uploads/";
Who is Apache process owner:
echo exec('whoami');
In my case it's www-data,  then change the owner of the destination directory:
chown www-dataupload_dir
and set permission:
chmod 755 upload_dir

воскресенье, 17 мая 2015 г.