There are a number of chinese dual sim phones using the chipset MTK6573
Unfortunately the manufacturer has chosen to be very secretive about the kernel and
1) Has not published the source code
2) Has not included the kernel .config file in the compilation
3) Has not compiled ext2, ext3 or ext4 support in the kernel
In an effort to overcome some of those limitations I have gathered the exact same version of the android kernel used in current roms (2.6.35.7) and tried to come up with a configuraration that produces modules (.ko) that can be loaded and used from MTK6573 based devices.
Instructions for compiling the kernel:
Pre-requirements:
a) check with uname -a in your device that the kernel version is 2.6.35.7
b) Download this file with the kernel source and the arm toolchain:
http://www.ziddu.com/download/18628468/androidkernelANDtoolchain.rar.html
1) Unpack the .rar file and extract the toolchain to your home folder
2) Extract the kernel sources somewhere you like
3) Open a bash terminal and cd into the folder containing the kernel source
4 ) make -j8 ARCH=arm menuconfig
That should open a menu and you will be able to modify options, the chosen system is a qualcom MSM as this is the closest thing I could find to the MTK6573
5) Compile with:
make -j8 ARCH=arm CROSS_COMPILE=~/code/distro/kernel/arm-2011.03/bin/arm-none-eabi-
6) to test the ext2.ko module
adb push fs/ext2/ext2.ko /data/local/
adb shell
insmod /data/local/ext2/ko
7) Try to mount an ext2 partition
We are really trying to overcome this situation and all the help is appreciated.
So far all the ext2.ko modules built can be loaded without any error, but as soon as the mount command is issued the phone immediately reboots. I can't even log anything. Any ideas?
EDIT:
Code:
lsmod
pvrsrvkm 151229 29 mtklfb, Live 0xbf000000
mtklfb 11329 0 - Live 0xbf033000
mtk_drvb 8436 0 - Live 0xbf03c000 (P)
lca_core 2706 0 - Live 0xbf044000 (P)
mtk_stp_core 211207 5 mt6620_fm_drv,mtk_stp_bt,mtk_stp_gps,mtk_stp_wmt,mtk_stp_u
art, Live 0xbf04a000 (P)
mtk_stp_uart 20598 1 - Live 0xbf087000 (P)
mtk_hif_sdio 10961 2 wlan,mtk_stp_wmt, Live 0xbf092000
mtk_stp_wmt 88860 6 wlan,mtk_fm_priv,mt6620_fm_drv,mtk_stp_bt,mtk_stp_gps, Live
0xbf09b000 (P)
mtk_stp_gps 37165 0 - Live 0xbf0ba000
mtk_stp_bt 39581 1 - Live 0xbf0c9000
mt6620_fm_drv 99803 1 mtk_fm_priv, Live 0xbf0d8000
mtk_fm_priv 7205 0 - Live 0xbf0f9000 (P)
wlan 255235 2 - Live 0xbf100000 (P)
ext2 44907 0 [permanent], Live 0xbf154000
ccci 195306 18 sec,ccmni, Live 0xbf167000 (P)
ccmni 16270 0 - Live 0xbf1a4000 (P)
mt6573_m4u 62946 0 - Live 0xbf1ae000 (P)
mt6573_mfv_kernel_driver 341502 0 - Live 0xbf1c5000 (P)
sec 52226 0 - Live 0xbf21f000 (P)
xlog 89315 24 - Live 0xbf233000 (P)
As you can see, ext2 module is loaded and cat /proc/filesystems confirms:
Code:
cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev tmpfs
nodev sockfs
nodev pipefs
nodev anon_inodefs
nodev devpts
nodev ramfs
vfat
msdos
yaffs
yaffs2
nodev mqueue
nodev mtd_inodefs
ext2
/sd-ext is created and the mount command that I'm issuing is:
Code:
busybox mount -r -w -t ext2 /dev/block/mmcblk0p2 /sd-ext
I think the memory allocation is using something non-standard, perhaps the kernel for the mtk6516 is similar enough...
http://groups.google.com/group/mt6516-linux/browse_thread/thread/2b6896ce22570932
I tried this, but unsuccessful.
/data/local # insmod ext3.ko
insmod: can't insert 'ext3.ko': invalid module format
/data/local # insmod ext2.ko
insmod: can't insert 'ext2.ko': invalid module format
/data/local # insmod ext4.ko
insmod: can't insert 'ext4.ko': invalid module format
You could provide the modules compiled for us?
The kernel also does not support swap.
Thank you.
kindly post the output of (after trying insmod ext2.ko )
dmesg
and
uname -a
riystetyt said:
I tried this, but unsuccessful.
/data/local # insmod ext3.ko
insmod: can't insert 'ext3.ko': invalid module format
/data/local # insmod ext2.ko
insmod: can't insert 'ext2.ko': invalid module format
/data/local # insmod ext4.ko
insmod: can't insert 'ext4.ko': invalid module format
You could provide the modules compiled for us?
The kernel also does not support swap.
Thank you.
Click to expand...
Click to collapse
Hello, thanks for your quick answer!
Errors for ext2.ko in dmesg:
[30005.453739] ext2: Unknown symbol kmalloc_caches (err 0)
[30005.454575] [17976:insmod] sig 17 to [11249:sh]
uname -a:
/data/local # uname -a
Linux localhost 2.6.35.7 #1 PREEMPT Mon Jan 9 16:05:35 CST 2012 armv6l GNU/Linux
Thanks for your help!
Is this the ext2.ko module you are trying to load?
ls -l /system/lib/modules/ext2.ko
-rw-r--r-- root root 756026 2012-05-02 18:20 ext2.ko
Hello, I get the ext2.ko in your post on eten-users. Works like a charm! I had only about 8MB free and now with your module and Link2sd has 120MB. Thanks!
Glad it helps you.
In truth I don´t know what mediatek were thinking when they released an android kernel with so little nand storage space and no ext2 support.
Hex Freq Value MTK CPU
Code:
0x68t
0xdft
0x41t
0xd8t
0xeat
0xf8t
0x91t
0x7t
0x19t
0x27t
0x64t
0xf1t
0x93t
0xedt
0x21t
0x59t
0x6ft
0x1t
0x83t
0x39t
Could you please post the ext2.ko that works with the 2.6.35.7? The one that riystetyt points.
You can download it from one of my G11i Pro or HD7 ROMs (check my signature).
Great, checking now.
Did you try compiling zram for the mtk6573?
---------- Post added at 04:12 PM ---------- Previous post was at 03:24 PM ----------
By the way, how did you solve the "invalid module format" issue?
Thanks for your replies
build <drivers> error 2
Where i miss?
@casacristo
Any updates on the compressed swap? I can help testing
My phone has the 2.6.35.7 kernel mt6573
I tried to download the .rar from eten-users but the dropbox link is broken.
Thanks...
casacristo?
bump
Why don't you ask him via PM instead of doing bumps? Probably he's busy to look at this thread...
maybe its help?
http://www.pudn.com/downloads391/doc/comm/detail1673271.html
Thanks for the suggestion but tried sending a private sms to casacristo with no luck.
Sadly I also found that if the kernel does not support swap, swap can't be loaded as a module, so we can't compile a swap module.
The page provided has the datasheet which as far as I know has the technical specs of the mt6573 processor, not the kernel, but I hope there is something there that can be used to compile a custom kernel.
---------- Post added at 10:06 AM ---------- Previous post was at 10:01 AM ----------
Hey just found this: what does it mean? the guy who posted this has the source?
================================================================================================
drivers debug
-------------------------------------------------------------------------------------------------------------
board_init
-------------------------------------------------------------------------------------------------------------
/mediatek/platform/mt6573/kernel/core/mt6573_devs.c
所有的驱动名对应的设备名都可以在这里找到!
-------------------------------------------------------------------------------------------------------------
lcd
-------------------------------------------------------------------------------------------------------------
/mediatek/custom/common/uboot/lcm
/mediatek/custom/common/kernel/lcm
CUSTOM_UBOOT_LCM = ili9481_dpi
***********************************************************
LCM_WIDTH = 320
LCM_HEIGHT = 480
CUSTOM_UBOOT_LCM = ili9481_dpi
CUSTOM_KERNEL_LCM = ili9481_dpi
***********************************************************
-------------------------------------------------------------------------------------------------------------
camera
-------------------------------------------------------------------------------------------------------------
kernel
/mediatek/custom/common/kernel/imgsensor/src
kd_imgsensor.h
kd_sensorlist.h
hal
/mediatek/custom/common/hal/imgsensor/
sensorlist.cpp
MTKCameraHardware.cpp
***********************************************************
CUSTOM_HAL_CAMERA = camera
CUSTOM_HAL_IMGSENSOR = gc2015_yuv
CUSTOM_KERNEL_IMGSENSOR = gc2015_yuv
CUSTOM_HAL_MAIN_IMGSENSOR = gc2015_yuv
CUSTOM_KERNEL_MAIN_IMGSENSOR = gc2015_yuv
***********************************************************
-------------------------------------------------------------------------------------------------------------
TouchPanel
-------------------------------------------------------------------------------------------------------------
/mediatek/custom/common/kernel/touchpanel/src/mtk_tpd.c
tpd_driver_add(&tpd_device_driver);
platform_driver_unregister(&tpd_driver);
***********************************************************
CUSTOM_KERNEL_TOUCHPANEL = COMM
# default settings: generic
# candidate settings: generic;eeti_pcap7200
# select the panel used by certain project.
***********************************************************
-------------------------------------------------------------------------------------------------------------
flash
-------------------------------------------------------------------------------------------------------------
CUSTOM_MEMORY_HDR = mediatek/custom/$(PROJECT)/preloader/inc/custom_MemoryDevice.h
CUSTOM_NAND_HDR = mediatek/custom/$(PROJECT)/common/nand_device_list.h
MEMORY_DEVICE_XLS = mediatek/build/tools/emigen/$(MTK_PLATFORM)/MemoryDeviceList_$(MTK_PLATFORM).xls
-------------------------------------------------------------------------------------------------------------
GPIO_config
-------------------------------------------------------------------------------------------------------------
./mediatek/build/makemtk.mk +294
drvgen:
ifneq ($(PROJECT),generic)
$(hide) echo $(SHOWTIME) [email protected]
$(hide) echo -e \\t\\t\\t\\b\\b\\b\\bLOG: $(S_LOG)[email protected]
$(hide) mediatek/source/dct/DrvGen mediatek/custom/$(PROJECT)/kernel/dct/dct/codegen.dws $(DEAL_STDOUT_DRVGEN) && \
$(SHOWRSLT) $$? $(LOG)[email protected] || \
$(SHOWRSLT) $$? $(LOG)[email protected]
endif
*********************************************
mediatek/source/dct/DrvGen
mediatek/custom/$(PROJECT)/kernel/dct/dct/codegen.dws
*********************************************
-------------------------------------------------------------------------------------------------------------
G-sensor
-------------------------------------------------------------------------------------------------------------
int hwmsen_gsensor_add(struct sensor_init_info* obj)
/mediatek/custom/common/kernel/accelerometer/auto/
/mediatek/config/mtk/ProjectConfig.mk:188:MTK_SENSOR_SUPPORT = yes
# Android sensor device
MTK_SENSOR_SUPPORT = yes
CUSTOM_KERNEL_MAGNETOMETER =
#akm8962
#akm8975
#auto for detcet by lilingyun
CUSTOM_KERNEL_ACCELEROMETER = auto
CUSTOM_KERNEL_ALSPS = tmd2771
CUSTOM_KERNEL_BAROMETER =
CUSTOM_KERNEL_GYROSCOPE =
#l3g4200d
#if defined(MTK_AUTO_DETECT_ACCELEROMETER)
/mediatek/source/kernel/drivers/hwmon/hwmsen/Hwmsen_dev.c
********************************************
#auto for detcet by lilingyun
CUSTOM_KERNEL_ACCELEROMETER = auto
*******************************************
-------------------------------------------------------------------------------------------------------------
compass
-------------------------------------------------------------------------------------------------------------
mediatek/custom/common/kernel/magnetometer/akm8962/akm8962.c
mediatek/custom/tm100/kernel/magnetometer/akm8962/cust_mag.c
*********************************************
CUSTOM_KERNEL_MAGNETOMETER =
#akm8962
#akm8975
********************************************
-------------------------------------------------------------------------------------------------------------
ALS/PS 光感 接近传感器
-------------------------------------------------------------------------------------------------------------
*********************************************
CUSTOM_KERNEL_ALSPS = tmd2771
*********************************************
mediatek/custom/common/kernel/alsps/tmd2771/tmd2771.c
mediatek/custom/common/kernel/alsps/tmd2771/tmd2771.h
mediatek/custom/tm100/kernel/alsps/tmd2771/cust_alsps.c
-------------------------------------------------------------------------------------------------------------
GYRO-sensor motion sensor 陀螺仪
-------------------------------------------------------------------------------------------------------------
*********************************************
CUSTOM_KERNEL_GYROSCOPE =
#l3g4200d
*********************************************
mediatek/custom/common/kernel/gyroscope/l3g4200d/l3g4200d.c
mediatek/custom/tm100/kernel/gyroscope/l3g4200d/cust_gyro.c
-------------------------------------------------------------------------------------------------------------
BAROMETER-sensor 气压计
-------------------------------------------------------------------------------------------------------------
*********************************************
CUSTOM_KERNEL_BAROMETER =
#ms5607
*********************************************
mediatek/custom/tm100/kernel/barometer/ms5607/cust_baro.c
mediatek/custom/common/kernel/barometer/ms5607/ms5607.c
------------------------------------------------------------------------------------------------------------
flashlight
------------------------------------------------------------------------------------------------------------
*********************************************
CUSTOM_HAL_FLASHLIGHT = dummy_flashlight
CUSTOM_KERNEL_FLASHLIGHT = dummy_flashlight
*********************************************
mediatek/custom/common/kernel/flashlight/dummy_flashlight/dummy_flashlight.c
mediatek/custom/common/kernel/flashlight/src/kd_flashlightlist.c
------------------------------------------------------------------------------------------------------------
jogball
------------------------------------------------------------------------------------------------------------
*********************************************
CUSTOM_KERNEL_JOGBALL =
*********************************************
mediatek/custom/common/kernel/jogball/
------------------------------------------------------------------------------------------------------------
leds
------------------------------------------------------------------------------------------------------------
*********************************************
CUSTOM_KERNEL_LEDS = mt65xx
*********************************************
mediatek/custom/common/kernel/leds
------------------------------------------------------------------------------------------------------------
matv
------------------------------------------------------------------------------------------------------------
*********************************************
CUSTOM_HAL_MATV =
CUSTOM_KERNEL_MATV =
HAVE_MATV_FEATURE = no
*********************************************
mediatek/custom/common/kernel/matv/mt5193/matv.c
------------------------------------------------------------------------------------------------------------
sound
------------------------------------------------------------------------------------------------------------
*********************************************
MTK_SOUNDRECORDER_APP = yes
CUSTOM_KERNEL_SOUND = speaker
*********************************************
mediatek/custom/common/kernel/sound/inc/yusu_android_speaker.h
mediatek/custom/tm100/kernel/sound/speaker/yusu_android_speaker.c
------------------------------------------------------------------------------------------------------------
USB
------------------------------------------------------------------------------------------------------------
*********************************************
CUSTOM_KERNEL_USB = mt6573
*********************************************
mediatek/custom/common/kernel/usb/src/Makefile
mediatek/custom/mt6573/kernel/usb/src/mtk_usb_custom.c
mediatek/custom/mt6573/kernel/usb/src/mtk_usb_custom.h
mediatek/custom/mt6573/uboot/inc/cust_sdc.h
mediatek/platform/mt6573/kernel/drivers/usb-gadget/
mediatek/platform/mt6573/kernel/drivers/power/
------------------------------------------------------------------------------------------------------------
BT
------------------------------------------------------------------------------------------------------------
*********************************************
MTK_WLAN_CHIP = MT6620
# candidate settings: MT6620
MTK_BT_CHIP = MTK_MT6620
# candidate settings: MTK_MT6611/MTK_MT6612/MTK_MT6616/MTK_MT6620
MTK_WLAN_SUPPORT = yes
MTK_BT_SUPPORT = yes
MTK_WLAN_SUPPORT = yes
MTK_WLANBT_SINGLEANT = no
MTK_BT_30_HS_SUPPORT = yes
####config BT feature###########
# please do not modify these options
MTK_BT_21_SUPPORT = yes
MTK_BT_30_SUPPORT = yes
MTK_BT_40_SUPPORT = yes
MTK_BT_FM_OVER_BT_VIA_CONTROLLER = yes
MTK_BT_PROFILE_OPP = yes
MTK_BT_PROFILE_SIMAP = yes
MTK_BT_PROFILE_PRXM = yes
MTK_BT_PROFILE_PRXR = yes
MTK_BT_PROFILE_HIDH = yes
MTK_BT_PROFILE_FTP = yes
MTK_BT_PROFILE_PBAP = yes
MTK_BT_PROFILE_MANAGER = yes
MTK_BT_PROFILE_BPP = yes
MTK_BT_PROFILE_BIP = yes
MTK_BT_PROFILE_DUN = yes
MTK_BT_PROFILE_PAN = yes
MTK_BT_PROFILE_HFP = yes
MTK_BT_PROFILE_A2DP = yes
MTK_BT_PROFILE_AVRCP = yes
MTK_BT_PROFILE_AVRCP14 = yes
MTK_BT_PROFILE_TIMEC = no
MTK_BT_PROFILE_TIMES = no
MTK_BT_PROFILE_MAPS = no
MTK_BT_PROFILE_MAPC = no
MTK_BT_PROFILE_SPP = yes
####config BT feature end ####
*********************************************
mediatek/custom/common/kernel/btwlanem/btwlanem/btwlanem.c
------------------------------------------------------------------------------------------------------------
EEPROM
------------------------------------------------------------------------------------------------------------
*********************************************
CUSTOM_HAL_EEPROM = dummy_eeprom
CUSTOM_KERNEL_EEPROM = dummy_eeprom
*********************************************
mediatek/custom/common/kernel/eeprom/dummy_eeprom/dummy_eeprom.c
------------------------------------------------------------------------------------------------------------
FM
------------------------------------------------------------------------------------------------------------
*********************************************
MTK_FM_CHIP = MT6620_FM
MTK_FM_SUPPORT = yes
MTK_FM_TX_SUPPORT = yes
MTK_FM_AUDIO = FM_ANALOG_INPUT
#FM_DIGITAL_INPUT
*********************************************
mediatek/custom/common/kernel/fm/mt6620/dummy.c
------------------------------------------------------------------------------------------------------------
voice coil motor driver
------------------------------------------------------------------------------------------------------------
*********************************************
CUSTOM_HAL_LENS = dummy_lens dummy_lens
CUSTOM_KERNEL_LENS = dummy_lens dummy_lens
CUSTOM_HAL_MAIN_LENS = dummy_lens
CUSTOM_HAL_MAIN_BACKUP_LENS =
CUSTOM_HAL_SUB_LENS = dummy_lens
CUSTOM_HAL_SUB_BACKUP_LENS =
CUSTOM_KERNEL_MAIN_LENS = dummy_lens
CUSTOM_KERNEL_MAIN_BACKUP_LENS =
CUSTOM_KERNEL_SUB_LENS = dummy_lens
CUSTOM_KERNEL_SUB_BACKUP_LENS =
*********************************************
mediatek/custom/common/kernel/lens/dummy_lens/dummy_lens.c
------------------------------------------------------------------------------------------------------------
OFN
------------------------------------------------------------------------------------------------------------
*********************************************
CUSTOM_KERNEL_OFN = ofn1090
*********************************************
mediatek/custom/common/kernel/ofn/inc
mediatek/custom/tm100/kernel/ofn/ofn1090/cust_ofn.c
------------------------------------------------------------------------------------------------------------
wifi
-----------------------------------------------------------------------------------------------------------
*********************************************
CUSTOM_KERNEL_WIFI =
MTK_SCREEN_OFF_WIFI_OFF = no
MTK_WIFI_P2P_SUPPORT = yes
MTK_WIFI_HOTSPOT_SUPPORT = yes
*********************************************
mediatek/custom/common/kernel/wifi/mt592x/dummy.c
------------------------------------------------------------------------------------------------------------
HEADSET
------------------------------------------------------------------------------------------------------------
*********************************************
CUSTOM_KERNEL_HEADSET = accdet
MTK_HEADSET_ICON_SUPPORT = yes
*********************************************
mediatek/custom/tm100/kernel/headset/accdet/accdet_custom.h
------------------------------------------------------------------------------------------------------------
board 配置与分区信息
------------------------------------------------------------------------------------------------------------
*********************************************
*********************************************
mediatek/custom/tm100/kernel/core/src/board.c
mediatek/custom/tm100/kernel/core/src/partition.c
------------------------------------------------------------------------------------------------------------
PM
------------------------------------------------------------------------------------------------------------
*********************************************
CUSTOM_KERNEL_BATTERY = battery
*********************************************
mediatek/custom/tm100/kernel/battery/battery/cust_battery.h
mediatek/custom/tm100/kernel/battery/battery/custom_fuel_gauge.h
mediatek/platform/mt6573/kernel/drivers/power/mt6573_battery.c
------------------------------------------------------------------------------------------------------------
RTC
------------------------------------------------------------------------------------------------------------
*********************************************
CUSTOM_KERNEL_RTC = rtc
# default settings: rtc
# candidate settings: rtc
# For RTC
*********************************************
mediatek/custom/tm100/kernel/rtc/rtc/rtc-mt6573.h
mediatek/platform/mt6573/kernel/drivers/rtc/mtk_rtc.c
Related
Let's discuss how we could dump out the kernel, ROMS, etc. from Galaxy R:
The following command would help to dump the kernel out (need su)
Code:
cat /dev/block/mmcblk0p9 > /sdcard/boot-i9103.img
The following command should help to dump the /system/ out (need su)
Code:
cat /dev/block/mmcblk0p2 > /sdcard/system-i9103.img
legion1911 said:
If you dump with su you have su in the dump, no?
How about a temporary root solution?
Click to expand...
Click to collapse
Yes, dumping out the /system/ will contain su
But what it means is just dumping the /bin/su and /system/app/Superuser.apk inclusively.
After dumping out, one can remove the su & superuser.apk to make a 'non-rooted' ROM, if necessary.
ardatdat said:
After dumping out, one can remove the su & superuser.apk to make a 'non-rooted' ROM, if necessary.
Click to expand...
Click to collapse
Please explain how to do it on Windows 7.
Sense this device is tegra we can use nvflash to dump almost any kind of stuff from device, but my problem is that when i try to read or read raw from device nvflash hangs, on this weekend i will try and see what i can debug from usbmon and maybe then i will have some clue, until the only good way is to raw copy of block partitions like you mentioned
by the way if this helps this is what i get in my bct file (dumped with bct_dump for chromeos but worked for me)
Code:
Version = 0x00020001;
BlockSize = 0x00004000;
PageSize = 0x00000200;
PartitionSize = 0x01000000;
# Bootloader used = 1;
# Bootloaders max = 4;
# BCT size = 4080;
# Hash size = 16;
# Crypto offset = 16;
# Crypto length = 4064;
# Max BCT search blocks = 64;
#
# These values are set by cbootimage using the
# bootloader provided by the Bootloader=...
# configuration option.
#
# Bootloader[0].Version = 0x00000001;
# Bootloader[0].Start block = 224;
# Bootloader[0].Start page = 0;
# Bootloader[0].Length = 1345716;
# Bootloader[0].Load address = 0x00108000;
# Bootloader[0].Entry point = 0x00108000;
# Bootloader[0].Attributes = 0x00000004;
SDRAM[0].MemoryType = NvBootMemoryType_LpDdr2;
SDRAM[0].PllMChargePumpSetupControl = 0x00000008;
SDRAM[0].PllMLoopFilterSetupControl = 0x00000000;
SDRAM[0].PllMInputDivider = 0x0000001a;
SDRAM[0].PllMFeedbackDivider = 0x00000258;
SDRAM[0].PllMPostDivider = 0x00000000;
SDRAM[0].PllMStableTime = 0x0000012c;
SDRAM[0].EmcClockDivider = 0x00000001;
SDRAM[0].EmcAutoCalInterval = 0x00000000;
SDRAM[0].EmcAutoCalConfig = 0xe0a61111;
SDRAM[0].EmcAutoCalWait = 0x00000000;
SDRAM[0].EmcPinProgramWait = 0x00000000;
SDRAM[0].EmcRc = 0x00000012;
SDRAM[0].EmcRfc = 0x00000027;
SDRAM[0].EmcRas = 0x0000000d;
SDRAM[0].EmcRp = 0x00000006;
SDRAM[0].EmcR2w = 0x00000007;
SDRAM[0].EmcW2r = 0x00000005;
SDRAM[0].EmcR2p = 0x00000003;
SDRAM[0].EmcW2p = 0x0000000b;
SDRAM[0].EmcRrd = 0x00000003;
SDRAM[0].EmcRdRcd = 0x00000006;
SDRAM[0].EmcWrRcd = 0x00000006;
SDRAM[0].EmcRext = 0x00000003;
SDRAM[0].EmcWdv = 0x00000003;
SDRAM[0].EmcQUseExtra = 0x00000006;
SDRAM[0].EmcQUse = 0x00000007;
SDRAM[0].EmcQRst = 0x00000004;
SDRAM[0].EmcQSafe = 0x00000009;
SDRAM[0].EmcRdv = 0x0000000d;
SDRAM[0].EmcRefresh = 0x0000045f;
SDRAM[0].EmcBurstRefreshNum = 0x00000000;
SDRAM[0].EmcPdEx2Wr = 0x00000004;
SDRAM[0].EmcPdEx2Rd = 0x00000004;
SDRAM[0].EmcPChg2Pden = 0x00000006;
SDRAM[0].EmcAct2Pden = 0x00000008;
SDRAM[0].EmcAr2Pden = 0x00000001;
SDRAM[0].EmcRw2Pden = 0x0000000f;
SDRAM[0].EmcTxsr = 0x0000002a;
SDRAM[0].EmcTcke = 0x00000003;
SDRAM[0].EmcTfaw = 0x0000000f;
SDRAM[0].EmcTrpab = 0x00000007;
SDRAM[0].EmcTClkStable = 0x00000007;
SDRAM[0].EmcTClkStop = 0x00000002;
SDRAM[0].EmcTRefBw = 0x000004e1;
SDRAM[0].EmcFbioCfg1 = 0x00000000;
SDRAM[0].EmcFbioDqsibDlyMsb = 0x00000000;
SDRAM[0].EmcFbioDqsibDly = 0x2f2f2f2f;
SDRAM[0].EmcFbioQuseDlyMsb = 0x00000000;
SDRAM[0].EmcFbioQuseDly = 0x2f2f2f2f;
SDRAM[0].EmcFbioCfg5 = 0x00000282;
SDRAM[0].EmcFbioCfg6 = 0x00000002;
SDRAM[0].EmcFbioSpare = 0x00000000;
SDRAM[0].EmcMrsResetDllWait = 0x00000000;
SDRAM[0].EmcMrsResetDll = 0x00000000;
SDRAM[0].EmcMrsDdr2DllReset = 0x00000000;
SDRAM[0].EmcMrs = 0x00000000;
SDRAM[0].EmcEmrsEmr2 = 0x00000000;
SDRAM[0].EmcEmrsEmr3 = 0x00000000;
SDRAM[0].EmcEmrsDdr2DllEnable = 0x00000000;
SDRAM[0].EmcEmrsDdr2OcdCalib = 0x00000000;
SDRAM[0].EmcEmrs = 0x00000000;
SDRAM[0].EmcMrw1 = 0x0001008a;
SDRAM[0].EmcMrw2 = 0x00020004;
SDRAM[0].EmcMrw3 = 0x00030002;
SDRAM[0].EmcMrwResetCommand = 0x003f0000;
SDRAM[0].EmcMrwResetNInitWait = 0x0000000a;
SDRAM[0].EmcAdrCfg1 = 0x00070303;
SDRAM[0].EmcAdrCfg = 0x01070303;
SDRAM[0].McEmemCfg = 0x00100000;
SDRAM[0].McLowLatencyConfig = 0x80000003;
SDRAM[0].EmcCfg2 = 0x00000403;
SDRAM[0].EmcCfgDigDll = 0xe0000413;
SDRAM[0].EmcCfgClktrim0 = 0x00000000;
SDRAM[0].EmcCfgClktrim1 = 0x00000000;
SDRAM[0].EmcCfgClktrim2 = 0x00000000;
SDRAM[0].EmcCfg = 0x0001ff00;
SDRAM[0].EmcDbg = 0x01000020;
SDRAM[0].AhbArbitrationXbarCtrl = 0x00010000;
SDRAM[0].EmcDllXformDqs = 0x00000010;
SDRAM[0].EmcDllXformQUse = 0x00000008;
SDRAM[0].WarmBootWait = 0x00000001;
SDRAM[0].EmcCttTermCtrl = 0x00000802;
SDRAM[0].EmcOdtWrite = 0x00000000;
SDRAM[0].EmcOdtRead = 0x00000000;
SDRAM[0].EmcZcalRefCnt = 0x00000000;
SDRAM[0].EmcZcalWaitCnt = 0x0000001b;
SDRAM[0].EmcZcalMrwCmd = 0x000a0056;
SDRAM[0].EmcMrwZqInitDev0 = 0x800a00ff;
SDRAM[0].EmcMrwZqInitDev1 = 0x400a00ff;
SDRAM[0].EmcMrwZqInitWait = 0x00000001;
SDRAM[0].EmcDdr2Wait = 0x00000000;
SDRAM[0].PmcDdrPwr = 0x00000000;
SDRAM[0].ApbMiscGpXm2CfgAPadCtrl = 0x77ffc000;
SDRAM[0].ApbMiscGpXm2CfgCPadCtrl2 = 0x08080040;
SDRAM[0].ApbMiscGpXm2CfgCPadCtrl = 0x77fffff8;
SDRAM[0].ApbMiscGpXm2CfgDPadCtrl2 = 0x00000000;
SDRAM[0].ApbMiscGpXm2CfgDPadCtrl = 0x77fffff8;
SDRAM[0].ApbMiscGpXm2ClkCfgPadCtrl = 0x77ffc000;
SDRAM[0].ApbMiscGpXm2CompPadCtrl = 0x01f1f008;
SDRAM[0].ApbMiscGpXm2VttGenPadCtrl = 0x00005500;
---------- Post added at 02:13 AM ---------- Previous post was at 01:59 AM ----------
legion1911 said:
Please explain how.
Click to expand...
Click to collapse
I think by mounting this image like a loop device in linux and deleting unneeded files from what i know SGR uses ext4 file system
Welcome SPLESH!
1) Please give us a download link for the nvflash you use and let us know about your progress.
2) "I think by mounting this image like a loop device in linux and deleting unneeded files from what i know SGR uses ext4 file system"
I do not use linux. How I do it in windows?
---------- Post added at 04:40 AM ---------- Previous post was at 03:41 AM ----------
ardatdat said:
Let's discuss how we could dump out the kernel, ROMS, etc. from Galaxy R:
The following command would help to dump the kernel out (need su)
Code:
cat /dev/block/mmcblk0p9 > /sdcard/boot-i9103.img
The following command should help to dump the /system/ out (need su)
Code:
cat /dev/block/mmcblk0p2 > /sdcard/system-i9103.img
Click to expand...
Click to collapse
Nice. How I do that on Windows 7?
legion1911 said:
Please explain how to do it on Windows 7.
Click to expand...
Click to collapse
on Windows 7 How?
Hi
Ok I will look to find a way to extract and pack it back or at least modify image itself (I do not have Windows and I will have to install it in virtualBox)
Look in this thread about magiciso (rfs and maybe ext4):
http://forum.xda-developers.com/showthread.php?t=879569
And of cause Linux reader (I can not verify it with image but i used it for real PC disk partitions):
http://www.diskinternals.com/linux-reader/
About nvflash, this thread have much info about it (it is for G Tablet but work as well on SGR, or maybe not so well but i will research more on it):
http://forum.xda-developers.com/showthread.php?t=861950
---------- Post added at 10:27 AM ---------- Previous post was at 10:06 AM ----------
To put device into nvflash mod you need:
unplug USB cable
turn device off
remove battery
press VOL_UP and VOL_DOWN and hold them
insert USB cable
press HOME for 1-2 sec
press POWER
verify device (windows should detect new device, on linux run lsusb and see for Nvidia Inc device)
release POWER, HOME, and VOL keys
on Windows install APX driver from post, on Linux run lsusb and look for Nvidia Inc device remember ID XXXX:XXXX (first part is vendor and do not change) and create udev rule for it with this line: SUBSYSTEM=="usb", ATTR{idVendor}=="0955", ATTR{idProduct}=="7f20", MODE="0660", GROUP="plugdev"
now you can run nvflash --sync (with out bootloader) just to verify it can connect
SPLESH!
I am so glad you are in this forum.
Greetings to Crimea!
May be I need use nvflash with USB JIG to be able to operate it will make one and try to operate with it on this weekend and will share my results with you guys
Hi
Can some one who rooted device but did not changed stock kernel post output of after su:
adb shell cat /sys/firmware/fuse/odm_production_mode > odm_production_mode.txt
adb shell cat /sys/firmware/fuse/sec_boot_dev_cfg >
sec_boot_dev_cfg.txt
adb shell cat /sys/firmware/fuse/sec_boot_dev_sel > sec_boot_dev_sel.txt
and probably all content of /sys/firmware/fuse will be useful for my investigation
I understand that this may be different among devices but just for reference this info will be interesting to look at
Some thought about partitions layout
Code:
mmc0->cid=15010056414c30304d11593326177e00
mmc0->csd=d02701320f5903fff6dbffef8a404000
mmc0->name=VAL00M
mmc0->type=MMC
mmc0->oemid=0x0100
mmc0->serial=0x59332617
mmc0->manfid=0x000015
mmc0->preferred_erase_size=524288
mmc0->erase_size=524288
mmc0->date=07/2011
mmcblk0->dev=179:0
mmcblk0->range=8
mmcblk0->ext_range=255
mmcblk0->removable=0
mmcblk0->ro=0
mmcblk0->size=15104000
mmcblk0->alignment_offset=0
mmcblk0->discard_alignment=0
mmcblk0->capability=50
p0->size=??? /bct,/pt,/flags
p1->size=24576 /efs ~11Mb
p2->size=1228800 /system ~503Mb
p3->size=638976 /cache ~307Mb
p4->size=7865344 /sdcard ~3Gb
p5->size=4096 radio? ~2Mb
p6->size=4194304 /data ~1Gb
p7->size=32768 radio? ~15Mb
p8->size=10240 recavery ~5Mb
p9->size=16384 boot ~8Mb
p10->size=16384 hidden? ~8Mb
p11->size=1048576 factoryfs? ~500Mb
It is more than a month since I played with this, but if I remember correctly, p8 is recovery, p9 is boot.
These 2 partitions need special scripts to unzip. Check here:
Code:
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
System partition is probably a standard Linux partition and is easy to mount on any Linux system.
I used dd to dump them, which essentially does the same thing as cat but with more options.
Yes you are correct and p5 and p7 are both radio related so the first 10 or so mb are for low level hboot/fastboot, partition table and etc
Sent from my GT-I9103 using XDA App
Sorry did not read the kernel code p5 is MISC partition
I lost ability to play with flash (some thing happend with VOL keys) it is good that i rooted it and instlled cwm just a day beffore (we had snow and ice no the road and I fail and paranty damedjed buttons) but I will continue to work on kernel until i will get it repared (new year, and etc)
SPLESH said:
I lost ability to play with flash (some thing happend with VOL keys) it is good that i rooted it and instlled cwm just a day beffore (we had snow and ice no the road and I fail and paranty damedjed buttons) but I will continue to work on kernel until i will get it repared (new year, and etc)
Click to expand...
Click to collapse
Did you open your device to check the electronics? Because I doubt you could damage the buttons permanently by software.
No i did it in more bad way also dameged side of device not so raw but this thin thing which they use for buttons is broken i did open it and removed broken pice of plastic and fexible pcb with buttons on it glad it at least work cause i was thinking it is it will have to replace this two parts
Sent from my GT-I9103 using XDA App
---------- Post added at 05:32 PM ---------- Previous post was at 05:11 PM ----------
This part "KEY FPCB-VOLUME KEY(GT-I9103) GH59-11005A" and plastic button part they should not cost much but it is little inconvenient for me now
SPLESH said:
Some thought about partitions layout
Code:
mmc0->cid=15010056414c30304d11593326177e00
mmc0->csd=d02701320f5903fff6dbffef8a404000
mmc0->name=VAL00M
mmc0->type=MMC
mmc0->oemid=0x0100
mmc0->serial=0x59332617
mmc0->manfid=0x000015
mmc0->preferred_erase_size=524288
mmc0->erase_size=524288
mmc0->date=07/2011
mmcblk0->dev=179:0
mmcblk0->range=8
mmcblk0->ext_range=255
mmcblk0->removable=0
mmcblk0->ro=0
mmcblk0->size=15104000
mmcblk0->alignment_offset=0
mmcblk0->discard_alignment=0
mmcblk0->capability=50
p0->size=??? /bct,/pt,/flags
p1->size=24576 /efs ~11Mb
p2->size=1228800 /system ~503Mb
p3->size=638976 /cache ~307Mb
p4->size=7865344 /sdcard ~3Gb
p5->size=4096 radio? ~2Mb
p6->size=4194304 /data ~1Gb
p7->size=32768 radio? ~15Mb
p8->size=10240 recavery ~5Mb
p9->size=16384 boot ~8Mb
p10->size=16384 hidden? ~8Mb
p11->size=1048576 factoryfs? ~500Mb
Click to expand...
Click to collapse
If I use this for BoardConfig.mk , how can I convert the sizes to hex values/bytes ?
EmoBoiix3 said:
If I use this for BoardConfig.mk , how can I convert the sizes to hex values/bytes ?
Click to expand...
Click to collapse
this values are taken from:
Code:
/sys/devices/platform/sdhci-tegra.3/mmc_host/mmc0/mmc0:0001/block/mmcblk0
Code:
adb shell cat /sys/devices/platform/sdhci-tegra.3/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p*/size
And this sizes is in blocks, 2048 byte each.
I9001XXKPU XXKPH OXAKP1
Flash + Odin :
hotfile.com/dl/140028931/367f5c4/i9001XXKPU_XXKPH_OXAKP1.rar.html
Regards!
Wish there was any change log available for stock rom updates...
Sent from my GT-I9001 using XDA App
Make them yourself, like I did:
1. Unzip/rar the file (just ignore the error)
2. Unpack system with Diskinternal Linux Reader
3. Compare the two with whatever file/dir compare tool you like (I use copyto for binary folder compare and ultracompare for file compare)
Good luck!
Regards,
Nika.
Sorry, first link have damaged MD5 checksums inside.
new one tested :
hotfile.com/dl/140028931/367f5c4/i9001XXKPU_XXKPH_OXAKP1.rar.html
I also edited first.
Lol, and I was trying to figure out why unpacking the smd did not work... thanks!
For whomever wants to know, you can extract an smd using this script (Linux or Cygwin):
Code:
#!/bin/bash
base=0
length=1
while (( length > 0 ))
do
# calculate Length
let "skip = base + 18"
length=`hexdump -e '"%d"' -s ${skip} -n 2 ${1}`
let "length = length * 65536"
let "skip = base + 16"
length2=`hexdump -e '"%d"' -s ${skip} -n 2 ${1}`
let "length += length2"
let "length = length / 512" # Number of 512-Byte blocks
# calculate offset
let "skip = base + 22"
offset=`hexdump -e '"%d"' -s ${skip} -n 2 ${1}`
let "offset = offset * 65536"
let "skip = base + 20"
offset2=`hexdump -e '"%d"' -s ${skip} -n 2 ${1}`
let "offset += offset2"
let "offset = offset / 512" # Number of 512-Byte blocks
# save header in case of first loop
if (( base == 0 ))
then
dd if=${1} bs=512 of=header count=${offset}
fi
# extract filename
let "skip = base + 32"
filename=`dd if=${1} skip=${skip} count=16 bs=1 2>/dev/null`
# and finally: extract image
if (( length > 0 ))
then
echo "Length: ${length}"
echo "Offset: ${offset}"
echo "Filename: ${filename}"
dd if=${1} bs=512 of=${filename} skip=${offset} count=${length} 2>/dev/null
fi
# next header
let "base += 64"
done
For the ppl that wanted a solution for making screenshots in recovery on HTC ONE M7
Can be handy for troubleshooting/bugreports in Aroma or simply for recovery Themers
Download the ScreenshotFFMPEG_M7.rar
Plugin usb cable in recovery
Extract the package and run the screenshot_run_me_auto_ffmpegM7.bat
thx to Sneakyghost for the ffmpeg values
It runs the following code:
Code:
@echo off
echo ********************************************
echo * *
echo * ADB-Screenshot Util *
echo * Boot into Recovery *
echo * Plug In USB Cable *
echo * Enjoy ;) *
echo * *
echo ********************************************
echo.
pause
echo.
adb kill-server -d >nul 2>&1
adb pull /dev/graphics/fb0 fb0
ffmpeg -vframes 1 -f rawvideo -pix_fmt rgba -s 1088x1920 -i fb0 screenshot.png
del fb0
echo.
echo ********************************************
echo * *
echo * Output saved as screenshot.png *
echo * *
echo ********************************************
echo.
pause
XDA:DevDB Information
*** Easy ADB solution for screenshots in recovery HTC ONE M7 ***, a Tool/Utility for the HTC One
Contributors
Whiskey103, Patrics83
Version Information
Status: Stable
Created 2013-08-04
Last Updated 2013-11-17
Output should look like this
Code:
********************************************
* *
* ADB-Screenshot Util *
* Boot into Recovery *
* Plug In USB Cable *
* Enjoy ;) *
* *
********************************************
Druk op een toets om door te gaan. . .
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
3138 KB/s (25067520 bytes in 7.800s)
FFmpeg version SVN-r25512, Copyright (c) 2000-2010 the FFmpeg developers
built on Oct 18 2010 04:06:45 with gcc 4.4.2
configuration: --enable-gpl --enable-version3 --enable-libgsm --enable-pthread
s --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame --
enable-libopenjpeg --enable-libschroedinger --enable-libopencore_amrwb --enable-
libopencore_amrnb --enable-libvpx --arch=x86 --enable-runtime-cpudetect --enable
-libxvid --enable-libx264 --extra-libs='-lx264 -lpthread' --enable-librtmp --ext
ra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm' --target-os=mingw32 --enable-avisyn
th --cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign
-hack
libavutil 50.32. 3 / 50.32. 3
libavcore 0. 9. 1 / 0. 9. 1
libavcodec 52.92. 0 / 52.92. 0
libavformat 52.83. 0 / 52.83. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.52. 0 / 1.52. 0
libswscale 0.12. 0 / 0.12. 0
[rawvideo @ 0188bf30] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from 'fb0':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0.0: Video: rawvideo, rgba, 1088x1920, 25 tbr, 25 tbn, 25 tbc
[buffer @ 0188ff50] w:1088 h:1920 pixfmt:rgba
[ffsink @ 01749890] auto-inserting filter 'auto-inserted scaler 0' between the f
ilter 'src' and the filter 'out'
[scale @ 01753570] w:1088 h:1920 fmt:rgba -> w:1088 h:1920 fmt:rgb24 flags:0x4
Output #0, image2, to 'screenshot.png':
Metadata:
encoder : Lavf52.83.0
Stream #0.0: Video: png, rgb24, 1088x1920, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 1 fps= 0 q=0.0 Lsize= -0kB time=0.04 bitrate= -4.4kbits/s
video:1030kB audio:0kB global headers:0kB muxing overhead -100.002087%
********************************************
* *
* Output saved as screenshot.png *
* *
********************************************
Druk op een toets om door te gaan. . .
Cool! This is handy.
Do you have a way of getting a screenshot from the bootloader?
Hi @Whiskey103
A use pointed me to your thread here using ffmpeg
I see you managed to decode the fb0 stream in the new devices. Seems like this thing works also on S4
Probably the frame width you modified helps here, maybe other offset things
Now, if I could get this to work in Android...
I found this very interesting, as I was too lazy to build them my self from sources:
https://github.com/guardianproject/android-ffmpeg/downloads
These have all ffmpeg static libs. The binary is dynamically linked though, so you need to mount /system in recovery shell session
Sadly, it doesn't work, the decoded stream is off on my side
If someone can test on his One device would be great
It could be you need to modify command a little to decode all frames:
Code:
ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgba -s 1088x1920 -i fb0 -f image2 -vcodec png image_%05d.png
Hey @Phil3759!
Downloaded ffmpg from pointed location and got this:
Code:
C:\Users\Marko\Desktop\HTC 1\fastboot>adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[email protected]:/ # ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgba -s 1088x192
0 -i fb0 -f image2 -vcodec png image_%05d.png
0 -i fb0 -f image2 -vcodec png image_%05d.png <
←[0;39mffmpeg version 0.11.1←[0m←[0;39m Copyright (c) 2000-2012 the FFmpeg developer
s←[0m←[0;39m
←[0m←[0;39m built on Sep 20 2012 13:28:38 with gcc 4.6.x-google 20120106 (prereleas
e)
←[0m←[0;39m configuration: --arch=arm --cpu=cortex-a8 --target-os=linux --enable-ru
ntime-cpudetect --prefix=/data/data/org.witness.sscvideoproto --enable-pic --disable
-shared --enable-static --cross-prefix=/opt/android-ndk/toolchains/arm-linux-android
eabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi- --sysroot=/opt/android-ndk/pl
atforms/android-3/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon'
--extra-ldflags=-L../x264 --enable-version3 --enable-gpl --disable-doc --enable-yasm
--enable-decoders --enable-encoders --enable-muxers --enable-demuxers --enable-pars
ers --enable-protocols --enable-filters --enable-avresample --enable-libfreetype --d
isable-indevs --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmp
eg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-
libx264 --enable-zlib
←[0m←[0;39m libavutil 51. 54.100 / 51. 54.100
←[0m←[0;39m libavcodec 54. 23.100 / 54. 23.100
←[0m←[0;39m libavformat 54. 6.100 / 54. 6.100
←[0m←[0;39m libavdevice 54. 0.100 / 54. 0.100
←[0m←[0;39m libavfilter 2. 77.100 / 2. 77.100
←[0m←[0;39m libswscale 2. 1.100 / 2. 1.100
←[0m←[0;39m libswresample 0. 15.100 / 0. 15.100
←[0m←[0;39m libpostproc 52. 0.100 / 52. 0.100
←[0m←[1;31mfb0: No such file or directory
←[0m←[4;31m←[0m1|[email protected]:/ #
donmarkoni said:
Hey @Phil3759!
Downloaded ffmpg from pointed location and got this:
Code:
C:\Users\Marko\Desktop\HTC 1\fastboot>adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[email protected]:/ # ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgba -s 1088x192
0 -i fb0 -f image2 -vcodec png image_%05d.png
0 -i fb0 -f image2 -vcodec png image_%05d.png <
←[0;39mffmpeg version 0.11.1←[0m←[0;39m Copyright (c) 2000-2012 the FFmpeg developer
s←[0m←[0;39m
←[0m←[0;39m built on Sep 20 2012 13:28:38 with gcc 4.6.x-google 20120106 (prereleas
e)
←[0m←[0;39m configuration: --arch=arm --cpu=cortex-a8 --target-os=linux --enable-ru
ntime-cpudetect --prefix=/data/data/org.witness.sscvideoproto --enable-pic --disable
-shared --enable-static --cross-prefix=/opt/android-ndk/toolchains/arm-linux-android
eabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi- --sysroot=/opt/android-ndk/pl
atforms/android-3/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon'
--extra-ldflags=-L../x264 --enable-version3 --enable-gpl --disable-doc --enable-yasm
--enable-decoders --enable-encoders --enable-muxers --enable-demuxers --enable-pars
ers --enable-protocols --enable-filters --enable-avresample --enable-libfreetype --d
isable-indevs --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmp
eg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-
libx264 --enable-zlib
←[0m←[0;39m libavutil 51. 54.100 / 51. 54.100
←[0m←[0;39m libavcodec 54. 23.100 / 54. 23.100
←[0m←[0;39m libavformat 54. 6.100 / 54. 6.100
←[0m←[0;39m libavdevice 54. 0.100 / 54. 0.100
←[0m←[0;39m libavfilter 2. 77.100 / 2. 77.100
←[0m←[0;39m libswscale 2. 1.100 / 2. 1.100
←[0m←[0;39m libswresample 0. 15.100 / 0. 15.100
←[0m←[0;39m libpostproc 52. 0.100 / 52. 0.100
←[0m←[1;31mfb0: No such file or directory
←[0m←[4;31m←[0m1|[email protected]:/ #
Click to expand...
Click to collapse
well, you should cat your buffer first...
I am not discussing the basics here to avoid cluttering a thread that should be kept for developing only
Phil3759 said:
well, you should cat your buffer first...
I am not discussing the basics here to avoid cluttering a thread that should be kept for developing only
Click to expand...
Click to collapse
Thing is, it seems somewhat kernel depending, for example latest twrp embedded a different kernel and the screenshot function broke.
Worked on earlier versions, it's really hit or miss sadly.
Honestly I stopped looking into it coz i don't have time to keep checking the changes all the time and don't have proper kernel knowledge either.
Way above my head Sry.
Sent from my HTC One using XDA Premium 4 mobile app
Phil3759 said:
well, you should cat your buffer first...
I am not discussing the basics here to avoid cluttering a thread that should be kept for developing only
Click to expand...
Click to collapse
Let me take another shot on this... booted recovery... typing paths...:
Code:
C:\Users\Marko\Desktop\HTC 1\fastboot>adb shell
~ # cd sdcard
cd sdcard
/data/media/0 # ./ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgba -s 10
88x1920 -i /dev/graphics/fb0 -f image2 -vcodec png image_%05d.png
./ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgba -
s 1088x1920 -i /dev/graphics/fb0 -f image2 -vcodec png image_%05d.png
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
built on Sep 20 2012 13:28:38 with gcc 4.6.x-google 20120106 (prerelease)
configuration: --arch=arm --cpu=cortex-a8 --target-os=linux --enable-runtime-cpude
tect --prefix=/data/data/org.witness.sscvideoproto --enable-pic --disable-shared --e
nable-static --cross-prefix=/opt/android-ndk/toolchains/arm-linux-androideabi-4.6/pr
ebuilt/linux-x86/bin/arm-linux-androideabi- --sysroot=/opt/android-ndk/platforms/and
roid-3/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon' --extra-ldf
lags=-L../x264 --enable-version3 --enable-gpl --disable-doc --enable-yasm --enable-d
ecoders --enable-encoders --enable-muxers --enable-demuxers --enable-parsers --enabl
e-protocols --enable-filters --enable-avresample --enable-libfreetype --disable-inde
vs --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmpeg --disabl
e-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-libx264 --e
nable-zlib
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[rawvideo @ 0xee5560] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from '/dev/graphics/fb0':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (RGBA / 0x41424752), rgba, 1088x1920, 25 tbr, 25 tb
n, 25 tbc
[buffer @ 0xef35a0] w:1088 h:1920 pixfmt:rgba tb:1/25 sar:0/1 sws_param:flags=2
[buffersink @ 0xef3810] No opaque field provided
Output #0, image2, to 'image_%05d.png':
Metadata:
encoder : Lavf54.6.100
Stream #0:0: Video: png, rgba, 1088x1920, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> png)
Press [q] to stop, [?] for help
frame= 2 fps=0.0 q=0.0 size= 0kB time=00:00:00.08 bitrate= 0.0kbits/s
frame= 3 fps=2.9 q=0.0 size= 0kB time=00:00:00.12 bitrate= 0.0kbits/s
frame= 3 fps=2.4 q=0.0 Lsize= 0kB time=00:00:00.12 bitrate= 0.0kbits/s
video:971kB audio:0kB global headers:0kB muxing overhead -100.000000%
/data/media/0 #
Getting three empty image_0000x.png files. First two about 480kB size and third about 8kB.
@Whiskey103's batch file does proper job with your recovery (s/s attached), so I'm guessing you could find a way if you have time and nerves to bear with my ignorance.
Sorry if doing stupid things, just ignore this post and I'll stop. You know I'm pretty much noob, but trying to learn when I have time and opportunity. It's also late and I had a long day at work. Sorry again.
Whiskey103 said:
For the ppl that wanted a solution for making screenshots in recovery on HTC ONE M7
Can be handy for troubleshooting/bugreports in Aroma or simply for recovery Themers
Download the ScreenshotFFMPEG_M7.rar
Plugin usb cable in recovery
Extract the package and run the screenshot_run_me_auto_ffmpegM7.bat
thx to Sneakyghost for the ffmpeg values
It runs the following code:
Code:
@echo off
echo ********************************************
echo * *
echo * ADB-Screenshot Util *
echo * Boot into Recovery *
echo * Plug In USB Cable *
echo * Enjoy ;) *
echo * *
echo ********************************************
echo.
pause
echo.
adb kill-server -d >nul 2>&1
adb pull /dev/graphics/fb0 fb0
ffmpeg -vframes 1 -f rawvideo -pix_fmt rgba -s 1088x1920 -i fb0 screenshot.png
del fb0
echo.
echo ********************************************
echo * *
echo * Output saved as screenshot.png *
echo * *
echo ********************************************
echo.
pause
XDA:DevDB Information
*** Easy ADB solution for screenshots in recovery HTC ONE M7 ***, a Tool/Utility for the HTC One
Contributors
Whiskey103, Patrics83
Version Information
Status: Stable
Created 2013-08-04
Last Updated 2013-11-17
Click to expand...
Click to collapse
Wat klinkt dat toch grappig in het Nederlands
Sent from my HTC One using xda app-developers app
Whiskey103 said:
Thing is, it seems somewhat kernel depending, for example latest twrp embedded a different kernel and the screenshot function broke.
Worked on earlier versions, it's really hit or miss sadly.
Honestly I stopped looking into it coz i don't have time to keep checking the changes all the time and don't have proper kernel knowledge either.
Way above my head Sry.
Sent from my HTC One using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Same here
We need to fix encoding at kernel level for each device. That's why I dropped it too
@Whiskey103
I found the ffmpeg values for the 2013 Nexus 7. I have made a batch file from scratch to save screenshots to the computer. Can I use your idea, and post in the Nexus 7 forum?
makers_mark said:
@Whiskey103
I found the ffmpeg values for the 2013 Nexus 7. I have made a batch file from scratch to save screenshots to the computer. Can I use your idea, and post in the Nexus 7 forum?
Click to expand...
Click to collapse
Sure. Go ahead and pray that it keeps working on the next recovery version :/
Sent from my HTC One using XDA Premium 4 mobile app
--- deleted
New version in main thread
still work in progress
@Whiskey103 and others:
New update version
It adds command line options to disable/enable buffering and to set a custom padding
It also adds a better auto mode for padding
Please test it under adb shell. If your device fails, post the code from adb shell here and we'll try to fix it
--------- deleted as it seems like a dead thread ----
Check my main PhilZ Touch thread for the progress with this one
fb2png is now universal, hopefully
At least, until next devices start to break it again
thanks for all your hard works
Android has Modified Linux kernel under GNU GPL v2 which means manufacturer must share their kernels for devices when asked.
But... It is Huawei...
When other companies released their kernel sources, Huawei posted only text files.
Huawei Open Source MiniSite
MHA Open Source Text File
LON Open Source Text File
Text file:
Huawei Device Co., Ltd ("Huawei")is pleased to provide you the corresponding open source code of the device. If you want the code, please contact us with an email titled "Open Source Codes Issue" to [email_removed_against_spam_it_is_in_text_file_by_link]. Please note we may charge you the cost of physically performing source distribution like sending you a CD of the Open Source Codes, if you reqest. And the code download link will be ready soon.
I tried two times, sent emails, but nobody answered to me. It looks like Xiaomi did. They delayed posting code for 6 months and more. And there is nothing to do...
I am ready to sign a petition !
Sent from my MHA-AL00 using Tapatalk
Could you PM me the email?
Nvm, found it.
ante0 said:
Could you PM me the email?
Click to expand...
Click to collapse
It is in text file by link above
Anyway, i PM to you)
5[Strogino] said:
It is in text file by link above
Anyway, i PM to you)
Click to expand...
Click to collapse
Emailed them too now.
I guess, if they don't provide a source, we could ask GNU GPL for help
emailed to them, Hope I can get reply
I just sent them an email.
If you take time to actually read. They are "working on it"
LastStandingDroid said:
If you take time to actually read. They are "working on it"
Click to expand...
Click to collapse
So probably anytime from now to years in the future...
The Rollout of Nougat should be done end of First quarter, so i think it comes between april and may.
I have seen the new P10 and I loved it but came here to check how is Huawei behaving in terms of Kernel sources so devs can work on roms/mods. This post means that they wont give much facilities for this ?
Javi22 said:
I have seen the new P10 and I loved it but came here to check how is Huawei behaving in terms of Kernel sources so devs can work on roms/mods. This post means that they wont give much facilities for this ?
Click to expand...
Click to collapse
Chinese OEM's don't care for GPL.. If you are looking for a device with good development look elsewhere
liam_davenport said:
Chinese OEM's don't care for GPL.. If you are looking for a device with good development look elsewhere
Click to expand...
Click to collapse
Understand..sorry for little OT but although they dont release kernel, are there good mods possibilities using Xposed or this is like Xiaomi where xposed is very problematic with miui?
If not I would imagine that having a Huawei for 2 years or more is boring as you can't personalise too much
How do we help Huawei to release the 4.1.18 kernel source code ?
Code:
HWMHA:/data/data # uname -a
Linux localhost 4.1.18-g0ad0fb3 #1 SMP PREEMPT Tue Apr 11 12:25:26 CST 2017 aarch64
There is a kernel 3.10.90 source available for Honor-8 (FRD), which has similar device driver setup, but a different CPU (hi3650 vs. hi3660).
I could compile this kernel for FRD (with minor code editing), but the compilation for the hi3660 target failed because of some missing bit number
#define's and macros (for ppll2 and ppll3). If needed, these could be derived with relative ease by disassembling the respective functions in the current kernel:
Code:
HWMHA:/data/data # echo 1 > /proc/sys/kernel/kptr_restrict
HWMHA:/data/data # cat /proc/kallsyms | grep ppll
ffffffc000805e30 t xgene_pcppllclk_init
ffffffc000806668 t hi3xxx_multicore_ppll_disable
ffffffc0008067c0 t hi3xxx_multicore_ppll_enable
ffffffc0017a25b4 t hi3xxx_ppll_setup
ffffffc0017d4fb8 t __of_table_xgene_pcppll_clock
ffffffc0017d52d8 t __of_table_hi3xxx_ppll
ffffffc0018eaa70 d hi3xxx_ppll_ops
Another source of the hi3660 kernel code is hikey960 repository at https://github.com/96boards-hikey/linux , but it is missing many device
drivers necessary for the phone.
Both kernels also lack the Device Tree Spec (DTS) for Mate 9, although this one is readily available from the current kernel
Code:
HWMHA:/data/data # cat /sys/firmware/fdt > /storage/sdcard1/FDT
HWMHA:/data/data # exit
HWMHA:/ $ exit
# adb pull /storage/sdcard1/FDT
# dtc -o MHA.dts -O dts -I dtb FDT
Here is the beginning of the 500K MHA.dts file, providing all "MHA_TUGL_VN2" board configuration data:
Code:
/dts-v1/;
/ {
#address-cells = <0x2>;
#size-cells = <0x2>;
model = "hi3660";
compatible = "hisilicon,hi3660";
interrupt-parent = <0x1>;
hisi,boardid = <0x5 0x5 0x0 0x9>;
hisi,boardname = "MHA_TUGL_VN2";
hisi,modem_id = <0x3a001400>;
hisi,sub_platform_info3 = "Kirin960";
hisi,provider3 = "BALONG";
hisi,sub_platform_info2 = "Kirin960";
hisi,provider2 = "BALONG";
hisi,sub_platform_info1 = "Kirin960";
hisi,provider1 = "BALONG";
hisi,sub_platform_info0 = "Kirin960";
hisi,provider0 = "HUAWEI_K3";
hisi,platform_num = <0x4>;
hisi,gpu_arch = "mimir";
hisi,camera_arch = "platform_v110";
hisi,camera_arch_v120 = "platform_v120";
...
There is another good thing about the current 4.1.18 kernel: it includes the kexec syscall
Code:
HWMHA:/data/data # echo 1 > /proc/sys/kernel/kptr_restrict
HWMHA:/data/data # cat /proc/kallsyms | grep kexec
ffffffc0000c430c W compat_sys_kexec_load
ffffffc0000c430c W sys_kexec_file_load
ffffffc0000c430c W sys_kexec_load
ffffffc001766794 t setup_crash_kexec_post_notifiers
ffffffc0017d2092 t __setup_str_setup_crash_kexec_post_notifiers
ffffffc0017d6fa8 t __setup_setup_crash_kexec_post_notifiers
ffffffc001a75758 b crash_kexec_post_notifiers
so it should be possible to test a self-compiled kernel zImage without any flashing
https://wiki.archlinux.org/index.php/kexec
and using a bare ramdisk image (unspoiled by weird android stuff)
https://github.com/96boards-hikey/l-loader/blob/master/rootfs.tar.gz
Would it be possible to build a kernel module (like loop.ko) from the hikey960 repository?
Could such a kernel module be loaded into the kernel of the Mate 9?
st_voss said:
Would it be possible to build a kernel module (like loop.ko) from the hikey960 repository?
Click to expand...
Click to collapse
It is a pretty hardware-independent and generic module with stable ABI,
you can try a precompiled .ko from any aarch64 kernel for the same kernel version
(i don't know how strict do they check the version numbers).
Could such a kernel module be loaded into the kernel of the Mate 9?
Click to expand...
Click to collapse
We should check if there are any SELinux restrictions for loading modules, and how to work around them.
All the module infrastructure is compiled into the kernel
Code:
ffffffc000576198 T module_add_driver
ffffffc000576260 T module_remove_driver
...
Huawei currently does not use dynamic modules (probably to avoid the support nightmares)
Code:
HWMHA:/data/data # lsmod
Module Size Used by
HWMHA:/data/data # modprobe -av
modprobe: can't change directory to '/system/lib/modules': No such file or directory
I have compiled loop.ko in the hikey960 tree (modules are disabled there by default), but cannot insert it
Code:
HWMHA:/data/data # insmod /system/lib/modules/4.1.18-g0ad0fb3/loop.ko
insmod: failed to load /system/lib/modules/4.1.18-g0ad0fb3/loop.ko: Exec format error
HWMHA:/data/data # strace insmod /system/lib/modules/4.1.18-g0ad0fb3/loop.ko
...
getuid() = 0
geteuid() = 0
umask(0) = 0
umask(0) = 0
openat(AT_FDCWD, "/system/lib/modules/4.1.18-g0ad0fb3/loop.ko", O_RDONLY|O_CLOEXEC) = 3
finit_module(3, "", 0) = -1 ENOEXEC (Exec format error)
write(2, "insmod: ", 8insmod: ) = 8
write(2, "failed to load /system/lib/modul"..., 58failed to load /system/lib/modules/4.1.18-g0ad0fb3/loop.ko) = 58
write(2, ": Exec format error", 19: Exec format error) = 19
write(2, "\n", 1) = 1
...
HWMHA:/data/data # cat /proc/sys/kernel/modules_disabled
0
It was my error, because the loop driver is already in the kernel
Code:
HWMHA:/data/data # cat /proc/kallsyms | grep loop_ | grep trans
ffffffc0005804c0 T loop_register_transfer
ffffffc000580784 T loop_unregister_transfer
ffffffc00058362c t cryptoloop_transfer
ffffffc00170c620 R __ksymtab_loop_register_transfer
ffffffc00170c630 R __ksymtab_loop_unregister_transfer
ffffffc001739b20 r __kstrtab_loop_unregister_transfer
ffffffc001739b39 r __kstrtab_loop_register_transfer
PS. The problem is more complex, i can't also load other modules.
Code:
ffffffc000127b3c T sys_finit_module
...
It was my error, because the loop driver is already in the kernel
Code:
HWMHA:/data/data # cat /proc/kallsyms | grep loop_ | grep trans
ffffffc0005804c0 T loop_register_transfer
ffffffc000580784 T loop_unregister_transfer
ffffffc00058362c t cryptoloop_transfer
ffffffc00170c620 R __ksymtab_loop_register_transfer
ffffffc00170c630 R __ksymtab_loop_unregister_transfer
ffffffc001739b20 r __kstrtab_loop_unregister_transfer
ffffffc001739b39 r __kstrtab_loop_register_transfer
PS. The problem is more complex, i can't also load other modules.
Code:
ffffffc000127b3c T sys_finit_module
Click to expand...
Click to collapse
You are right. Loop support is already in the kernel.
And we can even use it if selinux is set permissive!
Code:
HWMHA:/data/data # losetup /dev/block/loop0
/dev/block/loop0: [1031e]:6429 (/data/magisk.img)
HWMHA:/data/data # mount -t ext4 -o loop /dev/block/loop0 /magisk
mount: '/dev/block/loop0'->'/magisk': Invalid argument
HWMHA:/data/data # setenforce 0
HWMHA:/data/data # mount -t ext4 -o loop /dev/block/loop0 /magisk
HWMHA:/data/data # mount | grep loop
/dev/block/loop0 on /magisk type ext4 (rw,seclabel,relatime,data=ordered)
st_voss said:
You are right. Loop support is already in the kernel.
And we can even use it if selinux is set permissive!
Code:
HWMHA:/data/data # losetup /dev/block/loop0
/dev/block/loop0: [1031e]:6429 (/data/magisk.img)
HWMHA:/data/data # mount -t ext4 -o loop /dev/block/loop0 /magisk
mount: '/dev/block/loop0'->'/magisk': Invalid argument
HWMHA:/data/data # setenforce 0
HWMHA:/data/data # mount -t ext4 -o loop /dev/block/loop0 /magisk
HWMHA:/data/data # mount | grep loop
/dev/block/loop0 on /magisk type ext4 (rw,seclabel,relatime,data=ordered)
Click to expand...
Click to collapse
What good exactly will it do us then? I'm lost in all that tech talk. Halp!
Device: Surface Pro 3
ROM: Bliss 713
Android x86 Nougat 7.1.3
I have created the following file named Vendor_1b96_Model_1b05_Version_0100.idc
Code:
##########################
#surface pro 3 n-trig pen#
##########################
# touch.deviceType = touchScreen | touchPad | pointer | default
touch.deviceType = pointer
# orientationAware
# touch.orientationAware = 0 or 1
touch.orientationAware = 1
# gestureMode
# Definition: touch.gestureMode = pointer | spots | default
touch.gestureMode = spots
#Extras
device.internal = 1
touch.size.calibration = geometric
I have placed it into the folder /system/usr/idc .
But the file is completely ignored.
I found this file naming info online somewhere.
Code:
#################
#filenaming info#
#################
#name the file Vendor_XXXX_Model_YYYY_Version_ZZZZ.idc
#Replace XXXX , YYYY and ZZZZ with the information from $cat /proc/bus/input/devices
#cat /proc/bus/input/devices
And here is my information.
Code:
#I: Bus=0018 Vendor=1b96 Product=1b05 Version=0100
#N: Name="NTRG0001:01 1B96:1B05 Pen"
#P: Phys=i2c-NTRG0001:01
#S: Sysfs=/devices/pci0000:00/INT33C3:00/i2c-1/i2c-NTRG0001:01/0018:1B96:1B05.0003/input/input28
#U: Uniq=
#H: Handlers=event12 mouse1
#B: PROP=0
#B: EV=1b
#B: KEY=c03 1 0 0 0 0
#B: ABS=1000003
#B: MSC=10
Can anyone push me in the right direction?
Thanks.
EUREEKA!!!
I've done it. Perfect surface pro 3 N-Trig pen support.
Just add the following two files to your /system/usr/idc folder and reboot
https://mega.nz/#!LYFBXQrY
https://mega.nz/#!eJkRWbJA
The problem was the name scheme for the idc files. If you look at the information inside my files and see how I ended up naming the files you will figure it out. Basically you do not need to actually write the word Vendor_ and Model_ you just write the vendor and model . Hope this helps somebody.
Decryption Key
Hey, I tired clicking those links, but it requires a decryption key. Could you possibly make it open or post the key here? Thanks!
https://mega.nz/#!eJkRWbJA!lbMSDuVRHFhWgtR00ScWZfguyN365fbx-0sRyG2xM9w
https://mega.nz/#!LYFBXQrY!w3fRnZri_nQqLS5w3p82oa8MnoGB43xdHlVunbE6Wio