AMLogic aml8726-mx TV BOX new PCB "HD18 v2.22"

Search This thread

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
16,773
40,456
Halifax
GT-i9250
Google Nexus 4
I don't know how to compile yet myself but it could help definitely.

I'll look into the nandenv stuff over the next couple days I'm off work. Thanks as always for looking into this stuff like you do. :)
 
Last edited:

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
16,773
40,456
Halifax
GT-i9250
Google Nexus 4
Did a little experimenting today using No Frills (nice simple CPU app with CPU state stats! good find!) and CPU-Z as well.

This thing behaves pretty weird. It seems the reported available frequencies 96-1512 MHz are pretty loose, so instead of only being able to use the ones listed like on most devices, you can put whatever you want as your min frequency (from 48 up, in multiples of 24) and it seems to accept it. For its own scaling it even appears to just count up by 24s from the min, and can use any frequency on that spectrum, regardless of the listed available frequencies, since I even went down to the board min of 48 MHz and watched it drop down there occasionally, and hit 72 and 120 on the way back up. This is also partly why the min seems to stay at 336 MHz despite setting it lower, they seem to artificially keep it at 336 unless load is extremely low even though it isn't a listed frequency, after which point it can drop down to the set min, but generally doesn't. Once you go above 336 MHz min then setting the min starts to work as expected.

From there it still doesn't follow the listed frequencies, and by triggering a bit of load you can see that the next step it tends to use is whatever your min is plus 432 MHz (even if the min is below their magic 336). Though the value floats, this almost seems to function like the interactive governor's hispeed_freq.

So for the first 4 here, 336 generally remains your min freq in practice, and from 408 on the min freq is as listed. We can use this table to decide where we want to raise the min to and keep it fluid while not raising it so high that it could potentially overheat and/or thermal throttle (not sure if this board has a temperature cutoff):
Code:
48 -> 504
96 -> 528
192 -> 624
312 -> 744
408 -> 840
504 -> 936
600 -> 1032
696 -> 1128

48 MHz is the only exception to the y=x+432 rule, and is off by 456 instead, maybe there's a minimum hispeed_freq hardcoded as well and it can't go below 504. Also, starting with 816 I couldn't trigger a hispeed_freq, likely because it exceeds the default max 1200 MHz. We also don't even need to stick to the list, like I said, we could set it to whatever we want keeping in mind the next step will be +432.

Now here's where it gets even weirder. The set max definitely isn't respected at all, not with any governor, it keeps to the board max of 1200, and even underclocking below that isn't followed, and can be exceeded. This is especially unusual since performance governor is basically supposed to keep it at whatever you set your max to, but I can set to 696 min, plus 816 max and still trigger the hispeed_freq of 1128 MHz. Even with conservative or ondemand it almost seems as though governor isn't respected either, it just follows the hispeed_freq rule when load is somewhere between 80 and 100%. Either something they rigged up at Amlogic, or the meson-cpu_freq driver is insane and doesn't follow any of the rules most do with respect to allowing the governor to fully influence things.

So the good news is the min is definitely respected, so we can greatly improve performance by raising it. The other trick will be seeing if the 1200 MHz max is set somewhere in the nandenv, and if that's the one that gets used over the userspace cpufreq file then maybe we can circumvent it. That and doing nanddumps to try again at adding init.d support in properly are my next tasks. :D
 
Last edited:

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
16,773
40,456
Halifax
GT-i9250
Google Nexus 4
Huh.. I rebooted today with 696 as my min and now the offset to the hispeed_freq seems changed to 480 as it keeps going to 1176, so I guess it can be a moving target as well.

Thinking about it at 432, I guess that makes sense counting from 336.. 768.. 1200. Basically it's got 2 steps above its min by default, maybe one more halfway between the hispeed and the max. Not sure where I want to set my min now, maybe halfway between their default first steps at 552. If we can increase the max that'll be especially nice mathematically.
 
Last edited:

moeez butt

Member
Oct 31, 2013
12
0
can any one tell how to repair HTC One X LCD backlight problem what tolls are required and where can i find these tools
 

BenniBenassi

Senior Member
Huh.. I rebooted today with 696 as my min and now the offset to the hispeed_freq seems changed to 480 as it keeps going to 1176, so I guess it can be a moving target as well.

Thinking about it at 432, I guess that makes sense counting from 336.. 768.. 1200. Basically it's got 2 steps above its min by default, maybe one more halfway between the hispeed and the max. Not sure where I want to set my min now, maybe halfway between their default first steps at 552. If we can increase the max that'll be especially nice mathematically.

I set both min and max to 1512000 and the box was on 1200MHz for 18 hours without any overheating or hickups or restarts.... and it seems more responsive... :cool:
 
  • Like
Reactions: osm0sis

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
16,773
40,456
Halifax
GT-i9250
Google Nexus 4
I set both min and max to 1512000 and the box was on 1200MHz for 18 hours without any overheating or hickups or restarts.... and it seems more responsive... :cool:

Yeah it definitely is more responsive. :)

I couldn't find anything in cat /dev/nand_env related to clk, in fact it started at b for me with batfull=

Trying to dump the mtd partitions now, did you use nanddump/nandwrite from here:
http://xdaforums.com/showthread.php?t=1247908

Or are there newer versions of the binary I should be using that you could direct me to? :good:

My system only came with nandread in /system/bin/.
 

BenniBenassi

Senior Member
Huh.. I rebooted today with 696 as my min and now the offset to the hispeed_freq seems changed to 480 as it keeps going to 1176, so I guess it can be a moving target as well.

Thinking about it at 432, I guess that makes sense counting from 336.. 768.. 1200. Basically it's got 2 steps above its min by default, maybe one more halfway between the hispeed and the max. Not sure where I want to set my min now, maybe halfway between their default first steps at 552. If we can increase the max that'll be especially nice mathematically.

Yeah it definitely is more responsive. :)

I couldn't find anything in cat /dev/nand_env related to clk, in fact it started at b for me with batfull=

Trying to dump the mtd partitions now, did you use nanddump/nandwrite from here:
http://xdaforums.com/showthread.php?t=1247908

Or are there newer versions of the binary I should be using that you could direct me to? :good:

My system only came with nandread in /system/bin/.

If you install the newest Busybox from the Play Store and use the Smart Install option, it will install nanddump etc. No need to fiddle around with those commands you mentioned, ... I have the package, but the Busybox is more complete.


To me, cat /dev/nand_env/ gives following, but maybe its because I included in build.prob this line:

ubootenv.var.nandargs=

This is the what it gives:

Code:
QU▲▀batfull_threshold=98 batlow_threshold=10 baudrate=115200 bootargs=root=/dev/
cardblksd2 rw rootfstype=ext3 rootwait init=/init console=ttyS0,115200n8 nohlt v
malloc=256m mem=1024m logo=osd1,0x84100000,720p bootcmd=run nandboot bootdelay=1
 bootfile=boot.img chipname=8726m6 console=ttyS2,115200n8 cvbscheck=setenv outpu
ttemp ${outputmode};if test ${outputmode} = 480i; then if test ${cvbsenable} = t
rue; then setenv outputtemp 480cvbs;fi;fi; if test ${outputmode} = 576i; then if
 test ${cvbsenable} = true; then setenv outputtemp 576cvbs;fi;fi cvbsenable=fals
e display_bpp=24 display_color_bg=0 display_color_fg=0xffff display_color_format
_index=24 display_height=480 display_layer=osd1 display_width=720 ethaddr=c4:4e:
ac:00:e2:47 fb_addr=0x84900000 gatewayip=10.18.9.1 hostname=arm_m6 ipaddr=10.18.
9.97 loadaddr=0x82000000 loadaddr_misc=0x83000000 machid=4e27 mmcargs=setenv boo
targs console=${console} boardname=m6_mbx nandargs=run cvbscheck;nand read aml_l
ogo 0x84100000 0 400000;setenv bootargs root=/dev/cardblksd2 rw rootfstype=ext3
rootwait init=/init console=ttyS0,115200n8 mac=${ethaddr} logo=osd1,0x84100000,$
{outputtemp},full androidboot.resolution=${outputmode} nohlt vmalloc=256m mem=10
24m a9_clk_max=1512000000 nandboot=echo Booting from nand ...;run nandargs;nand
read boot ${loadaddr} 0 600000;hdcp prefetch nand;bootm;run recovery netmask=255
.255.255.0 outputmode=720p outputtemp=720p preboot=get_rebootmode; clear_rebootm
ode; echo reboot_mode=${reboot_mode}; if test ${reboot_mode} = usb_burning; then
 tiny_usbtool 20000; fi; run upgrade_check; run updatekey_or_not; run switch_boo
tmode reboot_mode=charging recovery=echo enter recovery;run nandargs;if mmcinfo;
 then if fatload mmc 0 ${loadaddr} recovery.img; then bootm;fi;fi; nand read rec
overy ${loadaddr} 0 600000; bootm serverip=10.18.9.113 sleep_threshold=20 switch
_bootmode=if test ${reboot_mode} = factory_reset; then run recovery;else if test
 ${reboot_mode} = update; then run recovery;fi;fi testaddr=0x82400000 update=if
mmcinfo; then if fatload mmc 0 ${loadaddr} aml_autoscript; then autoscr ${loadad
dr}; fi;fi;run recovery updatekey_or_not=saradc open 4;if saradc get_in_range 0x
0 0x50 ;then msleep 500;if saradc get_in_range 0x0 0x50; then run update; fi; fi
 upgrade_check=if itest ${upgrade_step} == 1; then defenv_without reboot_mode;se
tenv upgrade_step 2; save; fi upgrade_step=2 usbnet_devaddr=00:15:18:01:81:31usb
net_hostddr=00:15:18:01:a1:3bcdc_connect_timeout=9999999999 usbtty=cdc_acm video
_dev=tvout cvbsmode=480cvbs has.accelerometer=0

And this is UART boot sequence logcat... in around 22 seconds, there are very interesting settings being handled....
 

Attachments

  • BOOTLOG_HD18_V2.22_Interesting.txt
    75.4 KB · Views: 96
Last edited:
  • Like
Reactions: osm0sis

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
16,773
40,456
Halifax
GT-i9250
Google Nexus 4
If you install the newest Busybox from the Play Store and use the Smart Install option, it will install nanddump etc. No need to fiddle around with those commands you mentioned, ... I have the package, but the Busybox is more complete.


To me, cat /dev/nand_env/ gives following, but maybe its because I included in build.prob this line:

ubootenv.var.nandargs=

And this is UART boot sequence logcat... in around 22 seconds, there are very interesting settings being handled....

Ah yes, mine does have the a9 clk max value too, just like yours, I just didn't notice it since it's actually part of the nandargs= variable, even without that extra build.prop line. Here it is cleaned up.

/dev/nand_env:
Code:
p^⌠τ
batfull_threshold=98
batlow_threshold=10
baudrate=115200
bootargs=root=/dev/cardblksd2 rw rootfstype=ext3 rootwait init=/init console=ttyS0,115200n8 nohlt vmalloc=256m mem=1024m logo=osd1,0x84100000,720p
bootcmd=run nandboot
bootdelay=1
bootfile=boot.img
chipname=8726m6
console=ttyS2,115200n8
cvbscheck=
 setenv outputtemp ${outputmode};
 if test ${outputmode} = 480i; then
   if test ${cvbsenable} = true; then
     setenv outputtemp 480cvbs;
   fi;
 fi;
 if test ${outputmode} = 576i; then
   if test ${cvbsenable} = true; then
     setenv outputtemp 576cvbs;
   fi;
 fi
cvbsenable=false
display_bpp=24
display_color_bg=0
display_color_fg=0xffff
display_color_format_index=24
display_height=480
display_layer=osd1
display_width=720
ethaddr=c4:4e:ac:02:45:67
fb_addr=0x84900000
gatewayip=10.18.9.1
hostname=arm_m6
ipaddr=10.18.9.97
loadaddr=0x82000000
loadaddr_misc=0x83000000
machid=4e27
mmcargs=setenv bootargs console=${console} boardname=m6_mbx
nandargs=
 run cvbscheck;
 nand read aml_logo 0x84100000 0 400000;
 setenv bootargs root=/dev/cardblksd2 rw rootfstype=ext3 rootwait init=/init console=ttyS0,115200n8 mac=${ethaddr} logo=osd1,0x84100000,${outputtemp},full androidboot.resolution=${outputmode} nohlt vmalloc=256m mem=1024m a9_clk_max=1512000000 nandboot=echo Booting from nand ...;
 run nandargs;
 nandread boot ${loadaddr} 0 600000;
 hdcp prefetch nand;
 bootm;
 run recovery
netmask=255.255.255.0
outputmode=576p
outputtemp=720p
preboot=
 get_rebootmode;
 clear_rebootmode;
 echo reboot_mode=${reboot_mode};
 if test ${reboot_mode} = usb_burning; then
   tiny_usbtool 20000;
 fi;
 run upgrade_check;
 run updatekey_or_not;
 run switch_bootmode
reboot_mode=charging
recovery=echo enter recovery;
 run nandargs;
 if mmcinfo; then
   if fatload mmc 0 ${loadaddr} recovery.img; then
     bootm;
   fi;
 fi;
 nand read recovery ${loadaddr} 0 600000;
 bootm serverip=10.18.9.113
sleep_threshold=20
switch_bootmode=
 if test ${reboot_mode} = factory_reset; then
   run recovery;
 else
   if test ${reboot_mode} = update; then
     run recovery;
   fi;
 fi
testaddr=0x82400000
update=
 if mmcinfo; then
   if fatload mmc 0 ${loadaddr} aml_autoscript; then
     autoscr ${loadaddr};
   fi;
 fi;
 run recovery
updatekey_or_not=
 saradc open 4;
 if saradc get_in_range 0x0 0x50; then
   msleep 500;
   if saradc get_in_range 0x0 0x50; then
     run update;
   fi;
 fi
upgrade_check=
  if itest ${upgrade_step} == 1; then
    defenv_without reboot_mode;
    setenv upgrade_step 2;
    save;
  fi
upgrade_step=2
usbnet_devaddr=00:15:18:01:81:31usbnet_hostddr=00:15:18:01:a1:3bcdc_connect_timeout=9999999999
usbtty=cdc_acm
video_dev=tvout cvbsmode=480cvbs has.accelerometer=0 digitaudiooutput=PCM 576poutputx=36 576poutputy=34 576poutputwidth=628 576poutputheight=514

Interesting little bits of script they have in there. I wonder if there's any way to get back to the nand prompt to enter some of them..

Now, the odd thing is that doing that cat or trying to cat /dev/nand_env > /sdcard/nand_env.txt or doing a nanddump to /sdcard with the package I already have seems to freeze my device. Is it required that you nanddump out to external storage since the nand is in use?

Also weird is that I have the latest stericson BusyBox smart installed but I don't see nanddump in the Applet List or /system/xbin/..

Edit: never mind, found it in the binary, it just isn't symlinked or mentioned in the installer app. ;)

That area of the bootlog where it accesses memory locations for clk target lock and so on IS rather interesting... I'd be afraid to brick my device though! :p
 
Last edited:

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
16,773
40,456
Halifax
GT-i9250
Google Nexus 4
Just going through the .rc files and noticed references to these:

/sys/class/mali_freq/max 333000
/sys/class/freq_limit/limit 0

My guess is freq_limit is what allows it to not use the proper scaling_available_frequencies

And if we can modify the mali max freq... :D

Edit: Was just reading some docs, and apparently the MALI 400 has a normal max of 500. Setting it directly in the shell didn't affect it. I'll try it on boot.

Edit: No effect on boot either.. Maybe it's just the userspace output of the kernel set max. If that's the case then a recompile would be required to alter it.
 
Last edited:

BenniBenassi

Senior Member
Just going through the .rc files and noticed references to these:

/sys/class/mali_freq/max 333000
/sys/class/freq_limit/limit 0

My guess is freq_limit is what allows it to not use the proper scaling_available_frequencies

And if we can modify the mali max freq... :D

Edit: Was just reading some docs, and apparently the MALI 400 has a normal max of 500. Setting it directly in the shell didn't affect it. I'll try it on boot.

Edit: No effect on boot either.. Maybe it's just the userspace output of the kernel set max. If that's the case then a recompile would be required to alter it.

Maybe the kernel can be patched without a recompile? I will look into it.
 
  • Like
Reactions: osm0sis

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
16,773
40,456
Halifax
GT-i9250
Google Nexus 4
Have you ever had to nandwrite those nanddump backups? I tried it with just nandwrite and it threw up a warning recommending -p to pad the images to pagesize. So then I did nandwrite -p and it wouldn't boot. Restoring with your sdcard image now.

Examined the original dumped kernel image and my repacked one and padded it out appropriately, going to try again.

My only worry is that the last padded portion is all FF, and that ubootenv is ALL "blank" FF hex data where I expected it to contain variables we could hack, making me think it's a placeholder for something else, like the OOB info. So I'm worried that we're in a bit of a catch-22: If we dump the OOB then we can't edit the ramdisk; if we don't dump the OOB then the device won't boot after the image is rewritten.

Dumping with nanddump definitely worked well, though I didn't use -b since I wanted an exact copy. Anyway, if you know a method to write the images correctly again then I can definitely do ramdisk mods on this thing.

Edit: Hmm even won't work when nandwriting the original boot.img back.. Maybe if I try to dd it back.. Bad news is all my backups are likely useless and I'll have to set it up from scratch. :(

Edit 2: dd was also a failed experiment. Not sure how to write things back now. Any help here would be appreciated.
 
Last edited:
  • Like
Reactions: BenniBenassi

relol

Senior Member
Feb 20, 2009
74
17
Hi, i have the same board version, 2.22 but my system ans usrdata have different sizes than yours. I managed to compile cwm for the first version of this board and it works fine, then i compiled it for my board and it doesn't backup, it starts but freezes. I actually flashed a spanish rom and the device works fine, also Xbmc-linux works nice.
I have uart cable but it's very difficult to use it having pads instead of pins on the board. I will look through uart to see what's happening with cwm.
Anybody can give me a hand on this? Thanks!
 
  • Like
Reactions: osm0sis

BenniBenassi

Senior Member
Have you ever had to nandwrite those nanddump backups? I tried it with just nandwrite and it threw up a warning recommending -p to pad the images to pagesize. So then I did nandwrite -p and it wouldn't boot. Restoring with your sdcard image now.

Examined the original dumped kernel image and my repacked one and padded it out appropriately, going to try again.

My only worry is that the last padded portion is all FF, and that ubootenv is ALL "blank" FF hex data where I expected it to contain variables we could hack, making me think it's a placeholder for something else, like the OOB info. So I'm worried that we're in a bit of a catch-22: If we dump the OOB then we can't edit the ramdisk; if we don't dump the OOB then the device won't boot after the image is rewritten.

Dumping with nanddump definitely worked well, though I didn't use -b since I wanted an exact copy. Anyway, if you know a method to write the images correctly again then I can definitely do ramdisk mods on this thing.

Edit: Hmm even won't work when nandwriting the original boot.img back.. Maybe if I try to dd it back.. Bad news is all my backups are likely useless and I'll have to set it up from scratch. :(

Edit 2: dd was also a failed experiment. Not sure how to write things back now. Any help here would be appreciated.

Let me know what did you want to write on the nand? I will try to write on my box.
 

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
16,773
40,456
Halifax
GT-i9250
Google Nexus 4
Let me know what did you want to write on the nand? I will try to write on my box.

This doesn't grab a correct kernel image:

dd if=/dev/block/mtdblock5 of=/sdcard/mtd5-boot.img;

These definitely grab the kernel since the sha1sums match and I can unpack it afterwards perfectly:

nanddump -f /sdcard/mtd5-boot.img /dev/mtd/mtd5;
dd if=/dev/mtd/mtd5 of=/sdcard/mtd5-boot.img


But the opposite doesn't seem to result in a device that boots at all:

nandwrite /dev/mtd/mtd5 /sdcard/mtd5-boot.img; #or whatever, I did it correctly at the time. ;)
dd if=/sdcard/md5-boot.img of=/dev/mtd/mtd5;

And this just goes black after the bootlogo:
dd if=/sdcard/md5-boot.img of=/dev/block/mtdblock5;


Edit: Apparently that FF stuff I noticed before is just how nand handles empty pages:
http://stackoverflow.com/questions/11279473/how-to-correctly-nandwrite-a-nanddumped-dump-with-oob

Luckily your restore sdcard still worked in all these circumstances. Pretty frustrating though.. if I can write the kernel back in a working fashion then I can mod the ramdisk. Any ideas?
 
Last edited:

BenniBenassi

Senior Member
This doesn't grab a correct kernel image:

dd if=/dev/block/mtdblock5 of=/sdcard/mtd5-boot.img;

These definitely grab the kernel since the sha1sums match and I can unpack it afterwards perfectly:

nanddump -f /sdcard/mtd5-boot.img /dev/mtd/mtd5;
dd if=/dev/mtd/mtd5 of=/sdcard/mtd5-boot.img


But the opposite doesn't seem to result in a device that boots at all:

nandwrite /dev/mtd/mtd5 /sdcard/mtd5-boot.img; #or whatever, I did it correctly at the time. ;)
dd if=/sdcard/md5-boot.img of=/dev/mtd/mtd5;

And this just goes black after the bootlogo:
dd if=/sdcard/md5-boot.img of=/dev/block/mtdblock5;


Edit: Apparently that FF stuff I noticed before is just how nand handles empty pages:
http://stackoverflow.com/questions/11279473/how-to-correctly-nandwrite-a-nanddumped-dump-with-oob

Luckily your restore sdcard still worked in all these circumstances. Pretty frustrating though.. if I can write the kernel back in a working fashion then I can mod the ramdisk. Any ideas?

/block/mtdblock can't work because it does not exist on this reference board.

cd mtd
root@android:/dev/mtd # ls
mtd0
mtd0ro
mtd1
mtd1ro
mtd2
mtd2ro
mtd3
mtd3ro
mtd4
mtd4ro
mtd5
mtd5ro
mtd6
mtd6ro
mtd7
mtd7ro
mtd8
mtd8ro
mtd9
mtd9ro

Maybe the writing can be done in uboot only? By sf command?

http://forum.androidgadget.co.uk/showthread.php?tid=174&pid=964#pid964

And connecting the UART to this box is not so hard, all you need are these test hooks for about 1.6 dollars:

EBAY TEST HOOK

And this excellent UART connector for around 2.6 dollars

EBAY UART

Here are instructions and UART layout.

And picture of my connection with these test hooks:

DSC_0118_zps8d7cd2ce.jpg
 

relol

Senior Member
Feb 20, 2009
74
17
/block/mtdblock can't work because it does not exist on this reference board.

cd mtd
root@android:/dev/mtd # ls
mtd0
mtd0ro
mtd1
mtd1ro
mtd2
mtd2ro
mtd3
mtd3ro
mtd4
mtd4ro
mtd5
mtd5ro
mtd6
mtd6ro
mtd7
mtd7ro
mtd8
mtd8ro
mtd9
mtd9ro

Maybe the writing can be done in uboot only? By sf command?

http://forum.androidgadget.co.uk/showthread.php?tid=174&pid=964#pid964

And connecting the UART to this box is not so hard, all you need are these test hooks for about 1.6 dollars:

EBAY TEST HOOK

And this excellent UART connector for around 2.6 dollars

EBAY UART

Here are instructions and UART layout.

And picture of my connection with these test hooks:

DSC_0118_zps8d7cd2ce.jpg

Thank you, i'm buying the test hooks but is there any homemade solution to work while i wait for the hooks to arrive? Thanks
 
  • Like
Reactions: BenniBenassi

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
16,773
40,456
Halifax
GT-i9250
Google Nexus 4
@BenniBenassi

I decided I'd at least figure out the why of it not working after nandwrite, so I redumped after writing. The differences are pretty obvious:

00000000-00003FF0 (0-16384) Blanked with FF
Correct data...
00008000-0000BFF0 (32768-49152) Blank with FF
Correct data...
00010000-00013FF0 (65536-81920) Blank with FF

Every second 16384 sized block of data is blank. :confused:

I wonder if another nandwrite would handle it better? Going to try that one from the other thread. I've also got this vague hope that commandline options could resolve it if we could figure it out.

The good news is that you can nanddump with -b or without and you still get the same image sha1sum, so there aren't any bad blocks to worry about (at least on my device).
 
Last edited:

BenniBenassi

Senior Member
@BenniBenassi

I decided I'd at least figure out the why of it not working after nandwrite, so I redumped after writing. The differences are pretty obvious:

00000000-00003FF0 (0-16384) Blanked with FF
Correct data...
00008000-0000BFF0 (32768-49152) Blank with FF
Correct data...
00010000-00013FF0 (65536-81920) Blank with FF

Every second 16384 sized block of data is blank. :confused:

I wonder if another nandwrite would handle it better? Going to try that one from the other thread. I've also got this vague hope that commandline options could resolve it if we could figure it out.

The good news is that you can nanddump with -b or without and you still get the same image sha1sum, so there aren't any bad blocks to worry about (at least on my device).

Try this app for Online Nandroid Backup:

https://play.google.com/store/apps/details?id=com.pommedeterresautee.twoborange3

It will make Nandroid Backup while you are booted, it does not need CWM.

You can try using images from there. These backups work, as I have flashed them back with my CWM.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Used Titanium Backup to convert all my downloaded GApps to system apps (renamed manually to the correct Stock ROM filenames) to save some space the other day.

    Also came across the following little gem.

    /system/etc/init.d/00dalvik2cache:
    Code:
    #!/system/bin/sh
    # chmod -R 755 /system/etc/init.d
    # osm0sis @ xda-developers
    
    # move the dalvik-cache to /cache to save space on /data
    busybox rm -f /data/dalvik-cache/*;
    busybox mkdir /cache/dalvik-cache;
    busybox chown system:system /cache/dalvik-cache;
    busybox chmod 771 /cache /cache/dalvik-cache;
    busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache;

    We've got a ton of space in our cache partition we don't use since we don't bother with OTAs, so why not? :good: :)
    2
    I've never managed to brick it harder than the Benni emergency sdcard could recover, so if the toothpick method for getting into sdcard recovery doesn't work for you I don't really have any other firsthand ideas.

    There was mention of building a cable to connect to the board directly, that could be your best bet. On the other hand, for time and effort these things only cost like $35 nowadays so.. might be more cost effective to just start fresh?

    omg, i was doing the short on the NAND chip ( pin 7 and 8 )right now with the benni bennasi method.
    first i formated the sd card with HDDRawCopy1.02Portable and MATRICOM_MX2_115_FULL_AUG_09_2013. deleted files on the sd card, copied two files ( from dextars-nandscrubber ), did the tooth pick method, ( no hdmi output yet ), then do again the benni benassi method on the sdcard, short the nand pin 7 and 8 for 10-15 secs and when i removed the screwdriver im using to short pin 7 and 8, the system booted on the green android loading , now its stuck at around 25% and still loading.. i wonder if its working or if its stuck. will follow soon.

    ---------- Post added at 11:32 PM ---------- Previous post was at 11:04 PM ----------

    omg, i was doing the short on the NAND chip ( pin 7 and 8 )right now with the benni bennasi method.
    first i formated the sd card with HDDRawCopy1.02Portable and MATRICOM_MX2_115_FULL_AUG_09_2013. deleted files on the sd card, copied two files ( from dextars-nandscrubber ), did the tooth pick method, ( no hdmi output yet ), then do again the benni benassi method on the sdcard, short the nand pin 7 and 8 for 10-15 secs and when i removed the screwdriver im using to short pin 7 and 8, the system booted on the green android loading , now its stuck at around 25% and still loading.. i wonder if its working or if its stuck. will follow soon.


    so after flashing with mx2-boot-recovery.zip , i have been able to install 1.1.5 and its running. i tought it was the end... thank you all for the forum
    2
    Alright I think this is finally to a point where it's a good base to tweak from! :D

    MX-g18ref-r3-osmod:
    http://v.ht/osmod or http://d-h.st/users/osm0sis/osmod

    ramdisk changes:
    - change mounting to via fstab to allow for all the tweaked mount options I wanted
    - enable adb over TCP on boot, triggered by DHCP IP address assignment on eth0 or wlan0, and/or the new service.adb.tcp.enable property
    - fix up broken permissions on a number of files allowing for proper tweaking of various sysfs entires (resulting in...)
    - increase the Mali-400 GPU max freq to 400 MHz where it should be (was 333)
    - increase the CPU scaling max freq to the board max of 1512 MHz (was 1200)
    - increase the CPU scaling min freq to 696 MHz so that things are actually fast (was 96)
    - tuned conservative governor to scale up more aggressively (thanks droidphile)
    - various VM and kernel tweaks (randomize_va_space, minfree, lease-break-time, entropy)
    - various TCP tweaks (buffer sizes and thresholds from latest CM, "reno" TCP congestion avoidance algorithm)
    - replace the crappy G-Box bootsplash with the "Android Open System" image.. ooh rainbows!
    - add init.d support service
    - add busybox, nandwrite, nanddump and flash_erase binaries to /sbin to make life easy (thanks stericson & _n0p_)
    - add my flash_image and netadb scripts to /sbin to make it even easier
    - add /sbin/osbootscript.sh to run even further/more complicated tweaks

    osbootscript.sh tweaks:
    - create /system/etc/init.d/ directory and set proper permissions if it doesn't already exist
    - disable /system/lib/egl/libGLES_android.so to force rendering on the Mali GPU driver (thanks BenniBenassi)
    - disable some unnecessary debugging (thanks franciscofranco)
    - tune deadline IO scheduler for better throughput
    - some tried-and-true queue tweaks from myself and some experimental queue/bdi changes (thanks BenniBenassi)
    - remount sysfs+sdcard with tweaked mount options to improve responsiveness
    - TCP tweaks to reduce network latency (thanks anarkia1976)
    - lowmemorykiller tweaks for fewer background processes
    - renice (ie. increase priority of) systemui and launcher to improve responsiveness (thanks boype)


    I also attempted to enable USB adb by adding a number of entries to the .usb.rc files and default.prop but unfortunately it still doesn't work. Also, even though we can set the scaling_max_freq to 1512 MHz successfully, it still appears to cap at 1200 MHz; apparently changes to the kernel source are required to remove this weird, hardcoded limitation.


    To Flash:
    Use my flash_image script or do it directly with the MTD-Utils linked here:
    http://xdaforums.com/showthread.php?p=40409361#post40409361

    After the first flash you'll always have access to both the MTD-Utils and my flash_image script from /sbin to make it easier in the future, and the netadb script will toggle adb over TCP if the adbd service ever stops or we come across some circumstances where it doesn't trigger automatically. :good:
    2
    The first one is my favorite :)

    Me too, though it's a lot to take in for the half-second it's displayed, and things get a little warped on my old 4:3 television. ;)

    My girlfriend wants the GTV one on ours, but I won't force the branding on anyone else. :p

    @BenniBenassi, what do you prefer?

    Edit: Using those MTD-Utils I simplified the commandline flashing process into a flash_image script:
    http://xdaforums.com/showthread.php?p=40409361#post40409361

    Things just got way easy! :D Doing a bit of testing, then I'll upload my modded boot.img which will also include all the MTD-Utils in /sbin/. :good:
    2
    Ah. No idea. Go for it. ;)

    i will try, but my kernel compilation skills are near to zero.
    :)