Search Archive

Upgrading NEX4000 to NEX4100 - Work in Progress

By Covert_Death · Mar 24, 2015in NEX Series💬 624 posts👁️ 179,956 views
Page 16 of 25
Posted Jul 23, 2015 · 05:27 UTC#376

So tried to get into the test mode on the error screen and no go. 

 

And that 5000NEX sdcard looks like it may not be anything. It does not have a valid partition table (assuming ubuntu can read android partition tables). Which could explain the issues AdamOutler and I are having trying to boot from it.

 

Has anyone successfully used that image or the image on the different sites?

Posted Jul 23, 2015 · 07:06 UTC#377

[deleted post]

Edited Aug 05, 2015 by whatisbypass
Posted Jul 23, 2015 · 07:11 UTC#378

Are you speaking about avic_5000nex_sd.img?

$ fdisk -l avic_5000nex_sd.img

Disk avic_5000nex_sd.img: 7,5 GiB, 8068792320 bytes, 15759360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device               Boot   Start      End  Sectors  Size Id Type
avic_5000nex_sd.img1      1050624  1071103    20480   10M 83 Linux
avic_5000nex_sd.img2      1071104  1091583    20480   10M 83 Linux
avic_5000nex_sd.img3      1091584  3573759  2482176  1,2G  5 Extended
avic_5000nex_sd.img4      3573760 15042559 11468800  5,5G 83 Linux
avic_5000nex_sd.img5      1091585  1153023    61439   30M 83 Linux
avic_5000nex_sd.img6      1153025  1214463    61439   30M 83 Linux
avic_5000nex_sd.img7      1214465  2263039  1048575  512M 83 Linux
avic_5000nex_sd.img8      2263041  2525183   262143  128M 83 Linux
avic_5000nex_sd.img9      2525185  3573759  1048575  512M 83 Linux

Partition table entries are not in disk order.

If yes, you can use kpartx or mount original image using fdisk + mount offset: http://askubuntu.com/questions/445979/mount-sd-card-image-created-using-dd

 

I don't have a .img the file that I have is a .rar from you that I cannot extract. So i ended up dd'd that to the sdcard.

Posted Jul 23, 2015 · 07:19 UTC#379

[deleted post]

Edited Aug 05, 2015 by whatisbypass
Posted Jul 23, 2015 · 09:16 UTC#380


$ sudo fdisk avic_5000nex_sd.img
Disk: avic_5000nex_sd.img geometry: 980/255/63 [15759360 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: 83 513 0 1 - 522 127 16 [ 1050624 - 20480] Linux files*
2: 83 523 0 1 - 532 127 16 [ 1071104 - 20480] Linux files*
3: 05 533 0 1 - 1023 127 16 [ 1091584 - 2482176] Extended DOS
4: 83 1023 127 16 - 1023 127 16 [ 3573760 - 11468800] Linux files*
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: 83 533 0 2 - 562 127 16 [ 1091585 - 61439] Linux files*
2: 05 563 0 1 - 1023 127 16 [ 1153024 - 2420736] Extended DOS
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: 83 563 0 2 - 592 127 16 [ 1153025 - 61439] Linux files*
2: 05 593 0 1 - 1023 127 16 [ 1214464 - 2359296] Extended DOS
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: 83 593 0 2 - 1023 127 16 [ 1214465 - 1048575] Linux files*
2: 05 1023 127 16 - 1023 127 16 [ 2263040 - 1310720] Extended DOS
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: 83 1023 127 16 - 1023 127 16 [ 2263041 - 262143] Linux files*
2: 05 1023 127 16 - 1023 127 16 [ 2525184 - 1048576] Extended DOS
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: 83 1023 127 16 - 1023 127 16 [ 2525185 - 1048575] Linux files*
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused


 

osx output

Edited Jul 23, 2015 by gotofbi
Posted Jul 23, 2015 · 13:18 UTC#381

try unrar e /path-to/file.rar

 

here's the layout.

post-131243-0-97088500-1437657347_thumb.png

 

adamoutler@adamoutler-desktop:~/Desktop/avic$ fdisk -l ./avic_5000nex_sd.img 
 
Disk ./avic_5000nex_sd.img: 8068 MB, 8068792320 bytes
128 heads, 16 sectors/track, 7695 cylinders, total 15759360 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
 
                Device Boot      Start         End      Blocks   Id  System
./avic_5000nex_sd.img1         1050624     1071103       10240   83  Linux
./avic_5000nex_sd.img2         1071104     1091583       10240   83  Linux
./avic_5000nex_sd.img3         1091584     3573759     1241088    5  Extended
./avic_5000nex_sd.img4         3573760    15042559     5734400   83  Linux
./avic_5000nex_sd.img5         1091585     1153023       30719+  83  Linux
./avic_5000nex_sd.img6         1153025     1214463       30719+  83  Linux
./avic_5000nex_sd.img7         1214465     2263039      524287+  83  Linux
./avic_5000nex_sd.img8         2263041     2525183      131071+  83  Linux
./avic_5000nex_sd.img9         2525185     3573759      524287+  83  Linux
 
Posted Jul 23, 2015 · 16:30 UTC#382

Ah ok. Yes unrar on ubuntu worked, but not the utility I had on my mac. Will try again tonight.

Posted Jul 23, 2015 · 23:00 UTC#383

Ah ok. Yes unrar on ubuntu worked, but not the utility I had on my mac. Will try again tonight.

 

If you downloaded same file that I downloaded, its rar5 archive and I believe theres no good utility to unpack except official 'unrar'

http://www.rarlab.com/rar/rarosx-5.3.b1.tar.gz

its command line tool by the way. 

Posted Jul 24, 2015 · 01:29 UTC#384

Ok good news!

 

I was able to successfully dd that sd card img after i got it to unrar.

 

I then popped it into my unit and it went to the Updating screen. At this stage nothing would happen and it sat on Update 0.00 -> 0.00, so I went to my computer loaded the 8000 1.10 onto a usb, unplugged the other sdcard and popped it into the USB 1. The deck then recognized the 1.10 update and began updating. 

 

The deck now boots normally and I can resume where I was! (Carefully modifying the init.rc).

 

 

One thing to note with this is that on the first boot with the sd card I didn't realize I still had my usb with the Testmode key in it. However on subsequent boots I removed that key and still got the Updating 0.00->0.00 screen.

Posted Jul 24, 2015 · 01:33 UTC#385

Ok good news!

 

I was able to successfully dd that sd card img after i got it to unrar.

 

I then popped it into my unit and it went to the Updating screen. At this stage nothing would happen and it sat on Update 0.00 -> 0.00, so I went to my computer loaded the 8000 1.10 onto a usb, unplugged the other sdcard and popped it into the USB 1. The deck then recognized the 1.10 update and began updating.

 

The deck now boots normally and I can resume where I was! (Carefully modifying the init.rc).

 

 

One thing to note with this is that on the first boot with the sd card I didn't realize I still had my usb with the Testmode key in it. However on subsequent boots I removed that key and still got the Updating 0.00->0.00 screen.

Please share the sha256 of your rar and image for quality purposes.
Edited Jul 24, 2015 by AdamOutler
Posted Jul 24, 2015 · 01:36 UTC#386

Here is the shasum

 

f99aacce6347d2c4835fa63b413ed198f0b7fb92  /Users/daniel/Desktop/avic_5000nex_sd.img

2c4962326c1b2ccebd715a22f33c2772e0670c93  /Users/daniel/Downloads/avic_5000nex_sd.rar

 
Posted Jul 24, 2015 · 01:43 UTC#387

So whats also interesting is that I now get a map license error and my motorized screen will not work. The options are there for the cd and sdcard, clicking on them does nothing, and the options for the motorized screen are greyed out. 

 

It's like there is something saved from the sdcard image (which was not a 8000). 

Edited Jul 24, 2015 by bass_rock
Posted Jul 24, 2015 · 02:10 UTC#388

So whats also interesting is that I now get a map license error and my motorized screen will not work. The options are there for the cd and sdcard, clicking on them does nothing, and the options for the motorized screen are greyed out.

 

It's like there is something saved from the sdcard image (which was not a 8000).

Sounds like DRM. The deck is likely initialized with some special keys from the factory.

 

Try flashing the original SD Image once again, then perform all available updates even if they are redundant. It's possible one could contain a default DRM.

 

Also, ensure you flash a totally stock image and not modified.

Posted Jul 24, 2015 · 02:15 UTC#389

Yep. I did the updates a few times. Now I am trying a force write with the Testmode keys. 

 

The next idea if that that does not work is to try and dd the right images from the update to the right partitions to on the SD which mean we need to know the right mappings

Posted Jul 24, 2015 · 06:20 UTC#390

[deleted post]

Edited Aug 05, 2015 by whatisbypass
Posted Jul 24, 2015 · 06:23 UTC#391

@bass_rock please tell what testmode keys are you using? How they work and so on?

 

Also, SDCard image contains partitions (with maps for example) that are not updated during firmware update, this partitions can contain device-specific settings.

 

Device must contain special hidden service menus for initial setup for CD/DVD and other hardware. I know this because our local pioneer authorized service replaced my internal SD card (8 months to do this simple thing) and after that CD isn't work, so they had to adjust CD settings in service menus.

 

 

I am using a test mode key provided by @rojc as I thought there was only one.

 

 

However I have done a few sdcards and they seem to all boot in my unit just fine and then can be updated. 

 

As for the local authorized shop, are you on a friendly enough level to get them to share the service menus? That would be awesome if so..

Posted Jul 24, 2015 · 06:56 UTC#392

Thanks to the kind support of @whatisbypass my original sd card now works again. I was able to use one of the TESTMODE Keys to put my device in recovery mode with the 5000 SD Card image installed. Once it booted into recovery mode each time, I put back in my original sd card, put the update on a usb drive and used the recovery mode options to write all the partitions. I now have my deck back to what is was.

 

This also confirms whatisbypass and AdamOutlers thoughts on DRM and custom data on the EXTDATA partition that does not get updated in a system update.  Other than that partition (which contains the nav maps, nav license, and some type of deck hardware settings) it looks like everything is on the images in the updates.

 

Now back to trying custom firmwares, since I can now get back to my original.

Edited Jul 24, 2015 by bass_rock
Posted Jul 24, 2015 · 07:20 UTC#393

[deleted post]

Edited Aug 05, 2015 by whatisbypass
Posted Jul 24, 2015 · 07:30 UTC#394

[deleted post]

Edited Aug 05, 2015 by whatisbypass
Posted Jul 24, 2015 · 09:12 UTC#395

[deleted post]

Edited Aug 05, 2015 by whatisbypass
Posted Jul 25, 2015 · 08:48 UTC#396

@bass_rock is your restored sd card is still password locked or not? If sd card without password lock, you can insert this card into PC and hack system :)

 

Also, there is a lot of system logs in log folder of data partition. Maybe this can help.

 

 

SD card IMG file with all partitions can be mounted on ubuntu as simple as 'kpartx -a avic_5000nex_sd.img'

 

 

 

Yes my restored sd card is locked.

 

 

The steps I used to restore my card is as follows:

 

  1. Remove Internal SdCard.
  2. Boot With the AVIC5000 SD Card Image
  3. Insert the testmode_n_2, TEST_MODE_N.key
  4. Boot To recovery mode
  5. power off unit.
  6. Remove internal sd card
  7. Boot Again with the test mode n 2 key
  8. Receive System Error. Let it sit here for about 30 seconds to be sure. (this seems to trigger the NOR Flash, not the sd card, to always boot in recovery until you write a file using recovery)
  9. Put original SD Card back in.
  10. Boot with the last OS update you used (i.e. if you used 5100 update last, put that on the USB stick) on the USB Port 2
  11. Write the platform files.
  12. Reboot normally.
Edited Jul 25, 2015 by bass_rock
Posted Jul 25, 2015 · 09:01 UTC#397

[deleted post]

Edited Aug 05, 2015 by whatisbypass
Posted Jul 25, 2015 · 09:22 UTC#398

I tried TestMode s with the value 6 inside it and it seems to have turned off warp (boot takes much longer).

 

the test mode a you proved me with does not do anything but I have a different one from @rojc that boots into the testmode.apk.   testmode_s with a value of 6 or 5 seems to just say the word Test Mode in yellow on the screen, otherwise the device behaves normally.

 

 

If someone has more experience with the test mode files and knows how to get read them and get different modes to boot, more than willing to try!

Posted Jul 25, 2015 · 09:35 UTC#399

[deleted post]

Edited Aug 05, 2015 by whatisbypass
Posted Jul 25, 2015 · 16:21 UTC#400

OK. So what we need now is to modify the kernel or the system to cause a script to execute "$(sleep 60;am start -n com.whatever.testmode/testmode) &". Which will go into a background task, wait 60 seconds and then launch an APK.

 

I can tell you what to type if you post the apk in question.

 

Bass, were you able to modify the kernel or system yet? We need an entry point for execution. The same technique will work on an Android Terminal Emulator.

 

I'm going to get started on bringing my system back to life again, then begin work on bringing up a terminal,

then root, then work on adb over Bluetooth or some sort of networking.

Edited Jul 25, 2015 by AdamOutler
Page 16 of 25