Search Archive

Upgrading NEX4000 to NEX4100 - Work in Progress

By Covert_Death · Mar 24, 2015in NEX Series💬 624 posts👁️ 179,956 views
Page 19 of 25
Posted Jul 28, 2015 · 02:05 UTC#452

Ok I just tried to run the copy script function but it would not run. I also attached the contents of my usb at the time. 

 

Is Copy Script the correct function in the Write Programs Forcibly Menu?

 

post-116652-0-72846400-1438049066_thumb.jpg

 

post-116652-0-49758600-1438049099_thumb.jpg

 

shell.zip

Posted Jul 28, 2015 · 03:14 UTC#453

Also another note, I am wondering if Bluetooth Audio is not working in the cross update due to the Bootloader file not being in the update. As the x100 are on 1.0000 boot loader and the x000 are on .02000. Not sure at what point the boot loader helps with android as it seems to be different than the boot image.

Posted Jul 28, 2015 · 05:38 UTC#454

Ok added a good amount of all data discussed on the forum here:

 

https://github.com/bassrock/AVIC-NEX

 

Please create any pull requests with modifications!

Posted Jul 28, 2015 · 05:45 UTC#455

Something else that is interesting to note is that for the bluetooth audio cross-upgrade issue, I was able to use some of the new test mode features to get bluetooth audio to work in the test mode, bluetooth line test area by changing the Audio Codec to Digital, however these changes do not persist after exit and a reboot.

Posted Jul 28, 2015 · 05:53 UTC#456

[deleted post]

Edited Aug 05, 2015 by whatisbypass
Posted Jul 28, 2015 · 05:55 UTC#457

[deleted post]

Edited Aug 05, 2015 by whatisbypass
Posted Jul 28, 2015 · 06:05 UTC#458

Copy script must be on USB1 connection (/mnt/udisk), there is hardcoded paths inside libTestModeProxy.so:

      case 37:
      system("cp -rf /mnt/udisk/Copy_Script.sh /data/");
      if ( chmod("/data/Copy_Script.sh", 0x1FFu) == -1 )
      {
        _R6 = -1;
      }
      else
      {
        _R0 = system("sh /data/Copy_Script.sh");
        if ( _R0 == -1 )
        {
          _R6 = -1;
        }
        else
        {
          if ( _R0 & 0x7F )
          {
            _R6 = -1;
          }
          else
          {
            __asm { UBFX            R6, R0, #8, #8 }
            OutputDebugLogFunc(0x80000000u, "Copy Script return Value : %d (%d)", _R6, _R0);
          }
        }
        system("sync");
      }
      system("rm -rf /data/Copy_Script.sh");
      android__Parcel__writeInt32(v5, _R6);
      result = 0;

This library copies script into /data directory, changes rights (chmod) and executes this script, then removes it.

 

Also, TST_ProgramFunction::GetMediaVersion() checks existence of Copy_Script.sh and (SDCardDataVersion.txt or SDCardCWWVersion.txt). If I understand disassembly, SDCardDataVersion.txt must contain at least 2 bytes (up to 8 or 9 or 10, try all lengths), first byte is skipped during read, second byte (and all other bytes) must be greater then 126 (0x7E). This bytes later going into display (DATA [--------] under USB in your screenshot) and into system settings for unknown purposes. Also it seemed to me that some of these testmode functions can write right data of this file to card.

 

Just tried 10 bytes after the first 1. Still a no go.

Posted Jul 28, 2015 · 06:17 UTC#459

[deleted post]

Edited Aug 05, 2015 by whatisbypass
Posted Jul 28, 2015 · 08:44 UTC#460

[deleted post]

Edited Aug 05, 2015 by whatisbypass
Posted Jul 28, 2015 · 10:54 UTC#461

Good news. Scripts is working.

....

@AdamOutler script isn't working, but this can be my mistake, I forgot to convert line endings to unix variant (0x0A). I'll try later.

 

place semicolons at the end of each line and remove the shebang(#!) line at the beginning. Rely upon the executor itself. This will make it run as a one-liner.

Edited Jul 28, 2015 by AdamOutler
Posted Jul 29, 2015 · 01:28 UTC#462

@AdamOutler the script worked fine.

 

The dump of mine is located here: http://pastebin.com/BE7EELvh

 

I plan to do a dd of my 8000 later tonight. I also have a 4100 I will do as well, hopefully a dd works and will help you unbrick. Is the internal sdcard just /sdcard?

Edited Jul 29, 2015 by bass_rock
Posted Jul 29, 2015 · 02:09 UTC#463

3-part AVIC-8100 image inbound to https://builds.casual-dev.com/index.php?dir=random%2FAVIC%2F8100%2F

 

Max filesize is 4GB per file on FAT32, so I split it into 3GB chunks and I didn't know the entire size, so we have a 9-gig image uploading now.  The files should concatenate together, but they may contain an extra 512bytes at the beginning of .2 and .3.  I'm also uploading the script used to pull it. 

Posted Jul 29, 2015 · 02:23 UTC#464

3-part AVIC-8100 image inbound to https://builds.casual-dev.com/index.php?dir=random%2FAVIC%2F8100%2F

 

Max filesize is 4GB per file on FAT32, so I split it into 3GB chunks and I didn't know the entire size, so we have a 9-gig image uploading now.  The files should concatenate together, but they may contain an extra 512bytes at the beginning of .2 and .3.  I'm also uploading the script used to pull it. 

 

Oh dang cool! Is this from your bricked unit or an anonymous source?  I will wait then for the script to image my 8000 and my 4100, I also have access to a 4000 but not till the weekend.

Posted Jul 29, 2015 · 02:50 UTC#465

Oh dang cool! Is this from your bricked unit or an anonymous source? I will wait then for the script to image my 8000 and my 4100, I also have access to a 4000 but not till the weekend.

This is from my car.

 

You can reverse the IFs and OFs and change seek to skip to flash to your deck. I'm going to combine it all tomorrow.

Posted Jul 29, 2015 · 06:01 UTC#466

[deleted post]

Edited Aug 05, 2015 by whatisbypass
Posted Jul 29, 2015 · 23:29 UTC#467

@whatisbypass yes that should work. I just read up and looks like the NEX line supports NTFS so that should dump the whole image in 1 command.

 

Will try tonight as well as work interfered yesterday.

Posted Jul 30, 2015 · 00:39 UTC#468

I tried and ntfs and ext4, at least on my thumb drive and my 8100 deck, didn't show up in file maintenance and didn't work for copyscript.

 

There are a few partitions missing from my attempt last night so I'm trying again.

Edited Jul 30, 2015 by AdamOutler
Posted Jul 30, 2015 · 00:44 UTC#469

There are a few partitions missing from my attempt last night so I'm trying again.

 

 

Yea I noticed my attempt following your approach one of the files was completely 0 bytes.

 

Also a heads up, I believe the 8x units have 16gb internal cards.

Posted Jul 30, 2015 · 00:59 UTC#470

Hey guys, I have been following your progress the last few days and decided to finally register so I can thank you all for the work you're putting in to this.  As is likely the case with many x000NEX owners, I was quite frustrated to learn of the x100 series after purchasing my 8000 late 2014. It looks like you three, as well as several others, have put a big dent in getting AA working on the 8000.  That said, I would also like to offer my support.

 

It is my understanding at this point your goal is to fix the bluetooth issue, and, once resolved, continue along the testing/debugging process from there, right?  

 

I don't have a great deal of higher-level programming knowledge you all seem to posses, but I am comfortable enough with electronics, linux and android to send this to you without fear of creating a brick!  Actually... this sounds like a fun time!  Let me know if there's anything I can do!  Thanks again!

Posted Jul 30, 2015 · 01:19 UTC#471

Yea I noticed my attempt following your approach one of the files was completely 0 bytes.

 

Also a heads up, I believe the 8x units have 16gb internal cards.

Ah ha!!! That's it!

I formatted a different thumb drive (sacrificed my Ubuntu installer), and it worked with ntfs. The image is writing now.

Edited Jul 30, 2015 by AdamOutler
Posted Jul 30, 2015 · 02:20 UTC#472

Ah ha!!! That's it!

I formatted a different thumb drive (sacrificed my Ubuntu installer), and it worked with ntfs. The image is writing now.

 

Yep did/will do the same. However I ended up stopping it as it went past an hour. Any idea how long with these units a dd should take? Stopped mine after about an hour and only got 3.95gb.

Posted Jul 30, 2015 · 02:25 UTC#473

Hey guys, I have been following your progress the last few days and decided to finally register so I can thank you all for the work you're putting in to this.  As is likely the case with many x000NEX owners, I was quite frustrated to learn of the x100 series after purchasing my 8000 late 2014. It looks like you three, as well as several others, have put a big dent in getting AA working on the 8000.  That said, I would also like to offer my support.

 

It is my understanding at this point your goal is to fix the bluetooth issue, and, once resolved, continue along the testing/debugging process from there, right?  

 

I don't have a great deal of higher-level programming knowledge you all seem to posses, but I am comfortable enough with electronics, linux and android to send this to you without fear of creating a brick!  Actually... this sounds like a fun time!  Let me know if there's anything I can do!  Thanks again!

 

 

Right now the current even broader goal is to be able to modify the deck's software with a firmware update and get adb working. This will give us the ability to install other android apps, launchers, etc that will go even more into fixing the Android Auto issue and even maybe giving us the ability to write code for Wireless Carplay using an adapter etc..

 

The current task we are doing right now is creating a backup image of the internal SD card so that there is a full-proof way to restore a bricked unit, using a sd backup.

 

 

The one issue we are having with the software update modifications, is if you change the boot.img using our scripts, the deck will not boot afterwards, meaning we are missing a code signing somewhere.

Posted Jul 30, 2015 · 02:43 UTC#474

Yep did/will do the same. However I ended up stopping it as it went past an hour. Any idea how long with these units a dd should take? Stopped mine after about an hour and only got 3.95gb.

Mine turned off on its own after 1.5hr, it got 4.5GB

 

For 8gb, in 3gb chunks, it only took 20-30 minutes. I'm going to try breaking it up into 6-3GB chunks.

 

BTW, it did a 0gb to me once as well, on the same file. But that is the same script I used on the successful run. I purposefully didn't modify it and left those additional commands in place to ensure integrity.

Posted Jul 30, 2015 · 05:48 UTC#475

[deleted post]

Edited Aug 05, 2015 by whatisbypass
Page 19 of 25