Posible wp registry editor from PC? - Windows Phone 8 Q&A, Help & Troubleshooting

This tool http://go.microsoft.com/?linkid=9898656 (this is thedownload link) has an script inside atached to this message.
Can we modify windows phone registryfrom PC?
#################################################################################
# Grant/Deny the user access to the registry entry.
#################################################################################
function Add-RegistryPermission(
[String]$RegKeyPath = $(throw "No registry key path is specified"),
[String]$User = $(throw "No user is specified"),
[String]$Permission = $(throw "No permission is specified"),
[String]$AccessControlType = "Allow"
)
{
$acl = Get-Acl -Path $regkeyPath
$controlType = [Enum]:arse([Security.AccessControl.AccessControlType], $AccessControlType)
$iFlags = [Enum]:arse([Security.AccessControl.InheritanceFlags], "ContainerInherit,ObjectInherit")
$pFlags = [Enum]:arse([Security.AccessControl.PropagationFlags], "None")
$rights = [Enum]:arse([Security.AccessControl.RegistryRights], $Permission)
if($AccessControlType -eq "Allow")
{
$accesses = @($acl.Access | where {$_.IdentityReference -eq $User})
foreach($access in $accesses)
{
if($access.AccessControlType -eq 'Deny')
{
if(($access.RegistryRights.Value__ -band $rights.Value__) -ne 0)
{
$rule = New-Object Security.AccessControl.RegistryAccessRule $User,$access.RegistryRights,$iFlags,$pFlags,$access.AccessControlType
[void]$acl.RemoveAccessRule($rule)
}
}
}
}
$rule = New-Object Security.AccessControl.RegistryAccessRule $User,$rights,$iFlags,$pFlags,$controlType
$acl.AddAccessRule($rule)
$acl | Set-Acl
}

What makes you think this has anything to do with phone? That's a PowerShell script (which the phone can't execute) for editing the permissions on a registry key (which you can't do unless you already have control over that registry key anyhow, i.e. you would need to run it as Admin). It's not a registry "editor" at all, aside from changing a registry ACL. It might be handy for those who want to edit permissions on a PC registry key without opening regedit, but that's it.
Please don't post stuff like this in Dev&Hacking if you don't have any idea what it does. Also, please don't spam me with PMs about it. You've been here long enough that you should know better, even if my signature didn't specifically ask people not to waste my time that way. I have blocked you from messaging me.

You wasted my time...
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://schemas.microsoft.com/embedded/2004/10/ImageUpdate">
<Identity>
<Owner>Microsoft</Owner>
<Component>MS_SLAPI_UPDATER_FEATURE_PACK</Component>
<SubComponent>MainOS</SubComponent>
<Version Major="8" Minor="10" QFE="15154" Build="166" />
</Identity>
<ReleaseType>Production</ReleaseType>
<OwnerType>Microsoft</OwnerType>
<BuildType>Retail</BuildType>
<CpuType>ARM</CpuType>
<Partition>MainOS</Partition>
<GroupingKey>MS_SLAPI_UPDATER_FEATURE_PACK</GroupingKey>
<IsRemoval>false</IsRemoval>
<Files>
<FileEntry>
<FileType>Manifest</FileType>
<DevicePath>\Windows\Packages\DsmFiles\Microsoft.MS_SLAPI_UPDATER_FEATURE_PACK.MainOS.dsm.xml</DevicePath>
<CabPath>man.dsm.xml</CabPath>
<Attributes>Archive</Attributes>
<FileSize>3652</FileSize>
<CompressedFileSize>3652</CompressedFileSize>
<StagedFileSize>895</StagedFileSize>
</FileEntry>
<FileEntry>
<FileType>SecurityPolicy</FileType>
<DevicePath>\Windows\Packages\PolicyFiles\Microsoft.BaseOS.SLAPIUpdater.Feature.policy.xml</DevicePath>
<CabPath>2_Microso.xml</CabPath>
<Attributes>Archive</Attributes>
<SourcePackage>Microsoft.BaseOS.SLAPIUpdater.Feature</SourcePackage>
<FileSize>1063</FileSize>
<CompressedFileSize>1063</CompressedFileSize>
<StagedFileSize>635</StagedFileSize>
</FileEntry>
<FileEntry>
<FileType>Registry</FileType>
<DevicePath>\Windows\Packages\RegistryFiles\Microsoft.MS_SLAPI_UPDATER_FEATURE_PACK.MainOS.reg</DevicePath>
<CabPath>6_Microso.reg</CabPath>
<Attributes>Archive Compressed</Attributes>
<FileSize>5482</FileSize>
<CompressedFileSize>4096</CompressedFileSize>
<StagedFileSize>1245</StagedFileSize>
</FileEntry>
<FileEntry>
<FileType>Catalog</FileType>
<DevicePath>\Windows\System32\catroot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\Microsoft.MS_SLAPI_UPDATER_FEATURE_PACK.MainOS.cat</DevicePath>
<CabPath>content.cat</CabPath>
<Attributes>Archive Compressed</Attributes>
<FileSize>5064</FileSize>
<CompressedFileSize>4096</CompressedFileSize>
<StagedFileSize>3307</StagedFileSize>
</FileEntry>
<FileEntry>
<FileType>Regular</FileType>
<DevicePath>\windows\System32\ETWSLAPIUpdater.dll</DevicePath>
<CabPath>3_ETWSLAP.dll</CabPath>
<Attributes>Archive Compressed</Attributes>
<SourcePackage>Microsoft.BaseOS.SLAPIUpdater.Feature</SourcePackage>
<FileSize>8192</FileSize>
<CompressedFileSize>4096</CompressedFileSize>
<StagedFileSize>727</StagedFileSize>
</FileEntry>
<FileEntry>
<FileType>Regular</FileType>
<DevicePath>\windows\System32\SLAPIUpdater.exe</DevicePath>
<CabPath>4_SLAPIUp.exe</CabPath>
<Attributes>Archive Compressed</Attributes>
<SourcePackage>Microsoft.BaseOS.SLAPIUpdater.Feature</SourcePackage>
<FileSize>36608</FileSize>
<CompressedFileSize>16384</CompressedFileSize>
<StagedFileSize>11970</StagedFileSize>
</FileEntry>
<FileEntry>
<FileType>Regular</FileType>
<DevicePath>\windows\System32\UpdateKernelCache.exe</DevicePath>
<CabPath>5_UpdateK.exe</CabPath>
<Attributes>Archive Compressed</Attributes>
<SourcePackage>Microsoft.BaseOS.SLAPIUpdater.Feature</SourcePackage>
<FileSize>57648</FileSize>
<CompressedFileSize>36864</CompressedFileSize>
<StagedFileSize>30446</StagedFileSize>
</FileEntry>
</Files>
</Package>
Reg file inside executable:
Windows Registry Editor Version 5.00
; RegistrySource=Microsoft.BaseOS.SLAPIUpdater.Feature.reg
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{6D00F5E7-D43C-42A7-87A9-166745D22A21}]
@="Microsoft-WindowsPhone-SLAPIUpdater"
"Enabled"=dword:00000001
;Value:C:\windows\System32\ETWSLAPIUpdater.dll
"MessageFileName"=hex(2):43,00,3A,00,5C,00,77,00,69,00,6E,00,64,00,6F,00,77,00,73,00,5C,00,53,00,79,00,73,00,74,00,65,00,6D,00,33,00,32,00,5C,00,\
45,00,54,00,57,00,53,00,4C,00,41,00,50,00,49,00,55,00,70,00,64,00,61,00,74,00,65,00,72,00,2E,00,64,00,6C,00,6C,00,00,00
;Value:C:\windows\System32\ETWSLAPIUpdater.dll
"ResourceFileName"=hex(2):43,00,3A,00,5C,00,77,00,69,00,6E,00,64,00,6F,00,77,00,73,00,5C,00,53,00,79,00,73,00,74,00,65,00,6D,00,33,00,32,00,5C,00,\
45,00,54,00,57,00,53,00,4C,00,41,00,50,00,49,00,55,00,70,00,64,00,61,00,74,00,65,00,72,00,2E,00,64,00,6C,00,6C,00,00,00
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\WMI\Autologger\WinPhoneCritical\{6D00F5E7-D43C-42A7-87A9-166745D22A21}]
"Enabled"=dword:00000001
"EnableLevel"=dword:00000004
;Value:0X0000000000000005
"MatchAnyKeyword"=hex(b):05,00,00,00,00,00,00,00
; RegistrySource=Microsoft.BaseOS.SLAPIUpdater.Schedule.reg
[HKEY_LOCAL_MACHINE\Software\Microsoft\WPTaskScheduler\{1A6FC98F-6F1F-427A-8059-F51F520BAAF7}]
"Schedule"=hex:01,10,08,00,CC,CC,CC,CC,B0,01,00,00,00,00,00,00,00,00,02,00,01,00,00,00,04,00,02,00,2E,06,02,00,00,00,18,00,00,00,00,00,\
00,00,00,00,0F,27,0C,00,00,00,1F,00,00,00,00,00,00,00,00,00,FF,FF,FF,FF,08,00,02,00,28,00,02,00,00,00,00,00,8F,C9,6F,1A,\
1F,6F,7A,42,80,59,F5,1F,52,0B,AA,F7,01,01,00,00,00,00,00,00,22,00,00,00,42,00,61,00,73,00,65,00,4F,00,53,00,5F,00,54,00,\
61,00,73,00,6B,00,50,00,72,00,6F,00,76,00,69,00,73,00,69,00,6F,00,6E,00,5F,00,53,00,4C,00,41,00,50,00,49,00,55,00,70,00,\
64,00,61,00,74,00,65,00,72,00,00,00,02,00,02,00,0C,00,02,00,01,00,00,00,03,00,00,00,10,00,02,00,03,00,00,00,01,00,01,00,\
14,00,02,00,01,00,01,00,1C,00,02,00,01,00,01,00,24,00,02,00,75,90,BC,A3,22,1D,C6,41,02,00,00,00,04,00,00,00,18,00,02,00,\
00,00,00,00,00,00,00,00,04,00,00,00,00,00,00,00,75,38,BC,A3,3E,06,8A,41,02,00,00,00,04,00,00,00,20,00,02,00,00,00,00,00,\
00,00,00,00,04,00,00,00,00,00,00,00,75,50,BC,A3,3E,06,8A,41,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,2C,00,02,00,30,00,02,00,00,00,00,00,30,00,00,00,00,00,00,00,30,00,00,00,25,00,73,00,79,00,73,00,74,00,65,00,\
6D,00,64,00,72,00,69,00,76,00,65,00,25,00,5C,00,77,00,69,00,6E,00,64,00,6F,00,77,00,73,00,5C,00,73,00,79,00,73,00,74,00,\
65,00,6D,00,33,00,32,00,5C,00,53,00,4C,00,41,00,50,00,49,00,55,00,70,00,64,00,61,00,74,00,65,00,72,00,2E,00,65,00,78,00,\
65,00,00,00,00,00,00,00

Related

XML parsing-best method, general discussion

I am relatively new to programing and have been teaching myself as I go. I am trying to now integrate ESPN's API into my app which outputs XML data. I have done enough research to understand that I need to use an XML parser and that the XML can be displayed as a list view or web view by adding HTML markup.
I would like this thread to become a general discussion for all new developers on what XML parsing is and what it does. How it works, the code behind it etc.
I am currently trying to modify a code snippet from the developer.google.com website.
Android includes built in libraries for XML Parsing.
You can see a minimal use of the library here:
Code:
import java.io.IOException;
import java.io.StringReader;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
public class SimpleXmlPullApp
{
public static void main (String args[])
throws XmlPullParserException, IOException
{
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
factory.setNamespaceAware(true);
XmlPullParser xpp = factory.newPullParser();
xpp.setInput( new StringReader ( "<foo>Hello World!</foo>" ) );
int eventType = xpp.getEventType();
while (eventType != XmlPullParser.END_DOCUMENT) {
if(eventType == XmlPullParser.START_DOCUMENT) {
System.out.println("Start document");
} else if(eventType == XmlPullParser.START_TAG) {
System.out.println("Start tag "+xpp.getName());
} else if(eventType == XmlPullParser.END_TAG) {
System.out.println("End tag "+xpp.getName());
} else if(eventType == XmlPullParser.TEXT) {
System.out.println("Text "+xpp.getText());
}
eventType = xpp.next();
}
System.out.println("End document");
}
}
So essentially, you can grab the xml from ESPN, save it to a file, parse it with that library, and output as desired.
Full details here: http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html
the fastest way I know is the parser written in c/c++ and compiled with ndk.
bitpushr said:
Android includes built in libraries for XML Parsing.
So essentially, you can grab the xml from ESPN, save it to a file, parse it with that library, and output as desired.
Full details here: http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html
Click to expand...
Click to collapse
I will have to try out this code. Because I am learning as I go there are many things in java I don't yet understand which ultimately make it a lot harder to accomplish tasks but I am slowly catching on
If you want to do this in a .NET (Windows x86/64, Windows Mobile, Windows Phone) environment, or a Linux MONO environment then the following will carry out the bare minimum of parsing.
Assuming you have the data in an XML file :- PARAMS.XML in the same folder as the program, created similar to this:
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<PARAMS>
<Library>TESTLIB</Library>
<Source>C:\RetData\</Source>
</PARAMS>
Then the following C# code will read and extract the parameters:
Code:
using System.Xml;
string LibName,RetDir;
XmlReader xrdr = XmlReader.Create(Application.StartupPath+"\\PARAMS.xml");
xrdr.ReadToFollowing("Library");
Libname=xrdr.ReadElementContentAsString();
xrdr.ReadToFollowing("Source");
RetDir = xrdr.ReadElementContentAsString();
xrdr.Close();
After executing this code then:
LibName = "TESTLIB"
RetDir = "C:\RetData\"
CAVEAT:
I mentioned that this is the bare minimum. An XmlReader object is a forward only reader. Also, this code has no error checking.
In this case the elements must be read in the order they occur or the reader will encounter a null element and throw an error.

DeskCast + VB.NET Source

this is a little project I have been working on to cast videos from my desktop pc with hard drives mapped from my server
it works much like fling did but built with vb.net not java
you will need .Net Framework 4.6.1 installed to run or compile this application
the VB source was built Visual Studio 2013
the C# source was built Visual Studio 2017
if you have multiple network adapters this might not work for you as it might not resolve your local ip address correctly
ffmpeg is used to transcode videos that are not mp4, when transcoding you cannot seek/select play position
when streaming from harddrive mp4 files should have the ability to seek/select play position
you can drag and drop video files onto application to play them(like Fling)
it also has the option to play files from urls
it should be pretty simple to use for you
just open the program and it should find chromecasts on the network then select the chromecast you want to cast to then click "Connect CC" then drag and drop video onto it and it should start playing
it should work for rooted and non rooted chromecasts
when using a rooted chromecast the receiver is hosted by DeskCast its self
when using a non rooted chromecast the receiver is one of the apps in the google whitelist
the receiver files deskcast sends to the rooted chromecast are in the "data" folder of the application, so you can edit these too
I did play with the idea of the chromecast its self hosting the receiver files but the www folder in the chromecast is locked/read only so that might be something for team eureka to add to the webpanel they have
this works for me very well, but I cant say that it will work for you at all
im really only posting the source so other people can use it for information or ideas to make something better than I ever could
I hope this is useful to someone
VB .NET Source
https://github.com/stooged/DeskCast
C# Source
https://github.com/stooged/DeskCastC
stooged said:
this is a little project I have been working on to cast videos from my desktop pc with hard drives mapped from my server
it works much like fling did but built with vb.net not java
you will need .Net Framework 4.5 installed to run or compile this application
it was built Visual Studio 2012 so you will need that to compile it
if you have multiple network adapters this wont work for you as it wont resolve your local ip address
ffmpeg is used to transcode videos that are not mp4, when transcoding you cannot seek/select play position
when streaming from harddrive mp4 files should have the ability to seek/select play position
you can drag and drop video files onto application to play them(like Fling)
it also has the option to play files from urls
it should be pretty simple to use for you
just open the program and it should find chromecasts on the network then select the chromecast you want to cast to then click "Connect CC" then drag and drop video onto it and it should start playing
it should work for rooted and non rooted chromecasts
when using a rooted chromecast the receiver is hosted by DeskCast its self
when using a non rooted chromecast the receiver is one of the apps in the google whitelist
the receiver files deskcast sends to the rooted chromecast are in the "data" folder of the application, so you can edit these too
I did play with the idea of the chromecast its self hosting the receiver files but the www folder in the chromecast is locked/read only so that might be something for team eureka to add to the webpanel they have
this works for me very well, but I cant say that it will work for you at all
im really only posting the source so other people can use it for information or ideas to make something better than I ever could
I hope this is useful to someone
Click to expand...
Click to collapse
You can start your own webserver if you like. You got one built into /bin/busybox
in shell you can start it with:
/bin/busybox httpd -p 8000 -h /data/www -c /data/httpd.conf
httpd.conf contains:
A:*
/cgi-bin:a:a
echo "It's working!" > /data/www/index.html
open <chromecastip>:8000 and you got your self a webserver =)
if it not working, try a newer busybox binary, the one in /bin is a bit old.
I've been looking a way to use CC as a host for casting so this was fun to see =)
Mape0661 said:
You can start your own webserver if you like. You got one built into /bin/busybox
in shell you can start it with:
/bin/busybox httpd -p 8000 -h /data/www -c /data/httpd.conf
httpd.conf contains:
A:*
/cgi-bin:a:a
echo "It's working!" > /data/www/index.html
open <chromecastip>:8000 and you got your self a webserver =)
if it not working, try a newer busybox binary, the one in /bin is a bit old.
I've been looking a way to use CC as a host for casting so this was fun to see =)
Click to expand...
Click to collapse
yeah I did try that with a new busybox binary installed to the chromecast
the webserver worked and the receiver files were hosted by the chromecast in the /data/www folder but the receiver wouldn't allow a connection to the websocket
I think it had issues with the domain/ip being the same as the chromecast
it might be something that can be changed in the rom by team eureka.
the idea of a whitelist and a receiver being on the chromecast its self might make it possible to use offline when streaming media from your pc or tablet, Netflix and hulu and apps like that we know wont work offline
I guess I will just keep playing around with it to see if I can get it to work
stooged said:
yeah I did try that with a new busybox binary installed to the chromecast
the webserver worked and the receiver files were hosted by the chromecast in the /data/www folder but the receiver wouldn't allow a connection to the websocket
I think it had issues with the domain/ip being the same as the chromecast
it might be something that can be changed in the rom by team eureka.
the idea of a whitelist and a receiver being on the chromecast its self might make it possible to use offline when streaming media from your pc or tablet, Netflix and hulu and apps like that we know wont work offline
I guess I will just keep playing around with it to see if I can get it to work
Click to expand...
Click to collapse
I was experimenting with this few weeks ago, I installed Google CastVideo from github
https://github.com/googlecast/CastVideos-chrome
Got a page working, hosted by chromecast, but I was never able to remove the DEMO text all over the videos. But it worked nicely to stream mp4 files from a samba share.
I travel a lot and my plan was/is to use a travel router and mount a samba share to my linux server with ssh
something like this on chromecast
ssh -C -f -N -p 22 -L 440:127.0.0.1:445 <username>@<serveradress>
sudo mount -t cifs //127.0.0.1/<share> <mountpoint> -o port=440,user="<user>",password="<password>"
you need a new dropbearmulti, got a working one (armv61) from
http://landley.net/aboriginal/downloads/binaries/extras/
Did you try with lighttpd?
-----------------------------------
cp /system/etc/httpd.conf /data (change port and webroot in httpd.conf, 3000 and /data/www worked for me)
mkdir /data/www
lighttpd -m /system/usr/lib -f /data/httpd.conf
Mape0661 said:
Did you try with lighttpd?
-----------------------------------
cp /system/etc/httpd.conf /data (change port and webroot in httpd.conf, 3000 and /data/www worked for me)
mkdir /data/www
lighttpd -m /system/usr/lib -f /data/httpd.conf
Click to expand...
Click to collapse
no I just tried busybox httpd
but I will give lighttpd a go
I did find one way to make the chromecast host the receiver or any html content
in the post to the chromecast to loadup the receiver if you use the data uri scheme for the post data you can make the chromecast launch html
so as the url for the receiver you can use something like data:text/html;base64,html_encoded_in_base64
I did a test with the receiver.html file from the Fling source and it worked fine
here is a php script that should allow you to play a mp4 file on the chromecast using this method with a single post
Code:
<?php
$ChromeCastIP = "192.168.1.102";
$ChromeCastApp = "Fling";
$VideoURL = "://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4";
$htmldata = base64_encode("
<html>
<head>
<title></title>
</head>
<body bgcolor=#000000 topmargin=0 leftmargin=0 bottommargin=0 rightmargin=0 marginwidth=0 marginheight=0>
<video width='100%' height='100%' autoplay>
<source src='http$VideoURL' type='video/mp4'>
</video>
</body>
</html>
");
$postdata = "data:text/html;base64,$htmldata";
$fp = fsockopen($ChromeCastIP, 8008, $errno, $errstr, 30);
$out = "POST /apps/$ChromeCastApp/ HTTP/1.1\r\n";
$out .= "Accept-Language: en-us\r\n";
$out .= "Accept: */*\r\n";
$out .= "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36\r\n";
$out .= "Host: $ChromeCastIP:8008\r\n";
$out .= "Content-Type: application/x-www-form-urlencoded\r\n";
$out .= "Origin: chrome-extension://boadgeojelhgndaghljhdicfkmllpafd\r\n";
$out .= "Content-Length: ".strlen($postdata)."\r\n";
$out .= "Connection: Close\r\n\r\n$postdata";
fwrite($fp, $out);
sleep(2);
fclose($fp);
?>
stooged said:
I did find one way to make the chromecast host the receiver or any html content
in the post to the chromecast to loadup the receiver if you use the data uri scheme for the post data you can make the chromecast launch html
so as the url for the receiver you can use something like data:text/html;base64,html_encoded_in_base64
I did a test with the receiver.html file from the Fling source and it worked fine
here is a php script that should allow you to play a mp4 file on the chromecast using this method with a single post
Code:
<?php
$ChromeCastIP = "192.168.1.102";
$ChromeCastApp = "Fling";
$VideoURL = "://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4";
$htmldata = base64_encode("
<html>
<head>
<title></title>
</head>
<body bgcolor=#000000 topmargin=0 leftmargin=0 bottommargin=0 rightmargin=0 marginwidth=0 marginheight=0>
<video width='100%' height='100%' autoplay>
<source src='http$VideoURL' type='video/mp4'>
</video>
</body>
</html>
");
$postdata = "data:text/html;base64,$htmldata";
$fp = fsockopen($ChromeCastIP, 8008, $errno, $errstr, 30);
$out = "POST /apps/$ChromeCastApp/ HTTP/1.1\r\n";
$out .= "Accept-Language: en-us\r\n";
$out .= "Accept: */*\r\n";
$out .= "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36\r\n";
$out .= "Host: $ChromeCastIP:8008\r\n";
$out .= "Content-Type: application/x-www-form-urlencoded\r\n";
$out .= "Origin: chrome-extension://boadgeojelhgndaghljhdicfkmllpafd\r\n";
$out .= "Content-Length: ".strlen($postdata)."\r\n";
$out .= "Connection: Close\r\n\r\n$postdata";
fwrite($fp, $out);
sleep(2);
fclose($fp);
?>
Click to expand...
Click to collapse
Got it working =), Very cool.
I tryed to make php work on Chromecast. At the moment I only got a test page working with some old php binaries. But the php-cli are working fine!
Can you host this in github? I'd like to contribute to this project
Giswald said:
Can you host this in github? I'd like to contribute to this project
Click to expand...
Click to collapse
I have never used github before but I think this worked
https://github.com/stooged/DeskCast
What's the main difference between the chrome extension "VideoStream for Google Chromecast" ?
Seems it can do the same job.
lancillotto said:
What's the main difference between the chrome extension "VideoStream for Google Chromecast" ?
Seems it can do the same job.
Click to expand...
Click to collapse
you don't need the chrome browser which I don't use, its junk imo.
no ads.
its free.
open source.
the main point of this is to just encourage more people to develop more things for rooted chromecasts, not everyone codes in languages that make chrome browser extensions or android apps etc.
if you look at fling its open source and is a good source of information for anyone that wants to develop standalone applications for the chromecast.
I think things like videostream are great for people who just want something that will play a file, but charging money for things and closed source projects don't really help other developers.
videostream is a good extension it has playlist support, a custom tv part, can be controlled from your phone etc.
but its transcoding is done using ffmpeg and x264 projects which are opensource and free, without those people doing amazing work on those open source projects we wouldn't be able to transcode videos.
without team eureka we wouldn't have rooted chromecasts and thats open source and free.
I made this project for my own personal use to cast media to my projector and TV's around my house, I started using fling but that stopped working so I used the source as a guide to create deskcast in a language I could understand so I could maintain it and keep it working.
I decided to share it here because this is where I found fling and the team eureka rom, its not intended to compete with other projects or extensions its more of a source code dump for anyone out there that uses vb.net.
This app Always crash no Windows 8.1 x64:crying:
---------- Post added at 07:05 AM ---------- Previous post was at 06:40 AM ----------
Play movie for 3 seconds and then crash. Always.
Crash solved
mute_man said:
This app Always crash no Windows 8.1 x64:crying:
---------- Post added at 07:05 AM ---------- Previous post was at 06:40 AM ----------
Play movie for 3 seconds and then crash. Always.
Click to expand...
Click to collapse
Before i was on windows 8 64 bits she was crashing !! Now i am on windows 8.1 64 bits she's crashing again !
I have dl the src and debug and I found where search ask on the web and i solve..
The problème is with french pc, where locale Fr is used.
Because the programme for show us the current_time and de total duration of the cast, receive data and parse them.
The programe receive data in string like "0.145666" or "46.613333" .
And later we try to convert this decimal number in string to double.
But on US pc :
(4.5).ToString() send "4.5"
Convert.ToDouble("4.5") send 4.5
Convert.ToDouble("4,5") send an exception
On FR pc :
(4.5).ToString() send "4,5"
Convert.ToDouble("4.5") send an exception
Convert.ToDouble("4,5") send 4.5
I dont find this alone but i was searching help here http://openclassrooms.com/forum/sujet/la-conversion-de-la-chaine-46-6133-en-type-double
and somebody send me here http://www.developpez.net/forums/d530200/dotnet/langages/csharp/convert-todouble-ne-gere-points/
Where i found the solution.
So you can download the src http://forum.xda-developers.com/attachment.php?attachmentid=2958209&d=1412304466
open in visual studio go to Form1.vb
At the beginning of the file under
Code:
Option Strict Off
Option Explicit On
Imports System.IO
Imports System.Net
Imports System.Threading
add
Code:
Imports System.Globalization
and search for
Code:
If Spl2(0) = "null" Then Spl2(0) = 0
You will find 3 occurance. But only 2 are interesting on line 288 and line 295.
Add before these 2 lines
Code:
If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",")
at final you will have
Code:
If InStr(StrMessage, Chr(34) & "duration" & Chr(34) & ":") <> 0 Then
Spl1 = Split(StrMessage, Chr(34) & "duration" & Chr(34) & ":")
Spl2 = Split(Spl1(1), ",")
' If Spl2(0).Contains(".") Then Spl2(0) = Spl2(0).Replace(".", ",")
If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",")
If Spl2(0) = "null" Then Spl2(0) = 0
pDuration = Fix(Spl2(0))
End If
If InStr(StrMessage, Chr(34) & "current_time" & Chr(34) & ":") <> 0 Then
Spl1 = Split(StrMessage, Chr(34) & "current_time" & Chr(34) & ":")
Spl2 = Split(Spl1(1), ",")
' If Spl2(0).Contains(".") Then Spl2(0) = Spl2(0).Replace(".", ",")
If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",")
If Spl2(0) = "null" Then Spl2(0) = 0
pTime = Fix(Spl2(0))
TrackTime(pDuration, pTime)
End If
Instead of
Code:
If InStr(StrMessage, Chr(34) & "duration" & Chr(34) & ":") <> 0 Then
Spl1 = Split(StrMessage, Chr(34) & "duration" & Chr(34) & ":")
Spl2 = Split(Spl1(1), ",")
If Spl2(0) = "null" Then Spl2(0) = 0
pDuration = Fix(Spl2(0))
End If
If InStr(StrMessage, Chr(34) & "current_time" & Chr(34) & ":") <> 0 Then
Spl1 = Split(StrMessage, Chr(34) & "current_time" & Chr(34) & ":")
Spl2 = Split(Spl1(1), ",")
If Spl2(0) = "null" Then Spl2(0) = 0
pTime = Fix(Spl2(0))
TrackTime(pDuration, pTime)
End If
well compile & run and enjoy !
Great, thanks !
But may I ask to publish somewhere the compiled version because I don't think that everybody has visual studio.
Thanks in advance
Inf3rnus187 said:
Before i was on windows 8 64 bits she was crashing !! Now i am on windows 8.1 64 bits she's crashing again !
I have dl the src and debug and I found where search ask on the web and i solve..
The problème is with french pc, where locale Fr is used.
Because the programme for show us the current_time and de total duration of the cast, receive data and parse them.
The programe receive data in string like "0.145666" or "46.613333" .
And later we try to convert this decimal number in string to double.
But on US pc :
(4.5).ToString() send "4.5"
Convert.ToDouble("4.5") send 4.5
Convert.ToDouble("4,5") send an exception
On FR pc :
(4.5).ToString() send "4,5"
Convert.ToDouble("4.5") send an exception
Convert.ToDouble("4,5") send 4.5
I dont find this alone but i was searching help here http://openclassrooms.com/forum/sujet/la-conversion-de-la-chaine-46-6133-en-type-double
and somebody send me here http://www.developpez.net/forums/d530200/dotnet/langages/csharp/convert-todouble-ne-gere-points/
Where i found the solution.
So you can download the src http://forum.xda-developers.com/attachment.php?attachmentid=2958209&d=1412304466
open in visual studio go to Form1.vb
At the beginning of the file under
Code:
Option Strict Off
Option Explicit On
Imports System.IO
Imports System.Net
Imports System.Threading
add
Code:
Imports System.Globalization
and search for
Code:
If Spl2(0) = "null" Then Spl2(0) = 0
You will find 3 occurance. But only 2 are interesting on line 288 and line 295.
Add before these 2 lines
Code:
If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",")
at final you will have
Code:
If InStr(StrMessage, Chr(34) & "duration" & Chr(34) & ":") <> 0 Then
Spl1 = Split(StrMessage, Chr(34) & "duration" & Chr(34) & ":")
Spl2 = Split(Spl1(1), ",")
' If Spl2(0).Contains(".") Then Spl2(0) = Spl2(0).Replace(".", ",")
If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",")
If Spl2(0) = "null" Then Spl2(0) = 0
pDuration = Fix(Spl2(0))
End If
If InStr(StrMessage, Chr(34) & "current_time" & Chr(34) & ":") <> 0 Then
Spl1 = Split(StrMessage, Chr(34) & "current_time" & Chr(34) & ":")
Spl2 = Split(Spl1(1), ",")
' If Spl2(0).Contains(".") Then Spl2(0) = Spl2(0).Replace(".", ",")
If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",")
If Spl2(0) = "null" Then Spl2(0) = 0
pTime = Fix(Spl2(0))
TrackTime(pDuration, pTime)
End If
Instead of
Code:
If InStr(StrMessage, Chr(34) & "duration" & Chr(34) & ":") <> 0 Then
Spl1 = Split(StrMessage, Chr(34) & "duration" & Chr(34) & ":")
Spl2 = Split(Spl1(1), ",")
If Spl2(0) = "null" Then Spl2(0) = 0
pDuration = Fix(Spl2(0))
End If
If InStr(StrMessage, Chr(34) & "current_time" & Chr(34) & ":") <> 0 Then
Spl1 = Split(StrMessage, Chr(34) & "current_time" & Chr(34) & ":")
Spl2 = Split(Spl1(1), ",")
If Spl2(0) = "null" Then Spl2(0) = 0
pTime = Fix(Spl2(0))
TrackTime(pDuration, pTime)
End If
well compile & run and enjoy !
Click to expand...
Click to collapse
Windows 8.1 x64 NO CRASHES! Finally some good PC software for Chromecast, I don't like using Chrome to cast videos, and TorrentTV app stopped working for me. I'm downloading the source, can I compile using VS 2012? I'll be using it for studying purposes only. But I'll try to add subtitles option (perfect for offline movies).
Absolutely amazing, thanks man!
I know this is an old thread, but I hope someone see's this.
I want to make an app in VB.NET that will send one window to ChromCast and have another window on the desktop. Is this possible? Any guidance or starter tips on how to do it?
started tinkering with my chrome cast again and added C# source for deskcast as I have moved away from vb.net.
https://github.com/stooged/DeskCastC
Visual Studio 2017 RC
Net Framework 4.6.1
Thank @stooged, both project VB and C# work on windows 10 64 bit, but only .mp4 files .

[Q] [HELP] resize gridview

Hi,
I have a grid view with ítems that have a constant size and I want to change the margin between ítems in order to fill all area. So I Put a staticresource on page and this is changed from the event but it doesn't work. I have attached the code.
XAML
Code:
<Page.Resources>
<!-- Colección de elementos que muestra esta página -->
<CollectionViewSource
x:Name="itemsViewSource"
Source="{Binding Items}"/>
<Thickness x:Key="margenGrid" >10</Thickness>
</Page.Resources>
##......##
<GridView
x:Name="itemGridView"
AutomationProperties.AutomationId="ItemGridView"
AutomationProperties.Name="Items In Group"
TabIndex="1"
Grid.RowSpan="2"
ItemsSource="{Binding Source={StaticResource itemsViewSource}}"
SelectionMode="Multiple"
CanDragItems="True"
AllowDrop="True"
SizeChanged="itemGridView_SizeChanged"
CanReorderItems="True">
<GridView.ItemTemplate>
<DataTemplate>
<Grid Height="80" Width="200" Margin="{StaticResource margenGrid}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Background="{ThemeResource ComboBoxSelectedBackgroundThemeBrush}" Width="80" Height="80">
<Image Source="{Binding Imagen}" Stretch="UniformToFill" AutomationProperties.Name="{Binding Title}"/>
</Border>
<StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0">
<TextBlock Text="{Binding Nombre}" Style="{StaticResource TitleTextBlockStyle}" TextWrapping="NoWrap"/>
<CheckBox Grid.Column="0" IsChecked="{Binding Visibilidad, Mode=TwoWay}"/>
</StackPanel>
</Grid>
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
And this is CS
Code:
private void itemGridView_SizeChanged(object sender, SizeChangedEventArgs e)
{
ItemsWrapGrid appItemsPanel = (ItemsWrapGrid)itemGridView.ItemsPanelRoot;
double optimizedWidth = 200;
var number = (int)e.NewSize.Width / (int)optimizedWidth;
var margenes= (e.NewSize.Width -number*optimizedWidth)/number/2;
Thickness dato = (Thickness)this.Resources["margenGrid"];
dato.Bottom = margenes;
dato.Left = margenes;
dato.Right = margenes;
dato.Top = margenes;
this.Resources["margenGrid"] = dato;
}
Thanks!!

Help enabling downloads through webview (Kotlin)

Good day. I'm new to android development and I'm trying to develop a simple webview application, picked a nice template and went through the steps and made good progress, I managed to load my site fully and enable javascript, that works as intended, however I'm not able to make the app download anything, I host a few pdf files that should open or download through it, but nothing happens.
I looked at a few answers here and it is to my understanding that I need to specifically add a function for that, could you give me a hand? I have tried multiple different code and tweaking them, but I wasn't able to get it to work, here is my base code:
Code:
package com.logista.test.ui.home
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.webkit.WebResourceRequest
import android.webkit.WebView
import android.webkit.WebViewClient
import android.app.DownloadManager
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProvider
import com.logista.test.R
class HomeFragment : Fragment() {
private lateinit var homeViewModel: HomeViewModel
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
homeViewModel =
ViewModelProvider(this).get(HomeViewModel::class.java)
val root = inflater.inflate(R.layout.fragment_home, container, false)
val myWebView: WebView = root.findViewById(R.id.webview)
myWebView.webViewClient = WebViewClient()
myWebView.settings.javaScriptEnabled = true
myWebView.loadUrl("https://www.example.org/")
return root
}
}
I believe I should be adding
Code:
import android.app.DownloadManager
And tweak this
Code:
// Set web view download listener
web_view.setDownloadListener(DownloadListener {
url,
userAgent,
contentDescription,
mimetype,
contentLength ->
// Initialize download request
val request = DownloadManager.Request(Uri.parse(url))
// Get the cookie
val cookies = CookieManager.getInstance().getCookie(url)
// Add the download request header
request.addRequestHeader("Cookie",cookies)
request.addRequestHeader("User-Agent",userAgent)
// Set download request description
request.setDescription("Downloading requested file....")
// Set download request mime tytpe
request.setMimeType(mimetype)
// Allow scanning
request.allowScanningByMediaScanner()
// Download request notification setting
request.setNotificationVisibility(
DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED)
// Guess the file name
val fileName = URLUtil.guessFileName(url, contentDescription, mimetype)
// Set a destination storage for downloaded file
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, fileName)
// Set request title
request.setTitle(URLUtil.guessFileName(url, contentDescription, mimetype));
// DownloadManager request more settings
request.setAllowedOverMetered(true)
request.setAllowedOverRoaming(false)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
request.setRequiresCharging(false)
request.setRequiresDeviceIdle(false)
}
request.setVisibleInDownloadsUi(true)
// Get the system download service
val dManager = getSystemService(Context.DOWNLOAD_SERVICE) as DownloadManager
// Finally, request the download to system download service
dManager.enqueue(request)
})
// Load button click listener
button_load.setOnClickListener{
// Load url in a web view
web_view.loadUrl(url)
}
}
Taken from here: https://android--code.blogspot.com/2018/03/android-kotlin-webview-file-download.html
I did the basics, renaming the function accordingly and such, but it gives me quite a few errors when building the app, for instance uri isn't defined, cookiemanager isn't defined, environment isn't defined, build isn't defined, and such, could you give me some guidance?

[DexKit] Xposed Module Jni Lib | An easy-to-use, high-performance dex deobfuscation library

Library: DexKit
Project Link: https://github.com/LuckyPray/DexKit
About: An easy-to-use, high-performance dex deobfuscation library. Easy to use your CMAKE/Android projects.
Highlight:
JNI multi-threaded processing Dex bytecode, more efficient than JVM implementation.
It single search is ms level, You can even inject the host application at runtime without causing an ANR, to the extent permitted.
You can use it to handle reinforced apps(use ClassLoader cookies).
API introduction​There are two APIs can meet most of your usage scenarios:
DexKit::BatchFindClassesUsingStrings
DexKit::BatchFindMethodsUsingStrings
Note: In all cases you should avoid searching for keywords that contain duplicate content, eg: {"key_word", "word"}, as this will cause tags to be overwritten, resulting in inaccurate search results. If there is such a need, open the advanced search mode as much as possible, and use the string to match the content exactly, for example, modify it to this: {"^key_word$", "^word$"}
Click to expand...
Click to collapse
And there are many other APIs:
DexKit::FindMethodCaller: find caller for specified method.
DexKit::FindMethodInvoking: find the called method
DexKit::FindMethodUsingField: Find method to get/set specified field
DexKit::FindMethodUsingString: find method used utf8 string
DexKit::FindMethod: find method by multiple conditions
DexKit::FindSubClasses: find all direct subclasses of the specified class
DexKit::FindMethodUsingOpPrefixSeq: find all method using opcode prefix sequence(op range: 0x00-0xFF)
DexKit::FindMethodUsingOpCodeSeq: find all method using opcode sequence(op range: 0x00-0xFF)
DexKit::GetMethodOpCodeSeq: get method opcode sequence(op range: 0x00-0xFF)
Note: At present, all instructions are only for standard dex instructions and do not include odex optimization instructions.
Click to expand...
Click to collapse
For more detailed instructions, please refer to dex_kit.h.
Quick start​However, this approach will import an extra so file. If you don't want to import an extra so file, please use the second/third method.
build.gradle:
Code:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
app/build.gradle:
Code:
dependencies {
implementation 'com.github.LuckyPray:DexKit:<version>'
}
​JAVA Example​DexKitBridge provides 2 factory methods to create Dexkit instances:
DexKitBridge.create(apkPath): normally, please use it.
DexKitBridge.create(classLoader, true): for reinforced apps, used classLoader and set option useCookieDexFile to true.
PS: DexKitBridge.create(classLoader, useCookieDexFile = false) ≈ DexKitBridge.create(apkPath), but the former may contain part of the system dex.
Java:
import io.luckypry.dexkit.DexKitBridge;
// ...
public class DexUtil {
static {
System.loadLibrary("dexkit");
}
public static void findMethod() {
// for no-reinforced apps please use apkpath to load, because of the exist of dex2oat and CompactDex(cdex),
// dexkit currently only handles StandardDex.
String apkPath = application.applicationInfo.sourceDir
// try-with-resources, auto close DexKitBridge, no need to call DexKitBridge.close()
// if you don't use try-with-resources, be sure to manually call DexKitBridge.close() to release the jni memory
try (DexKitBridge dexKitBridge = DexKitBridge.create(apkPath)) {
if (dexKitBridge == null) {
Log.e("DexUtil", "DexKitBridge create failed");
return;
}
List<DexClassDescriptor> classes = dexKitBridge.findSubClasses("android.app.Activity", null);
for (DexClassDescriptor clazz : classes) {
String name = clazz.getName();
String simpleName = clazz.getSimpleName();
Class<?> clz = clazz.getClassInstance(hostClassLoader);
Log.i("DexUtil", "findSubClasses: " + clz);
}
} catch (Throwable e) {
Log.e("DexUtil", Log.getStackTraceString(e));
}
}
}
If you have problems using it, please create an issue on the github repo.
Reserved

Categories

Resources