Related
I have attached all the files needed to do this on windows, mac, and linux at the end of this post. The creation of these apps, goes to the respective people, including Koush, JF, Infernix, and alansj.
Want to get rid of that t-mobile boot image?
Disconnect, over at Gotontheinter.net, has figured out how to do it using the new unlocked bootloader from the g1 dev phone. Below is a quote from the source. ( http://www.gotontheinter.net/node/9 )
"So you want to join the party and flash your own boot image, but its a weird undocumented format and you don't want to spend all year researching it in the source. Well, I'm here to help.
It is actually very simple. Start with an image you want to use, make sure it is 320x480 with 8bpp color. (In my examples, I'll use splash.png: PNG image data, 320 x 480, 8-bit/color RGBA, non-interlaced
Just make sure you have ImageMagick installed, and the utilities from the source build. (Specifically, rgb2565.)
$ convert -depth 8 splash.png rgb:splash.raw
# Make sure it is 460800 bytes long!
$ rgb2565 < splash.raw > splash.raw565
# Triple-check size before flashing! 307200 bytes
$ fastboot flash splash1 splash.raw565
$ fastboot reboot
Lets break it down. the convert turns it from a png (or any supported image format) into a raw 8-bits-per-color no-alpha data file. This file should be 460800 bytes - no more, no less.
Next, rgb2565 converts that file to a raw 565 16bit file (for the framebuffer on the G1.) This file is exactly 307200 bytes long - if its not, you messed up somewhere.
Finally, you use fastboot to flash the splash image and reboot. Instead of the B&W T-mobile logo, now you will see your custom splash screen. Congrats! "
Thanks to Infernix for the following extended how to:
1. find an image you like
2. edit it with your favourite editing suite and scale it to 320x480
3. after scaling it, convert the colorspace to 256 colors (8-bit)
4. Save it as a PNG without alpha channel/transparency.
5. Use the convert tool from the ImageMagick toolkit (use cygwin, or a linux box): convert -depth 8 splash.png rgb:splash.raw
6. Check that the splash.raw file is exactly 460800 bytes!
7. Compile the android tool called rgb2565 (gcc -O2 -Wall -Wno-unused-parameter -o rgb2565 to565.c)
8. Run the conversion command: rgb2565 < splash.raw > splash.raw565
9. Check that splash.raw565 is 307200 bytes. if it isn't, DO NOT FLASH IT ON YOUR PHONE. double-check your steps, something went wrong.
10. Boot your phone in SPL mode (hold camera +power).
11. After SPL shows, plug in USB connector/cord/whateva and push trackball or hit back. SPL restarts and now shows FASTBOOT.
12. If on windows, you need to install http://dl.google.com/android/android_usb_windows.zip
13. Compile android (see http://source.android.com/download) and make sure the fastboot binary (mydroid/out/host/*/bin/fastboot) is compiled (* being your OS)
14. use fastboot devices to check whether if your phone is showing up. if it isn't, try it as root (user might not have permission to access the usb device).
15. Double check that splash.raw565 is 307200 bytes. if it isn't, DO NOT FLASH IT ON YOUR PHONE.
16. Flash the splash image: fastboot flash splash1 splash.raw565
17. Reboot your phone to check: fastboot reboot
The instructions below are for users trying to flash their own boot image using windows.
The instructions below are also JF's work and not my own:
Instructions:
(note: you have to check the USB device in Computer Manager when the phone is in fastboot mode. The computer sees the phone in fastboot mode as a different device than the phone in normal mode)
Download the file and extract it in the same folder as adb. (if you don't have adb yet, it's included in the android SDK for windows. go download it!)
Take out the usb cable and boot up your phone into the SPL (back + power). You have to have the dev bootloader for this to work (white background with 3 skateboarding androids).
Plug in the usb cable, and make sure the display on the phone changes from "Serial0" to "FASTBOOT". If it doesn't, try pressing the back button.
If it asks you to install drivers, then go ahead and use the same usb drivers that you used to get adb working. You can skip the rest of the instructions. Fastboot should be working for you now.
If it doesn't ask you to install a driver, you need to figure out if the correct driver is loaded already.
Right click on My Computer, and click Manage, then go to the device manager
If you see an "ADB Interface" category at/near the top, with "HTC Dream" under it, then you're good to go. Fastboot should be working for you.
If you don't see an "ADB Interface" category, then it's likely that windows loaded the USB Mass Storage driver for it automatically. In the device manager, go down to "Universal Serial Bus Controllers", and see if you have at least one "USB Mass Storage device". If you have multiple ones, you'll need to go through each to find the correct one.
To find the correct one, right click on the USB Mass Storage device and click Properties. Go to the Details tab. In the combo box at the top that says "Device Instance Id", bring up the pull down and choose "Compatible Ids". If that is the correct device, then you will see 3 entries:
* USB\Class_ff&SubClass_42&Prot_03
* USB\Class_ff&SubClass_42
* USB\Class_ff
Once you find the correct device, go to the driver tab, and click "Update Driver". Choose "No, not this time", then "Install from a list or specific location", then "Don't search, I will choose the driver to install", and then choose the same usb driver that you used to get adb to work.
After that's done, you should be good to go. Open a command prompt and type fastboot devices and it should list the phone.
Here is a very good set of instructions for applying this to your phone if you haven't gotten it already: http://forum.xda-developers.com/showthread.php?t=467064
Additional Information
-
-
another way to convert to 565 raw, but from ANY format, is to use ffmpeg like so:
ffmpeg -i input.png -f rawvideo -pix_fmt rgb565 output.565
where input.png could be jpg, gif, tiff, etc. whatever you want.
-
-
credits for this goes to
Clone137
Heres some info about FFmpeg and where you can download it: FFmpeg
Stericson
“It won't work,” droned Marvin, “I have an exceptionally large mind.”
It's possible to modify the code to show a different startup animation: for example, the cylon strobing eye animation that was present up till Android V0.9.
Check out \frameworks\base\libs\surfaceflinger\BootAnimation.cpp. Just need to redeploy the one surfaceflinger file to see the changes.
Stericson, You ROCK!
I'm getting hung up at this line
fastboot flash splash1 g1-splash.rle
it says g1-splash.rle not found. what'd i miss? everything else has worked like a charm thus far.
Correction in instructions:
$ rgb2565 < splash.raw > splash.raw565
# Triple-check size before flashing! 307200 bytes
$ fastboot flash splash1 splash.raw565
$ fastboot reboot
Stericson said:
This file should be 460800 bytes - no more, no less.
Click to expand...
Click to collapse
460800 shall be the size of the file, and the number of bytes in the file shall be 460800. 460801 shalt not the size of the file be, neither shall the size be 460799, excepting that thou then append a byte to 460800.
460802... is right out.
Once the file size 460800, being the 460800th byte be reached, flasheth thou thy boot image onto the G1, who, being naughty in my sight, shall display it.
(note: please read the instructions, and don't actually flash a file that's 460800 bytes long. I had to take some artistic liberties here )
Ok, now the terminal just hangs on
< waiting for device >
Is the phone supposed to be in recovery? I've tried that, but have had the same results. I have the /system mounted and the phone is on a jailbroken RC30 (1.2). And it also is running the Dev 1 bootloader. Any helpful hints?
[edit]
when i do an 'adb devices', the phone is listed...
can I do this using windows? I made an image, with paint shop pro, and used convert to convert it to the raw format and it turned out to be 403,200 bytes, is that wrong? What did I do? Also, can I use rgb2565 on Windows? or do I have to run this in linux? Lastly, when using fastboot, do I boot my phone into the dev bootloader and connect to it via adb shell and then type that command?
Any help would be great!
OK let me extend the howto:
1. find an image you like
2. edit it with your favourite editing suite and scale it to 320x480
3. after scaling it, convert the colorspace to 256 colors (8-bit)
4. Save it as a PNG without alpha channel/transparency.
5. Use the convert tool from the ImageMagick toolkit (use cygwin, or a linux box): convert -depth 8 splash.png rgb:splash.raw
6. Check that the splash.raw file is exactly 460800 bytes!
7. Compile the android tool called rgb2565 (gcc -O2 -Wall -Wno-unused-parameter -o rgb2565 to565.c)
8. Run the conversion command: rgb2565 < splash.raw > splash.raw565
9. Check that splash.raw565 is 307200 bytes. if it isn't, DO NOT FLASH IT ON YOUR PHONE. double-check your steps, something went wrong.
10. Boot your phone in SPL mode (hold camera +power).
11. After SPL shows, plug in USB connector/cord/whateva and push trackball or hit back. SPL restarts and now shows FASTBOOT.
12. If on windows, you need to install http://dl.google.com/android/android_usb_windows.zip
13. Compile android (see http://source.android.com/download) and make sure the fastboot binary (mydroid/out/host/*/bin/fastboot) is compiled (* being your OS)
14. use fastboot devices to check whether if your phone is showing up. if it isn't, try it as root (user might not have permission to access the usb device).
15. Double check that splash.raw565 is 307200 bytes. if it isn't, DO NOT FLASH IT ON YOUR PHONE.
16. Flash the splash image: fastboot flash splash1 splash.raw565
17. Reboot your phone to check: fastboot reboot
This list together with instructions at http://www.gotontheinter.net/node/9 should get you going.
The tools mentioned here are commandline tools.
I have attached static versions of the tools mentioned for linux x86 to this thread. However I can't guarantee that they will work for you. they should, though.
A quick note: you can save directly to raw format from gimp or photoshop (allowing you to skip the imagemagick step). It just has to be 8-bit (which has been the default when I tried it).
Also, I attached rgb20565 and fastboot compiled for OS X 10.5.
Could someone upload the compiled binaries for Windows for those lazy people out there (me included)?
Here is the compiled binary for rgb2565
I don't have the compiled binary for fastboot, hopefully someone else will post it for you guys...I found it easier, way easier, to do this on a linux box.
After a bit of tinkering, i finally got it. The biggest problem i was having was that after i booted into the SPL, THEN i was supposed to connect the USB cable... i had it plugged in and then tried to boot SPL and nothing happened. Everything is great now. Big thanks
Thanks Stericson for the compiled rgb2565 file(for windows)
Can someone please upload the fastboot binary? I don't know how to compile it myself....Thanks a lot in advance for everyones previous hardwork on this and forthcoming.
to build the file yourself go to the root android source directory (mine is linux, but it looks like this "/home/ryan/android_source"), your's might look something like "C:/Source Codes/android/" or whatever. Once you navigate to that directory (via the command prompt... just go to start > run > and type in 'cmd' and hit enter, then use the 'cd' command to get there... e.g., "cd C:/Source Codes/android/"), once there, simply type 'make' and hit enter and it will start building everything, it might take a few minutes to complete. Then just go into the 'out' directory, then it's under "host/windows-x86/bin" (i'm not sure about the windows-x86 part, it might just be windows or something like it, i'm just assuming based on mine), once in that folder you'll have the fastboot as well as all of the other binary files ready to go. Then you can just type fastboot w/e w/e and it'll work just fine.
Here's my updated bootloader logo:
It's kind of difficult to see, my camera sucks... it's my fraternity letters with the crest in the background. Here's the image i used for it:
big head white robot guy
Id like to have the big head robot one in the first of this post, mind sharing the properly pressed,flipped,shook,stirred and what not, Id just like to dump the tmob splash, really anybody who has tried tested images attach them here, if you don't mind sharing...
just figured I'd ask as I didnt see any posted anywhere I don't always do so well at looking for stuff, at least thats what my wife is always b1tchen in my ear...
bhang
Ok, I'm sure I can do that, but now how do I get the android source onto my windows installation? Do I use cygwin? How, if so?
Thanks so much....
BTW, I've tried googling this, and still am, with no luck, thusfar.
Here's what I finally settled on.
Take 2...
Awesome, thanks for the help!
You mentioned that disconnect figured out how to do it with a dev bootloader - does this mean my rooted rc30 phone should be upgraded to a dev phone bootloader for it to work? Or will I be able to perform it on my modified rc30 v1.2 setup?
thanks
edit: nm, figured it out thanks! here's a pic:
Moderators, please permit me to leave the tablet's Korean name (Eden Midas: 이든 마이다스) here so it shows up in google searches (if you don't have Korean fonts, it will probably show as garbage, but it really does say "Eden Midas" in Korean script).
This thread is intended as a place to collect together information about the Eden Midas tablet. It's quite possible that we will eventually find that the internals are the same as one of the Chinese tablets using the RK2918 chipset, in which case the thread may just turn into a pointer to that other thread.
What is the Eden Midas tablet?
In the form I have it, an 8" tablet based on the RK2918 chipset, with ICS 4.0.3 and kernel 3.0.8+ (whatever the plus may mean). It's quite nice, with a very clean 1024*768 screen. But like most RK2198 builds, severely locked down and marketed just as an entertainment station. At present, it seems to be only sold online in Korea. My build is V1.0.1.IMK74K.eng.root_20120508.165508_HW:1.0.0.0 (I wonder if the HW stands for huawei??).
Rooting[\B]
This is all I've done so far. Here's what I did:
On Linux
What's needed:
You may need to have root privileges on your linux system (you will need to mount some filesystems, and edit a udev rule file - depends on the linux system who is allowed to do these). You will also need rk2918tools ( https://github.com/lamegopinto/rk2918tools) - these are tools collected by lamegopinto, credits inside to the original authors; specifically, you will need ivop's rkflashtool.
In theory, this shouldn't remove your applications, data, and settings. In practice, on my machine, it did. So I'd back everything up first. And take out any external sd card so it's safe. Also, I better warn that I had a few scary moments getting to here, so please make sure you have really good backups. You will need (on your linux system) copies of su, Superuser.apk and busybox.
Connect the tablet by USB to your linux machine (real or virtual). Put the tablet into fastboot mode by holding down the whole +/- key, then pressing the start key for about 3 seconds. Keep holding the +/- key for up to ten seconds. If the system boots or goes into the boot screen (android open robot icon) you need to try again.
On the linux system, type lsusb (if you get an error, you probably need to install usbutils - how you do this depends on the linux system). If you see 2207:290a, you are OK. If you see 2077:0000, you missed fastboot mode and need to try again.
Tell linux about your device. You need to install udev rules.
Code:
cd /etc/udev/rules.d
sudo pico 61-android.rules
then create the content
Code:
# USB devices
SUBSYSTEM=="usb",ATTRS{idVendor}=="2207",ATTRS{idProduct}=="0000",MODE="0666",GROUP="users"
SUBSYSTEM=="usb",ATTRS{idVendor}=="2207",ATTRS{idProduct}=="290a",MODE="0666",GROUP="users"
This is for fedora 17. On current ubuntu the priority number (the 61 in the file name) probably needs to be different (maybe 51?). In earlier systems, the udev rule format is different, you're going to need to google this. The above rules also include one for adb mode, which will probably turn out useful. If you want adb mode, you will also need to do this:
Code:
pico ~/.android/adb_usb.ini
and create the content
Code:
0x2207
Create a directory called MIDAS inside the directory where you stored the rkflashtools. You need to have probably 2 times the capacity of your sdcard available (if you have an 8GB internal sdcard, I'd aim for 16GB+ free). Go into that directory.
Use ivop's rkflashtool to retrieve the first 2K blocks of memory:
Code:
../rkflashtool r 0x0 0x2000 > headers
This will create a file called headers. It's a binary file, but the important bit is readable. Try
Code:
more header
to read it, and carefully note down the partition locations (note that the order parameter order is the opposite to what rkflashtool uses. [email protected] means that the partition consists of X blocks starting at Y. Whereas for rkflashtool, you specify "rkflashtool (r or w) Y X (< or >) filename". The numbers X and Y are in hex notation (that's what the 0x at the start means). Note also that the MIDAS has a different layout to the tablet Ivop was discussing).
Now retrieve all the other partitions from the device, giving them descriptive names. For root, the only one you will actually need should be system.img. But get the rest just in case, as backups... Please note that there seem to be some funnies with this device, and rewriting partitions often causes it to reinitialise everything. It's probably doing some checksumming... Please keep these image files safe, and don't edit them! But you can gzip them to reduce the space they take up. Please note also that the last partition - usually the user partition - goes to the end of your card. So you need to convert your flash card size into a hex number (e.g. 8GB is 0x200000000 bytes, or 0x10000000 512B blocks). Suppose the user partition starts at 0x32A000. Then you need to put its length as 0x10000000 - 0x32A000 = CD6000 blocks (you may need a hex calculator for this).
Download su, Superuser.apk and busybox (these are all public domain) into your MIDAS directory
Code:
cp system.img system.new.img
mkdir mnt
sudo mount -t ext3 system.new.img mnt
Copy su into mnt/xbin, busybox into mnt/bin and Superuser.apk into mnt/app (simplest is to use a file manager to do this - or use linux commands). At this point, your image is complete!
Code:
umount mnt
../rkflashtool w (the system partition address and length for _your_ system image, which might be different from mine) < system.new.img
../rkflashtool b
Disconnect the USB cables
Your system should now reboot. If you're lucky (I wasn't) it will reboot as a rooted system with all your files intact. If you're semi-lucky, it will reboot as a rooted system, but without your files. Hope your backups were good... If you're really unlucky, it won't reboot. You may need to recreate all partitions from the copies you just made above, and try again. If the system seems completely bricked, the reset button (the tiny pinhole in the back, just above the external sd card door) is your friend. Pressing it and going into fastboot mode can allow you to reload all your partitions (you did make those backup copies of all partitions, didn't you)?
On Windows[\I]
Sorry, I have no idea. If someone drafts a guide, I'm happy to put it up. Alternatively, you can easily install a ubuntu virtual machine inside your windows box. It will probably be easier, and the linux experience won't go astray in working with android anyway.
[Tun Drivers and Openvpn]
For some reason known only to themselves, the manufacturers have removed the Tun drivers from the ics kernel build. The kernel doesn't have the ability to load modules. (This makes sense for phones, maybe, but I can't understand why anyone would remove the ability to load modules in a tablet. Perhaps the Chinese government doesn't want it to be too easy for people to set up vpns?) Anyway, you can install what appears to be a suitable Tun module using Tun.ko installer. It installs OK but when you try to use it, the system freezes for about 10 seconds, then reboots. If anyone finds a version of the 3.0.8+ kernel (maybe 3.0.8- kernel would be a better name), suitable for the Midas and with either a built-in tun driver, or the ability to load kernel modules, please let me know.
Complete Reflashes
Not sure if there are any that will work right now. If you're really stuck, the cyanogenmod version for Cube might work, but it sounds like it is still a work-in-progress.
Do you have the kernel of the tab?
- Oma -
Oma7144 said:
Do you have the kernel of the tab?
Click to expand...
Click to collapse
Sorry, no - and sorry for the delay in replying, I didn't get notification for the thread.
Dump the firmware and upload the files: http://forum.xda-developers.com/showpost.php?p=35298423&postcount=462
- Oma -
I've had a pretty long journey so far trying to get these pictures back, and I feel like I'm really close but not quite there.
I attempted to flash JB onto my Galaxy Nexus and wound up in a bootloop. I had made a nandroid but did not back up the /sdcard/ folder...restored back to stock and my files were gone. Bonehead move, admittedly.
So, the past week has been how to get a dd image of the phone to try and do some file carving. I wound up soldering wires to the pins of the phone and using an adjustable 8V/2A max power supply to keep it running long enough to create a dd .img file on a usb thumb drive over an OTG cable. I've got said image, which is 30.7 GB (30,691,802,112 bytes), so I'm pretty confident I've got the entirety of the drive (used /dev/block/mmcblk0p12).
I wound up trying scalpel, photorec, foremost, and testdrive to see if I could pull the jpg files out, but so far nothing has proven helpful. I've got a ton of cached jpg images from web browsing/pandora album art/handcent compressed images sent via MMS, but absolutely nothing from the DCIM folder (had somewhere around 150 files in there in total).
I took a look at the scalpel carve settings and realized that while the first 3 hex values matched, the second 3 did not before the Exif data...
scalpel's default jpg setting:
# jpg y 200000000 \xff\xd8\xff\xe0\x00\x10 \xff\xd9
I had an old backup of my /sdcard/ so I compared headers of JPG files in there:
\xff\xd8\xff\xe1\x90\xb0 (older image, possibly taken with Droid X)
\xff\xd8\xff\xe1\x27\xab (newer image definitely taken with GNex)
So I changed the string in scalpel to be "\xff\xd8\xff???Exif" for the footer, which creates wildcards for the fourth through sixth values and then prompts for Exif data (as opposed to JFIF data, as most of the downloaded JPGs had, which weeded out a lot of "false positives").
I wound up getting far fewer values but most of them were images that had been sent over MMS (taken on that phone), so I know I'm on the right track. The part that is confusing to me is the footer...because the files I've looked at using "od -cb" which will do an octal export all have different footers...so I'm not sure if there's metadata that can change at the end of the files or what. I've tried using \xff\xd9 REVERSE (since apparently \xff\xd9 is the standard footer for JPG files) as the footer which provided results, just absolutely nothing out of DCIM. I also tried using no footer and grabbing the 2.5MB immediately following...got the same image files as the previous command except they were all 2.5mb in size).
Am I going crazy? Is DCIM not located on that block I got the data export out of (I can't think of anywhere else it would be other than /userdata/, which I believe is mapped to that block)? I find it hard to believe that I could recover files that most likely haven't been touched in months with no problems, but I can't recover picture files that were taken just before the partition got destroyed. I think something is either wrong with my header/footer specifications with regards to the JPG files generated specifically by the GNex (since apparently they vary when compared to other JPG images taken by phones and also amongst different images all taken by the phone) or I'm just missing something.
Any help is greatly appreciated.
Bump. Anyone mind collecting a few headers/footers off .jpg files taken by the stock Android camera from their Gnex? Might go a long way toward helping me.
Get it here http://forum.xda-developers.com/showthread.php?t=1392436
Good luck.
buzzcomp said:
Get it here http://forum.xda-developers.com/showthread.php?t=1392436
Good luck.
Click to expand...
Click to collapse
Resized pictures are basically worthless as any manipulation done to a picture has the potential to alter the header/footer info during the decompression/recompression process for the JPEGs (as I understand it). I need freshly taken with stock camera app on a Gnex full size picture headers/footers just to make sure I'm not missing anything.
od -bc <imagename> | head
That command can be run in android terminal to give the header. Really I'm just interested in the first 10 octals. For my phone it is the following:
377/330/377/341/047/253/105/170/151/146
377/330/377/341/105/253/105/170/151/146
(two different files with slightly different headers, but that's easy to compensate for)
The footer can be obtained by running the same command without the piped portion...it will take longer to run as it is doing an octal dump of the entire file. Here I would need the last 3 rows (45 octal groups) as I'm trying to figure out if there is in fact some sort of pattern to the footer (so far I haven't been able to identify one that works).
My footers (from three files) -
013/105/013/074/000/000/000/053/020/120/004/253/017/214/017/053
020/120/004/253/017/214/017/074/000/000/000/001/120/001/000/074
000/000/000/000/000/000/000/000/000/000/000/000/000/000/000/000
172/035/377/044/132/046/166/016/172/035/377/044/074/000/000/000
001/120/001/000/074/000/000/000/000/000/000/000/000/000/000/000
000/000/000/000/000/000/000/000/000/000/000/000/000/000/000/000
024/030/030/032/026/031/031/034/030/033/033/036/032/035/035/040
033/036/036/042/034/040/040/043/034/042/042/044/034/042/042/044
034/042/042/044/034/042/042/044/034/042/042/044/034/042/042/044
The last one differs greatly from the first two (which have been taken post-flash)...the last one is from April and was copied from the phone to Windows as a backup from that timeframe then copied back onto the phone.
However, I'm running AOKP at this point and was not earlier (when some of the pictures were taken), and the phone has been flashed since (the headers/footers here are from post-flash, not sure if flashing would affect headers/footers or the camera app somehow) so if I can get a bit more data to see if the ROM being used/the version of Android on the Gnex has any effect on the header/footer, and whether or not the 074/000/000/001/120/001/000/074/000 pattern is a footer of sorts for other people, it might help me figure out what's going on and to figure out why the footer pattern changed from April to today.
Great work so far! I'm interested in your progress. Keep us up to date.
Sent from my Nexus 7 using xda app-developers app
friend of mine running unrooted stock ROM gave me these -
$ od -b IMG_20110719_093821.jpg |head
0000000 377 330 377 341 210 036 105 170 151 146 000 000 115 115 000 052
0000020 000 000 000 010 000 007 001 017 000 002 000 000 000 004 110 124
0000040 103 000 001 020 000 002 000 000 000 012 000 000 000 142 001 032
0000060 000 005 000 000 000 001 000 000 000 154 001 033 000 005 000 000
0000100 000 001 000 000 000 164 001 050 000 003 000 000 000 001 000 002
0000120 000 000 002 023 000 003 000 000 000 001 000 001 000 000 207 151
0000140 000 004 000 000 000 001 000 000 000 174 000 000 001 124 116 145
0000160 170 165 163 040 117 156 145 000 000 000 000 110 000 000 000 001
0000200 000 000 000 110 000 000 000 001 000 013 210 047 000 003 000 000
0000220 000 001 000 351 000 000 220 000 000 007 000 000 000 004 060 062
$ od -b IMG_20110719_093821.jpg |tail
3377260 103 161 370 125 211 143 076 110 363 076 120 060 163 305 117 065
3377300 237 263 173 235 022 152 311 330 252 144 135 305 243 301 214 162
3377320 015 106 367 161 335 260 164 166 332 111 014 304 167 366 253 155
3377340 062 222 361 111 003 060 043 052 123 220 175 276 265 132 073 074
3377360 076 365 212 110 002 375 326 162 061 370 142 211 070 245 175 231
3377400 122 273 121 121 104 006 325 325 320 156 037 067 166 156 152 164
3377420 177 050 341 230 053 172 016 151 056 135 363 030 165 312 307 302
3377440 340 165 036 346 234 261 014 215 270 003 030 033 316 171 367 254
3377460 145 053 044 344 312 346 345 155 133 325 237 377 331
3377475
What's interesting is that I thought 337/331 was the standard footer for JPG files (at least according to scalpel's base configuration, it seemed to be)....but none of my files have this tail :/.
You are certainly braver than I.
I don't really know the details of how flash memory is laid out, but I seem to recall that some sort of wear levelling is typically used to prevent the same sectors from being repeatedly written and erased and wearing out with others left untouched. The structural layout of sectors may not actually match the logical layout of the file system. E.g. if you have a 20 MB Angry Birds apk file and then you upgrade it from Play Store, it might write the upgraded 25 MB apk on a less worn sector rather than rewrite it at the same spot. And the sectors containing app data aren't necessarily going to be the same all the time... they could "wander" from one region to another as a result of dynamic wear levelling.
So it's conceivable that if you had a bunch of photos sitting around for a long time, those sectors were the "least worn", and the moment the files were wiped, they became prime territory for writing new data. If the phone has booted a few times since the wipe, your photos may have been overwritten by app data, the dalvik cache, anything really.
Could the dynamic levelling lead to some scrambled files, where sectors containing deleted files are no longer interpreted as contiguous post-wipe?
And next time... use ADB over USB from CWM recovery to pull all your files before any drastic restore attempts
cmstlist said:
You are certainly braver than I.
I don't really know the details of how flash memory is laid out, but I seem to recall that some sort of wear levelling is typically used to prevent the same sectors from being repeatedly written and erased and wearing out with others left untouched. The structural layout of sectors may not actually match the logical layout of the file system. E.g. if you have a 20 MB Angry Birds apk file and then you upgrade it from Play Store, it might write the upgraded 25 MB apk on a less worn sector rather than rewrite it at the same spot. And the sectors containing app data aren't necessarily going to be the same all the time... they could "wander" from one region to another as a result of dynamic wear levelling.
So it's conceivable that if you had a bunch of photos sitting around for a long time, those sectors were the "least worn", and the moment the files were wiped, they became prime territory for writing new data. If the phone has booted a few times since the wipe, your photos may have been overwritten by app data, the dalvik cache, anything really.
Could the dynamic levelling lead to some scrambled files, where sectors containing deleted files are no longer interpreted as contiguous post-wipe?
And next time... use ADB over USB from CWM recovery to pull all your files before any drastic restore attempts
Click to expand...
Click to collapse
Your wear-leveling theory has been my fear. Most of photos were sitting on my phone since I got it (copied over from my Droid X), though some were taken 48 hours before I had my major screw-up. If it wasn't flashing the phone, it was probably the recovery process that hexamob pro did where it dumped like 20gb of jpg files onto my SD card. :/
I wasn't as savvy to adb as I am now (nor to many aspects of my phone...this whole thing, at worst, has forced me to learn a lot about the inner workings of it), and will certainly do that going forward...MTP is just utter shiat when it comes to copying files. I used to use SwiFTP and FTP into my phone to get the files to be backed up...but now that I know adb commands, I will go that route.
I've tried a few different recovery methods, but I think the next two I will try when I get some time are 377 330 377 ? ? ? 105 170 151 146 as the header (to eliminate the seemingly variable fourth through sixth octets but only pull files with EXIF data) and do a forward read with the standard jpg footer and a reverse read from 2.5, 2, 1.5, and 1 MB with the standard jpg footer. The forward read in scalpel takes the file from the header start to the first instance of the footer...the reverse read goes out the number of bytes specified and reads backward toward the header until it finds the footer...
I'm just really confused why there is what appears to be "pad data", or at least some kind of data, at the end of my JPG files. I'm wondering if some aspect of AOKP puts it there, as the head and tail of the file given to me by my buddy are from a stock ROMed phone.
i have made a similar issue with my sister-in-law nexus. i have been unsuccessful at getting dd image to otg usb because the battery doesnt last long enough.i did make a my backup backup file, but that was deleted during wipe and it didnt even cross my mind to copy before such. also because i was not used to non sdcard devices, my current phone is a thunderbolt.
is there a way to get it thru adb?
i formatted my otg udb to ext3 because it didnt work on fat due to file size limitations
is mmcbl0p12 all that is needed or should the dump be the whole mmcblk0?
have you tried any of the diskinternals apps? the reader or the recovery. (the link restriction prevents me from posting links. google is your friend for this)
i also have access to other tools and i am willing to to try them, but i still need to get may hands on that dump file.
any suggestions are welcome.
QuattroCS said:
i have made a similar issue with my sister-in-law nexus. i have been unsuccessful at getting dd image to otg usb because the battery doesnt last long enough.i did make a my backup backup file, but that was deleted during wipe and it didnt even cross my mind to copy before such. also because i was not used to non sdcard devices, my current phone is a thunderbolt.
is there a way to get it thru adb?
i formatted my otg udb to ext3 because it didnt work on fat due to file size limitations
is mmcbl0p12 all that is needed or should the dump be the whole mmcblk0?
have you tried any of the diskinternals apps? the reader or the recovery. (the link restriction prevents me from posting links. google is your friend for this)
i also have access to other tools and i am willing to to try them, but i still need to get may hands on that dump file.
any suggestions are welcome.
Click to expand...
Click to collapse
as far as i know, no way to get the dd image through adb because there's no way to get the phone to recognize your computer as a mount point...when you run adb shell you are running the entire command on your phone so something like "adb shell dd if=/dev/block/mmcblk0p12 of=C:\temp\sdbackup.img" or even replacing C with a mount point wouldn't work since you can't mount the computer as a mount point on the phone :/.
you could also format the usb drive to ntfs and load an ntfs capable kernel (i used samurai akira's) so you can work on the .img file in windows or linux. mmcblk0p12 is i think all that is needed as it is mapped to /device/ which should contain all of the pertinent data. i haven't tried diskinternals but am coming to the realization that hexamob probably screwed me by dumping 20GB worth of 1-50mb jpg files onto the SD card (because it couldn't dump them anywhere else) and i attempted recovery that way in a panic after it first deleted :/.
if you want that dd image you're gonna have to wire your phone up for external power the way i did it, as far as i know...no other way to go about it. instructions i found were here - http://www.droidforums.net/forum/galaxy-nexus-development/209149-backup-sd-partition-using-dd.html
how were you able to mount the dd image to use photorec. this is the point at which i am stuck at the moment.
QuattroCS said:
how were you able to mount the dd image to use photorec. this is the point at which i am stuck at the moment.
Click to expand...
Click to collapse
I never mounted the dd image, just ran recovery tools on the .img file itself. There are quite a few tools you can use...I had Ubuntu installed on a second partition so I used Linux tools for the most part (since the OS natively supports ext*). Scalpel and foremost were the two I had the most success with (in terms of number of files recovered...unfortunately I didn't actually get any picture files from my DCIM folder).
Unfortunately it looks like Hexamob probably killed any recovery efforts I had by writing 20gb of junk/repeated JPG files to the partition. I'm thinking it does something along the lines of a scalpel file carve but goes 50mb out from the header and reads backward (this is an option within scalpel) as I had a ton of small (64x64 pixel size, for example) JPG files that were close to 50mb in size.
EVERYONE STAY AWAY FROM HEXAMOB! If you lose files and really want them back, immediately turn off your phone and make a dd image as described earlier in this thread...then say a prayer to any deities you've heard of that the files might still be there in the file structure.
Live and learn!
Hi, having the same problem...
accidentally flashed with fastboot -w and stopped it when I saw it that it wants to wipe userdata, but the damage was already done.
Now everything on the sdcard is gone. I created a image using dd of /dev/block/mmcblk0p12
So far I couldn't restore any images using scalpel. I also tried looking for strings that should be in the image, like ID3 tags of mp3s and also can't find any. ( strings image; cat image | grep -i bandname ).
I saw that the sdcard folder is mounted using fuse. Maybe that's the problem, we first have to use fuse to get to the file?
Have you been restored your pictures in the end?
Thanks, Alex
alexonfire said:
Hi, having the same problem...
accidentally flashed with fastboot -w and stopped it when I saw it that it wants to wipe userdata, but the damage was already done.
Now everything on the sdcard is gone. I created a image using dd of /dev/block/mmcblk0p12
So far I couldn't restore any images using scalpel. I also tried looking for strings that should be in the image, like ID3 tags of mp3s and also can't find any. ( strings image; cat image | grep -i bandname ).
I saw that the sdcard folder is mounted using fuse. Maybe that's the problem, we first have to use fuse to get to the file?
Have you been restored your pictures in the end?
Thanks, Alex
Click to expand...
Click to collapse
I restored some pictures but none from the camera itself, just jpg files that had been downloaded (even after modifying the header/footers that were being carved). I have a very strong suspicion that the lack of recovered images is due to hexamob recovery and the way it restored files (it looks like it did a reverse from 50mb out which created a lot of 50mb jpg files that quickly filled up the sdcard, overwriting any pictures that may have been left on there).
You shouldn't need fuse to mount the image of the file to perform recovery provided the image is a full image file.
Just Realized Im in wrong thread .and don't know how to fix hopefully I will be moved to Q and A
This is just to help out people who may have had a hard time getting other guides to work like I had
I dont have original thread so i will give you my rough draft and will update when possible.
All steps work.
My working image link is at bottom of post
Here is were I made the mistake
http://forum.xda-developers.com/showthread.php?t=1745865
These are the 2 files
1.Galaxy-S-fre3-2.51.zip
2.Galaxy-S-fre3-MD4FirmwareModemAIO.zip
flashed first and wamo no andro
Ya my bad shouldnt have flashed firmware but i did and payed the price.
Heres my specs.
Android Ver:
4.3
Baseband Ver:
L710VPUCMK3
Build:
JSS15JL710VPUCMK3
Hardware Ver:
L710.14
haha, so im a knuklehead.
I thought i lost my device (this is still a bad-ass phone, almost too nice to be in a roofers pouch and getten torn up. But it takes really nice pictures of my custom work, and takes em fast so i can get back to work.
I lost 12 hours for stupid mistake,
Not to mention the last device i bricked was my first (Hero) and thought was my last.
The only life left in the device, was red light, when battery removed (when battery was placed in during charge, red light went out in 5 to 10 sec.)
When battery was in unit, no lights at all.
I noticed when usb cable attached to ubuntu, was some kind of Qualcomm Device _DLMODE or somthing.
I will edit this post when i find it again, but anyway that led to nothing.
My first attempts were made following this guide:http://forum.xda-developers.com/showthread.php?t=2369125
I couldnt figure out by reading the threads if how I was to format the fat32 partition default 8 or 4 or 1Mg
I couldnt understand why we would have to try to write the image over and over...Why it wouldnt write it right the first time.
I had a hard time trying to write the image file ..debrick_sph_l710.img to sdcard using my v-box..
(Virtual-Box under windows 8 with Ubuntu 13.10 installed ....Android-Kernel-Build ready ).
After trying all the different ways and different images, I said screw it i give up.
.........Till after dinner
wife made a roasted chicken not gonna be late.
Finally I made my own image from my wifes phone, because we bought them at the same time.
One problem hers isnt rooted and she wasnt about to let me touch it.............
Solution: I bought her a galaxy4 for 49.00 /w upgrade, now i have 2 galaxy 3's. But only one works.:/
That was a pain rooting because she always excepts the firmware upgrades when they come over air.
Couldnt get the "seLinux seAndroid" thing so i just went back to 4.1 for now so that i could adb.
Heres What Did It...
http://forum.xda-developers.com/showthread.php?t=2345860
HERES HOW I DID IT
To extract a de-brick image from your phone (an UnBricked Phone) do in an adb shell:
If you know the partition use:
dd if=/dev/block/mmcblk0 of=/sdcard/HomefixSprint_S3_L710.img bs=1048576 count=70
If not use:
dd if=/dev/block/platform/msm_sdcc.1/by-name/modem of=/sdcard/HomefixSprint_S3_L710.img bs=1048576 count=70
MY TERMINAL SHOWS:
C:\Users\dad>adb shell
[email protected]:/ # busybox dd if=/dev/block/mmcblk0 of=/sdcard/HomefixSprint_S3_L710.img bs=1048576 count=70
0 of=/sdcard/HomefixSprint_S3_L710.img bs=1048576 count=70 <
70+0 records in
70+0 records out
73400320 bytes (70.0MB) copied, 4.578239 seconds, 15.3MB/s
Take that image, copy it to your cygwin directory and write it to an unformatted 16mb sdcard using cygwin:
TO GET THE SDCARD READY:
get EaseUS Partition Master Free Edition-Free For Home Users
and find the sdcard, its about 14.82GB, if u have more than 1 your on your own.
Select that one, and delete all partitions.
Then, New partition, select fat32, and then finish by applying the operations.
IN CYGWIN:
Get sdcard info:
cat /proc/partitions
MY TERMINAL SHOWS:
[email protected] ~
$ cat /proc/partitions
major minor #blocks name
8 0 976762584 sda
8 1 976759808 sda1
8 16 117220824 sdb
8 17 358400 sdb1
8 18 116859904 sdb2
8 32 976762584 sdc
8 33 976759808 sdc1
8 48 244198584 sdd
8 49 244196001 sdd1
8 64 976762584 sde
8 65 976657408 sde1
8 80 976762584 sdf
8 81 976760001 sdf1
8 96 976762584 sdg
8 97 976760001 sdg1
8 112 976075776 sdh
8 113 976074752 sdh1
8 128 15558144 sdi
8 129 15558110 sdi1
[email protected] ~
$ ls
debrick_sph_l710.img
[email protected] ~
$ dd if=HomefixSprint_s3_L710.img of=/dev/sdi
143360+0 records in
143360+0 records out
73400320 bytes (73 MB) copied, 338.771 s, 217 kB/s
I DID WHAT I WAS SUPPOSED TO DO:
Put battery in
Connect usb cable
Insert sdcard
Vol-up/Home and Power
I felt the vibration no more than a second after pressing power (along with vol_dwn and home key pressed and held)
As you can imagine, my adrenilin was pumpped to the point of feeling like i smoked a pack of camel ciggirettes, AGAIN, as i try to boot the phone.
I knew i was out of the woods after I saw the samsung logo.
It Skipped past download.
I was able to boot right into my desktop, however there were no signal bars.
and the Baseband ver: was unknown.
I powered down the phone (man that was hard to do) but i did.
Tried to get into download mode but failed at first, recovery failed also.
Finally got to download then i was good.
NOTES:
After I revived the phone I had nothing too loose because now I had 2 S3's, so I played a bit.
Its fun to brick your phone on purpose haha
:The debrick_sph_l710.img or the Debrick_Sprint_S3_L710_4.3.img did not work for me
:I did not need the class 10, class 4 worked too
:I did not need cable attached
:It didnt Matter wich order i put battery, sdcard, usb-cord to boot
:I did not format card
nly took 1 try to write working image each time ( didnt take several attemts) I wrote and tested 3 different images.
:Upon booting It seems to be the same each time ,couple three four sec (out of a few times playing it may have taken 10sec to boot on one occasion).
:I think the issues with ubuntu was,the sdcard was not ejecting properly and corrupting the image.
:If you have a sucssesful write to sdcard, it may not show up in file explorer until you pull out card reader and re-insert it... then it will show up in file explorer as a folder called "image" with bunch of files or somthing in it, then you know it wrote ok.
:for some reason after i haha... BRICKED MY SG3 ON PURPOSE....Oh my GOD....Im SHOT, booted to my homemade image, i was able to boot into recovery as well as Download.
:Not for nothen I tried to:
dd if=/sdcard/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
dd if=/sdcard/boot.img of=/dev/block/platform/msm_sdcc.1/by-name/boot
dd if=/sdcard/modem.img of=/dev/block/platform/msm_sdcc.1/by-name/modem
(Remember i was able to boot to system, so adb worked)
Did not work, however it may have worked if i used the syntax...mmcblk0 and such.
My Image Link: http://rooferdave.com/Downloads/sprintsg3.html
Will your image work if placed on a formated sd card or do I need to do the partion step then copy
[GUIDE/TUTORIAL/HOWTO] Sony Xperia S stock to Android 8.1 Oreo
[GUIDE/TUTORIAL/HOWTO] Upgrade Sony Xperia S (Model LT26i codename nozomi) from Android 2.3.7 to Android 8.1 Oreo / nAOSP Rom
This detailed step-by-step guide helps you transform your Sony Xperia S to a much fresher one with Android 8.1 Oreo.
To make sure you are with a compatible Xperia S:
On the smartphone, go to Settings > About phone. Check that "Model number" is correct: LT26i.
### We need to make sure Bootloader can be unlocked before going further.
Open dialer, enter code
Code:
*#*#7378423#*#*
In the follow menu, go to Service info > Configuration > Rooting status.
Bootloader unlock allowed: Yes
If it is set on No, you cannot update your device. You can quit this tutorial and cry, you will never unlock it.
### You must be logged as a Microsoft Windows administrator to run console commands below.
CHANGELOG
v4. Moved to Bitgapps to solve infinite GApps "searching for updates", TWRP 3.5.2_9-0
v3. Android 7.1 if needed, hints to solve problems (error 7, fdisk -l)
v2. Slight tutorial improvements
v1. Initial release
1) DOWNLOAD FILES
- djibe Xperia S pack: https://bit.ly/djibe-xperias-pack
(contains FlashTool Xperia Driver Pack 1.8 for USB drivers + fastboot/adb + recovery TWRP 3.5.2_9-0)
+ ROM nearAOSP 8.1 build 11: https://forum.xda-developers.com/t/rom-8-1-naosprom-for-xperia-s-acro-s.3853082/
Download latest build (2020/03 or newer): https://androidfilehost.com/?w=files&flid=240525&sort_by=date&sort_dir=DESC
+ BitGApps Package ARM 8.1: https://github.com/BiTGApps/BiTGApps-Release/releases
+ You find Android 8.1 laggy ? Android 7.1.2/nAOSP is suitable https://androidfilehost.com/?fid=890129502657590583
Download according BitGApps.
+ Charge phone to 100%.
NB. Use a USB2 port to connect tablet to PC.
2) INSTALL USB DRIVERS
Commands below are for Windows 10 installation of unsigned drivers.
### For other Windows versions, Google "windows X install unsigned driver".
On the keyboard of PC, use "Windows key + R" combo.
In the command prompt that opens, type:
Code:
shutdown -r -t 0 -o
This opens a Windows menu:
Go to Troubleshooting > Advanced Options > Settings > Restart
Upon restart, press on keyboard : key 7 - Disables drivers signature verification
After boot,
Start Flashtool Xperia Driver Pack 1.8,
check the Flashmode Drivers, Fastboot drivers, Common drivers Fuji board (both lines) and Xperia S driver for ICS.
Start the installation and confirm the forcing the driver installation.
It ends by saying that everything was installed.
Restart Windows.
3) BACKUP ALL YOUR DATA
Backup every SMS, photo, app login or sync everything in the cloud.
You will lose everything, including what is contained in the microSD card during bootloader unlock.
So backup everything and transfer every file to your computer.
### Do it now or you will regret it.
4) IMEI NUMBER AND UPDATES
On phone, go to Settings > About phone > Status > IMEI
Note the IMEI (15 digits). Store it.
5) MAKE SURE PHONE IS NOT SIMLOCKED
We need to check phone is not SIMlocked.
Open dialer, enter code again
Code:
*#*#7378423#*#*
Go to Service info > SIM lock. If everything is blank/unchecked ( [] ), phone is Desimlocked.
If not, you must contact your network provider for an unlock code.
### Don't move further until phone is simlocked. You cannot debrand/desimlock it using a custom ROM.
6) GENERATE BOOTLOADER UNLOCK CODE
From your PC, go to https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/
At the bottom of the page, in "Select your device:" menu: select Xperia S.
Enter your IMEI, check first 2 checkboxes "I acknowledge that", click Submit and complete the captcha to generate unlock key.
Note the unlock code (beginning and end of page paragraph C.)
7) CONNECT PHONE IN FASTBOOT MODE
Phone powered off, hold "Volume up" while you plug phone in USB.
The blue light appears at the front bottom edge, the drivers install in Windows.
8) UNLOCK BOOTLOADER
In Windows, copy the path to the "flash" folder you unziped earlier.
Open a Windows command prompt : Start menu > Command prompt > Start as administrator
Then type
Code:
cd /d thePathToFlashFolder
(ex: E:\root\djibe Sony Xperia S\djibe\flash)
Type:
Code:
fastboot devices
If "PSDN:..." is returned, drivers are correctly installed.
Create this text: fastboot -i 0x0fce oem unlock 0xAPPENDYOURUNLOCKCODEAFTER0x
Paste the previous line in windows command:
Code:
fastboot -i 0x0fce oem unlock 0xAPPENDYOURUNLOCKCODEAFTER0x
confirm with Enter.
After 5 seconds, it is displayed Finished. Total time: ...
Bootloader is unlocked !
9) FLASH TWRP RECOVERY 3.5
Still in fastboot, type in console :
Code:
fastboot flash boot twrp-3.5.2_9-0-nozomi.img
. Confirm with Enter.
Wait, then once the confirmed success,
type :
Code:
fastboot reboot
(confirm with Enter).
Be fast to disconnect phone AND while it restarts, repeatedly click Volume+ AND Volume- buttons to access the recovery (can take a while).
Reconnect phone to PC once recovery has started.
10) BACKUP ORIGINAL ROM AND USE TWRP RECOVERY
You are now in TWRP recovery,
check Never show this screen during boot again and Swipe to Allow modifications.
Go to Backup, select all partitions.
Confirm with OK.
Then swipe to start backup.
Click the TWRP icon to return to home.
Go to Mount. Select Data partition and make sure bottom right button is dsiplaying Disable MTP text.
Phone must be connected to computer.
In Windows Explorer, open Xperia S device > Internal Storage.
Copy whole TWRP folder and save it somewhere safe on your PC.
In the opposite way, copy twrp.img and paste it in the same phone's folder you grabbed TWRP folder (SDcard root folder).
11) FLASH A PERMANENT TWRP RECOVERY
The TWRP recovery you are using is temporary.
We need to flash it on a partition.
Back to TWRP Home screen > Install > Install Image button > twrp.img > Select boot partition > Swipe to flash.
12) REPARTITION INTERNAL MEMORY
Newer Android versions changed the partition layout. We have to do so.
Back to TWRP Home screen > Mount.
Deselect ALL partitions.
You can copy-paste commands with right click in the Windows command.
From Windows command, type following commands:
Code:
adb devices
Command returns: List of devices attached
CB511Z8FWJ recovery
Code:
adb shell
Code:
fdisk -l /dev/block/mmcblk0
### fdisk -l (this is letter L, not number 1)
Command returns
Code:
4 heads, 16 sectors/track, 973824 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 65 2048 f0 Linux/PA-RISC boot
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 * 65 81 512 4d Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 129 768 20480 48 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 769 954240 30511104 5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 785 800 512 46 Unknown
/dev/block/mmcblk0p6 833 928 3072 4a Unknown
/dev/block/mmcblk0p7 961 1056 3072 4b Unknown
/dev/block/mmcblk0p8 1089 1184 3072 58 Unknown
/dev/block/mmcblk0p9 1217 1376 5120 70 Unknown
/dev/block/mmcblk0p10 1409 1664 8192 83 Linux
/dev/block/mmcblk0p11 1665 2176 16384 f0 Linux/PA-RISC boot
/dev/block/mmcblk0p12 2177 34944 1048576 83 Linux
/dev/block/mmcblk0p13 34945 42944 256000 83 Linux
/dev/block/mmcblk0p14 42945 108480 2097152 83 Linux
/dev/block/mmcblk0p15 108481 954240 27064320 c Win95 FAT32 (LBA)
~ #
### Copy all the text of the partition layout to be able to reformat in case of a crash.
### Paste this text in a file somewhere safe on your PC.
We are interested by line /dev/block/mmcblk0p14, Start sector: 42945 in my case,
And /dev/block/mmcblk0p15 End sector: 954240 for me.
### These values may differ for you. USE YOUR OWN VALUES.
Now type
Code:
fdisk /dev/block/mmcblk0
Commands returns: Command (m for help):
Enter
Code:
p
Commands returns: Command (m for help):
Enter
Code:
d
Command returns: Partition number (1-15):
Enter
Code:
15
Commands returns Command (m for help):
Enter
Code:
d
Command returns: Partition number (1-15):
Enter
Code:
14
Commands returns: Command (m for help):
Enter
Code:
n
Command returns: First cylinder (769-954240, default 769):
Enter
Code:
42945
(Your /dev/block/mmcblk0p14 Start sector)
Command returns: Last cylinder or +size or +sizeM or +sizeK (42945-954240, default 954240):
If "default 954240" is the same as your /dev/block/mmcblk0p15 End sector, just press Enter.
Commands returns: Command (m for help):
Enter
Code:
t
Command returns: Partition number (1-14):
Enter
Code:
14
Command returns: Hex code (type L to list codes):
Enter
Code:
83
Commands returns: Command (m for help):
Enter
Code:
w
And let command return to its waiting state: ~ #
We must restart phone now, unplug USB and from TWRP go to Reboot > Recovery for a refresh of partition table.
### Your TWRP recovery is not compatible with new partition layout.
13) FORMAT PARTITIONS TO F2FS
nAOSP Rom doesn't support EXT4 filesystem. We need to repartition to F2FS, easily with TWRP.
### If you experience errors while flashing like "Unable to mount storage", use TWRP 3.2.3 instead: https://androidfilehost.com/?fid=1322778262904003720
Check Never show this screen during boot again and Swipe to Allow modifications.
Back to TWRP Home menu.
Go to Wipe > Wipe Advanced > Select Data > Repair or Change File System > Change File System > F2FS.
Repeat same procedure for Cache partition.
We must restart phone now, go to Reboot > Recovery for a refresh of partition table.
### If you don't, you won't be able to flash zipfiles.
After reboot, Swipe to Allow modifications.
### If you still see 0MB or a wrong size for data after the reboot, try to format data (Wipe/Format Data).
### In the worst case, convert data to ext4 and convert back to f2fs will do the job.
### You get ERROR 7, Failed to mount '/system' etc.), try this fix: https://bit.ly/3BvcYvM
### Failed to mount '/system' error: https://bit.ly/3yF2jwX
14) PUSH ROM AND GOOGLE APPS
Go to Mount > make sure nothing is mounted.
Connect phone to PC with USB.
Copy downloaded ROM and Google Apps to your /flash folder (along adb.exe and twrp.img).
Rename bitgapps*.zip to gapps.zip
Make sure adb is still running with 'adb devices' command.
Now push the ROM to the phone with
Code:
adb push nAOSProm-8.1.0-b11-nozomi.zip /sideload
Then
Code:
adb push gapps.zip /sideload
15) INSTALL ROM AND GOOGLE APPS
Go back to TWRP Home menu.
Go to Install > You are in /sdcard empty folder.
Tap on (Up a level) > sideload.
Select nAOSProm > Swipe to flash.
Wait during "Install Zip".
Then Reboot > Recovery
Go back to Install > select bitgapps*.zip > Swipe to flash.
## Problems flashing? Use TWRP 3.2.3-0: https://eu.dl.twrp.me/nozomi/twrp-3.2.3-0-nozomi.img.html
At the end, tap on Wipe Cache/Dalvik and Swipe to wipe.
Then tap on Reboot system.
Wait during long first boot.
Enjoy your new phone.
16) BETTER PERFORMANCES
Go to Settings > About phone.
Tap 7 times on Build number.
Go to Settings > System > Developer options.
Set Windows animation scale, Transition animation scale and Animator duration scale to 0.25x.
Right below, you may try to switch Force GPU rendering On (default is off but feels slower, isn't it ?)
17) ROOT
nAOSProm has a built-in root.
No extra Root manipulation needed.
### DO NOT TRY MAGISK, you will have problems.
### If you run in troubles with Magisk, see the end of this tutorial.
Configure Android as you like.
For faster GPS fix, use GPS Status and Toolbox and download A-GPS data.
You may try Greenify app to improve battery.
Your phone is up to date, enjoy ;-)
Thanks: @millosr, @mickybart, @AdrianDC, TWRP team, OpenGApps team, Flashtool Xperia Driver pack team
-----------------------------------------------------------------------
### Android doesn't see Wifi channel 14 (or 13),
Your phone doesn't see your local Wifi network?
You are probably european and your wifi is set to channel >= 11.
Reboot to TWRP recovery.
Go to Mount > check System partition.
Open a Windows command like before:
Code:
adb pull /system/build.prop
Edit file with Notepad++ freeware.
Locate line: ro.wifi.channels=
Change it to: ro.wifi.channels=14
Add this line just below: ro.boot.wificountrycode=EU
Save file.
Send modified file to phone:
Code:
adb push build.prop /system/
Disconnect phone, go to Reboot > System.
-------------------------------------------------------------------------
### Tried Magisk and it doesn't work ? (we know it doesn't)
You can't access recovery because phone restarts as soon as it reboots.
Let battery drain by bootloop.
When it is exhausted, hold Volume+ and connect phone tu USB, blue light will appear (fastboot mode).
Unzip boot.img from nAOSProm-8.1.0-b11-nozomi.zip to /flash folder (along fastboot.exe).
Make sure fastboot is OK with
Code:
fastboot devices
Then
Code:
fastboot flash boot boot.img
And restart with
Code:
fastboot reboot
Phone is op.
Enjoy
Thank you very much for this detailed guide. I have two questions:
1) Why do you recommend to flash version 2.3.7 of Android before beginning this procedure?
2) Everytime I have Flashed nAOSProm-8.1.0-b11-nozomi.zip on my phone (folllowing the original guide), I've had a very annoying bug, which is that it's really difficult to answer a phone call (I have to swipe the phone icon up several times until it finally rsponds). Of course I have always made a totally clean flash of the rom. Do you know what the reason for this can be?
TXUTXI72 said:
Thank you very much for this detailed guide. I have two questions:
1) Why do you recommend to flash version 2.3.7 of Android before beginning this procedure?
2) Everytime I have Flashed nAOSProm-8.1.0-b11-nozomi.zip on my phone (folllowing the original guide), I've had a very annoying bug, which is that it's really difficult to answer a phone call (I have to swipe the phone icon up several times until it finally rsponds). Of course I have always made a totally clean flash of the rom. Do you know what the reason for this can be?
Click to expand...
Click to collapse
Hi,
1) By precaution. For some phones you have to flash latest firmwares which upgrade bootloaders. We never know and there is no information about this. Just precaution.
2) I will test it.
Have you tried another call app ? That's the benefit of Android.
djibe89 said:
Hi,
1) By precaution. For some phones you have to flash latest firmwares which upgrade bootloaders. We never know and there is no information about this. Just precaution.
2) I will test it.
Have you tried another call app ? That's the benefit of Android.
Click to expand...
Click to collapse
Hi again! Thanks for answering.
First of all, 2.3.7 was not the last firmware for Sony xperia s, but the first one. The last one was Jelly Bean (4.1.2, or something like that, as far as I remember). So I am confused by your answer.
Secondly, yesterday I flashed again nAOSProm-8.1.0-b11-nozomi.zip, and this time I didn't get that annoying bug related to the phone app. Why? Well, there are two possible reasons:
1) This time I Flashed TWRP the way you tell in your guide. I used to do it via Flashtool.
2) I have used Nano Gapps instead of Pico Gapps.
Another thing I would like to tell you, is that yesterday it was impossible for me to flash the rom with the official TWRP (the one you recommend). I had to use TWRP 3.2.3, the version the developer of this rom recommends. It is something I don't understand: Why does the official TWRP work for you, while it doesn't for me?
Thank you very much again for all your help. I am pretty much interested in bringing to life again this old phone. What I really like about Xperia S is its small size
Now I am going to try to flash the rom again, because, although it works correctly, I cannot reboot into recovery
Cheers!
TXUTXI72 said:
Hi again! Thanks for answering.
First of all, 2.3.7 was not the last firmware for Sony xperia s, but the first one. The last one was Jelly Bean (4.1.2, or something like that, as far as I remember). So I am confused by your answer.
Secondly, yesterday I flashed again nAOSProm-8.1.0-b11-nozomi.zip, and this time I didn't get that annoying bug related to the phone app. Why? Well, there are two possible reasons:
1) This time I Flashed TWRP the way you tell in your guide. I used to do it via Flashtool.
2) I have used Nano Gapps instead Pico Gapps.
Another thing I would like to tell you, is that yesterday it was impossible for me to flash the rom with the official TWRP (the one you recommend). I had to use TWRP 3.2.3, the version the developer of this rom recommends. It is something I don't understand: Why does the official TWRP work for you, while it doesn't for me?
Thank you very much again for all your help. I am pretty much interested in bringing to life again this old phone. What I really like about Xperia S is its small size
Now I am going to try to flash the rom again, because, although it works correctly, I cannot reboot into recovery
Cheers!
Click to expand...
Click to collapse
Hi,
Sorry for my late replay.
Sorry for the 2.3.7 version. When i tried to force updates nothing came out so I thought it was the last one. I will remove comments on version.
For the Recovery, everything went fin with latest version. However, with 3.4+ TWRP, every time you wipe a partition you must reboot recovery before flashing.
I'll put a comment for those who have problems flashing.
And now I must add the Magisk tuto.
djibe89 said:
Hi,
Sorry for my late replay.
Sorry for the 2.3.7 version. When i tried to force updates nothing came out so I thought it was the last one. I will remove comments on version.
For the Recovery, everything went fin with latest version. However, with 3.4+ TWRP, every time you wipe a partition you must reboot recovery before flashing.
I'll put a comment for those who have problems flashing.
And now I must add the Magisk tuto.
Click to expand...
Click to collapse
Flashing Rom and Gapps over adb gives an insufficient space error. I first install Rom and then install Gapps.
Hi @haktug,
did you repartition correctly ? The partition should be ultra wide after repart
after writing the partition layout and formating /data and /cash the only i get whatever i try to do is "Unable to mount storage". SDCard partition is marked as no present and on "Select Storage" button the only i get is "SDCard (0MB)". and that lets me do NOTHING at all. i tryied everithing i cant get over it, dispite my every step in this guide were presice... please somebody help...
djibe89 said:
Hi @haktug,
did you repartition correctly ? The partition should be ultra wide after repart
Click to expand...
Click to collapse
yes ı did
bkokkinos said:
after writing the partition layout and formating /data and /cash the only i get whatever i try to do is "Unable to mount storage". SDCard partition is marked as no present and on "Select Storage" button the only i get is "SDCard (0MB)". and that lets me do NOTHING at all. i tryied everithing i cant get over it, dispite my every step in this guide were presice... please somebody help...
Click to expand...
Click to collapse
which version of twrp are you using?
haktug said:
which version of twrp are you using?
Click to expand...
Click to collapse
the one you provide ... 3.5.0.9.0 i think it is
i made the procedure multiple times and i formated many times both /data and /cashe and i return to my previous layout installed a random rom and tryied this repartition again with the same results....
unable to mount storage
SDCard (0MB)
on advanced wipe >SDCard >change file system > Present:No
@bkokkinos Can you send the log form the command
Code:
fdisk -l /dev/block/mmcblk0
bkokkinos said:
the one you provide ... 3.5.0.9.0 i think it is
i made the procedure multiple times and i formated many times both /data and /cashe and i return to my previous layout installed a random rom and tryied this repartition again with the same results....
unable to mount storage
SDCard (0MB)
on advanced wipe >SDCard >change file system > Present:No
Click to expand...
Click to collapse
you should use twrp 3.2.3 on this link.
Downloads for : Sony Xperia S | AndroidFileHost.com | Download GApps, Roms, Kernels, Themes, Firmware and more. Free file hosting for all Android developers.
haktug said:
you should use twrp 3.2.3 on this link.
Downloads for : Sony Xperia S | AndroidFileHost.com | Download GApps, Roms, Kernels, Themes, Firmware and more. Free file hosting for all Android developers.
Click to expand...
Click to collapse
WWWOOOOOOOOOOOOOOOOOWWWWWWWWWWW!!!!!!!!!!!!!
What did you do......????????!!!!
i just flashed twpr 3.2.3 and everything worked perfectly....!!!! How could just different version make such differance???? OOOUUUFFFFFF i can't believe it... my two days headache is gone... THANK YOU Very Much!!!
Hi, I updated tutorial thanks to both of you.
Thanks t
djibe89 said:
Hi, I updated tutorial thanks to both of you.
Click to expand...
Click to collapse
Thanks to you!
Hello,
Good day! I was stuck at step 13) INSTALL ROM AND GOOGLE APPS
It says,
"Updater process ended with ERROR: 7 error installing zip file 'sideload/nAOSProm-81.0-b11-nozomi.zip'
Failed to mount '/system' ".
I used TWRP 3.2.3-0.
Thank you...
l3mu3l said:
Hello,
Good day! I was stuck at step 13) INSTALL ROM AND GOOGLE APPS
It says,
"Updater process ended with ERROR: 7 error installing zip file 'sideload/nAOSProm-81.0-b11-nozomi.zip'
Failed to mount '/system' ".
I used TWRP 3.2.3-0.
Thank you...
Click to expand...
Click to collapse
I don't know if I can really help you, but I would recommend you to use the links provided by the author of the rom himself. For instance, the author of this rom says clearly to use the following link in order to get the proper TWRP version: https://androidfilehost.com/?fid=1322778262904003720
Another important thing is in my opinion that the permanent twrp must be flashed into the fota partition, not in the boot partition. In my case, everytime I flashed it into the boot partition, the device always rebooted into system and not into twrp.
And very important as well is to check if the repartition has been made correctly. Check out that the sd has about 28 gigabytes free after doing the repartition.
l3mu3l said:
Hello,
Good day! I was stuck at step 13) INSTALL ROM AND GOOGLE APPS
It says,
"Updater process ended with ERROR: 7 error installing zip file 'sideload/nAOSProm-81.0-b11-nozomi.zip'
Failed to mount '/system' ".
I used TWRP 3.2.3-0.
Thank you...
Click to expand...
Click to collapse
By the way, I have just read someone who was getting error 7 while trying to install the rom, and he warns: MAKE SURE YOU DON'T CHANGE SYSTEM PARTITION INTO F2FS. Only Data and cache partitions must be changed into f2fs. Just in case it may help you...
TXUTXI72 said:
I don't know if I can really help you, but I would recommend you to use the links provided by the author of the rom himself. For instance, the author of this rom says clearly to use the following link in order to get the proper TWRP version: https://androidfilehost.com/?fid=1322778262904003720
Another important thing is in my opinion that the permanent twrp must be flashed into the fota partition, not in the boot partition. In my case, everytime I flashed it into the boot partition, the device always rebooted into system and not into twrp.
And very important as well is to check if the repartition has been made correctly. Check out that the sd has about 28 gigabytes free after doing the repartition.
Click to expand...
Click to collapse
ı agree. if it doesn't work, you're doing it wrong somewhere. You should do it again