*** Easy ADB solution for screenshots in recovery HTC ONE M7 *** - One (M7) Android Development

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

Related

[ROM] I9001XXKPU_XXKPH_OXAKP1 Oryginal Open

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

[KERNEL] [DEV] MTK6573 kernel improvement effort

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

[REF][DEV] Tweaks for i9003 list [UPDATE]

This is a list of all threads avaiable to our phone, using for ROM developer too...
i decided to post in general, becouse this is not developer threads, developer threads are done from developers and i'm a human no developer.
Adrenaline Shot v14 Universal ​What do these tweaks do?
the first improve is under /system/bin, replace 2 bin with leaked from ICS 4.0 , with GREAT EPIC improvement , 2 bins 're app_process and system_server.
app_process executes, and executes a runtime environment for a dalvik class
The system server is the core of the Android system and as described in the boot sequence post it is started as soon as Dalvik is initialized and running.
like all tweaks , this will add some /system/etc/init.d script , if kernel supports of curse
( for everyone using Gentoo, know init.d too )
the first one is 00remount
Code:
#!/system/bin/sh
#Partition mounts by Dsexton702
mount -o remount,noatime,nobh,nodiratime,nodelalloc,noauto_da_alloc,barrier=0 /system /system
mount -o remount,noatime,nobh,nodiratime,nodelalloc,noauto_da_alloc,barrier=0 /cache /cache
mount -o remount,noatime,nodiratime,delalloc,noauto_da_alloc,barrier=0 /data /data
This script will (re) mount the EXT4 partitions with some "tweaks", like noatime, nodiratime,delalloc and soso.. , speed increased in R/W
the second is 01kerneltweak
Code:
mount -t debugfs none /sys/kernel/debug
echo NO_GENTLE_FAIR_SLEEPERS > /sys/kernel/debug/sched_features
unmount /sys/kernel/debug
using NO_GENTLE_FAIR_SLEEPERS as schedule features, nothing to hard
the third 02journaling
provide to delete cache if its too big
the 4th is 03sysctl
Code:
#!/system/bin/sh
sysctl -p
This is simply call to sysctl ( parameters settings under linux kernel ), its under kernel tweak
the 5th is 04sysctltweaks
this will set a lot of utils things about kernel and its driver ( like governor ) , if people using ondemand it will set ondemand/up_threshold to 65 ( more responsive , but increase battery drain ) and ondemand/sampling_rate to 30000 ^^
05sdcardspeedfix
fixing READ_AHEAD_KB , suggest it will increase sdcard speed ( not too much )
06zipalign
provide to zipalign all /data/app/*.apk files, anything know to apk files are zip archive contains a lot of things, zipalign optimize this archive , major info at developer.android.com/guide/developing/tools/zipalign.html
07vacuum
this provide to "VACUUM" all *.db ( see SMS's DB, etc ... ) to rebuild all *.db better, increase performance too!
08ramscript
i never will use this, this is not designed for our phone IMHO it can be replace with superchanger ( see after )
/system/lib/libsqlite*
will replace sqlite's lib for better performance, sqlite has sync and async method, this will disable sync , theorically it will double the performance in I/O
/system/xbin
it simply provide a sqlite3 bin and zipalign bin, nothing tweaks
Click to expand...
Click to collapse
Thunderbolt tweaks ( this is not avaiable, i upload some script i've download a time ago )​/system/etc/init.d
s78enable_touchscreen_1
Code:
#!/system/bin/sh
#Touchscreen
#Configure touchscreen sensitivity
#Sensitive(Chainfire)
echo 7035 > /sys/class/touch/switch/set_touchscreen;
echo 8002 > /sys/class/touch/switch/set_touchscreen;
echo 11000 > /sys/class/touch/switch/set_touchscreen;
echo 13060 > /sys/class/touch/switch/set_touchscreen;
echo 14005 > /sys/class/touch/switch/set_touchscreen;
this is IMHO the best script i've ever seen , this will increase sensitivity of touchscreen
07sqlite_optimize
this will vacuum and re-index all db, better than Adrenaline's 07vacuum IMHO
S70darky_zipalign
Another zipalign script, useless
*bolt_siray*
this is not developer for our phone, this will working only with adeguate kernel ( we haven't )
S98CFS
it will provide a lot of tweaks using sysctl and kernel proc/ interface
S98system_tweaks
this is a lot of script unify in one script
i edit this to be "better" with our phone, i delete re-mount runtime , adrenaline's 00remount do it better
and modify this part:
Code:
# ==============================================================
# smartassV2
# ==============================================================
if [ -e /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq ]; then
echo "800000" > /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq;
if [ "`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq`" -eq 300000 ]; then
echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq;
else
echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq;
fi;
echo "800000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_wakeup_freq;
echo "85" > /sys/devices/system/cpu/cpufreq/smartass/max_cpu_load;
echo "75" > /sys/devices/system/cpu/cpufreq/smartass/min_cpu_load;
echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_down_step;
echo "0" > /sys/devices/system/cpu/cpufreq/smartass/ramp_up_step;
fi;
to have a correctly step for our processor
​
"after applied this , my phone morth into blonde, blue eyes galaxy Supersayan [cit.]
THIS IS THE ONLY MEMORY Manager, this provide a better ram manager by android, anyone know that Random Access Memory contains a kernel and all APP run, kernel are loaded in lowest address possible , and all app are loaded when open, android usually doesn't close this, for better speed when you re-open its, but if you have small RAM ( 512 MB too ) this will cause a lot of problem , superchange fix it!
i suggest to use 512HP Balanced ( or Performance ) with Bulletproof launcher + OOM FIX, Nullify lag work too
HOW INCLUDE THIS INTO MY ROM?
Poseidons ROM include this by ****ty init.d script, i suggest to delete and re-apply
if you are not ROM Developer is simple, download latest avaiable by link i provide at top and with ROOT-enabled ( check su ) and Script Manager ( or terminal emulator -> # su -> sh script_location ) follow the scripts guide, remember, using this can cause ( 0.01% ) bootloops, i suggest to use local.prop and init.rc integration
if you are a ROM Developer is more complicated than simple user, for stick you can use:
init.d script ( like poseidons )
local.prop and init.local.rc ( suggest ) under /data
build.prop
init.d script ( i do not see this, for me is the worst way to get it )
init.local.rc:
create a /data/init.local.rc contains
* This is for 512HP-Performance + Bulletproof
Code:
write /sys/module/lowmemorykiller/parameters/adj 0,3,6,10,12,15
write /sys/module/lowmemorykiller/parameters/minfree 2048,3584,19200,23040,24320,32000
# V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox.
# SuperMinFree Calculator & MFK Calculator (for min_free_kbytes) created by zeppelinrox also :)
#
# See http://goo.gl/krtf9 - Linux Memory Consumption - Nice article!
# See http://goo.gl/hFdNO - Memory and SuperCharging Overview ...or... "Why `Free RAM` Is NOT Wasted RAM!"
# See http://goo.gl/4w0ba - MFK Calculator Info - explanation for vm.min_free_kbytes.
#
# DO NOT DELETE COMMENTS. DELETING COMMENTS WILL BREAK UNINSTALL ROUTINE!
#
# BEGIN OOM_MEM_Settings
setprop ro.FOREGROUND_APP_MEM 2048
setprop ro.VISIBLE_APP_MEM 3584
setprop ro.PERCEPTIBLE_APP_MEM 1024
setprop ro.HEAVY_WEIGHT_APP_MEM 19200
setprop ro.SECONDARY_SERVER_MEM 19200
setprop ro.BACKUP_APP_MEM 23040
setprop ro.HOME_APP_MEM 1024
setprop ro.HIDDEN_APP_MEM 23040
setprop ro.EMPTY_APP_MEM 32000
# END OOM_MEM_Settings
# BEGIN OOM_ADJ_Settings
setprop ro.FOREGROUND_APP_ADJ 0
setprop ro.VISIBLE_APP_ADJ 3
setprop ro.PERCEPTIBLE_APP_ADJ 2
setprop ro.HEAVY_WEIGHT_APP_ADJ 4
setprop ro.SECONDARY_SERVER_ADJ 6
setprop ro.BACKUP_APP_ADJ 7
setprop ro.HOME_APP_ADJ 0
setprop ro.HIDDEN_APP_MIN_ADJ 9
setprop ro.EMPTY_APP_ADJ 15
# END OOM_ADJ_Settings
write /proc/sys/vm/min_free_kbytes 15360
write /proc/sys/vm/oom_kill_allocating_task 0
write /proc/sys/vm/panic_on_oom 0
write /proc/sys/vm/overcommit_memory 1
write /proc/sys/vm/swappiness 0
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/panic 30
# End of V6 SuperCharged Entries.
or build.prop way ( need a supplie init.d script )
i9003 tweaks​
01loopy
this will make phone more smoothness by renice ( change priority ) the main process will run
i suggest to set your launcher process here like:
Code:
### Launcher apps ###
renice -19 `pidof com.sec.android.app.twlauncher` # TouchWiz Launcher
renice -19 `pidof org.adwfreak.launcher` # ADW Launcher Ex
renice -19 `pidof org.zeam.core` # Zeam launcher
renice -19 `pidof info.tikusoft.launcher7`# Launcher 7
PART2
95allinone
This will provide a complete collection of tweaks avaiable, i hate this becouse, a lot of tweaks here are not implemented correctly , like:
Code:
#Part below here edited by me (changed values) Credits to Juwe11
if [ -e /sys/module/lowmemorykiller/parameters/adj ]; then
echo "0,1,2,4,6,15" > /sys/module/lowmemorykiller/parameters/adj
fi
if [ -e /sys/module/lowmemorykiller/parameters/minfree ]; then
echo "2560,4096,5632,10240,11776,14848" > /sys/module/lowmemorykiller/parameters/minfree
fi
if [ -e /proc/sys/vm/swappiness ]; then
echo "20" > /proc/sys/vm/swappiness
fi
zOOM zOOM :
Code:
echo "2560,4096,5632,10240,11776,14848" > /sys/module/lowmemorykiller/parameters/minfree
This is the same things that do superchanger, but this will be wrost for our phone IMHO
Code:
echo "20" > /proc/sys/vm/swappiness
the right value ( in my cases ) is 0, i haven't swap of anyway we dont have to have a swap!
Zipalign Runtime, it will just implemented by a lot of script, this is also the wrost IMHO zip align script i've never seen
Code:
for k in $(busybox mount | grep relatime | cut -d " " -f3) ; do
sync;
busybox mount -o remount,noatime $k;
done;
this will break 00remount script
Code:
for i in /sys/block/*/queue/scheduler ; do
echo "noop" > $i;
done;
if kernel support i suggest deadline
Code:
# Tweak kernel VM management
echo 0 > /proc/sys/vm/swappiness
echo 10 > /proc/sys/vm/dirty_ratio
echo 4096 > /proc/sys/vm/min_free_kbytes
??? WHAT? again?
Code:
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "cfq" > /sys/block/mmcblk0/queue/scheduler
see upper
Code:
echo "deadline" > /sys/block/mmcblk0/queue/scheduler
What? another change?
this is good:
Code:
# Copyright @ CRANIUM ROM
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
echo "0" > /proc/sys/net/ipv4/tcp_timestamps;
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse;
echo "1" > /proc/sys/net/ipv4/tcp_sack;
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle;
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling;
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes;
echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl;
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout;
echo "404480" > /proc/sys/net/core/wmem_max;
echo "404480" > /proc/sys/net/core/rmem_max;
echo "256960" > /proc/sys/net/core/rmem_default;
echo "256960" > /proc/sys/net/core/wmem_default;
echo "4096,16384,404480" > /proc/sys/net/ipv4/tcp_wmem;
echo "4096,87380,404480" > /proc/sys/net/ipv4/tcp_rmem;
#End Cranium Tweaks
Conclusion: 95allinone is simply a addiction of all tweaks avaiable in one script without any review and improves for our phone ( in this case, this work ), this will only increase the boot time and break others tweaks installed ( some )
99V6_Superchanger
DO NOT USE THIS, THIS IS EPIC FAIL INIT.D SCRIPT!
Code:
mount -o remount,rw /system
mount -o remount,rw /dev/block/mtdblock3 /system
mount -o remount,rw /dev/block/mtdblock6 /system
*facepalm*
in my terminal:
Code:
# su
# ls -la /dev/block/mtd*
ls: /dev/block/mtd*: No such file or directory
anyway this is not init.d script, this is v6 script , this is not compatible with init.d ,
PART3
Build.prop and android params
Listed partial by TheFrankestain, thanks
* YOU MUST ADD IT AT BOTTOM OF /system/build.prop and delete cache and reboot*
Code:
ro.ril.hsxpa=2
This will enable High-Speed_Downlink_Packet_Access and High-Speed Uplink Packet Access ( HSDPA and HSUPA )
Code:
ro.ril.gprsclass=10
gprs class, see this LINK
Code:
ro.ril.hep=1
0 meaning off, 1 activated
Code:
ro.ril.enable.dtm=0
Dual Transfer Mode , set 1 only if your network support it
Code:
ro.ril.hsdpa.category=8
Folllow this ( thanks to tnpapadakos )
Code:
#ro.ril.hsdpa.category :
# Cat 1 = 1.2 Mbit/s
# Cat 2 = 1.2 Mbit/s
# Cat 3 = 1.8 Mbit/s
# Cat 4 = 1.8 Mbit/s
# Cat 5 = 3.6 Mbit/s
# Cat 6 = 3.6 Mbit/s
# Cat 7 = 7.2 Mbit/s
# Cat 8 = 7.2 Mbit/s
# Cat 9 = 10.1 Mbit/s
# Cat 10 = 14.0 Mbit/s
# Cat 11 = 0.9 Mbit/s
# Cat 12 = 1.8 Mbit/s
# Cat 13 = 17.6 Mbit/s
# Cat 14 = 21.1 Mbit/s
# Cat 15 = 23.4 Mbit/s
# Cat 16 = 27.9 Mbit/s
# Cat 19 = 35.3 Mbit/s
# Cat 20 = 42.2 Mbit/s
# Cat 21 = 23.4 Mbit/s
# Cat 22 = 27.9 Mbit/s
# Cat 23 = 35.3 Mbit/s
# Cat 24 = 42.2 Mbit/s
# Cat 25 = 46.8 Mbit/s
# Cat 26 = 55.9 Mbit/s
# Cat 27 = 70.6 Mbit/s
# Cat 28 = 84.4 Mbit/s
Code:
ro.ril.enable.a53=1
a53 enabling
Code:
ro.ril.enable.3g.prefix=1
1 will show 3g prefix next to network signal
Code:
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
bitmask &
Code:
ro.ril.hsupa.category=6
See this:
Code:
#ro.ril.hsupa.category :
# Cat 1 = 0.73 Mbit/s
# Cat 2 = 1.46 Mbit/s
# Cat 3 = 1.46 Mbit/s
# Cat 4 = 2.93 Mbit/s
# Cat 5 = 2.00 Mbit/s
# Cat 6 = 5.76 Mbit/s
# Cat 7 = 11.5 Mbit/s
Code:
net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960
Redefinite TCP Standard size packet, it will increased overall speed
Code:
ro.ext4fs=1
will set ext4fs prop to android system, increased performance if you are under ext4
Code:
persist.sys.purgeable_assets=1
More speed!
Code:
persist.sys.shutdown.mode=hibernate
NOT COMPATIBLE FOR OUR PHONE, we have not hibernate shutdown mode
Code:
ro.ril.disable.power.collapse=0
is ultra-battery-life mode, when phone're sleeping
Code:
ro.ril.enable.cnap
Celler name presentation
Code:
debug.sf.hw=0
Render with GPU Apps ( see last #3 post for better info )
Code:
pm.sleep_mode=1
Permits better sleep mode ( battery ++ )
Code:
wifi.supplicant_scan_interval=150
Android ( when wifi on ) periodically scan for new network, you can set time between its for better battery when wifi on
Code:
windowsmgr.max_events_per_sec=150
Increase the max events record by windows manager , better scroll
Code:
debug.performance.tuning=1
video.accelerate.hw=1
GPU Tune for scrolling performance
Code:
debug.sf.nobootanimation=1
for me, not work, it will theorically disable boot animation for faster boot
Code:
ro.HOME_APP_ADJ=1
USE ONLY IF YOU DONT USE SUPERCHANGER
Code:
ro.lge.proximity.delay=25
mot.proximity.delay=25
decrease proximity delay for better experience
Code:
ro.sf.lcd_density=240
Simply not sense
Code:
ro.kernel.android.checkjni=0
disable check jni
Code:
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
increase media quality
WHICH GOVERNOR DO U USE?​( ref: Simba501 )
SEE THIS
Anyway i suggest:
- Smartassv2 if you want performance over less battery
- InteractiveX if you want battery over less performance
CAN ANY KERNEL DEVELOPER INCLUDE LULZACTIVE CPUFREQ-DRIVER IN OUR KERNELS? ITS THE PERFECT GOVERNOR , EITHER FOR BATTERY AND PERFORMANCE
EGL TWEAK!​Android header said:
Code:
#
# One line per configuration, of the form:
#
# D I TAG
#
# D: display (0: default)
# I: implementation (0: software, 1: hardware)
# TAG: a unique tag
#
# The library name loaded by EGL is constructed as (in that order):
#
# /system/lib/egl/libGLES_$TAG.so
# /system/lib/egl/lib{EGL|GLESv1_CM|GLESv2}_$TAG.so
#
in the stock ROM the egl.cfg is:
Code:
0 0 android
0 1 POWERVR_SGX530_125
what's meaning?
simply using cpu ( with gpu too ) to render all apps and system
if you modify to:
Code:
0 1 POWERVR_SGX530_125
it will use overall GPU render only, more fast and imho better Battery life because, CPU in our cases with overclock consume more than GPU
See original post: http://forum.xda-developers.com/showpost.php?p=14323192&postcount=8
Wow!! very good thread!! I am setting up a custom rom, could u tell me what of these could give my rom a better battery life? Thank u man!
luiseteyo said:
Wow!! very good thread!! I am setting up a custom rom, could u tell me what of these could give my rom a better battery life? Thank u man!
Click to expand...
Click to collapse
Battery life is influence by:
Running Apps
Governors do you use
Memory Manager ( #1 addicted )
If you set /etc/init.d script to set conservative governor and implemented v6 without any stupid app like facebook or bloatware samsung, and your battery seems infinite
in the past i used SCH Rom , its used only v6 and most important tweaks , without any stupid bloatware, battery seems very infinite ^^ like 2% in 5 hours under 2G network
Ok, sorry for my noob question but I am learning a lot of things this days.. where can I find a tutorial about how to set a governor or a frecuency by default in my kernel? Thank u very much
luiseteyo said:
Ok, sorry for my noob question but I am learning a lot of things this days.. where can I find a tutorial about how to set a governor or a frecuency by default in my kernel? Thank u very much
Click to expand...
Click to collapse
I'm noob too
for frequency are too kernel releated to be generalized,
or if you using XDA_Bam kernel
39frequency
Code:
#!/system/bin/sh
echo "300" > /sys/power/overclock_opp1
echo "600" > /sys/power/overclock_opp2
echo "800" > /sys/power/overclock_opp3
echo "1000" > /sys/power/overclock_opp4
anyway you can create init.d script like
40governorbattery
with:
Code:
#!/system/bin/sh
echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
and see if it stick ^^
Hi.
Are there codes that can remove or dissable the TouchUI aka TouchWiz interface on the i9003 and just use the android deffult launcher?
Another thing something that will easy-up my ram usage and allow more usable ram?
If so how do i implement them?
I just want to add a cool sound and audio tweaks using MagaBassBeats_Mod
First download the MagaBassBeats_Mod_9003.zip file from the xda forum.
Now copy it to the sdcard.
Reboot to the recovery mode.
Now select install from zip file and chose internal sdcard.
Search for the zip file, hit power button, and chose yes.
That's it now you can enjoy a great sound quality.
details from here

[BOOTANIMATION][HDPI] Nexus 5 Boot Animation for codina [480x800]

Hii there!
I just wanna share some Nexus boot-anims which I ported from several sources
I use bash (batch processing) & ImageMagick cmds to make these boot-anims
1. Nexus 5 (Kitkat) Boot Animation
bootanim_nexus-5-kk-default.zip, src: Nexus 5 [kitkat]All APPS , stock Walls , Bootanimation ,Fonts
bootanim_htc-one-google-ed.zip, src: [bootanimation] Google Edition Boot Animation
2. Nexus (Lollipop) Boot Animation
bootanim_nexus-5-l-small.zip, src: [BOOTANIMATION] Nexus 5 Bootanimations Collection
bootanim_nexus-5-l-large.zip, src: [BOOTANIMATION] Nexus 5 Bootanimations Collection
You can put one of them to /system/media and rename it to bootanimation.zip
Don't forget to backup ur old boot animation if you want to. You do it all at your own risk!
Note: How to make these boot-anims?
1. bootanim_nexus-5-l-small.zip
Create a new directory.. for example: bootanim. Extract the source (keyword: N7 Maxed, Manual Install) to bootanim/orig
Then, put this script to bootanim/make-bootanim.sh & execute it to generate bootanim/bootanim.zip
Code:
#!/bin/bash
echo "make-bootanim.sh by @nieltg"
echo
BOOTANIM_SIZE=480x208
BOOTANIM_CROP=1080x468
mkdir mod
# Adjust all pictures
if [ -n "${BOOTANIM_CROP}" ] ; then
cmd_crop="-gravity center -crop ${BOOTANIM_CROP}+0+0 +repage"
else
cmd_crop=
fi
for i in orig/part? ; do
conv_dir=mod/$(basename ${i})
mkdir ${conv_dir} ; echo "mkdir: ${conv_dir}"
for j in $i/*.png ; do
conv_target=${conv_dir}/$(basename ${j})
convert ${j} ${cmd_crop} \
-resize ${BOOTANIM_SIZE} ${conv_target}
echo "converted: ${conv_target}"
done
done
# Generate desc.txt
echo "${BOOTANIM_SIZE//x/ } 30" > mod/desc.txt
tail -n +2 orig/desc.txt >> mod/desc.txt
echo "written: mod/desc.txt"
# Pack bootanim.zip
( cd mod ; zip -0 ../bootanim.zip -r * )
echo "packaged: bootanim.zip"
rm -r mod
echo
echo done.
echo
2. bootanim_nexus-5-l-large.zip
The steps are same like bootanim_nexus-5-l-small.zip.. Extract the source (keyword: N7 Mod, Manual Install) to bootanim/orig
But, you have to make some adjustments with bootanim/make-bootanim.sh
Modify BOOTANIM_SIZE & BOOTANIM_CROP:
Code:
BOOTANIM_SIZE=480x320
BOOTANIM_CROP=
3. bootanim_nexus-5-kk-default.zip
The steps are still the same like bootanim_nexus-5-l-small.zip.. Extract the source (keyword: Boot Animation) to bootanim/orig
And.. like usual, you have to make some adjustments with bootanim/make-bootanim.sh
Modify BOOTANIM_SIZE & BOOTANIM_CROP:
Code:
BOOTANIM_SIZE=480x96
BOOTANIM_CROP=1080x216
Add codes for tail-animation after "Adjust all pictures" section:
Code:
# Tail animation
l=0
mkdir mod/part2
echo "mkdir: mod/part2"
for k in 90 72 50 30 15 ; do
conv_num=$((l++))
conv_target=$(printf mod/part2/%03d.png ${conv_num})
convert mod/part1/059.png \
-resize ${k}% -gravity center -background black \
-extent ${BOOTANIM_SIZE} ${conv_target}
echo "scaled: ${conv_target}"
done
convert -size ${BOOTANIM_SIZE} canvas:black mod/part2/00${l}.png
echo "created: mod/part2/00${l}.png"
And replace "Generate desc.txt" section:
Code:
cat > mod/desc.txt << __DESC
480 96 24
c 1 0 part0
c 0 0 part1
c 1 0 part2
__DESC
echo "written: mod/desc.txt"
4. bootanim_htc-one-google-ed.zip
The steps are still the same like bootanim_nexus-5-l-small.zip.. Extract the source (keyword: GoogleBootanimation768-signed.zip) to bootanim/orig
And.. still like usual, you have to make some adjustments with bootanim/make-bootanim.sh
Modify BOOTANIM_SIZE & BOOTANIM_CROP:
Code:
BOOTANIM_SIZE=480x100
BOOTANIM_CROP=768x160
Add codes for tail-animation which steps is described on bootanim_nexus-5-kk-default.zip
Then, add more codes for head-animation after "Tail animation" section:
Code:
# Head animation
l=0
mkdir mod/part3
echo "mkdir: mod/part3"
easing_tmp=$(mktemp)
# Easing for ActionScript
# Source: http://gizma.com/easing
python3 - > ${easing_tmp} << __PYFILE
import math
def ease (t,b,c,d):
t /= d/2
if (t < 1): return c/2*t*t*t + b
t -= 2
return c/2*(t*t*t + 2) + b
for i in range (0,25):
print ("%.2f" % ease (i,0,100,24))
__PYFILE
easing=$(cat ${easing_tmp})
echo "generated: ${easing_tmp}"
rm ${easing_tmp}
for k in ${easing} ; do
conv_num=$((l++))
conv_target=$(printf mod/part3/%03d.png ${conv_num})
convert mod/part0/000.png \
-modulate ${k} ${conv_target}
echo "brightness: ${conv_target}"
done
And replace "Generate desc.txt" section:
Code:
cat > mod/desc.txt << __DESC
480 100 24
c 1 24 part3
c 1 0 part0
c 0 0 part1
c 1 0 part2
__DESC
echo "written: mod/desc.txt"
I use Fedora 21 64-bit to build these boot-anims.. I think you should be able to build it too on ur Linux
These scripts use common tools, ex: bash, ImageMagick, python3 which usually have already installed
You can use this script to make a new boot-anims or if you want to improve these boot-anims,
you can modify the scripts and rebuild them using these scripts..

[HOWTO]Use ffmpeg on android

This is a quick tip about how to use FFmpeg on android.
- Download FFmpeg Android Java.
- Open it and put the commands properly on the text box and hit "Run".
Examples:
Mux two separate audio and video files into a single one
Code:
-y -i /sdcard/video.mp4 -i /sdcard/audio.m4a -map 0 -map 1 -codec copy /sdcard/result.mp4
Mux video and two separate audio streams
Code:
-y -i /sdcard/video.mp4 -i /sdcard/audio1.mp3 -i /sdcard/audio2.ogg -map 0:0 -map 1:0 -map 2:0 -codec copy /sdcard/result.mkv
http://cfc.kizzx2.com/index.php/muxing-audio-and-video-with-ffmpeg/
http://stackoverflow.com/questions/...eo-and-audio-from-another-video-mapping-issue
Much more commands on the original website: http://ffmpeg4android.netcompss.com/
FFmpeg documentation: https://www.ffmpeg.org/ffmpeg.html

Categories

Resources