FORUMS
Remove All Ads from XDA

 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%

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

332 posts
Thanks Meter: 245
 
Post Reply Email Thread
Announcement from k1ll3r8e: You need an UI for some functions of this dll? Have a look at my AndroidCtrlUI.dll!
28th November 2015, 06:23 AM |#91  
k1ll3r8e's Avatar
OP Senior Member
Flag Delmenhorst
Thanks Meter: 245
 
Donate to Me
More
Quote:
Originally Posted by squabbi

I'm good thank you.

This is my output. It looks the same to yours.

Code:
I:\Android\Android Tools>adb devices -l
List of devices attached
XXXXXXXXXXXXXXXX       device product:angler model:Nexus_6P device:angler
Is there any way of checking the device state with the "status" from the device selector (combobox)?

Thanks.

Heyho
-
that good to hear
-
About the output, maybe u passed an empty (string)deviceID?

Code:
IDDeviceState state = General.CheckDeviceState(ADB.Instance().DeviceID);

/* Are u sure that u selected a device before u use? */
ADB.Instance().DeviceID
About the selector, u can use the following variables to get the required data:
Code:
/* FileSystemViewModel myModel = new FileSystemViewModel(); */

(DataModelDevicesItem) myModel.DeviceSelector.SelectedItem
(ListCollectionView) myModel.DeviceSelector.ComboElements
Hope this helps u

Regards,
Sebastian
The Following User Says Thank You to k1ll3r8e For This Useful Post: [ View ] Gift k1ll3r8e Ad-Free
 
 
21st December 2015, 05:27 AM |#92  
squabbi's Avatar
Senior Member
Flag Sydney
Thanks Meter: 1,355
 
Donate to Me
More
Hello! It's me again!

Could you add these partitions?
  • vendor
  • userdata
  • bootloader

Thank you!

EDIT:

Is there any way in getting a live output (async) while the command is running using the method you gave almost a year ago (it still works! )

Output is displayed via a richtextbox:

Code:
<RichTextBox x:Name="console" IsReadOnly="True" HorizontalAlignment="Left" Height="110" Margin="10,362,0,0" VerticalAlignment="Top" Width="497">
            <RichTextBox.Resources>
                <Style TargetType="{x:Type Paragraph}">
                    <Setter Property="Margin" Value="0,0,0,0"/>
                </Style>
            </RichTextBox.Resources>
            <FlowDocument/>
        </RichTextBox>
This is the method:

Code:
        public void Add(List<string> msg)
        {
            foreach (string tmp in msg)
            {
                console.Document.Blocks.Add(new Paragraph());
            }
            console.ScrollToEnd();
        }
This is how I call it:

Code:
Add(Fastboot.Instance().Execute("flash vendor " + comma.Content + appPath + "Data/Downloads/Vendor/" + vendorListBox.SelectedItem.ToString() + comma.Content, -1));
For some fastboot commands, especially when I'm flashing a large zip I want to be able to see the sending, flashing and done messages as they come up. I've tried experimenting by making it async and await but with no luck.

EDIT 2! ahha I keep on finding new things!

Can you update the fastboot binary and commands to reflect new commands such as: fastboot flashing unlock etc. It should have been updated with the 23.0.1 rev of the SDK tools. Thanks,

EDIT 3! I'm on a roll! haha

Is there any way to fix this error? When I compile and run the program the tree view is fine.

https://gyazo.com/992225e548ddd2a8877b856960e50a74


Regards,
Squabbi
The Following User Says Thank You to squabbi For This Useful Post: [ View ] Gift squabbi Ad-Free
22nd December 2015, 06:38 AM |#93  
k1ll3r8e's Avatar
OP Senior Member
Flag Delmenhorst
Thanks Meter: 245
 
Donate to Me
More
Quote:
Originally Posted by squabbi

Hello! It's me again!

Could you add these partitions?

  • vendor
  • userdata
  • bootloader

Thank you!

EDIT:

Is there any way in getting a live output (async) while the command is running using the method you gave almost a year ago (it still works! )

Output is displayed via a richtextbox:

Code:
<RichTextBox x:Name="console" IsReadOnly="True" HorizontalAlignment="Left" Height="110" Margin="10,362,0,0" VerticalAlignment="Top" Width="497">
            <RichTextBox.Resources>
                <Style TargetType="{x:Type Paragraph}">
                    <Setter Property="Margin" Value="0,0,0,0"/>
                </Style>
            </RichTextBox.Resources>
            <FlowDocument/>
        </RichTextBox>
This is the method:

Code:
        public void Add(List<string> msg)
        {
            foreach (string tmp in msg)
            {
                console.Document.Blocks.Add(new Paragraph());
            }
            console.ScrollToEnd();
        }
This is how I call it:

Code:
Add(Fastboot.Instance().Execute("flash vendor " + comma.Content + appPath + "Data/Downloads/Vendor/" + vendorListBox.SelectedItem.ToString() + comma.Content, -1));
For some fastboot commands, especially when I'm flashing a large zip I want to be able to see the sending, flashing and done messages as they come up. I've tried experimenting by making it async and await but with no luck.

EDIT 2! ahha I keep on finding new things!

Can you update the fastboot binary and commands to reflect new commands such as: fastboot flashing unlock etc. It should have been updated with the 23.0.1 rev of the SDK tools. Thanks,

EDIT 3! I'm on a roll! haha

Is there any way to fix this error? When I compile and run the program the tree view is fine.

https://gyazo.com/992225e548ddd2a8877b856960e50a74


Regards,
Squabbi

Heyho XD,

about the partitions, i just added them to the (enum)IDDevicePartition

about the "real time" output, u can use the "ProcessModels.RealTimeBG{}" class like:
Code:
using using AndroidCtrl.ProcessModels;
...

RealTimeBG procRT = new RealTimeBG(Fastboot.PATH_EXE, "flash vendor " + comma.Content + appPath + "Data/Downloads/Vendor/" + vendorListBox.SelectedItem.ToString() + comma.Content);
procRT.Callback += Response;
procRT.Start();

/*procRT.Dispose();*/


private void Response(object sender, ProcessResponseArgs e)
{
    if (string.IsNullOrEmpty(e.Response) == false)
    {

    }
}
about the fastboot commands, i just download the latest SDK and update adb.exe and fastboot.exe. I'll also have a look at the new commands
(THX for that hint btw. :P)

about the error, i have no idea where it comes from... but i'll have a look at this part and do also a code analysis :P

---
The new build goes later online - i'll update this post and send u a pm
---

NOTE:
To all who use this dll, i have changed a view variables and deleted the "Logger" namespace. The "Logger" will be replaced in the next time. Also, i added an "Tools.Update" class, this is the new way to get the latest version of the dll (U can use it but u don't must).

---

Regards,
Sebastian
The Following User Says Thank You to k1ll3r8e For This Useful Post: [ View ] Gift k1ll3r8e Ad-Free
22nd December 2015, 08:12 AM |#94  
squabbi's Avatar
Senior Member
Flag Sydney
Thanks Meter: 1,355
 
Donate to Me
More
Quote:
Originally Posted by k1ll3r8e

Heyho XD,

about the partitions, i just added them to the (enum)IDDevicePartition

about the "real time" output, u can use the "ProcessModels.RealTimeBG{}" class like:

Code:
using using AndroidCtrl.ProcessModels;
...

RealTimeBG procRT = new RealTimeBG(Fastboot.PATH_EXE, "flash vendor " + comma.Content + appPath + "Data/Downloads/Vendor/" + vendorListBox.SelectedItem.ToString() + comma.Content);
procRT.Callback += Response;
procRT.Start();

/*procRT.Dispose();*/


private void Response(object sender, ProcessResponseArgs e)
{
    if (string.IsNullOrEmpty(e.Response) == false)
    {

    }
}
about the fastboot commands, i just download the latest SDK and update adb.exe and fastboot.exe. I'll also have a look at the new commands
(THX for that hint btw. :P)

about the error, i have no idea where it comes from... but i'll have a look at this part and do also a code analysis :P

---
The new build goes later online - i'll update this post and send u a pm
---

NOTE:
To all who use this dll, i have changed a view variables and deleted the "Logger" namespace. The "Logger" will be replaced in the next time. Also, i added an "Tools.Update" class, this is the new way to get the latest version of the dll (U can use it but u don't must).

---

Regards,
Sebastian

Thanks for adding in those partitions! and np about the new sdk update. btw the tools.update looks promising too.

I had a look at the RealTimeBG and I tried to incorporate it into something like this:

Code:
flashVendor.IsEnabled = false;
                vendorProgressBar.IsIndeterminate = true;
                RealTimeBG procRT = new RealTimeBG(Fastboot.PATH_FASTBOOT, "flash vendor " + comma.Content + appPath + "Data/Downloads/Vendor/" + vendorListBox.SelectedItem.ToString() + comma.Content);
                procRT.Callback += Response;
                procRT.Start();
                vendorProgressBar.IsIndeterminate = false;
                flashVendor.IsEnabled = true;
Where I click a button and it will disable it and start a progress bar. But I'm guessing it runs on a different background thread. It didn't turn out what I wanted to see. When I flashed the vendor image it took 7 seconds to flash, the output (which I've done like this

Code:
private void Response(object sender, ProcessResponseArgs e)
        {
            if (string.IsNullOrEmpty(e.Response) == false)
            {
                App.Current.Dispatcher.Invoke((Action)delegate
                {
                    console.Document.Blocks.Add(new Paragraph(new Run(e.Response.ToString())));
                });
            }
        }
It will only display the output when the image has been completely flashed. I would prefer it to be able to be used with a progress indicator of some sort.

I hope you get what I mean.

Regards,
Squabbi
23rd December 2015, 06:23 AM |#95  
k1ll3r8e's Avatar
OP Senior Member
Flag Delmenhorst
Thanks Meter: 245
 
Donate to Me
More
Quote:
Originally Posted by squabbi

Thanks for adding in those partitions! and np about the new sdk update. btw the tools.update looks promising too.

I had a look at the RealTimeBG and I tried to incorporate it into something like this:

Code:
flashVendor.IsEnabled = false;
                vendorProgressBar.IsIndeterminate = true;
                RealTimeBG procRT = new RealTimeBG(Fastboot.PATH_FASTBOOT, "flash vendor " + comma.Content + appPath + "Data/Downloads/Vendor/" + vendorListBox.SelectedItem.ToString() + comma.Content);
                procRT.Callback += Response;
                procRT.Start();
                vendorProgressBar.IsIndeterminate = false;
                flashVendor.IsEnabled = true;
Where I click a button and it will disable it and start a progress bar. But I'm guessing it runs on a different background thread. It didn't turn out what I wanted to see. When I flashed the vendor image it took 7 seconds to flash, the output (which I've done like this

Code:
private void Response(object sender, ProcessResponseArgs e)
        {
            if (string.IsNullOrEmpty(e.Response) == false)
            {
                App.Current.Dispatcher.Invoke((Action)delegate
                {
                    console.Document.Blocks.Add(new Paragraph(new Run(e.Response.ToString())));
                });
            }
        }
It will only display the output when the image has been completely flashed. I would prefer it to be able to be used with a progress indicator of some sort.

I hope you get what I mean.

Regards,
Squabbi

Heyho,

- new build is out -

np for adding the partitions

about the output, i added "ProcessModels.RealTimeBG.IsAlive" so u can now check if the process is still running. Also, i added to some methods the "CallbackProcessResponse responseCallback" parameter, so u can now get nearly all outputs in "real time".

- If the callback will be triggered only at the end of the process, the process didn't return something while its flashing the image. -

Maybe u can add a "dummy" ProgessBar which animates "from left to right and right to left" than set an text field on top of it which indicates the state like:
Code:
State: Erasing/Formatting/Flashing/Rebooting
+--------------------------------------------------------+
|                           <->                          |  (Progressbar)
+--------------------------------------------------------+
or like this:

Code:
Overall progress: Erasing/Formatting/Flashing/Rebooting
+--------------------------------------------------------+
|    1    |      2     |     3     |    4    |    5      |  (Progressbar)
+--------------------------------------------------------+

+--------------------------------------------------------+
|         Erasing/Formatting/Flashing/Rebooting          |  (Progressbar)
+--------------------------------------------------------+
about the MSVS editor error, i checked a view files but i can't reproduce this error... Which MSVS version did u use?

Hope this helps

Regards,
Sebastian
24th December 2015, 05:17 AM |#96  
squabbi's Avatar
Senior Member
Flag Sydney
Thanks Meter: 1,355
 
Donate to Me
More
Quote:
Originally Posted by k1ll3r8e

Heyho,

- new build is out -

np for adding the partitions

about the output, i added "ProcessModels.RealTimeBG.IsAlive" so u can now check if the process is still running. Also, i added to some methods the "CallbackProcessResponse responseCallback" parameter, so u can now get nearly all outputs in "real time".

- If the callback will be triggered only at the end of the process, the process didn't return something while its flashing the image. -

Maybe u can add a "dummy" ProgessBar which animates "from left to right and right to left" than set an text field on top of it which indicates the state like:

Code:
State: Erasing/Formatting/Flashing/Rebooting
+--------------------------------------------------------+
|                           <->                          |  (Progressbar)
+--------------------------------------------------------+
or like this:

Code:
Overall progress: Erasing/Formatting/Flashing/Rebooting
+--------------------------------------------------------+
|    1    |      2     |     3     |    4    |    5      |  (Progressbar)
+--------------------------------------------------------+

+--------------------------------------------------------+
|         Erasing/Formatting/Flashing/Rebooting          |  (Progressbar)
+--------------------------------------------------------+
about the MSVS editor error, i checked a view files but i can't reproduce this error... Which MSVS version did u use?

Hope this helps

Regards,
Sebastian

Thanks for updating so quickly! I've chosen to use the traditional 'Add' method for showing output. Btw, I'm using VS 2015 community. I can PM you the xaml code. Also one more thing, the device connection monitor with the combobox won't show my device anymore. It used to before but I don't know what happened.

It's so close to being finished.

Thanks,
24th December 2015, 06:34 AM |#97  
k1ll3r8e's Avatar
OP Senior Member
Flag Delmenhorst
Thanks Meter: 245
 
Donate to Me
More
Quote:
Originally Posted by squabbi

Thanks for updating so quickly! I've chosen to use the traditional 'Add' method for showing output. Btw, I'm using VS 2015 community. I can PM you the xaml code. Also one more thing, the device connection monitor with the combobox won't show my device anymore. It used to before but I don't know what happened.

It's so close to being finished.

Thanks,

Heyho

np for the update - i use the same MSVS version so, send me ur xaml code then ill have a look at it

about the connection monitor,

1. download/install/run this tool
2. get the output from "adb devices -l"
3. paste it into the "sample text" box
4. add this
Code:
^(?<SERIAL>.*?)\s{1,}(?<STATE>.*?)(\s{1,}product:\s{0,}(?<PRODUCT>.*?))?(\s{1,}model:\s{0,}(?<MODEL>.*?))?(\s{1,}device:\s{0,}(?<DEVICE>.*?))?$
to the "Regular Expression" box
5. press "Run Match" or "Validate"

if the "Search Results" box stay empty my regular expression have a bug^^
(Pls report if the expression can detect the output line.)

Hope this helps

Regards,
Sebastian
24th December 2015, 07:06 AM |#98  
squabbi's Avatar
Senior Member
Flag Sydney
Thanks Meter: 1,355
 
Donate to Me
More
Quote:
Originally Posted by k1ll3r8e

Heyho

np for the update - i use the same MSVS version so, send me ur xaml code then ill have a look at it

about the connection monitor,

1. download/install/run this tool
2. get the output from "adb devices -l"
3. paste it into the "sample text" box
4. add this

Code:
^(?<SERIAL>.*?)\s{1,}(?<STATE>.*?)(\s{1,}product:\s{0,}(?<PRODUCT>.*?))?(\s{1,}model:\s{0,}(?<MODEL>.*?))?(\s{1,}device:\s{0,}(?<DEVICE>.*?))?$
to the "Regular Expression" box
5. press "Run Match" or "Validate"

if the "Search Results" box stay empty my regular expression have a bug^^
(Pls report if the expression can detect the output line.)

Hope this helps

Regards,
Sebastian

Looks like it's validated so there should be no problems. I'll send you (PM) the whole thing so you can take a look at the connection monitor too.

Thanks,
Squabbi
The Following User Says Thank You to squabbi For This Useful Post: [ View ] Gift squabbi Ad-Free
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