Android Tablets Forum banner
1 - 6 of 6 Posts

·
Registered
Joined
·
14 Posts
Preamble.
There are many Allwinner A10 / A13 cheap tablets these days. Some are more branded and there some "OEM" clones. Many of the hardware parameters are stored in Fat16 partition called BOOTLOADER (nanda usually) in form of script.bin/script0.bin. There is enough instructions here on other places on how to recover and modify these parameters. They are stored in binary form, but there is a so-called sunxi-tools on the github which can convert them to text ini files and back to binary.
On other forum I've found many people are having troubles with cheap Q88 (YeahPad A13) devices, which have a lot (really!) of various clones. Which look exactly the same, but have different hardware (like TS ICs, g-sensors, etc). Sometimes the require modifying script.bin to fix mirrored touch screen or adjust screen offset. This could be done and there are guides for this. You just need the sunxi-tools to do the trick and a working Linux system to run them.
I received a lot of requests asking for a help to convert script.bin<->script.fel. Seems like the most difficult part for most people are getting sunxi-tools from github and compiling them on linux. So I've decided to do that for them.

Compiled sunxi-tools.
I've grabbed them from github and compiled. Nothing special here really. Except for the I've slightly modified the makefile to do a static build of executables. I.e. all dependencies and libraries are "compiled-in". So you won't stuck with missing library error. Just grab the archive, unpack it, and run on any 32-bit (64 with ia32 libs will work too) GNU/Linux system.

Full arch, including sources (with my static options quick hack) can be downloaded here (as I can't attach it): http://www.multiupload.nl/JU28L19IW0

After doing a static compile, I've decided I could cross-compile it for ARM. To run directly from Android device! It was compiled with armv7a-hardfloat-linux-gnueabi-gcc-4.5.2, static linking again. See my next post in this thread for details.
Here are the tools compiled for ARMv7 with gcc: View attachment fexc-armv7-eabihf.zip View attachment nand-part-armv7-eabihf.zip
 

Attachments

·
Registered
Joined
·
87 Posts
oooooooooooohhhhhhhhhhh thank you very the facking mucho!!!!!!!!!!!!!!!
 

·
Registered
Joined
·
14 Posts
After doing a static compile, I've decided I could cross-compile it for ARM. To run directly from Android device! It was compiled with armv7a-hardfloat-linux-gnueabi-gcc-4.5.2, static linking again. Here we go:

Build log:
Code:
<br />
# make fexc<br />
armv7a-hardfloat-linux-gnueabi-gcc -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/ -static -Llibusb-1.0.9/libusb/.libs -o fexc fexc.c script.c script_uboot.c script_bin.c script_fex.c <br />
<br />
# file fexc<br />
fexc: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 2.6.16, not stripped<br />
Running from android smartphone: Font Screenshot Display device Multimedia Rectangle


To run it on a tablet/smartphone, you need to put it into executable dir, something like /system/xbin. This could be done with following commands from shell (adb or terminal emulator):
Code:
<br />
su<br />
busybox mount -o remount,rw /system<br />
busybox cp /mnt/sdcard/fexc /system/xbin<br />
busybox mount -o remount,ro /system<br />
fexc -h<br />
With that binary on your tablet, you can edit script.bin fex attributes directly from your tablet. Enjoy!

Download: View attachment fexc-armv7-eabihf.zip or Multiupload mirror: http://www.multiupload.nl/02Q0LHZLSU
 

Attachments

·
Registered
Joined
·
14 Posts
Thanks Passnet, that will come handy, especially the ARM binaries, I already had the Linux-x86 binaries compiled by myself.
I've eventually managed to compile it under Windows as well, using MinGW. NO WARRANTY that it works properly, but so far every file I've compiled/decompiled with it has matched what the Linux version produces byte by byte.
IMPORTANT : DO NOT USE REDIRECTION TO GET THE OUTPUT FILE! THE RESULTING FILE WILL BE CORRUPT! THIS IS WRONG:
Code:
fexc -I fex -O bin script.fex >script.bin
Use a full command line with both source and target files specified as arguments. This is correct:
Code:
fexc -I fex -O bin script.fex script.bin
I couldn't find how to attach even a small file here, so here's a link to a file hoster: fexc for Windows
 

·
Registered
Joined
·
4 Posts
I couldn't find how to attach even a small file here, so here's a link to a file hoster: fexc for Windows
Hi Lannig,

I would very much like to have your fexc-windows program to change video settings in the script.bin file in the bootsection of my Cubieboard.
File dropper has a wall installed that makes it hard to download the file (if it is there still that is), is there a way for me to download the program?
 

·
Registered
Joined
·
4 Posts
Lannig don't bother because I have found the file via an other forum.
For people who can't download the file via Lannig his download url try this alternative: https://dl.dropbox.com/u/65333261/fexc-windows.zip
I read in other forums that Windows notepad and wordpad corrupt the fex file so they can't be compiled again to working bin files later on.
People told me to use notepad++ instead of the others, notepad++ can be found here: http://notepad-plus-plus.org/

EDIT:
The fexc-windows.zip is for 32bit Windows in my case WinXP 32bit and it works.
I had trouble getting the program to do its job but got it working, I explain below how I did it.
Make a folder (directory) on your desktop and call it for example FEXC.
Next download the fexc-windows.zip and put it in your FEXC folder and unzip it in there.
You now have 3 files called; fexc.exe, BIN2FEX.BAT and FEX2BIN.BAT.
Now you copy your script.bin file from your bootpartition of your SDcard and put it in your FEXC folder.
Normally you must doubleclick on the BIN2FEX.BAT file and a DOS command box opens and that works but nothing more happens what ever I type in it.

So I modified the line inside the BIN2FEX.BAT file from "fexc -I bin -O fex %1 %2" to this line: "fexc -I bin -O fex %1 %2 script.bin script.fex", and after doubleclicking on the BIN2FEX.BAT file the script.bin file was decompiled to a script.fex file and I can open it now with notepad++.
Now before you change anything make sure you make an other folder in your FEXC folder called "old script.bin" and put your script.bin file in there otherwise you might change it by accident.
Modify your script.fex file with notepad++ until it is ready.
You need to modify the line in your FEX2BIN.BAT file from "fexc -O bin -I fex %1 %2" to this: "fexc -I fex -O bin %1 %2 script.fex script.bin".
Now doubleclick on the FEX2BIN.BAT file and you should have your new script.bin file in your FEXC folder!

I hope this info is useful for someone.
 
1 - 6 of 6 Posts
Top