yashsingh1/xdaforums huggingface dataset:
[Android Q&A, Help & Troubleshooting] colemarc:
Seems unnecessarily complex

So, why tunneling data through a TCP socket?

What's wrong with this: (well, I know now what's wrong, see my subsequent posts for a fix)

./adb shell dd if=/dev/block/mmcblk0p23 | pv > userdata.img

I am doing it just now in a shell window under Cygwin on Windows 7.

I used Cygwin because it allows me to use the pv command as a progress monitor, but the same command line should work in Linux.

It should even work in a cmd.exe shell in Windows if written as:

adb shell dd if=/dev/block/mmcblk0p23 > userdata.img

altough you will miss the progress monitor.

I forgot to backup my pictures before doing a factory reset from the settings menu of my Nexus 4, therefore I wanted to dump the raw user data partition to a file on the PC in order to recover the pics with PhotoRec. Mind you, the Nexus 4 has got no SD slot and does not support USB on-the-go.

It seemed that the only way was to root the device the usual way (risking to overwrite some pictures in the process), but then I learned that TWRP has got an ADB interface since version 2.8.0.0.

Add the fact that you can start TWRP without flashing it on the device, and you have got a powerful forensic tool.

In short:

adb reboot-bootloader
...
fastboot boot twrp-2.8.0.0-mako.img
...
adb shell dd ...

For some reason the ADB interface does not work with TWRP 3.0.0-0.

P.S. adb pull command does not work with special files like block devices:

$ ./adb pull /dev/block/mmcblk0p23
remote object '/dev/block/mmcblk0p23' not a file or directory

hence the need to use dd and shell redirection.
[Android Q&A, Help & Troubleshooting] scandiun:
First, you may be writing to the same partition that you are reading from, so you need enough free space, which will be less and less as you write. And second, inside userdata.img there will be also usedata.img that is being written to. That command is only assured to be safe the you are writing to a different partition that you are reading from.
[Android Q&A, Help & Troubleshooting] colemarc:
No, because the final redirection is in the context of the Windows shell, hence userdata.img is created on the PC filesystem.
[Android Q&A, Help & Troubleshooting] scandiun:
I'm not sure why a tcp connection is used but there must be a reason for it.
[Android Q&A, Help & Troubleshooting] colemarc:
I discovered the reason the hard way!

The ouput of [adb shell somecommand] is cooked twice: first because of the android tty, second because of adb under Windows.

The Android tty replaces 0x0A (LF) with 0x0D 0x0A (CRLF). This can be fixed like this [adb shell "stty raw; somecommand"].

ADB for Windows uses some system call to write which is not binary transparent, then again 0x0A is replaced with 0x0D 0x0A.

I believe the easiest fix (under Windows) is to use gsar :

adb shell cat /dev/block/mmcblk0p23 | gsar -F -s:x0D:x0D:x0A -r:x0A > userdata.img
[Android Q&A, Help & Troubleshooting] scandiun:
If you make the same backup in several ways and compare checksums you will notice if there's some difference.

The problem with the replace command is that if there's some plain text file in the partition you will be editing it, or any database that matches that array inside. That's not a professional way to do things.
[Android Q&A, Help & Troubleshooting] colemarc:
Well, I believe the transformation is reversible and the described replacement reverses it exactly:

For example, if T is the transformation and R is the replacement

R(T(0A)) = R(0D0D0A) = 0A
R(T(0D0A)) => R(0D0D0D0A) => 0D0A
R(T(0D0D0A)) => R(0D0D0D0D0A) => 0D0D0A
...

I cannot think of any character sequence which is not restored as it was.
[Android Q&A, Help & Troubleshooting] scandiun:
It will work provided that no ADDITIONAL 0x0A are added to the stream to specify end of stream from the first iteration.
[Android Q&A, Help & Troubleshooting] colemarc:
Sorry, you lost me here. Could you explain?

I believe any 0x0A contained in the output stream of the command (I mean the command which runs under Linux/Android) will be restored exactly.
[Android Q&A, Help & Troubleshooting] lebigmac:
bump
[Sony Xperia P, U, Sola, Go] electrash:
Hello everyone.

Im not quitly sure if ICS bring more battery drain (faster).

With GB i could use it whole day and it remains 30% to night, but with ICS im happy if it have 15% when battery

warning me.

So do you guys have more and faster battery drain on ICS then on GB.

I also make some test with CPU spy and other programs, it shows that on

easy task such as open flipboard, or put some widgets its activate both Core to 100% (1512Hz) for about 5 sec.
[Sony Xperia P, U, Sola, Go] electrash:
Refresh

Sent from my LT26i
[Sony Xperia P, U, Sola, Go] gm007:
I had battery drain before but since I updated via sus my region firmware the battery is ok.
[Sony Xperia P, U, Sola, Go] skywirepteltd:
I'm using ICS 4.0.4 , rooted. Battery seems to better than GB 2.3.7. I hardly find it drain even if i browse through.
[Sony Xperia P, U, Sola, Go] Xploda:
For me it's about the same i think.

My phone lasts nearly 3 days with ICS, exactly the same as with GB. :D
[Samsung Galaxy S (4G Model)] daothanhduy1996:
Here is the place for that thing
[Samsung Galaxy S (4G Model)] gabrielshaste:
Thanks Erik for this... you truly are the porting king.
[Samsung Galaxy S (4G Model)] daothanhduy1996:
So, Is this AOSP or kanged or shipped or Port, Erikmm?
[Samsung Galaxy S (4G Model)] Kyndig66:
Just some quick info. Data does not work, phone dialer is a bit wacky. wifi works and bt will connect. You can make calls, but you can't hang up. I've let Erik know this and will get logs for him unless someone beats me to it.
[Samsung Galaxy S (4G Model)] mcarbaja:
Do we need to flash gapps?
[Samsung Galaxy S (4G Model)] daothanhduy1996:
No, it's stock anyway =]

@Kyndig66: and the broken USB Storrage, too :D
[Samsung Galaxy S (4G Model)] vitalexx:
I just flash this row, working is very nice

but have one problem data package does't work
[Samsung Galaxy S (4G Model)] Kyndig66:
That would be something to get a log to erik about. I'm not in a position where I can get any logs at the moment. Probably not until late this afternoon.

I mentioned data above.
[Samsung Galaxy S (4G Model)] Wodensman:
Thanks for this Erik. It makes me want to go troll Samsung, and drop tons of links to the ICS stock dev thread, all over Samsung websites.

Do you think that the USB bug has something to do with the error I've been getting where I plug the USB charger in, and the phone is unresponsive for a bit, then finally reboots? This error is on OTHER roms, not this one. I think I've seen someone else post about having it.
[Samsung Galaxy S (4G Model)] thomas.raines:
Port from Nexus S... Read the OP...lol

Sorry Erik, so many ports/ROMs to remember...lol
[Samsung Galaxy S (4G Model)] raphifix:
I have the exact problem on CM9. Just plugged in to the computer with no reboot, but when I plugged into charger this morning, it rebooted. It seems to happen sporadically, but always when plugged into USB.
[Samsung Galaxy S (4G Model)] Beastmode:
this is the stock ICS that nexus s got and was ported over for us :P
[Samsung Galaxy S (4G Model)] jislam88:
Hi erik, this is a great port, but i am having trouble making and receiving calls. My phone doesnt show when someone calls me and i am unable to hangup a call.
[Samsung Galaxy S (4G Model)] Kyndig66:
If you can get a log for erik that would help a lot. :)

Sent from a hole in the time/space continuum.
[Samsung Galaxy S (4G Model)] IAIRonI:
I wasn't paying attention and installed this instead of aokp... yes, i am dumb.

How do I boot into recovery?
[Samsung Galaxy S (4G Model)] eollie:
How the hell did you get into recovery to begin with?
[Samsung Galaxy S (4G Model)] IAIRonI:
I rebooted into it. An this obviously doesnt have that. I've tried volume up, down, both...
[Samsung Galaxy S (4G Model)] eollie:
http://xdaforums.com/wiki/Samsung_Galaxy_S/SGH-T959V/Download_Mode
[Samsung Galaxy S (4G Model)] USSENTERNCC1701E:
That's Download Mode, not recovery.

For recovery, turn off the phone, pull the battery, unplug USB, reinsert battery.

Press and hold Vol+ and Vol-, press and hold PWR.

When screen brightens or changes to ROM static splash screen, release PWR, keep holding Vol+ and Vol- until recovery loads.
[Samsung Galaxy S (4G Model)] m4127440:
Advanced Settings FC's due to missing tvout libs.....?
[Samsung Galaxy S (4G Model)] Beastmode:
Thanks ill fix it next update just got some personal issues to deal with I'm rl atm
[Samsung Galaxy S (4G Model)] mangodiva:
Has anyone figured out how to get their data connectivity back, or am I just stuck on Wi Fi for a moment if I want to keep the root?

Thanks! Super stoked on this :D
[Samsung Galaxy S (4G Model)] Manumission:
I've put this up in a few places - why not one more? Try this: go to Settings > Wireless & Networks > More... > Mobile Networks > Access Point Names, then hit the Menu button, then choose "Reset to Default". I had a similar problem, and that cleared it up for me.
[Samsung Galaxy S (4G Model)] Beastmode:
If i'm not mistake the problem is in the framework.jar I'm trying to fix it but it's really difficult since I don't have working data on my phone lol but hopefully i get it soon :D
[Samsung Galaxy S (4G Model)] mangodiva:
Already tried that, and manually re-entering the appropriate APN, and master reset, and turning airplane mode on and off again...I work at T-Mobile ;)
[Samsung Galaxy S (4G Model)] johncdn:
you might want to try rom 'IMM76L' (seems an upgrade from IMM76D? :)) by RaverX3X, data works, as well as pretty much everything. It's posted in 'General' forum.
[Samsung Galaxy S (4G Model)] Beastmode:
Actually ravers rom is cm9 atm he was trying to see if how he downloaded and set up was good.
[Samsung Galaxy S (4G Model)] Beastmode:
Anyone tried latest build that can confirm if data has been fixed or not?
[Samsung Galaxy S (4G Model)] USSENTERNCC1701E:
I'll be at my computer in about an hour and a half, will have an answer shortly after that if no one else has by then.
[Samsung Galaxy S (4G Model)] Beastmode:
Thanks
[Samsung Galaxy S (4G Model)] USSENTERNCC1701E:
Looks like data is working! Great job, thanks :D

Service here is shoddy, it connected briefly to HSDPA and 3G, which is standard behavior for stock ROM where I am. I'm connected steadily to EDGE and loaded a web page... eventually. Again, standard fare for my area.

I don't know that this makes a difference, but I run my phone on null IMEI (eBay find).
[Samsung Galaxy S (4G Model)] ArmyofTracy:
IMM76L

Okay so the update is awesome! My data and everything work, just not strong enough....sitting next to my router I only get 3 bars, and if I wanted to switch roms to say a 2.3.6 build or something else how would I do that, I know it says I'm new here but I've been following the SGS4G dev and changing and rooting my phone for about a year now, and yesterday after installing IMM76L, I tried going back to Valhalla Black and could not, phone got stuck in boot loop, tried Gummy Mutt, no go .....had to go back to IMM76L....I've read everything I could and can't find an answer.....plz help out???
[Samsung Galaxy S (4G Model)] eollie:
Using the heimdall one clicks flash bhundvens stock kj6 then the antonx kernel one click. Then you can restore a bml nandroid.
[Samsung Galaxy S (4G Model)] Nickcu13:
I just installed and there's a voicemail notification that i cannot get rid of.

I try to swipe it away.

I try to clear it away.

I even called my voicemail multiple times (and i have none) but the notification will not go away.

Anybody else having this problem?
[Samsung Galaxy S (4G Model)] Beastmode:
that is an annoying problem the only way i've found to fix it on any rom is leave a voicemail to yourself then call your voicemail and delete it and it should go away
[Samsung Galaxy S (4G Model)] Nickcu13:
that fixed it. thanks.

Imma post this here in case you can help at all, but i recently installed the Google Now port to my phone and the text input works fine, but it won't let me use voice input. The traditional voice search works, but the one in Google Now never gives me any time to speak before it says it couldn't understand me.

Any advice/thoughts?
[Samsung Galaxy S (4G Model)] gn400:
It's great - One question

I installed this yesterday in place of GB and so far I really like the improvements. So far everything works great (except for UMS which I know the devs are working on).

But I can't get the portable wifi hotspot to work.

I searched threads for other phones and found different answers.

Some said use Titanium Backup to freeze tethering provisions, others said the issue is T-mobile blocks this feature unless you pay for the service.

Everything else works great so I don't want to start mucking things up for no reason. Does anybody have any input they can give me?

Thanks
[Samsung Galaxy S (4G Model)] ArmyofTracy:
battery life

Also the battery life is horrible. I have the 2300 battery and on 2.3.6 it last 2 days. Barely using my phone for data today I have hit 25% in 10 hours of use. Killed most everything with task manager.
[Samsung Galaxy S (4G Model)] eollie:
Sounds like you have some gremlins or dust bunnies. Go back to stock and try flashing again.
[Samsung Galaxy S (4G Model)] gn400:
Text Messaging Crashing

When I open messaging it crashes if I click on a sent message or immediately after sending a message.

Anyone else having this issue?
[Samsung Galaxy S (4G Model)] gregcapps:
In order to get back to a gingerbread ROM you will have to use Odin or one of the one click methods. Once you change over to an Ics recovery you can only flash ics roms.
[Samsung Galaxy S (4G Model)] blazen2000:
I have read and seen videos on youtube explaining how task managers kill apps along with your battery. They kill the apps but if you go into it right after you will notice that some apps are still going or started up again. Every time you kill they need to start up again and that is what might be killing your battery. You can also try to clear the battery stats.

---------- Post added at 10:40 AM ---------- Previous post was at 10:35 AM ----------

rember i am not responsible for anything but i was on cm9 and wanted to go to aokp but i had tons of bugs so i did 1 click gremlin remover by thomas rains http://xdaforums.com/showthread.php?t=1500427 then went strait to aokp with no problems. Read up on the i click it has gotten me out of many problems.
[Samsung Galaxy S (4G Model)] ArmyofTracy:
Did the one click a few days ago,and the gremlin remover, now back to Valhalla black. I tried IMM76L again after the gremlin remover,even on my 2800 battery it drained fast. Also noticed can't recieve or send pictures through mms, and auto download doesn't work either.
[Samsung Galaxy S (4G Model)] ArmyofTracy:
Blazen2000, the apps I stop don't restart. That's not what kills my battery. I have the same stuff running on Valhalla black and my battery stays good even using data.
[Samsung Galaxy S (4G Model)] eollie:
Check this out. Even if media server isnt the top abuser of your battery its something to look into.

http://xdaforums.com/wiki/Samsung_Galaxy_S/SGH-T959V/Why_is_media_server_using_my_battery
[Samsung Galaxy S (4G Model)] ArmyofTracy:
Yep, that seems to be the culprit. Can we get rid of it? Or maybe have a dev disable it? This is by far my favorite rom, it is visually and functionally perfect, just needs better signal and battery life. And I tired all the padded modems, they all act the same
[Samsung Galaxy S (4G Model)] gn400:
I second everything you've said. Pictures through MMS don't work. I took my phone completely back to stock, installed the CWM 5 kernel then IMM76L and battery life is still bad. My favorite ROM thus far, so I hope the battery life issue can be resolved, but it seems that its a problem with ICS itself not specifically the ROM for our phones, so perhaps the next ICS update will fix it? I'm back to Valhalla Black for the time-being.

My favorite thing about ICS is bluetooth HID support for external keyboards, which allowed me to use a TomTom bluetooth GPS remote to control the phone while riding my motorcycle.
[Samsung Galaxy S (4G Model)] eollie:
If media server is on the top of the list are you listening to music? Watching videos? Viewing pictures? These are all forms of media and when transferring from the computer to the phone they can get corrupted. Transferring via the usb cable will net you more corrupted files then popping the sdcard out of the phone and into a reader on the pc.

I suggest if you have copies of all these files on your computer, delete the stuff from your phone and start fresh. Probably a good idea to delete everything after making a backup and reformatting the phone. Just make sure you put the backup on your computer.
[Samsung Galaxy S (4G Model)] gn400:
I've read about the media server/corrupt file issue and it is definitely an issue with my phone, sometimes hitting nearly 70% in Watchdog. I may try your solution, but I haven't been eager to because I have a 64GB SD card in my phone, almost all of it used for music and podcasts. Since the UMS isn't working yet in IMM76D, I haven't been able to sync in ICS so I haven't change the media on the card since I was in GB.

So the issue with UMS is another reason I went back to Valhalla for the time-being. It's just a lot more convenient to sync when dealing with that many files.

I appreciate your help.
[Samsung Galaxy S (4G Model)] gn400:
I did a clean install of IMM76D, and wiped all the media from my SD card.

The battery life went up significantly. Still not as good as it was on GB, but the phone lasts about 24 hours in standby instead of 8.

Since the only media I put on my phone are music and podcasts I ran an mp3 checker to see what it could find and it said half of my music library was corrupted! It turns out that ripping music with Variable Bit Rate (VBR) causes a data mismatch problem in the file header. Everything that was VBR came back as corrupted and everything that was Constant Bit Rate (CBR) was fine.

I did some tests repairing a few mp3s with MP3 validator as well as converting to CBR, but they still came back corrupted.

So my choice is good battery life but can't listen to VBR encoded files or bad battery life.

I know the same issue is happening on other phones, so as I said before, seems to be a problem with ICS not the IMM76D port for S4G.
[Samsung Galaxy S (4G Model)] gn400:
I did another clean install taking the phone back to GB 2.3.4 before installing IMM76D, re-formatted the sd card and installed Rescan Media Root and seem to have solved the problem.

Even though VBR files still come back corrupted in MP3 validator, mediaserver doesn't run unless I'm playing music.
[Samsung Galaxy S (4G Model)] ArmyofTracy:
I fixed mms on my phone, under apn settings, change your apn protocol settings from Ipv4 to both 4 and IPv 6. Now I'm getting and receiving pics.
[Samsung Galaxy S (4G Model)] Beastmode:
Awesome find bro I'm working on an update of all my roms this weekend I should have this one ready by Tuesday maybe earlier

----------------------------------------------

If helped don't be afraid to hit the thanks button ;) it doesn't bite lol
[Samsung Galaxy S (4G Model)] gn400:
Cool. Thanks for the post. I just made the change. Now I've got to get someone to send me an MMS to test it.
[Samsung Galaxy S (4G Model)] Beastmode:
Try sending a pic to yourself to test it out?

----------------------------------------------

If helped don't be afraid to hit the thanks button ;) it doesn't bite lol
[Samsung Galaxy S (4G Model)] gn400:
Duh. I always test email that way.

Sometimes I can be a bit daft.

I tested it and it works, both ways.

Rock on.

If you fix the mass storage issue, I don't think there are any other problems.

It's damn near perfect.
[Samsung Galaxy S (4G Model)] ArmyofTracy:
Still having the weak WiFi issue though. But yes it is damn near perfect.

Sent from my ICS modded SGS4G
[Samsung Galaxy S (4G Model)] Beastmode:
i'm sending you a test build...check your PM's in about an hour :P
[Samsung Galaxy S (4G Model)] ArmyofTracy:
Got a new one for you guys.. .download Tweakker ICS from the market and do what it says. My WiFi signal, according to 'speed test' went from 2MB sec to 12 MB sec, deleted the settings and it went down, added then back and it went up.....weird but cool
[Samsung Galaxy S (4G Model)] Beastmode:
Haha yea I've been working on some **** today...thanks kyndig for the screenshot and testing as well as armyoftracy :)

View attachment 1244189

----------------------------------------------

If helped don't be afraid to hit the thanks button ;) it doesn't bite lol
[Samsung Galaxy S (4G Model)] ArmyofTracy:
Arghhhhh! I was just a little late with the screenshots! !
[Samsung Galaxy S (4G Model)] hechoen:
Well it turns on but does it work??
[Samsung Galaxy S (4G Model)] Beastmode:
Haha yea I added yours too

@hechoen yep it does but has a bug right now kyndig told me about

----------------------------------------------

If helped don't be afraid to hit the thanks button ;) it doesn't bite lol
[Samsung Galaxy S (4G Model)] hechoen:
Sounds like your close. Nice work. Now if we could only get GPS to work right. lol
[Samsung Galaxy S (4G Model)] Beastmode:
GPS is working fast now :) well according to kyndig cus I can't test :P so far so good :)

----------------------------------------------

If helped don't be afraid to hit the thanks button ;) it doesn't bite lol
[Samsung Galaxy S (4G Model)] Kyndig66:
Sort of. It's the "they can't hear me thing" Any ideas for a quick fix?
[Samsung Galaxy S (4G Model)] hechoen:
Have you tried the old volume up or down when in the call? Putting it on speaker? Moving to an area with better cell coverage(SARCASM)?
[Samsung Galaxy S (4G Model)] Kyndig66:
Yeah, no luck with any of 'em even after wiping caches and fixing perms.
[Samsung Galaxy S (4G Model)] hechoen:
Then just do what I always do. Get some logs. Get them to Erik and let him fix it. lol
[Samsung Galaxy S (4G Model)] Beastmode:
Lmao ...and oh yea kyndig if you can get me some logs that totally skipped my mind (seriously i didn't ask him to lol)

----------------------------------------------

If helped don't be afraid to hit the thanks button ;) it doesn't bite lol
[Samsung Galaxy S (4G Model)] Flame182:
This Ics rom is great,I've been running it with no problems with SMS/MMS, phone,the reception I get is okay,but its always better than having none , the battery life with this rom using moderate use is okay. But overall this is the ONLY Ics rom that I have no problems with whatsoever, the clock in the status bar is always running(I've had my clock in other ICS roms stop for no reason). Nuff said,hands down,so far this is my favorite ice cream sandwich rom for our sgs4g.:D

Thanks a lot Erik for your work,keep it up.

Glad you make our phone have amazing roms:)
[Samsung Galaxy S (4G Model)] Beastmode:
@flame

thanks bro well I'm trying to finish fixing wifi calling on this rom and we will be good if I do get the bugs fixed then I'll make a flashable for all ics roms :)..on my test build seems like gps is a lot better as well

----------------------------------------------

If helped don't be afraid to hit the thanks button ;) it doesn't bite lol
[Samsung Galaxy S (4G Model)] th3controller:
So this is pure stock? No CM9 base?
[Samsung Galaxy S (4G Model)] Beastmode:
I used the kernel and the video patches that jt made for our phone other than that no cm9 ..not that it matters but yea...still has same issues as cm9 as most of them are in the kernel

----------------------------------------------

If helped don't be afraid to hit the thanks button ;) it doesn't bite lol
[Samsung Galaxy S (4G Model)] Flame182:
No thank you man . Theres no rush,take your time,that's great though,thanks a lot for this rom though.:D
[Samsung Galaxy S (4G Model)] Kyndig66:
You'd think I'd know better by now and not need to be asked ;)

Edit: I meant oops, I forgot. Thanks guys! :)
[Samsung Galaxy S (4G Model)] ArmyofTracy:
Not bad on my 2800 battery. I've been trying to wear it out all day! Lol awesome job Erik
[Samsung Galaxy S (4G Model)] Beastmode:
update time :P

link is live check post #2 for changes and link and md5 and well enjoy