So I got this device but I don't like emulators stretching the image across the screen. There's a video aspect ratio setting but it doesn't seem to work.
Hoping for a solution I got the firmware here
http://www.jxdofficial.com/firmware (
A1000_20130531) It is looking like the same firmware when the device came but for some reason the camera doesn't work now.
Hoping maybe I can modify the firmware, I coded this PHP script for unpacking/packing. I can change the images but don't have any idea about IMG or RAP files. I'm sharing this incase someone can come up with a solution.
I'd like emulators to show 1x size centered on screen and without smooth effect. It would be nice if you could fix the camera as well. Then I also noticed files related to radio, unlocked the menu for it but it also doesn't work (despite headphones inserted) so maybe that can be fixed as well.
You can install EasyPHP for this. Put "A1000EN-UOA-BTR-YB20120406-8110C-100C-CG0307-NOFM.img" file from the firmware archive near this script. Uncomment "//imgExtract();" line and run it. It should create a DATA folder with all files inside. There's a folder named "0" in it. Keep that as backup, copy and rename the new one "HOME". Now you can modify files in HOME and repack. I suggest deleting "thumbs.db" files inside, they are probably unnecessary.
When you want to pack, comment that line back and then uncomment "//imgPack();" line and run the script. This should produce a "+A1000EN-UOA-BTR-YB20120406-8110C-100C-CG0307-NOFM.img" file in the same folder (Notice + in front).
!Warning: If you hadn't changed your firmware before, don't do this since the camera becomes broken.!
I hope someone can make use of this and solve my problems. There are a few bytes I don't know the meanings but packed firmware seems to work regardless. I'm guessing they are timestamps or something.
<html><head><style>body {font-family:sans-serif; font-size:12px; }</style></head><body><?php
set_time_limit(3000);
ini_set('memory_limit','300M');
//imgExtract();
//imgPack();
function imgExtract(){
if(!file_exists('DATA')) mkdir('DATA');
$content = file_get_contents('A1000EN-UOA-BTR-YB20120406-8110C-100C-CG0307-NOFM.img');
// u1=time?
$header = unpack('Vu1/Vfiles/Vsize/Vversion/Z16name',$content);
print_r($header);
$files = array();
$pos = 32;
for($n=0,$m=$header['files']; $n<$m; $n++,$pos+=32){
// u1=permission?(always 7) u2=subfolder+2(. & ..)? u3=always 26280336
array_push($files,unpack('vtype/vu1/Vu2/Vu3/Vsize/Vtime/Vstart/Z8id',substr($content,$pos,32)));
$files[$n]['path'] = 'DATA/'.$n;
}
for($n=0,$m=count($files); $n<$m; $n++){
if($files[$n]['type']=="1"){
mkdir($files[$n]['path']);
} else if($files[$n]['type']=="8"){
$data = substr($content,$files[$n]['start'],$files[$n]['size']);
file_put_contents($files[$n]['path'],$data);
} else {
exit('Unknown File Type!');
}
}
for($n=0,$m=count($files); $n<$m; $n++){
if($files[$n]['type']=="1"){
$list = substr($content,$files[$n]['start'],$files[$n]['size']);
$pos = 0;
while($pos<strlen($list)){
$data = unpack('Vid/Vend',substr($list,$pos,8));
$data = unpack('Vid/Vend/Z'.($data['end']-($pos+8)).'name',substr($list,$pos,$data['end']-$pos));
echo '<br/>'.$data['id'].' - '.($data['end']-($pos+8)).' - '.$data['name'];
if($data['name']!='.' && $data['name']!='..'){
rename($files[$data['id']]['path'],$files[$n]['path'].'/'.$data['name']);
$files[$data['id']]['path'] = $files[$n]['path'].'/'.$data['name'];
}
$pos = $data['end'];
}
}
}
}
function imgPack(){
$files = array();
$files[0] = array( 'type'=>1, 'parent'=>0, 'name'=>'HOME', 'path'=>'DATA/HOME', 'folders'=>1);
$f=0;
while($f<count($files)){
if($files[$f]['type']==1){
$files[$f]['folders']++;
$folder = scandir($files[$f]['path']);
for($n=0,$m=count($folder); $n<$m; $n++){
if($folder[$n]!='.' && $folder[$n]!='..'){
if(is_dir($files[$f]['path'].'/'.$folder[$n])) {
$type = 1;
$files[$f]['folders']++;
} else {
$type = 8;
}
array_push($files,array( 'type'=>$type, 'parent'=>$f, 'name'=>$folder[$n], 'path'=>$files[$f]['path'].'/'.$folder[$n], 'folders'=>1));
}
}
}
$f++;
}
$newH = '';
$newC = '';
$pos = 32 + (count($files)*32);
for($n=0,$m=count($files); $n<$m; $n++){
if($files[$n]['type']==1){
$size = 64;
$newC .= pack('VVZ24VVZ24', $n, 32, '.', $files[$n]['parent'], 64, '..');
for($a=0,$b=count($files); $a<$b; $a++){
if($files[$a]['parent']==$n && $files[$a]['type']==1 && $a!=$n){
$length = strlen($files[$n]['name']);
if($length<24) $length=24; else if($length<56) $length=56;
$size += ($length + 8);
$newC .= pack('VVZ'.$length, $a, $size, $files[$a]['name']);
}
}
for($a=0,$b=count($files); $a<$b; $a++){
if($files[$a]['parent']==$n && $files[$a]['type']!=1 && $a!=$n){
$length = strlen($files[$n]['name']);
if($length<24) $length=24; else if($length<56) $length=56;
$size += ($length + 8);
$newC .= pack('VVZ'.$length, $a, $size, $files[$a]['name']);
}
}
} else {
$size = filesize($files[$n]['path']);
$newC .= file_get_contents($files[$n]['path']);
}
$id = '<'.str_pad($n, 6, ' ', STR_PAD_LEFT).'>';
$newH .= pack('vvVVVVV', $files[$n]['type'], 7, $files[$n]['folders'], 26280336, $size, 0, $pos) . $id;
$pos += $size;
if($size%32>0) for($x=$size%32;$x<32;$x++){
$newC .= "\x00";
$pos ++;
}
}
$new = pack("VVVVZ16", 1383034158, count($files), 32 + strlen($newH) + strlen($newC), 67507472, 'EN-YB0406') . $newH . $newC;
file_put_contents('+A1000EN-UOA-BTR-YB20120406-8110C-100C-CG0307-NOFM.img',$new);
}
echo '<br/><br/>DONE!';
exit(0);