Someone allready found a way for the ext_rom password? - JAM, MDA Compact, S100 General

Did someone allready find a way to edit te extended rom (ms_.nbf) ?
I'm stuck in searching for days in this and other forums.. :shock:
I want to add some cabs to it, but didn't find a way yet...
i hope someone else is much smarter then me and found a way.. !

nmx77 said:
Did someone allready find a way to edit te extended rom (ms_.nbf) ?I'm stuck in searching for days in this and other forums.. :shock:
Click to expand...
Click to collapse
This perl script decodes the nbf files of the "recent" variety: Due to the way the files are "encrypted", if you know the first dword of a given files (which happens to be the same since the first version), you can easily decode the rest. The numbers in the comment, are the first words of each type of file...
Code:
#!/usr/bin/perl
# nk.nbf 0x00000000
# ms_.nbf 0xEBFE904D
# radio_.nbf 0xC2EE13DE
use strict;
use MIME::Base64;
sub usage {
print "Usage: decode.pl file.nfb -x xorvalue\n";
print " decode.pl file.nfb -f firstdword\n";
print " (xorvalue/firstdword can start with '0x' for hexadecimal)\n";
exit 1;
}
if($#ARGV!=2) {
usage;
}
open FI,"<$ARGV[0]" or die "File $ARGV[0] not found!";
my $dest=$ARGV[0];
my $hdr=$ARGV[0];
$dest=~s/\.nbf$/.nba/g;
if($dest!~/.*\.nba/) {
$dest.='.nba';
}
$hdr=~s/\.nbf$/.hdr/g;
if($hdr!~/.*\.hdr/) {
$hdr.='.hdr';
}
my ($xor, $first)=undef;
if($ARGV[1] eq '-x') {
$xor=$ARGV[2];
if ($xor=~/0x(.*)/) {
$xor=hex($1);
}
}
elsif($ARGV[1] eq '-f') {
$first=$ARGV[2];
if ($first=~/0x(.*)/) {
$first=hex($1);
}
}
else {
usage;
}
my $header;
read FI, $header, 0xac;
open FO,">$hdr" or die "Can't open $hdr as decoded header!";
$header=~tr|yz98765432UVWXYZabcdKLMNOPQRSTopqrstuvwxefghijklmnABCDEFGHIJ10|ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789|;
print FO decode_base64($header)."\n";
close FO;
open FO,">$dest" or die "Can't open $dest as destination!";
for(;;) {
my ($bytes, $dword);
last if (read FI, $bytes, 4)!=4;
$dword=unpack('N',$bytes);
if(!defined $xor) {
$xor=$dword^$first;
}
$dword=$dword^$xor;
$bytes=pack('N', $dword);
$xor=$xor^$dword;
print FO $bytes;
}
the ms_.nba (decoded from the ms_.nbf) is a simply a FAT16 disk image. under MacOS X you can rename it as ms_.dmg and it will mount double clicking it (even in read-write mode). Under linux you can mount it with mount -o loop, under windows you can use WinImage...
What you CAN'T do is encode it back to feed it to the update program. But you can insert it in a SD dump and install it with the bootloader...

Ok, not such a big problem to put it into a dumped rom..
Pity there isn't a easier way found yet, but this probarly should do the job
if i only had more knowledge of perl then a supernovice :wink:
Nevertheless, thanks man ! at least a way to do the job
:roll:

Related

How to code with CF3.5 on a Mac.

Hi, this is my first post. I've been all the afternoon trying to do this and at the end i got a C# "hello World" working, so i thought it would be nice to post how i did it with my mac. I've got a slow eMac with Mac OSx 10.4.9. You will need a Windows machine (or emulator) for one of the steps, maybe somebody knows how to get the files from the phone, but for me it was easier this way. The guide is for beginners, and maybe this info was widely known, but I couldn't find it. Enjoy it.
Step by step.
1- Download the compiler. I used the Dotgnu c# compiler, from here: http://pnetframework.sourceforge.net/ .
2- Install it, it installs to /Library/Frameworks/pnet.framework.
3- On windows, install The .net compact framework 3.5. After installing, go to:
c:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE and get all the .dll files from here. Copy them to your mac. I copied it into a folder called pocketlib in my home directory.
4- Write a very simple test program:
----CUT HERE ---
Code:
using System;
using System.Windows.Forms;
public class HelloWorld
{
public static void Main()
{
MessageBox.Show("Hello World");
}
}
---CUT HERE ---
and save it as hello.cs
5- Compile it:
Now in the terminal type:
Code:
/Library/Frameworks/pnet.framework/Versions/0.7.4/bin/cscc -L~/pocketlib -lmscorlib -lSystem.Windows.Forms -nostdlib hello.cs
and rename a.out to hello.exe .
6- Transfer to the pocketpc device: transfer hello.exe to your pocketpc and it works.
That's it. I hope that i haven't forget anything ...
Nice!
Hi,
Simple and Efficient. Is there a good IDE for C# under MAC???
Regards,
Taguapire.
I have not tried, but you can check monodevelop , which comes included with mono ( http://www.mono-project.com/Downloads ) .

[Q] File read/write modifications

Hi,
I'm trying to create a program that reads an existing file and later overwrites it with new data. The file i'm trying to open is in /data/data/PACKAGE/files/FILE (but package is another application then mine)
This is the code so far:
Code:
try {
runtime.exec("su");
runtime.exec("chmod 777 /data/data/PACKAGE/files/FILE");
runtime.exec("cp /data/data/PACKAGE/files/FILE /sdcard/NEWFILE");
runtime.exec("chmod 777 /sdcard/NEWFILE");
}
.....
File file = new File("/sdcard/NEWFILE");
FileInputStream fis = new FileInputStream(file);
BufferedWriter fos = new BufferedWriter(new FileWriter(new File("/sdcard/NEWFILE_TEMP")),MODE_WORLD_READABLE);
The first part (cp to /sdcard/) seems to work, the file is present at /SDCARD, but it won't open. Superuser permissions have been granted.
Also
Code:
android:permission="android.permission.WRITE_EXTERNAL_STORAGE"
has been added to the manifest.xml file.
What am I missing here?
nobody has an idea?
You don't need to chmod the file.
With superuser shell you can access all files anyways and after you have copied it to the sdcard anyone can do anything with it.
jehan1 said:
but it won't open
Click to expand...
Click to collapse
How do you know that?
Maybe post the error message?

pushing files from your apk to the sdcard?

Im designing a new theme engine for the 360 Launcher so users can start developing their own themes for the 360 Launcher Pro and i360 Launcher. I already design themes for the 360 on google play but I want to get a little bit creative with it and open source it to fellow themers, but I have a question first...
Lets say I stored the appropriate drawables in a /raw folder in the apk. What command in the java code would I use to "push" those files to /sdcard/360/themes/ (So, when a user clicks the install button, it pushes the appropiate files in the correct folders in the devices sdcard or memory) .
Im not a junkie for linux commands so I need a helping hand here, probably something simple.
No need for command line things.
Move your files to the assets directory. Then you will be able to read them. Just write the content to the SD card afterwards. (Android does not use a /raw folder.)
Have a look at this: http://stackoverflow.com/questions/...he-full-contents-of-a-file-to-an-outputstream
Or even better: http://stackoverflow.com/questions/4447477/android-how-to-copy-files-in-assets-to-sdcard
nikwen said:
No need for command line things.
Move your files to the assets directory. Then you will be able to read them. Just write the content to the SD card afterwards. (Android does not use a /raw folder.)
Have a look at this: http://stackoverflow.com/questions/...he-full-contents-of-a-file-to-an-outputstream
Or even better: http://stackoverflow.com/questions/4447477/android-how-to-copy-files-in-assets-to-sdcard
Click to expand...
Click to collapse
Well that works better if thats the case, lemme give this a shot then. rather not beat around the bush and use people memory. I use a /raw folder when I store files in a apk if its a txt file or something thats not relevent to default apk folders.
Hmmm still having troubles with this...
Would this be as equal as what they discuss above?
http://www.codeofaninja.com/2013/01/copy-files-from-assets-folder-to-sd.html
Ive been even messing with this method
Nx Biotic said:
Hmmm still having troubles with this...
Would this be as equal as what they discuss above?
http://www.codeofaninja.com/2013/01/copy-files-from-assets-folder-to-sd.html
Ive been even messing with this method
Click to expand...
Click to collapse
I think so.
Did you add the proper permission for accessing the SD card?
Which error message do you get?
i didn't get errors, just didn't apply
Sent from my 9300 using xda app-developers app
Nx Biotic said:
i didn't get errors, just didn't apply
Sent from my 9300 using xda app-developers app
Click to expand...
Click to collapse
Does your phone have an internal and an internal SD card. Check both.
Did you print the stacktrace in the try and catch blocks? The error might be there.
The code i use:
Code:
public void copyFileFromRaw(int fileID, String destFile)
{
try
{
InputStream is = getResources().openRawResource(fileID);
FileOutputStream fos = new FileOutputStream(destFile);
byte[] buffer = new byte[1024];
int offset;
while ( ( offset = is.read(buffer) ) > 0 ) fos.write(buffer, 0, offset);
is.close();
fos.close();
Runtime.getRuntime().exec("chmod 700 " + destFile); // or chmod to whatever you need
}
catch (Exception e)
{
// print error log
}
}
Args:
fileID -> resource ID of your file, e.g. R.raw.myfile (note this is an ID, not a string)
destFile -> destination file (full path!)
So let's say you put inside the /res/raw/ folder a file called "myfile", now you want to copy that file to the sdcard:
copyFileFromRaw(R.raw.myfile, "/mnt/sdcard/myfile");
nikwen said:
Does your phone have an internal and an internal SD card. Check both.
Did you print the stacktrace in the try and catch blocks? The error might be there.
Click to expand...
Click to collapse
all of my devices do
Sent from my 9300 using xda app-developers app
xdaid said:
The code i use:
Code:
public void copyFileFromRaw(int fileID, String destFile)
{
try
{
InputStream is = getResources().openRawResource(fileID);
FileOutputStream fos = new FileOutputStream(destFile);
byte[] buffer = new byte[1024];
int offset;
while ( ( offset = is.read(buffer) ) > 0 ) fos.write(buffer, 0, offset);
is.close();
fos.close();
Runtime.getRuntime().exec("chmod 700 " + destFile); // or chmod to whatever you need
}
catch (Exception e)
{
// print error log
}
}
Args:
fileID -> resource ID of your file, e.g. R.raw.myfile (note this is an ID, not a string)
destFile -> destination file (full path!)
So let's say you put inside the /res/raw/ folder a file called "myfile", now you want to copy that file to the sdcard:
copyFileFromRaw(R.raw.myfile, "/mnt/sdcard/myfile");
Click to expand...
Click to collapse
il give this a shot
Sent from my 9300 using xda app-developers app
Nx Biotic said:
all of my devices do
Sent from my 9300 using xda app-developers app
Click to expand...
Click to collapse
I meant that it might have been saved on the internal instead of the external SD card.
nikwen said:
I meant that it might have been saved on the internal instead of the external SD card.
Click to expand...
Click to collapse
Neither, i monitored both partitions. Im gna give this another shot tonight with the information You guys gathered so hopefully i can get something working.
Sent from my 9300 using xda app-developers app

[How to] launch any deployed app within your own app

Hello again,
while I´m still working on my PDF to Office app I found out how to use <Capability Name="ID_CAP_OEM_DEPLOYMENT" />.
Using this capability lets you launch any deployed app within another app or lets you get the applist of all deployed apps (sadly less system apps like Office) including appname, uri, appicon and so on.
1. add
Code:
<Capability Name="ID_CAP_OEM_DEPLOYMENT" />
to your WMAppManifestXML
Add to your *xaml.cs file:
2.
Code:
using Windows.ApplicationModel;
using Windows.Phone.Management.Deployment;
3.
Code:
public Package GetPackageByID(string id)
{
return InstallationManager.FindPackages().FirstOrDefault(p => p.Id.ProductId.ToLower().Equals(id.ToLower()));
}
=> the code will return the package (app) you want to launch if it exists
4.
Code:
private void LaunchAR_Click(object sender, System.Windows.Input.GestureEventArgs e)
{
Package packageById = GetPackageByID("{134E363E-8811-44BE-B1E3-D8A0C60D4692}");
if (packageById != null)
{
packageById.Launch(string.Empty);
}
else
{
// do something if the app doesn´t exist
}
}
=> this sample code will launch Adobe Reader if the app is present on your device
With some simple modifications of the above code you will easyly be able to make visible the whole applist in a ScrollistViewer or Listbox.
=> this could be useful for coding a new AppData backup app for interop-unlocked devices.
Cheers
contable
contable said:
Hello again,
while I´m still working on my PDF to Office app I found out how to use <Capability Name="ID_CAP_OEM_DEPLOYMENT" />.
Using this capability lets you launch any deployed app within another app or lets you get the applist of all deployed apps (sadly less system apps like Office) including appname, uri, appicon and so on.
1. add
Code:
<Capability Name="ID_CAP_OEM_DEPLOYMENT" />
to your WMAppManifestXML
Add to your *xaml.cs file:
2.
Code:
using Windows.ApplicationModel;
using Windows.Phone.Management.Deployment;
3.
Code:
public Package GetPackageByID(string id)
{
using (List<Package>.Enumerator enumerator = new List<Package>(InstallationManager.FindPackages()).GetEnumerator())
{
while (enumerator.MoveNext())
{
Package current = enumerator.Current;
try
{
if (current.Id.ProductId.Contains(id))
return current;
}
catch (Exception ex)
{
}
}
}
return (Package)null;
}
=> the code will return the package (app) you want to launch if it exists
4.
Code:
private void LaunchAR_Click(object sender, System.Windows.Input.GestureEventArgs e)
{
Package packageById = GetPackageByID("{134E363E-8811-44BE-B1E3-D8A0C60D4692}");
if (packageById != null)
{
packageById.Launch(string.Empty);
}
else
{
// do something if the app doesn´t exist
}
}
=> this sample code will launch Adobe Reader if the app is present on your device
With some simple modifications of the above code you will easyly be able to make visible the whole applist in a ScrollistViewer or Listbox.
=> this could be useful for coding a new AppData backup app for interop-unlocked devices.
Cheers
contable
Click to expand...
Click to collapse
Yep! This is used in Samsung AppFolder
-W_O_L_F- said:
Yep! This is used in Samsung AppFolder
Click to expand...
Click to collapse
Exactly.
Do you you know how "InstallationManager.AddPackageAsync" works ?
contable said:
Exactly.
Do you you know how "InstallationManager.AddPackageAsync" works ?
Click to expand...
Click to collapse
I am hoping to learn that myself. I know that Nokia's "Extras & Info" app uses this API for their "SilentInstaller". Nokia's "SilentInstaller" has the ability to install interop-unlocked apps as long as they are fully and properly signed with the appropriate license.xml and wmprheader.xml.
Microsoft has some documentation about this API at http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207248(v=vs.105).aspx
**EDIT**
Found it! (I think)
we can deploy apps with InstallationManager.AddPackageAsync(String title, Uri sourceLocation, String instanceId, String offerId, Uri license)
This info matches EVERYTHING that is included with a valid xap signed by Microsoft. All the data is contained in the xap's provxml, too (albeit in the wrong order)
Info about this "undocumented" api is at http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj662948(v=vs.105).aspx
The million-dollar questions are what privileges are required to access this API, and can we use it without interop unlock?
Really wishing I had my phone back! (won't be here until tomorrow)
Very nice, thanks for publishing! I was going to pull apart App Folder and see how it works myself; thanks for taking the time to do that for me and share it with us all!
For what it's worth, a foreach loop will read more cleanly than explicitly calling GetEnumerator() and then iterating over it, but the basic structure of the code is fine (and I think the MSIL is the same anyhow - foreach being just syntactic sugar - so they probably did it that way when actually writing the app and your decompiler just produced the more verbose version from the MSIL).
Note that this can also, of course, be used to create launcher apps. An alternative to the Start screen, potentially, even (with some other hackery to hook it in where needed). To use it in Backup apps, though, we'll need access to the app's storage folder too (or a way to activate the SeBackup privilege in the app's token...)
Well... already known when I decompiled samsung's app folder app.
---------- Post added at 12:37 PM ---------- Previous post was at 12:29 PM ----------
compu829 said:
I am hoping to learn that myself. I know that Nokia's "Extras & Info" app uses this API for their "SilentInstaller". Nokia's "SilentInstaller" has the ability to install interop-unlocked apps as long as they are fully and properly signed with the appropriate license.xml and wmprheader.xml.
Microsoft has some documentation about this API at http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207248(v=vs.105).aspx
**EDIT**
Found it! (I think)
we can deploy apps with InstallationManager.AddPackageAsync(String title, Uri sourceLocation, String instanceId, String offerId, Uri license)
This info matches EVERYTHING that is included with a valid xap signed by Microsoft. All the data is contained in the xap's provxml, too (albeit in the wrong order)
Info about this "undocumented" api is at http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj662948(v=vs.105).aspx
The million-dollar questions are what privileges are required to access this API, and can we use it without interop unlock?
Really wishing I had my phone back! (won't be here until tomorrow)
Click to expand...
Click to collapse
see nokia extra+info app's capability
You can use Shell Chrome API directly to launch any URI, just 2 lines code
reker said:
You can use Shell Chrome API directly to launch any URI, just 2 lines code
Click to expand...
Click to collapse
So please post the two lines of code so that I can launch any URI without using a Toast.
DELETED
GoodDayToDie said:
Very nice, thanks for publishing! I was going to pull apart App Folder and see how it works myself; thanks for taking the time to do that for me and share it with us all!
For what it's worth, a foreach loop will read more cleanly than explicitly calling GetEnumerator() and then iterating over it, but the basic structure of the code is fine (and I think the MSIL is the same anyhow - foreach being just syntactic sugar - so they probably did it that way when actually writing the app and your decompiler just produced the more verbose version from the MSIL).
Note that this can also, of course, be used to create launcher apps. An alternative to the Start screen, potentially, even (with some other hackery to hook it in where needed). To use it in Backup apps, though, we'll need access to the app's storage folder too (or a way to activate the SeBackup privilege in the app's token...)
Click to expand...
Click to collapse
Here an improved code:
Code:
public Package GetPackageByID(string id)
{
List<Package> packages = new List<Package>(InstallationManager.FindPackages());
foreach (var cpackage in packages)
{
if (cpackage.Id.ProductId.Contains(id))
return cpackage;
}
return (Package)null;
}
Indeed to create an AppData Backup app we need access to the app´s storage folder first. Atm we only can copy files from the app´s storage folder with another RPCComponent discovered by -W_O_L_F-. But when the time comes a Backup app can be created in a few hours...
Oneliner (untested)
Code:
public Package LinqGetPackageByID(string id)
{
return InstallationManager.FindPackages().FirstOrDefault(p => p.Id.ProductId.ToLower().Equals(id.ToLower()));
}
jessenic said:
Oneliner (untested)
Code:
public Package LinqGetPackageByID(string id)
{
return InstallationManager.FindPackages().FirstOrDefault(p => p.Id.ProductId.ToLower().Equals(id.ToLower()));
}
Click to expand...
Click to collapse
Thanks. The oneliner works fine. :good:
Edit:
post #1 updated with the oneliner....
jessenic said:
Oneliner (untested)
Code:
public Package LinqGetPackageByID(string id)
{
return InstallationManager.FindPackages().FirstOrDefault(p => p.Id.ProductId.ToLower().Equals(id.ToLower()));
}
Click to expand...
Click to collapse
Is it also possible to check if an app is installed and if yes, which version? that would be nice...
gipfelgoas said:
Is it also possible to check if an app is installed and if yes, which version? that would be nice...
Click to expand...
Click to collapse
Yes. With this method you can get all informations about an installed package: version, publisher and so on...

Shared Preferences with Xposed

I try to get shared preferences in the exposed class.
This is a straight forward issue in android java. I do not know whether the permissions are the problem but things are not as straight with Xposed.
Xposed asks to provide the name of the file and the package at init Zigote. I have tried many versions and none of them seems to work. Also, the file which I make may not be available when init Zygote is called, however, I take XposedBridge wants to just register the name of the file and, probably, to prepare to override some permissions when the file is created.
I also try to double the call to the Xposed Shared Method inside the hooked method. I check for the existence of the shared preference file before. Everything is there but the reload method does not seem to reload and the file is not read but defaults are loaded by getInt and getFloat.
There is probably something more to be done, although the examples I have seen do not do anything, yet they override other methods inside init Zygote which I do not need to do.
All I need is to read a simple file from an Xposed Module.
PLEASE, INFORM.
Here is what I have tried :
I have tried many different variation and XposedBridge methods for 4 hours. I have also
tried many name variations with and without .xml.
In the standard Java for Android, there is just one get method to read a shared
preferences file. This does not seem to be the case with exposed.
I do have :
@override
public void initZygote(StartupParam startupParam) throws Throwable {
MODULE_PATH = startupParam.modulePath;
prefs = new XSharedPreferences("PackageName", "SharedPreferenceFileNameWithotDotXml");
}
MODULE_PATH is not used, although I have tried many other methods where was.
Because the file changes on the fly, I called :
prefs.reload();
before I read the data. I tried without this call too. I also tried to get another
prefs before the reload :
prefs = new XSharedPreferences("PackageName", "SharedPreferenceFileNameWithotDotXml");
prefs.reload();
Then I try to read the data from the file :
theStart=prefs.getInt("Start", 2);
theValue=prefs.getFloat("Value", 102.0f);
I always get the defaults 2 and 102.0 although the file is there and the values of the
file are different. I have read the file.
In standard java for android philosophy, just the initialisation in init zygote and
prefs.reload() are sufficient to load the changing values of the shared preferences
file into prefs and then into the variables.
Xposed seems to be different.
I have been told there is a way to read the data from the file. I have tried most
anything and cannot. What is the way to do so. Must be simple and straight as in the
standard java for android. I must not do everything necessary.
Please, inform.
I have also tried to read the file manually from the Xposed class. Access denied. Tried
just in cases. Access denied, again.
Tried to make the shared preferences file with Activity.MODE_WORLD_READABLE. Still
access denied to be read manually.
Even with Activity.MODE_WORLD_READABLE, Xposed cannot read the file as previously
explained.
Tried :
@override
public void initZygote(StartupParam startupParam) throws Throwable {
prefs = new XSharedPreferences(TheNameOfTheXposedClass.class.getPackage().getName
());
prefs.makeWorldReadable();
}
Then, in the hooked method :
prefs.reload();
theStart = prefs.getInt("Start", 2);
theValue = prefs.getFloat("Value", 102.0f);
Still returns only the default, although the file is there. I think, in all attempts,
XSharedPreferences() cannot get the name of the package and or or the name of the file.
The file is in /data/data/NameOfPackage/shared_prefs/NameOfFile.xml
Tried :
@override
public void initZygote(StartupParam startupParam) throws Throwable {
prefs = new XSharedPreferences
("/data/data/NameOfPackage/shared_prefs/NameOfFile.xml");
prefs.makeWorldReadable();
}
with and without .xml
Still nothing.
PROBLEM SOLVED.
Thank you for your reply. Everything was WORLD READABLE : in the non Xposed class and in the Xposed class on a number of occasions.
Also, I have used the hard values for the package and path.
The problem was not related to Java and Android but to Android arrangements and how much Xposed can cope with. The Android permissions for to access the file from the Xposed class had to be elevated which is unusual but this is what solved the problem, I think. Someone also reported the same problem and the same solution : http://forum.xda-developers.com/xposed/development-xsharedpreferences-issue-t2931396
In the non Xposed class, I have used the same solution just with a hard coded path and file. After I make the shared preferences file in the non Xposed class, I gave more permissions by :
File theSharedPrefsFile;
theSharedPrefsFile = new File("/data/data/PackageName/shared_prefs/FileName.xml");
theSharedPrefsFile.setReadable(true, false);
This seems to have solved the problem.
I am not sure of how reliable the solution is, though. I still check in the Xposed class whethere there is such a file or not. I have not tested what happens when the file is not there initially. Must do.
theXposedCommunicationPreferenceFile = new File("/data/data/PackageName/shared_prefs/FileName.xml");
if (theXposedCommunicationPreferenceFile.exists() == false) XposedBridge.log("Check in hooked method cannot find the file");
Hope everything would be OK.
Even though everything should be OK, I am not sure how reliable the dependence of permissions is.
I have also tried the secure reload :
StrictMode.ThreadPolicy oldPolicy;
oldPolicy = StrictMode.allowThreadDiskReads();
try {
prefs.reload();
} finally {
StrictMode.setThreadPolicy(oldPolicy);
}
I am not sure how reliable this is either so I put another simple reload on top :
prefs.reload();
StrictMode.ThreadPolicy oldPolicy;
oldPolicy = StrictMode.allowThreadDiskReads();
try {
prefs.reload();
} finally {
StrictMode.setThreadPolicy(oldPolicy);
}
I think, neither of these has made any difference and the real solution was the higher permissions to access the shared preference file given in the non Xposed class, again :
File theSharedPrefsFile;
theSharedPrefsFile = new File("/data/data/PackageName/shared_prefs/FileName.xml");
theSharedPrefsFile.setReadable(true, false);
Pretty nasty problem and difficult to find solution although published in the XDA Forum the searchability of post in the said forum is not very good.
Yet another sleepless night.
StevenStanleyBayes said:
I think, neither of these has made any difference and the real solution was the higher permissions to access the shared preference file given in the non Xposed class, again :
Click to expand...
Click to collapse
I know this is a pretty old thread but I have elevated the permission level to 777 of both the dir and preferences file and yet cannot access the file from the xposedClass is there any chance you are still developing xposed modules and can help

Categories

Resources