FORUMS

Vinsic 20,000mAh Ultra Slim Power Bank Giveaway

We have covered a lot of Android Accessories here on XDA TV. Mostly because we realize … more

T-Mobile Steps Up The War Against Verizon

T-Mobile has today launched a new attack on Verizon under the tagline of “Never Settle … more

Multi DPI Apps for Galaxy Note 4

Samsung stock apps do not scale to non-stock DPIs, which can prove annoying to those that want to … more

Google #StepInsideAdWords Event Livestream

Ahead of the annual I/O conference scheduled to take place later this month, the Google … more

 View Poll Results: What does u want in the next version?

Ability to read/write the device contacts?
 
1 Vote(s)
50.00%
Ability to read/write device sms/mms?
 
1 Vote(s)
50.00%
Post Reply Subscribe to Thread Email Thread

[DEV] AndroidCtrl.dll [0.0.0.12] (AAPT/ADB/Fastboot/(apk/zip) Signer - Framework)

4th March 2015, 09:31 PM |#71  
OP Senior Member
Flag Delmenhorst
Thanks Meter: 114
 
Donate to Me
More
Quote:
Originally Posted by squabbi

I got the connection monitor working! Thanks! Now with your advice for the identifier token, I get this:

Code:
System.Collections.Generic.List`1[System.String]
I remember once we had this issue and we fixed it somehow.

Thanks for the UI example too! I haven't looked at it yet but I will soon! Thanks friend!

Heyho

Sry for the little mistake, i fixed it, for me and my token it works now. :P

Code:
List<string> _token = new List<string>();
foreach (string line in Fastboot.Instance().OEM.GetIdentifierToken())
{
    GroupCollection groups = Regex.Match(line, @"^\(bootloader\)\s{1,}(?<PART>.*?)$").Groups;
    string part = groups["PART"].Value;
    if (String.IsNullOrEmpty(part) == false && Regex.IsMatch(part, @"^<{1,}.*?>{1,}$") == false)
    {
        _token.Add(part);
    }
}
//the final string which u can write to an file
string token = String.Join("\n", _token.ToArray());
About the "monitor" np.

Regards,
Sebastian
The Following User Says Thank You to k1ll3r8e For This Useful Post: [ View ]
 
 
10th March 2015, 11:10 AM |#72  
squabbi's Avatar
Senior Member
Flag Sydney
Thanks Meter: 1,067
 
Donate to Me
More
Quote:
Originally Posted by k1ll3r8e

Heyho

Sry for the little mistake, i fixed it, for me and my token it works now. :P

Code:
List<string> _token = new List<string>();
foreach (string line in Fastboot.Instance().OEM.GetIdentifierToken())
{
    GroupCollection groups = Regex.Match(line, @"^\(bootloader\)\s{1,}(?<PART>.*?)$").Groups;
    string part = groups["PART"].Value;
    if (String.IsNullOrEmpty(part) == false && Regex.IsMatch(part, @"^<{1,}.*?>{1,}$") == false)
    {
        _token.Add(part);
    }
}
//the final string which u can write to an file
string token = String.Join("\n", _token.ToArray());
Hmmm. Its still displaying the same line instead of the code.
About the "monitor" np.

Regards,
Sebastian

It still doesn't work for me. It shows the same string as before! Thanks for helping!
10th March 2015, 01:13 PM |#73  
OP Senior Member
Flag Delmenhorst
Thanks Meter: 114
 
Donate to Me
More
Quote:
Originally Posted by squabbi

It still doesn't work for me. It shows the same string as before! Thanks for helping!

Heyho

That's sad to hear... I think ur token output is different from mine... That's why the regex dun works...

I've send u an example from my token-dialog (window) so u can check the output with ur's.

Regards,
Sebastian
15th April 2015, 03:47 AM |#74  
squabbi's Avatar
Senior Member
Flag Sydney
Thanks Meter: 1,067
 
Donate to Me
More
Hey buddy
Could you help explain how to implement the AndroidCtrl.Logger; to display the logs to a textbox or a text block?

Thanks!
15th April 2015, 10:00 PM |#75  
OP Senior Member
Flag Delmenhorst
Thanks Meter: 114
 
Donate to Me
More
Quote:
Originally Posted by squabbi

Could you help explain how to implement the AndroidCtrl.Logger; to display the logs to a textbox or a text block?

Thanks!

Heyho

Have a look at this article.

Code:
...

Logger.Instance.CallbackWarning += CallbackLogger;
 
// This is the callback for all events
public void CallbackLogger(object sender, LoggerArgs e)
{
     App.Current.Dispatcher.Invoke((Action)delegate
     {
          // Here u have to add the worker which will add e.Log data to the textbox/-block
          // U can also call "e.Log.ToString()" to get an formatted multi-line string
     });
}

...
Hope this helps

Regards,
Sebastian
The Following User Says Thank You to k1ll3r8e For This Useful Post: [ View ]
18th April 2015, 12:12 AM |#76  
squabbi's Avatar
Senior Member
Flag Sydney
Thanks Meter: 1,067
 
Donate to Me
More
Thanks bro! It worked!! I should have read it again!
Now, is it possible to have something like this:

Code:
private async void fastbootFlash(string file, string partition)
{
          Fastboot.Instance().Flash(IDDevicePartition.[I want to use the string partition here], file);
}
So I can just call it:

Code:
Button1_click
{
          fastbootFlash("recovery1", "recovery");
}
Thank you for ur time! )
The Following User Says Thank You to squabbi For This Useful Post: [ View ]
18th April 2015, 03:14 AM |#77  
OP Senior Member
Flag Delmenhorst
Thanks Meter: 114
 
Donate to Me
More
Quote:
Originally Posted by squabbi

Thanks bro! It worked!! I should have read it again!
Now, is it possible to have something like this:

Code:
private async void fastbootFlash(string file, string partition)
{
          Fastboot.Instance().Flash(IDDevicePartition.[I want to use the string partition here], file);
}
So I can just call it:

Code:
Button1_click
{
          fastbootFlash("recovery1", "recovery");
}
Thank you for ur time! )

Heyho

no u can't use an string as an enum. But, u can act like the following example:
Code:
Fastboot.Instance().Execute(String.Join(" ", "flash", "MyPartition", Tools.General.Quote("MyImgPath")), 0);
EDIT (another, maybe better solution):
Code:
...
using System.Windows.Collections.Generic;
...
// Set an ComboBox as partition selector 
// ComboBox _partition = new ComboBox();

// Add all partitions from the IDDevicePartition enum to it
foreach (IDDevicePartition enu in Enum.GetValues(typeof(IDDevicePartition)))
{
    // Here i use an KeyValuePair (u can also use an own class), so u can bind to the "Key" property of the KeyValuePair
    // to display the user the partition name
    _partition.Add(new KeyValuePair<string, IDDevicePartition>(enu.ToString(), enu));
}
...

private async void fastbootFlash(string file)
{
    if (_partition != null)
    {
        if (_partition.SelectedItem != null)
        {
            // Use the selected partition to flash the img
            Fastboot.Instance().Flash(((KeyValuePair<string, IDDevicePartition>)_partition.SelectedItem).Value, file);
        }
    }
}
(Code is untested)

Hope this helps

Regards,
Sebastian
Last edited by k1ll3r8e; 18th April 2015 at 02:45 PM.
The Following User Says Thank You to k1ll3r8e For This Useful Post: [ View ]
19th April 2015, 10:30 AM |#78  
squabbi's Avatar
Senior Member
Flag Sydney
Thanks Meter: 1,067
 
Donate to Me
More
Hey man! Could you add this new adb command? Its for the HTC one M9.

Code:
ADB.Instance().Reboot(IDBoot.DOWNLOAD)
to do:
Code:
adb reboot download
Thanks!
The Following User Says Thank You to squabbi For This Useful Post: [ View ]
19th April 2015, 12:43 PM |#79  
OP Senior Member
Flag Delmenhorst
Thanks Meter: 114
 
Donate to Me
More
Quote:
Originally Posted by squabbi

Hey man! Could you add this new adb command? Its for the HTC one M9.

Code:
ADB.Instance().Reboot(IDBoot.DOWNLOAD)
to do:
Code:
adb reboot download
Thanks!

Heyho

sure! - I just add it to the dll upload starts in 5 min

EDIT:
UPDATE is online!

Regards,
Sebastian
Last edited by k1ll3r8e; 19th April 2015 at 01:03 PM.
The Following User Says Thank You to k1ll3r8e For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
adb, androidctrl.dll, dll, fastboot, framework
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes