yashsingh1/xdaforums huggingface dataset:
[Vibrant General] mj56gt:
After flashing GCR3, there was a list of options during the reboot asking whether I want to restore the configuration or something like that, I chose NO (I hope I didn't make any mistake here). As the ROM does not include Titanium Backup, I wanted to install Titanium Backup through adb (which I never failed before when flashing other ROMs), but it failed with the following message:

> adb install Titanium_Backup.apk

3755 KB/s (... bytes in 0.515s)

pkg: /data/local/tmp/Titanium_Backup.apk

Failure [INSTALL_FAILED_MEDIA_UNAVAILABLE]

Anybody know what went wrong? 'Unknown sources' under Settings/Applications/ have been on. And I can't find the sdcard directory! When I try to install any apps from Market, it complains that there is not enough space to install items! Does it mean I've lost all the backup data somehow? If so, how can I rebuild the sdcard directory? Help!
[Vibrant General] nomadrider123:
Did you make a nandroid backup of what you were running? did you back up your sd card to your computer? Eugene stated it could wipe your sd card. The same thing happened to me. I ended up odin back to stock rooted my phone again. Then I formated my sd card to fix the 0 free space put the rom back on and was good to go.
[Vibrant General] mj56gt:
Thanks a lot for the help!

Yes, I did.

Unfortunately I didn't do this part. Does it mean I've lost my backup data?

My original stock version was JI6. I could not find any guide of how I could odin back to my stock. Any suggestions or pointers? Also is ODIN only for Windows computers? I have a Mac, so any ODIN program for Mac? Thanks!
[Vibrant General] nomadrider123:
nandroid backup should get your old rom back up and running with TB and your other apps. Then you might want to copy things over to your computer,
[Vibrant General] mj56gt:
Thanks again for the help! Please bear with me as I'm a newbie. By 'nandroid backup' do you mean the backup data I saved through Clockwork Recovery with ROM Manager, right? But I didn't copy that data to my computer! And the problem for me now is that I can't install Titanium Backup because of the "not enough space" message, and I'm not even sure if and where my backup data exists on the phone. What should I do?
[Vibrant General] keospeedwagon:
boot into recovery

select backup and restore

select restore
[Vibrant General] mj56gt:
I tried that already! The problem is that at Restore stage, it says:

Couldn't find open directory. No file found.

That was why I feared that I had lost my backup data! And I don't even have an sdcard directory now on the phone... So what else can I do?
[Vibrant General] deadpass:
That rom wiped my phone as well so I lost all of my backups. Luckily I had a week old back up on my laptop I used. This was the first rom I've flashed that wiped everything so I was kind of confused at first.
[Vibrant General] mj56gt:
Internal phone storage of zero

Could somebody help me out? Aside from the lost backup data, now my main problem is the zero internal phone storage that does not allow me to install any apps! How can I solve this?
[Vibrant General] iynfynity:
that happened to me and what I did was odin to stock again.

odin might fail at first but try again and it will work.
[Vibrant General] billwinkle:
If you havent fixed your phone yet, there is an easy fix for this. I had the very same problem after installing GCR3. You need to:

In the green recovery go to ULF Voodoo options or whatever it is...then lagfix options....then apply the "use voodoo (ext4)" i think...after it goes through that...then "set default permissions" , clear cache then reboot....

That is from rubbamade. He posted the fix in the GCR3 thread link number 121.

It worked for most everyone else that had the same issue. Please go to that thread and thank him for posting a fix. GCR3 is a really nice ROM.

Cheers and good luck
[Vibrant General] mj56gt:
Yes, that was the solution I ended up taking to fix the problem. Thanks for your kindness...
[Windows Phone 7 Software Development] win98:
Hello,

i started to wrote my first WO7 applicatin.

I got following code:

private void BtnStart_Click(object sender, RoutedEventArgs e)
{
BtnStart.Content = "Calculating...";

for (int i = 0; i < Pb1.Maximum; i++)
{
...
}

...
}

My Problem is that the content of the Button doesn't change to "Calculating". Even my Progressbar:

private void PbStep()
{
if (Pb1.Value == Pb1.Maximum)
{
Pb1.Value = 0;
MessageBox.Show("Progressbar Overflow");
}
else
{
Pb1.Value = Pb1.Value + 1;

}
}

It is wrapped in s loop, and the bar begins with 0 and then switsch to 100%, but i cant see the steps between.

I think i need a refresh command. in visual basic it is Me.Update();.

I tried many codes from google, but nothing helped. I hope some1 can help me.

many thank :)
[Windows Phone 7 Software Development] sensboston:
Try

Dispatcher.BeginInvoke(() =>
{
BtnStart.Content = "Calculating...";
});
[Windows Phone 7 Software Development] win98:
i did already try this. but now when i press the button, while calculation nothing happens, and after the calculation is finished, the button content changes to "calculating" and don't changes back to "start".

so i put the code in both parts and now i got the same as before. the button did not change its content

private void BtnStart_Click(object sender, RoutedEventArgs e)
{
LblDuration.Text = "";

Dispatcher.BeginInvoke(() =>
{
BtnStart.Content = "Calculating...";
});

Pb1.Value = 0.0;
Pb1.Maximum = Max;

DateTime StartZeit = DateTime.Now;

for (int i = 0; i < Pb1.Maximum; i++)
{
PbStep();//Count Up PorgressBar
}

DateTime EndZeit = DateTime.Now;
TimeSpan GemesseneZeit = EndZeit - StartZeit;
LblDuration.Text = "Duration: " + GemesseneZeit.ToString();

Dispatcher.BeginInvoke(() =>
{
BtnStart.Content = "Start";
});
}

private void PbStep()
{
try
{
Pb1.Value = Pb1.Value + 1;
}
catch
{
Pb1.Value = 0;
MessageBox.Show("Progressbar Overflow");
}
}

But thank you for your help. any other ideas?
[Windows Phone 7 Software Development] cameronm:
you really need to be looking at a background thread (background worker control may allow you do do this)

any tight loop like that will freeze the UI until the loop has finished

in the 'old days' a doevents within the loop itself would have been suffice but this is not good practice

HTH
[Windows Phone 7 Software Development] sensboston:
Try this one, it does what you've trying to implement but using a correct way:

using System.Windows.Threading;

private void BtnStart_Click(object sender, RoutedEventArgs e)
{
BtnStart.Content = "Calculating...";

DispatcherTimer timer = new DispatcherTimer();
timer.Interval = TimeSpan.FromMilliseconds(100);
timer.Tick += (_, __) =>
{
// Here is replacement of your PbStep()
Pb1.Value++;
};
timer.Start();
}
[Windows Phone 7 Software Development] win98:
i got it now this way:

private void BtnStart_Click(object sender, RoutedEventArgs e)
{
LblDuration.Text = "Duration: Calculating...";
BtnStart.Content = "Wait";

DateTime StartZeit = DateTime.Now;

DispatcherTimer timer = new DispatcherTimer();
timer.Interval = TimeSpan.FromMilliseconds(1);
timer.Tick += (_, __) =>
{
for (int i = 0; i < Pb1.Maximum; i++)
{
Pb1.Value++;
}
timer.Stop();

LblDuration.Text = "Duration: " + (DateTime.Now - StartZeit).ToString();
BtnStart.Content = "Start";
};
timer.Start();
}

It is half working. When i press Start, the button changes its content imediatly and after finishing the loop it return to its default content.

now i got 2 problems:

1. the progressbar isnt smooth jet

and the bigger one:

2. i wanted to create a benchmark programm an measure how long it takes to count a progressbar from 0 to 1million. now with the timer i dont have the real cpu speed because it is always waiting for the timer to tick. so the benchmark is sensless :(

@ cameronm:

I know the DoEvent command from other languages, but i wans able to use this in c#. i mainly programm in visual basic, cause this seems to be easy (In this case i would use Me.Update). I have heard from the Background worker, but never tried it. Maybe this can help.

I will do some google search and try to use the Background worker. I'll post again if i got new code :)

Thanks you all !
[Windows Phone 7 Software Development] win98:
hello again

im now that far:

public partial class MainPage : PhoneApplicationPage
{
//Globale Variablen
private BackgroundWorker bw = new BackgroundWorker();
public int Max = 0;

// Konstruktor
public MainPage()
{
InitializeComponent();
Max = 500000;
bw.WorkerReportsProgress = true;
bw.WorkerSupportsCancellation = true;
bw.DoWork += new DoWorkEventHandler(bw_DoWork);
bw.ProgressChanged += new ProgressChangedEventHandler(bw_ProgressChanged);
bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted);
}

private void BtnStart_Click(object sender, RoutedEventArgs e)
{
if (bw.IsBusy != true)
{
LblDuration.Text = "";

BtnStart.Content = "Calculating...";

Pb1.Value = 0.0;
Pb1.Maximum = Max;

bw.RunWorkerAsync();
}
}

private void BtnStop_Click(object sender, System.Windows.RoutedEventArgs e)
{
if (bw.WorkerSupportsCancellation == true)
{
bw.CancelAsync();
}
}

private void bw_DoWork(object sender, DoWorkEventArgs e)
{
BackgroundWorker worker = sender as BackgroundWorker;

DateTime StartZeit = DateTime.Now;

//Failure by any deklarion
//like int i = 0 or BtnStart.Content = "Calculating...";

for (int i = 0; i < Pb1.Maximum; i++)
{
if ((worker.CancellationPending == true)) //Abbruchbedingung
{
e.Cancel = true;
break;
}
else //Progressbedingung
{
PbStep();//Count Up PorgressBar
}
}

DateTime EndZeit = DateTime.Now;
TimeSpan GemesseneZeit = EndZeit - StartZeit;
LblDuration.Text = "Duration: " + GemesseneZeit.ToString();

BtnStart.Content = "Start";
}

private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if ((e.Cancelled == true))
{
this.LblStatus.Text = "Canceled!";
}

else if (!(e.Error == null))
{
this.LblStatus.Text = ("Error: " + e.Error.Message);
}

else
{
this.LblStatus.Text = "Done!";
}
}

private void bw_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
this.LblPercentage.Text = (e.ProgressPercentage.ToString() + "%");
}

private void PbStep()
{
try
{
Pb1.Value = Pb1.Value + 1;
}
catch
{
Pb1.Value = 0;
MessageBox.Show("Progressbar Overflow");
}
}

In the DoWork Function i receive an error when i try to set a variable like int i=0.

The Failure:UnauthorizedAccessException: Invalid cross-thread access

i followed this instruction: http://msdn.microsoft.com/en-us/library/cc221403(v=vs.95).aspx

but there they did the same. why did i have the error?
[Windows Phone 7 Software Development] sensboston:
The exception you've got show exactly what's wrong: you are trying to access GUI thread variables from another (BackgroundWorker) thread.

Use Dispatcher.Invoke as I recommended to you a few posts above.
[Windows Phone 7 Software Development] win98:
thank you sensboston. id dont understand why, because i just have one bgworker, but now it works :)

private void BtnStart_Click(object sender, RoutedEventArgs e)
{
if (bw.IsBusy != true)
{
LblDuration.Text = "";
BtnStart.Content = "Calculating...";
Pb1.Value = 0.0;
Pb1.Maximum = Max;
bw.RunWorkerAsync();
}
}

private void bw_DoWork(object sender, DoWorkEventArgs e)
{
BackgroundWorker worker = sender as BackgroundWorker;

DateTime StartZeit = DateTime.Now;
Dispatcher.BeginInvoke(() =>
{
LblDuration.Text = "";
BtnStart.Content = "Calculating...";
for (int i = 0; i < Pb1.Maximum; i++)
{
if ((worker.CancellationPending == true)) //Abbruchbedingung
{
e.Cancel = true;
break;
}
else //Progressbedingung
{
Pb1.Value = Pb1.Value + 1;
//PbStep();
}
}

DateTime EndZeit = DateTime.Now;
TimeSpan GemesseneZeit = EndZeit - StartZeit;
LblDuration.Text = "Duration: " + GemesseneZeit.ToString();

BtnStart.Content = "Start";
});
}

private void bw_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
this.LblPercentage.Text = (e.ProgressPercentage.ToString() + "%");
}

Just my progressbar isnt running fluently. still just 0% (before calc) or 100% (after calc) and no steps between :(
[Windows Phone 7 Software Development] sensboston:
It's simple, dear Watson: your code updating progress bar too fast, without delays needed for GUI updates ;)
[Windows Phone 7 Software Development] cameronm:
yep agree with this .. what you are actually doing in the loop is not enough for you to acutally see the progressbar update .. fast little things these phones of ours :)
[Windows Phone 7 Software Development] win98:
yeah, this was the first i tryed, before posting in this forum.

delay() did not work in c#.

Application.DoEvents() should work if i can believe google, but visual studio says there is no definition for doevents().

So i used

Pb1.Value++;
System.Threading.Thread.Sleep(1);

after each progressbar.value++, but this either didnt work...

what is the secret?
[Windows Phone 7 Software Development] cameronm:
1 millisecond will not be enough to slow it down either

Maybe try 1000 instead ..
[Windows Phone 7 Software Development] cameronm:
something else i thought of too ..

you may want to think about your design

If a progress bar is going to just flash up and complete as what you are doing is too fast .. you need to think 'is a progress bar the right control to use'

if you are going to increase the amount of work your background thread is going to do then I would say keep the progress bar

If the background thread is going to be this quick always .. then maybe a label saying 'please wait' ... and then hide the label when done .. or something similar
[Windows Phone 7 Software Development] win98:
i tried with 1000 ms but this progress bar isnt running.

@cameronm: i want to create a "benchmark app" where the cpu counts the progressbar to 1million and measures the time. the time measuring is working correctly. i just want to get a nice GUI with a running bar, like it runs when you download and install apps from the market.

i was very long googling and found commands like progressbar.PerfomStep(); like described here http://www.java2s.com/Code/CSharp/GUI-Windows-Form/ProgressBarinC.htm

this is also c#, but i cant perfom this command. did i miss some assembly, headers or so? or is it because im doint a windows phone form and that there are less command than in a normal windows application?
[Windows Phone 7 Software Development] Freeboss:
You want to make a Benchmark app and you actually used :System.Threading.Thread.Sleep(*int)...!

This is not Benchmarking.

Background Worker like any other ThreadTypeClass should report it's progress via the BackgroundWorker_ProgressChanged_Event(..args).

Inside the Event either u PerformStep() either you implement your own code logic.

If even after this the worker fills instanly like "cameronm" said above then consider making the backgroundworker's Job a bit heavier or leave the progressBar and even the seperated background thread Idea cause it is not Needed.
[Windows Phone 7 Software Development] win98:
yes, i am not luck with using a sleep command :P

PerformStep() is not accepted by the compiler :(

so you mean just counting up is to "easy". what progress could be "heavier". now i understand what cameronm meant^^

in the evening i will try more difficult calculations like sqare and multiplication of integers. would that be heavy enough?
[Windows Phone 7 Software Development] Freeboss:
Typing from LG quantum :)

Try this: make your calculations in a for loop 1-100..at each loop make progressbar.value++ .
[Windows Phone 7 Software Development] PG2G:
You should be calling ReportProgress and then updating the Progress Bar in the Progress Changed function.

See: http://msdn.microsoft.com/en-us/library/cc221403(v=vs.95).aspx
[Windows Phone 7 Software Development] win98:
@PG2G

the link you posted was exactly the source where i learned to implement the bw_worker. but with the command you told me i got an failure in the marked line (see source code comment). It says: InvalidOperationException: Operation has already been completed.

private void bw_DoWork(object sender, DoWorkEventArgs e)
{
BackgroundWorker worker = sender as BackgroundWorker;
double a, b, c;

DateTime StartZeit = DateTime.Now;
Dispatcher.BeginInvoke(() =>
{
LblDuration.Text = "";
BtnStart.Content = "Calculating...";
for (int i = 0; i < Pb1.Maximum/100; i++)
{
if ((worker.CancellationPending == true))
{
e.Cancel = true;
break;
}
else
{
for (int m = 0; m < 10; m++)
{
a = 3547.23; //double
b = 2354.15; //double
c = (a * b) * (a * a * b);
}
Pb1.Value++;//PbStep();
worker.ReportProgress((i * 10)); //Failure here//
}
}

DateTime EndZeit = DateTime.Now;
TimeSpan GemesseneZeit = EndZeit - StartZeit;
LblDuration.Text = "Duration: " + GemesseneZeit.ToString();

BtnStart.Content = "Start";
});
}

@Freeboss

i tried it with your loop and a double calculation but it didnt work...

im going crazy, in vb i can do this in 10 minutes^^
[Windows Phone 7 Software Development] PG2G:
Okay, this has become a bit of a mess so let's try and clean it up :P

1. Set your initial control values prior to even calling RunAsyncWorker (or whatever calls DoWork). Meaning take the duration label and button content out of DoWork.

2. Get rid of BeginInvoke, it is the source of your problems. This call puts all of your logic into a separate thread. This means the DoWork method exits immediately after BeginInvoke is run. When DoWork is complete, it fires off RunWorkerCompleted (where you probably set the progress to 100%) and the worker is done.

3. Because we no longer have BeginInvoke, do not modify control values in DoWork. You should be modifying the value of your ProgressBar in the handler for ProgressChanged.

Hopefully that helps. Let me know if you need something more visual.
[Windows Phone 7 Software Development] Freeboss:
Ok i don't have the time to comment now but i hope you will figure it out..

Download the attachment..contains the project
[Windows Phone 7 Software Development] win98:
thank you freeboss, your app seems to work. however on the first looks i would say i had that thisway :D i will soon try to figure out what i did wrong.

but i saw u also used

System.Threading.Thread.Sleep(1);

which isnt the base of a benchmark app. Anyway im not going to publish a bench app in the wp7 market, this was just my try to make a progress bar working, and i things the 1ms sleeping will be fine.

great thank to you guys :)
[Windows Phone 7 Software Development] win98:
ok, i get it now :)

after this german tutorial: http://www.der-softwareentwickler-b...ultithreading-mit-vbnet-und-backgroundworker/

i understand what PG2G mean. The fault was to use progressbar.value ++ in the dowork sub. the reason is because you just can access the backgroundworker with events, and so you (or in this case me :D ) have to use the bgw.ReportProgress(p) event, where p is a number from 0 to 100 (calculated from loop index).

anyway i found a vb sdk. so i wrote the programm in vb, but it works similar in c#

Imports System.ComponentModel

Partial Public Class MainPage
Inherits PhoneApplicationPage

Private WithEvents bgw As New BackgroundWorker
Dim max As Integer
Dim test As String = ""

' Constructor
Public Sub New()
InitializeComponent()
bgw.WorkerReportsProgress = True 'Status rückmelden
bgw.WorkerSupportsCancellation = True 'Abbrechen erlauben
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
max = 1000
ProgressBar1.Value = 0

bgw.RunWorkerAsync()
End Sub

Sub Count()
Dim x, i As Integer
Dim p As Double

For x = 0 To 999

For i = 0 To 999

test = test & "a"

Next i

p = x / 1000 * 100
bgw.ReportProgress(p)

test = ""

If bgw.CancellationPending = True Then
bgw.ReportProgress(0)
Exit Sub
End If

Next x
End Sub

Private Sub bgw_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles bgw.DoWork
Call Count()
End Sub

Private Sub bgw_ProgressChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles bgw.ProgressChanged
ProgressBar1.Value = e.ProgressPercentage
End Sub

Private Sub bgw_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles bgw.RunWorkerCompleted
MessageBox.Show("Fertig")
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button2.Click
bgw.CancelAsync()
End Sub
End Class

thank you, problem solved :)
[Windows Phone 7 Software Development] sensboston:
BTW, could you explain what you are trying to implement? Your code looks senseless. What you are measuring or "benchmarking"?
[Windows Phone 7 Software Development] win98:
oh nothing special.

i just wanted to learn this backgroundworker for my further app(s)

and a simple progressbar should be an example. its not a really usefull benchmark app :P
[G Tablet General] albright:
I *was* fooling around installing various roms and such,

but suddenly the touch screen is almost totally

unresponsive - or else starts doing strange, jumpy things

in response to a touch.

Is this just bad hardware (my tablet is only a week old)?

Or is there some kind of fix?

I have nvflashed it but that does not help.

Any advice welcome; very sad to lose my gtablet so soon ...:(
[G Tablet General] Rumbleweed:
What ROMs kernels Flash tools were you using. some combinations don't play well together.
[G Tablet General] albright:
If I understand right, the only flash tool I used was clockworkmod.

I had vegan 5.1.1 installed but then decided to switch to tnt lite 4.4.

Everything appeared to go well - the only strange thing was that

tnt lite had a lock screen when the tablet started (which I don't

think is in tnt lite).

I was trying to get email set up, but kept getting a "cannot verify

hostname" error.

After one of several reboots - the screen suddenly failed to respond to touches

or gestures.

I finally nvflashed it back to stock but that did not fix the screen issue.

I'll let the battery rundown (as it is now the display never turns off)

and see if that does any good.

Then return it to tigerdirect.ca for replacement ...
[G Tablet General] roebeet:
TNT Lite 4.4.0 does have a lockscreen.

If you are still on it, try the calibration.ini trick (if you haven't already): http://xdaforums.com/showpost.php?p=9774374&postcount=27 (the hack itself already exists, you just need to create the calibration.ini file and reboot. Then remove it when it's completed).
[G Tablet General] albright:
well, it's worth a try! I assume you mean that I just put the calibration.ini file

on the root of sdcard2 (because I can't get access to the internal sdcard).

..... and ..... holy cr*p - It worked. :)

I had flashed to the 3316 stock - time to climb back on the horse and

install tnt lite once more.

Thanks Roebeet
[Xoom General] lilikin:
Over here in the UK I am waiting for my pre ordered xoom 3g and am looking for a bluetooth headset that does the followimg

Lets me plug my headphones in seperately

Has a remote on it

Has a display for curremt somg

Doesnt put m's in xda app ;)

Works with xoom and hd2 runnimg ginger bread

Has a mic on it

This is my ideal any ideas have looked cant find the exact one?
[Xoom General] kcrudup:
The Sony MW600 does all that except for song titles, but there's no current support in Android for that anyway.
[Xoom General] lilikin:
Cheers looks good