Hi All,
I m using the The DllImport Project (+/also C++ Wrapper) [Mango Support] ..
And im using the postmessage ...and i tried the following scenarios
int i = Phone.OS.PostMessage(0xffff, (int)WM.WM_CLOSE, (int)Phone.KeyboardHook.PhysicalKeys.BackKey, 0);
it Worked fine and closed the current Application .
But when i tried the following line of codes , No Action performed on the device to simulate BackKey Press
int j = Phone.OS.PostMessage(0xffff, (int)WM.WM_KEYDOWN, (int)Phone.KeyboardHook.PhysicalKeys.BackKey, 0);
int k = Phone.OS.PostMessage(0xffff, (int)WM.WM_KEYUP, (int)Phone.KeyboardHook.PhysicalKeys.BackKey, 0);
Please let me know What im missing here .. help me on this please ...
Appreciate your Response...
Thanks,
Hi there, i have an android app which spawns many native executables dinamically linked with libraries i distribute with the package. To launch those binaries, i use the LD_LIBRARY_PATH environment variable to make them aware of the place to load the libraries from, but on some devices this doesn't work at all, the LD_LIBRARY_PATH is correctly updated but the binary fails to find the library anyway. This is not something i can reproduce because on my two devices ( Galaxy Nexus & Nexus 7 with stock roms ) it just works fine.
I tried many ways, for instance i spawn:
Code:
LD_LIBRARY_PATH=/my/package/custom/libs:$LD_LIBRARY_PATH && cd /binary/directory && ./binary
And :
Code:
String[] envp = { "LD_LIBRARY_PATH=" + libPath + ":$LD_LIBRARY_PATH" };
Process process = Runtime.getRuntime().exec( "su", envp );
writer = new DataOutputStream( process.getOutputStream() );
reader = new BufferedReader( new InputStreamReader( process.getInputStream() ) );
writer.writeBytes( "export LD_LIBRARY_PATH=" + libPath + ":$LD_LIBRARY_PATH\n" );
writer.flush();
But on those devices nothing seemed to work ... so i'm starting to think that this is a kernel related issue, some kernels ( like mine ) use the LD_LIBRARY_PATH, other kernels don't ( simply ignore it, or they're using just the LD_LIBRARY_PATH that was set on application startup, therefore there's no way to change it at runtime ).
I also tried to use System.load but it didn't work, probably because those libs are not JNI ... is there something i could try before starting to think about using statically linked binaries ?
up
up
Up
Sent from my Galaxy Nexus using xda premium
evilsocket said:
Up
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
up
did you find a solution? is this kernel related issue, as you assumed?
Hi all,
I searched the forum but cannot find one thread about this topic.
has anyone noticed that the app AdvanceS 1.1 send the IMEI to a server called loc.lidroid.com ?
Can anyone explain why this should nessesary ???
Thx in advance
Dys
Dys66 said:
Hi all,
I searched the forum but cannot find one thread about this topic.
has anyone noticed that the app AdvanceS 1.1 (which is probably part of Omega-ROM) send the IMEI to a server called loc.lidroid.com ?
Can anyone explain why this should nessesary ???
Thx in advance
Dys
Click to expand...
Click to collapse
I would get rid of that app no one should have your IMEI number that is really bad for you
Sent from my Nexus 4 using Tapatalk 2
......and report it too Google while you are at it, if it came from the play store
slaphead20 said:
......and report it too Google while you are at it, if it came from the play store
Click to expand...
Click to collapse
I froze it for now with Titanium.
But AdvanceS seems to be part of lidroid Mod which is probably included with Omega and other ROMS and is NOT out of Google Play.
Seems to be a config-tool for SystemUI. I don't used it so far ...
Therefore I think it will reactivated when I flash a new version of the ROM.
Dys66 said:
I froze it for now with Titanium.
But AdvanceS seems to be part of lidroid Mod which is probably included with Omega and other ROMS and is NOT out of Google Play.
Seems to be a config-tool for SystemUI. I don't used it so far ...
Therefore I think it will reactivated when I flash a new version of the ROM.
Click to expand...
Click to collapse
I see what it is control toggles app for lidroid delete it no matter what should not be uploading your IMEI number dev or no dev
Sent from my Nexus 4 using Tapatalk 2
Hmmmm.......I think I will notify the mods about this and let them get to the bottom of it
Edit...done.
OP Was this mod something you got off XDA? If so could you point me to it. I know of the mod and I've used it in my own roms but like others have said, It shouldn't be uploading your IMEI number anywhere. If it is, you might have gotten a hacked version of the mod with maliciousness code. If the source is XDA please let me know ASAP so we can look into it. If it's not from XDA then there really isn't much we can do about it
graffixnyc said:
OP Was this mod something you got off XDA? If so could you point me to it. I know of the mod and I've used it in my own roms but like others have said, It shouldn't be uploading your IMEI number anywhere. If it is, you might have gotten a hacked version of the mod with maliciousness code. If the source is XDA please let me know ASAP so we can look into it. If it's not from XDA then there really isn't much we can do about it
Click to expand...
Click to collapse
Now That's what i call swift action :thumbup: he did say he mite of come woth omega rom so that could mean he did not install a apk
Sent from my Nexus 4 using Tapatalk 2
just looked at loc.lidroid.com - seems to list phone numbers, all seem to be in China though ...
mikep99 said:
just looked at loc.lidroid.com - seems to list phone numbers, all seem to be in China though ...
Click to expand...
Click to collapse
Hmm, it seems NOT inside my Omega Package.
But I never installed any apps from other locations than XDA or google play.
I will try to find the app in the files i got on my harddisk ...
The app is named "com.lidroid.settings" when I see it right in Titanium
It maintains a database "telocation.db" ... the content seems to be chinese :S
I exported the content for further investigation and will uninstall and delete that crap from my phone ...
Hope that droidwall has blocked the network access :S
Dys66 said:
Hmm, it seems NOT inside my Omega Package.
But I never installed any apps from other locations than XDA or google play.
I will try to find the app in the files i got on my harddisk ...
The app is named "com.lidroid.settings" when I see it right in Titanium
It maintains a database "telocation.db" ... the content seems to be chinese :S
I exported the content for further investigation and will uninstall and delete that crap from my phone ...
Hope that droidwall has blocked the network access :S
Click to expand...
Click to collapse
Info - im assuming omegarom uses 23 toggle mod from lidroid - that app is the options app, deleting it will disable 23 toggle customization
and the app is called LidroidSettings.apk - its in v38 which i have
DSA said:
Info - im assuming omegarom uses 23 toggle mod from lidroid - that app is the options app, deleting it will disable 23 toggle customization
and the app is called LidroidSettings.apk
Click to expand...
Click to collapse
Best thing to do till this issue is resolved,I reckon.....anything that is copying your imei and sending it is up to no good imho
DSA said:
Info - im assuming omegarom uses 23 toggle mod from lidroid - that app is the options app, deleting it will disable 23 toggle customization
and the app is called LidroidSettings.apk - its in v38 which i have
Click to expand...
Click to collapse
I checked it with "LogMan logcat" from google play ...
It was pretty lucky that I tested this tool ...
If you want to check your phone you can start LogMan right after a phone reboot ...
Dys66 said:
Hmm, it seems NOT inside my Omega Package.
But I never installed any apps from other locations than XDA or google play.
I will try to find the app in the files i got on my harddisk ...
The app is named "com.lidroid.settings" when I see it right in Titanium
It maintains a database "telocation.db" ... the content seems to be chinese :S
I exported the content for further investigation and will uninstall and delete that crap from my phone ...
Hope that droidwall has blocked the network access :S
Click to expand...
Click to collapse
The apk for Lidroid is in /system/framework
I don't have my GS3 with me today (I also have the mod) so I can't check. I'll shoot a PM over to the Dev who created Lidroid and ask him
the other app it uses is Quicksettings.apk (I believe that's the name off the top of my head)
I don't have the device on my hand to check, but i guess it's because of the Telocation service, i used to hide this tab on my ports, but i didn't remove the services, because i tough it uses the local database.
Anyway i will repack a new one asap.
Edit : i repacked a new one (attached), i removed all telocation dependencies, i had to remove others tab for safety.
wanam said:
I don't have the device on my hand to check, but i guess it's because of the Telocation service, i used to hide this tab on my ports, but i didn't remove the services, because i tough it uses the local database.
Anyway i will repack a new one asap.
Edit : i repacked a new one (attached), i removed all telocation dependencies, i had to remove others tab for safety.
Click to expand...
Click to collapse
Thanks wanam. Is there any need for people to be worried about this from a security perspective?
graffixnyc said:
Thanks wanam. Is there any need for people to be worried about this from a security perspective?
Click to expand...
Click to collapse
In my opinion no need to worry, this service was included in all Lidroid Roms since GS2 days for Chinese users only, i can't confirm that Lidroid save any information remotely.
I need to check the telocation sources, this may give us more information about this issue.
Sent from my GT-N7100 using Tapatalk 2
I just decompiled telocation sources here is the content of the guilty file:
Code:
package com.lidroid.settings.telocation;
import android.content.*;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.telephony.TelephonyManager;
import android.util.Log;
import com.google.protobuf.InvalidProtocolBufferException;
import com.lidroid.providers.telocation.DatabaseHelper;
import java.io.InputStream;
import java.net.URL;
// Referenced classes of package com.lidroid.settings.telocation:
// HttpReader
public class UpdateUtils
{
public UpdateUtils(Context context)
{
mOpenHelper = new DatabaseHelper(context, null);
mDeviceId = ((TelephonyManager)context.getSystemService("phone")).getDeviceId();
mContext = context;
}
private void updateMob(Telocation.mob_location mob_location)
{
ContentResolver contentresolver = mContext.getContentResolver();
Uri uri = Uri.parse((new StringBuilder()).append("content://com.lidroid.providers.telocation/mobile/").append(mob_location.getTel()).toString());
Cursor cursor = contentresolver.query(uri, null, null, null, null);
boolean flag;
ContentValues contentvalues;
if(cursor != null && cursor.getCount() > 0)
flag = true;
else
flag = false;
if(cursor != null)
cursor.close();
contentvalues = new ContentValues();
contentvalues.put("_id", mob_location.getTel());
contentvalues.put("location", mob_location.getLocation());
contentvalues.put("areacode", mob_location.getAreacode());
if(flag)
contentresolver.update(uri, contentvalues, null, null);
else
contentresolver.insert(Uri.parse("content://com.lidroid.providers.telocation/mobile"), contentvalues);
}
private void updateSp(Telocation.sp_info sp_info)
{
ContentResolver contentresolver = mContext.getContentResolver();
Uri uri = Uri.parse((new StringBuilder()).append("content://com.lidroid.providers.telocation/sp/").append(sp_info.getTel()).toString());
Cursor cursor = contentresolver.query(uri, null, null, null, null);
boolean flag;
ContentValues contentvalues;
if(cursor != null && cursor.getCount() > 0)
flag = true;
else
flag = false;
if(cursor != null)
cursor.close();
contentvalues = new ContentValues();
contentvalues.put("addr", sp_info.getTel());
contentvalues.put("name", sp_info.getName());
if(flag)
contentresolver.update(uri, contentvalues, null, null);
else
contentresolver.insert(Uri.parse("content://com.lidroid.providers.telocation/sp"), contentvalues);
}
public long upgrade()
{
InputStream inputstream;
HttpReader httpreader;
inputstream = null;
httpreader = null;
Uri uri;
HttpReader httpreader1;
uri = Uri.parse("content://com.lidroid.providers.telocation/ver");
int i = mContext.getContentResolver().update(uri, null, null, null);
[COLOR="Red"]URL url = new URL((new StringBuilder()).append("http://loc.lidroid.com/update/").append(i).append("/").append(Build.DISPLAY).append("/").append(mDeviceId).toString());[/COLOR]
Log.d("xiaoym", (new StringBuilder()).append("http://loc.lidroid.com/update/").append(i).append("/").append(Build.DISPLAY).append("/").append(mDeviceId).toString());
httpreader1 = new HttpReader(url);
Telocation.update update;
int j;
int k;
inputstream = httpreader1.getStream();
update = Telocation.update.parseFrom(inputstream);
j = update.getMobCount();
k = update.getSpCount();
if(update.getMobCount() != 0) goto _L2; else goto _L1
_L1:
int k1 = update.getSpCount();
if(k1 != 0) goto _L2; else goto _L3
_L3:
long l;
l = 0L;
if(inputstream == null)
break MISSING_BLOCK_LABEL_197;
inputstream.close();
if(httpreader1 != null)
httpreader1.close();
_L6:
return l;
_L2:
int i1 = 0;
_L5:
if(i1 >= j)
break; /* Loop/switch isn't completed */
updateMob(update.getMob(i1));
i1++;
if(true) goto _L5; else goto _L4
_L13:
int j1;
for(; j1 < k; j1++)
updateSp(update.getSp(j1));
Uri uri1 = ContentUris.withAppendedId(uri, update.getVersion());
mContext.getContentResolver().update(uri1, null, null, null);
l = j + k;
if(inputstream == null)
break MISSING_BLOCK_LABEL_306;
inputstream.close();
if(httpreader1 != null)
httpreader1.close();
goto _L6
InvalidProtocolBufferException invalidprotocolbufferexception;
invalidprotocolbufferexception;
_L12:
l = -2L;
if(inputstream == null)
break MISSING_BLOCK_LABEL_334;
inputstream.close();
if(httpreader != null)
httpreader.close();
goto _L6
Exception exception4;
exception4;
goto _L6
Exception exception2;
exception2;
_L11:
l = -3L;
if(inputstream == null)
break MISSING_BLOCK_LABEL_365;
inputstream.close();
if(httpreader != null)
httpreader.close();
goto _L6
Exception exception3;
exception3;
goto _L6
Exception exception;
exception;
_L10:
if(inputstream == null)
break MISSING_BLOCK_LABEL_390;
inputstream.close();
if(httpreader != null)
httpreader.close();
_L8:
throw exception;
Exception exception1;
exception1;
if(true) goto _L8; else goto _L7
_L7:
exception;
httpreader = httpreader1;
if(true) goto _L10; else goto _L9
_L9:
Exception exception5;
exception5;
httpreader = httpreader1;
goto _L11
InvalidProtocolBufferException invalidprotocolbufferexception1;
invalidprotocolbufferexception1;
httpreader = httpreader1;
goto _L12
Exception exception6;
exception6;
goto _L6
Exception exception7;
exception7;
goto _L6
_L4:
j1 = 0;
goto _L13
}
public static final long CONNECT_LIDROID_FAILED = -3L;
public static final long INVALID_TELOCATION_DATA = -2L;
public static final long NO_UPDATE = 0L;
public static final long OPEN_WRITABLE_DATABASE_ERROR = -1L;
private Context mContext;
private String mDeviceId;
private DatabaseHelper mOpenHelper;
}
Lidroid uses this class to collect stats about his users build, this classe call a remote service and save the installed build number for each device ID.
For stats purposes? maybe, i think he wouldn't logged it if he want to use it for bad purposes, Lidroid is the only one who can give us more lights about this.
Anyway the new repacked one is safe to use, i will update my toggles threads asap.
Thanks Wanam and all others involved in resolving this :thumbup:
Is it safe for all devices?
Hey everyone, since we develop apps on Mono Android, I thought that if there were something that will easily help us to execute the commands. So I'm wrote a DLL which will be useful for anyone, though this will reduce a little bit of time while you developing apps.
Second Releasing:- Get Date
Get Time
Get a List of Files and Folders in a specific path
Previous Commands attached.
PS:- Fixed the Root Permissions. Now only Some Commands will require Root Permissions.
Initial Version:- Mount/Un-Mount System as RW/RO.
Set Permissions - Through this you can Set permissions to the files easily. -- SU cmd
Play Boot Animation - Show your BootAnime without rebooting your Device.
Reboot - Won't work on every rom. You must have reboot in your /system/bin/ -- SU cmd
UpTime - How much long the phone was Turned On Since The Last boot.
Example of Usings:-
Code:
[Activity(Label = "Testings", MainLauncher = true, Icon = "@drawable/icon")]
public class Activity1 : Activity
{
int count = 1;
MultiShell.ShellCmds shellCmds = new ShellCmds();
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
// Get our button from the layout resource,
// and attach an event to it
Button button = FindViewById(Resource.Id.MyButton);
button.Click += button_Click;
TextView textView = FindViewById(Resource.Id.textView1);
textView.Text = cmdsShell.GetListofFilesnFolders("/system/bin/"); //Get a list of folders/files in a specific path.
textView.Text = cmdsShell.GetDate(); //Gets the date as a string.
cmdsShell.SetPermissions("0644","/system/etc/hw_config.sh");
}
Download MultiShellLatest.zip and Extract it then use the MultiShell.dll to program.
I Hope you will enjoy my work. Suggestions are Welcome.
HappY COding!
View attachment MultiShellLatest.zip
View attachment 2207630
--------------
----------—------——
Hey, cool. :good:
(This "limited to 8 thanks a day"... :laugh
nikwen said:
Hey, cool. :good:
(This "limited to 8 thanks a day"... :laugh
Click to expand...
Click to collapse
Lol...thanks man :beer:
Sent from my SonyX8 using Tapatalk 2
Next version will be updated soon.
There will be more few features with installing apks in background.
Sent from my SonyX8 using Tapatalk 2
.................
thank you, very nice tool to have
WarBorg said:
thank you, very nice tool to have
Click to expand...
Click to collapse
Hi, thanks for trying it. I will release a new version soon with some new features.
Sent from my E15 using xda app-developers app
My galaxy player 4.0 got wet and everything works including charging, but usb data transfers do not work. If a flash a bad update that requires recovery via download mode I am screwed. I will still stick around on these forums, but I will be getting another tablet just to experiment with. So for now I will not be posting builds with my experimental mods.
Oh.. Sorry for that guy.. Thats really sad.... I liked your mods..
Edit: and yes.. Please share the source of the mod.. (I'm building my own roms and that would be pretty nice.. I even want to ask for this cause im using optimized compiler flags which don't affect your (pre)built framework.. 2nd thing is that the rom i'm building has other framework sources than official cm)..
andreasltcf said:
Oh.. Sorry for that guy.. Thats really sad.... I liked your mods..
Edit: and yes.. Please share the source of the mod.. (I'm building my own roms and that would be pretty nice.. I even want to ask for this cause im using optimized compiler flags which don't affect your (pre)built framework.. 2nd thing is that the rom i'm building has other framework sources than official cm)..
Click to expand...
Click to collapse
My galaxy player works fine it is just usb data does not work. I will still be doing mods but it will be for another tablet, most likely the nook hd since the galaxy tab 3 does not have cm yet because of the closed source marvell soc.
the attached source.zip contains the mods that I did.
http://forum.xda-developers.com/showthread.php?t=2693483 for the mod I had to do to get philz recovery to compile.
Surfaceflinger.cpp mod:
Code:
static int getEmuDensity() {
return getDensityFromProperty("qemu.sf.lcd_density"); }
static int getEmuXDensity() {
return getDensityFromProperty("qemu.sf.lcd_density.xdpi"); }
static int getEmuYDensity() {
return getDensityFromProperty("qemu.sf.lcd_density.ydpi"); }
static int getBuildXDensity() {
return getDensityFromProperty("ro.sf.lcd_density.xdpi"); }
static int getBuildYDensity() {
return getDensityFromProperty("ro.sf.lcd_density.ydpi"); }
static int getBuildDensity() {
return getDensityFromProperty("ro.sf.lcd_density"); }
};
if (type == DisplayDevice::DISPLAY_PRIMARY) {
// The density of the device is provided by a build property
float density = Density::getBuildDensity() / 160.0f;
if (density == 0) {
// the build doesn't provide a density -- this is wrong!
// use xdpi instead
ALOGE("ro.sf.lcd_density must be defined as a build property");
density = xdpi / 160.0f;
}
if (Density::getBuildXDensity()) {
// if "ro.sf.lcd_density.xdpi" is specified, it overrides xdpi
xdpi = Density::getBuildXDensity();
}
if (Density::getBuildYDensity()) {
// if "ro.sf.lcd_density.ydpi" is specified, it overrides ydpi
ydpi = Density::getBuildYDensity();
}
if (Density::getEmuXDensity()) {
// if "qemu.sf.lcd_density" is specified, it overrides everything
xdpi = Density::getEmuXDensity();
}
if (Density::getEmuYDensity()) {
// if "qemu.sf.lcd_density" is specified, it overrides everything
ydpi = Density::getEmuYDensity();
}
if (Density::getEmuDensity()) {
// if "qemu.sf.lcd_density" is specified, it overrides everything
xdpi = ydpi = density = Density::getEmuDensity();
density /= 160.0f;
}
info->density = density;
lets you set custom x and y dpi by setting ro.sf.lcd_density.xdpi and ro.sf.lcd_density.ydpi. I did this mod so I could change the screen size without having to change the dpi.
Logicaldisplay.java:
Code:
mBaseDisplayInfo.type = deviceInfo.type;
String dxres = String.valueOf(deviceInfo.width);
String dyres = String.valueOf(deviceInfo.height);
String xres = SystemProperties.get("qemu.sf.widthpixels", SystemProperties.get("ro.sf.widthpixels", dxres));
String yres = SystemProperties.get("qemu.sf.heightpixels", SystemProperties.get("ro.sf.heightpixels", dyres));
Integer xre = Integer.valueOf(xres);
Integer yre = Integer.valueOf(yres);
mBaseDisplayInfo.address = deviceInfo.address;
mBaseDisplayInfo.name = deviceInfo.name;
mBaseDisplayInfo.appWidth = xre;
mBaseDisplayInfo.appHeight = yre;
mBaseDisplayInfo.logicalWidth = xre;
mBaseDisplayInfo.logicalHeight = yre;
mBaseDisplayInfo.rotation = Surface.ROTATION_0;
mBaseDisplayInfo.refreshRate = deviceInfo.refreshRate;
mBaseDisplayInfo.logicalDensityDpi = deviceInfo.densityDpi;
mBaseDisplayInfo.physicalXDpi = deviceInfo.xDpi;
mBaseDisplayInfo.physicalYDpi = deviceInfo.yDpi;
mBaseDisplayInfo.smallestNominalAppWidth = xre;
mBaseDisplayInfo.smallestNominalAppHeight = yre;
mBaseDisplayInfo.largestNominalAppWidth = xre;
mBaseDisplayInfo.largestNominalAppHeight = yre;
mBaseDisplayInfo.ownerUid = deviceInfo.ownerUid;
mBaseDisplayInfo.ownerPackageName = deviceInfo.ownerPackageName;
mPrimaryDisplayDeviceInfo = deviceInfo;
mInfo = null;
lets you set custom screen resolution via build.prop by setting ro.sf.widthpixels and ro.sf.heightpixels. this mod can give you additional features or give you a less restrictive experience in certain apps. I did that mod so I could have a 10.1 inch tablet look with a google play compatible dpi of 120.
phonewindowmanger.java:
Code:
// Allow a system property to override this. Used by the emulator.
// See also hasNavigationBar().
String navBarOverride = SystemProperties.get("qemu.hw.mainkeys", SystemProperties.get("ro.hw.mainkeys"));
if ("1".equals(navBarOverride)) {
mHasNavigationBar = false;
} else if ("0".equals(navBarOverride)) {
mHasNavigationBar = true;
}
allows you to enable softkeys by setting ro.hw.mainkeys=0 I did that so I would not have to use qemu properties. Just copy these mods to the apporiate sections and you should be good.
I ended up getting a galaxy tab 2 because of device similarities.
How much?
Sent from my YP-G1 using xda app-developers app
obscuresword said:
How much?
Sent from my YP-G1 using xda app-developers app
Click to expand...
Click to collapse
129$
Sent from my GT-P3113 using Tapatalk
How did it get wet?
droid if you can solder good i have a old board i could send you, you might be able to merge the two boards and get it working again.
TheKryptonite said:
How did it get wet?
Click to expand...
Click to collapse
I fell into a creek. The device was in my pocket and was under for less than 30 seconds. Everything works except for USB data transfers. Charging works fine.
Sent from my GT-P3110 using Tapatalk
Update: USB data lines appear to be partially working. The device is able to go into charging mode when turned off. I can see the normal charging mode battery and percentage.
Ums, adb over USB, download mode, etc does not work,
Sent from my GT-P3110 using Tapatalk
Update: I've modified services.jar even more. I can now force what screen class I want and choose what GUI I want, all via build.prop settings. I can share my code modifications if anyone is interested.
Sent from my GT-P3110 using Tapatalk