AD-Logger - Windows Mobile Software Development

hello,
i am using a very simple AD-converter to measure voltages (circuit based on LTC1290). Till now i used old DOS-Laptops in the field to get and store the measurements. The connection went over the serial port by using the DTR, RTS and CTS lines and the 'port commands' of the io-system.
At the moment i am thinking about a change to a xda.
I need a 'clock', a 'send data' line and a 'receive data' line. They must be switched between zero and at least 3Volts.
Can anybody tell me wether this is possible with a xda ?
- Jan -

Yeah, i would presume you can use the serial lines, although I don't think there is a clock.

You could probably use one of the serial control lines as a clock, and another one as data in and one as data out. The +5V for the thing could also be spuulied by the XDA. You will most likely not get the 50 kilosamples/second the 1290 supports, but that's likely not to be what you want anyway.

thank you Peter Poelman,
yes, a sample rate of 50kilosamples/s is not my goal.
Meanwhile i found this general page about serial communicaion with Palm's: palm serial manager with a very general statement in the 'serial hardware section':
Some devices also have a configurable DTR (data terminal ready) signal. Normally, the DTR signal is always high.
Click to expand...
Click to collapse
Ok - some devices can manipulate the DTR-line - but which ? can the XDA ?
According to this page it seems not possible with the standard palm-os modules and routines to manipulate the the RTS line. I can only get status information about the DTR and CTS line - i am new to pda/xda programming i dont know very much about hardware architecture and but maybe someone her has some hints.
- Jan -

Related

[APP] Resident Mort - Scary Good, not Scary Evil

*Anyone get the reference? Haha*
Resident Mort
The Scripter's Companion​
Current News / Status:
Resident Mort is currently Under Development
Resident Mort is planned to be a background EXE that will extend the functionality of MortScript available to developers through the usage of the "PostMessage" function.
Resident Mort is planned to extend functionality by adding extra, possibly more complex, functions or even adding in the ability for more complex GUIs.
Features (Green = Implemented, Blue = In Testing, Orange = Planned, Red = Failed):
GetProcessList - Gets a list of Running Programs
GetRecentApps - Gets a list of Recent Apps (10)
CreateScript - Creates a MortScript with the provided info
MakeFile - Makes a file of any kind with the provided info
MakeFolder - Makes a folder at the specified location
RegToEvent - Registers a File to an event​
UnRegFromEvent - Unregisters a File from an event
IsIdEventRegistered - Checks to see if a File is registered to an event.
DispImg - Displays an Image to the screen [and gets where the user Presses]
MakeForm - The Initial call for setting up an 'advanced GUI' form
FormAddObject -A Call that will add one of the predefined objects to the form being created
DeployForm - The Final call for setting up an 'advanced GUI' form, displays it to the user
This application is being made for MortScripters, to possibly make some projects easier. Since I don't use MortScript so much any more, I do rely on you the developers who use MortScript, to tell me what you want in the program.
Since I have a good deal of Functions there, I will commence work on a primary release
Saved For Future Use - Features and Screenshots
like the idea! advanced guis would be very useful
so this is a compiler? I am not sure what this is about
-sorry
No, this is a Resident App, an EXE that is always running in the background. It will have certain functions in it which can be accessed by MortScripters.
All the functions can be called with PostMessage ( I will provide documentation on how to do so, when I make a first release ). Then the results will either be written in the REGISTRY, written to a FILE, or copied to the CLIPBOARD (depending on how the scripter wants to handle the task).
Does this clarify it a bit?
Thanks for sharing!
A small update:
I am using this 'decent' planning utility, to help me keep track of my growing projects. According to this utility, the program is close to 30% complete. Then again, this is just a 'decent' utility haha. I would say, in my estimation (since some Code is "Copy + Paste"), I am close to 60% to 75% done.
A small change in my plans:
While I originally had the intentions of making this program as simple as a PostMessage in MortScript, I found out the following two Limitations:
1) MortScript's PostMessage/SendMessage only support(s) sending Numbers in the wParam and lParam parameters...very disheartening.
2) Due to #1, I made an assistant EXE, which would be run instead of calling PostMessage [this way I could do it Natively in my own control], but it is MUCH harder to transfer data between two applications that I would have thought! Due to Virtual Stacks and Memory Allocation 'rules', I couldn't EASILY do this.
So Here is my change:
In order to use Resident Mort, scripters will have to do about 3 or 4 commands to run. The only real commands that need to be used are PostMessage and RegWriteString (Did I get those right?).
In any case, my Resident Mort will read the Registry for corresponding wParam and lParam values and use those [in the future I will attempt Clipboard integration, to avoid Registry Interfacing].
When I release this program to the public, I will try to include a MortScript file that shows how to use all the functions. I don't remember much of MortScript [unfortunately], but I was thinking it could be helpful to make a "Library" of MortScript functions so a script will only have to call that function. But that is if some kind dev. would like to help out later on
Anyways, Thats that for this update. Expect a result in the coming week.
That sounds interesting for adv. gui functions.
Cyclonezephyrxz7 said:
1) MortScript's PostMessage/SendMessage only support(s) sending Numbers in the wParam and lParam parameters...very disheartening.
Click to expand...
Click to collapse
That's not MortScript's fault, it is design of whole Windows CE kernel, more here
I'd go with background EXE, that would listen to messages WM_USER+somenumber, maybe even region (for different actions, so you'd have both lParam and wParam free for another parameters). If you need help with this part, drop me PM on MSN, I had to study this a bit in the PinchToZoom project myself.
@OndraSter : Yeah, I know that Windows CE has limitations, however it is not impossible. Such an ability could be implemented in a code-update to MortScript. I did my reseach (if you look at #2, I mention that I found it much harder to transfer data between exe's that I had hoped) and found that you can transfer data via SendMessage (the Synchronous method) using a TRANSFERDATASTRUCT and WM_COPYDATA. If MortScripts interpreter could identify a SendMessage with a String value in either wParam or lParam, then it would create such a structure and transfer it, the receiving app would HAVE to take care of deleting the data though, or you have mis-used RAM.
As for how it is going to work now, I did not consider using WM_USER + a value, mainly because my program won't be using other Messages, and will only act if the correct wParam/lParam are provided (preventing accidental execution if the System decides to post a message with the same ID). I have it mostly covered, and I am closing in on finishing (currently with Reg data retrieval only, no Clipboard yet). I have completed 3 of the 7 Proposed Functions (MakeFile, MakeFolder, CreateScript) and I would have finished RegToEvents, but I got sorta lazy hehe. DispImg shouldn't take me more than a few minutes when I get to it, and once I get the API calls for Processes and figure out how to read the MRU reg-entry, I will have the last 3 complete!
As for Clipboard data retrieval, unless I am using the entirely wrong API calls, MortScript has an interesting way of using the Clipboard...I tried copying simple strings like "hello world" to the clipboard using MortScript, then trying to retrieve them in my Resident Mort, but the clipboard always comes up empty... Any ideas anyone?
Thats that for now I am about ready to release....any other functions you want implemented?
As for how it is going to work now, I did not consider using WM_USER + a value, mainly because my program won't be using other Messages, and will only act if the correct wParam/lParam are provided (preventing accidental execution if the System decides to post a message with the same ID).
Click to expand...
Click to collapse
http://msdn.microsoft.com/en-us/library/ms644947(v=VS.85).aspx
Good idea, the only downside being that it will generate the Message Numbers each time it is run... It is not assured that the Post / Send Message MsgIDs will remain constant.
Thanks for the link however
Cyclone,
Sorry about taking so long to post here...
How about, when the BT is on, this reports what is "out there" based on what the BT stack is telling you.
That is, it should read the surrounding area, then report that is saw my BT dongle. In the car, it should report that it saw my BT GPS unit.
Then, I can use that information to change my profile. That is, when it sees the BT dongle, regular phone calls. When it sees the BT GPS unit, run speaker mode, or connect to the GPS unit for phone calls.
Thanks!
--Ironhead
P.S. it would need to support the Touch Pro 2, Rhodium (my understanding is that it is Widcomm BT stack)
I"ll see what I can manage. I am really 'grid-locked' in my work on a couple of projects already So a release of this may have to wait a while....Sorry
I wish I had caught you a little sooner...
AutohotkeyCE may be a better base to work from than Mortscript...
http://www.autohotkey.net/~Micha/AutohotkeyCE/html/index.htm
In fact... AHKCE should be able to cater to all of your needs without the separate resident app
Yeah, I have seen that before. This project is really just a little challenge for myself to expand upon MortScript [because I know it is widely used].
Thank you for the link/suggestion however
I've been playing with Mortscripts for a while, I'm really thinking I can do everything I want, right from there...
EXCEPT:
Actually getting the information from the BT stack. I just need to see if there are any registered BT devices around my phone (so I can tell if I am in my car, at home, at work, etc.).
--Ironhead
Bumpity bump!
Hehe...Yeah, sorry for the lack of work on this. Check out FFP_LockScreen. I am working on a new release. I have very little time now, and I can't manage more than just one or two projects at a time. Once I release FFP_LS 3.0, I can devote some time MAYBE to this project. It all depends on how quickly the XDA-Marketplace idea takes off.
Sorry =\
I you can add a tool to make an GUI... it s must be soo cool...

[Testing] Workaround fix for GPS data validity (0,0 position) bug

I've been working on fixing the GPS data validity bug (where positions are reported at a lat/long of approximately 0,0 prior to lock)
Attached is a version of libhardware_legacy.so that should do the following:
Improve debugging of GPS operation (change printf()s in the main GPS library file to Android logging macros)
Fix/workaround the 0,0 bug (I say workaround because I have yet to identify the root cause of the issue - however it is "fixed" from the point of view of an end user
A few "under the hood" cleanups/fixes
Things that are NOT implemented/fixed in this library:
XTRA (driver/library support for QuickGPS data loading)
Obtaining satellite status prior to GPS lock on Rhodiums (behavior on non-Rhodium unknown, but this should not change actual behavior at all except for the false 0,0 fixes)
Any methods for improved lock speed - all this does is prevent you from appearing south of Africa prior to lock
To test this fix (Intended for FRX05, may work with other 2.2.2 based builds that are derived from xdandroid FRX05):
Unzip the attached zip file
Place libhardware_legacy.so somewhere on your SD card. For organization, I use bindfiles/system/lib/libhardware_legacy.so
Open conf/froyo.user.conf in your favorite text editor
Within the custom_shells{} section of froyo.user.conf, add:
mount --bind /sdcard/bindfiles/system/lib/libhardware_legacy.so /system/lib/libhardware_legacy.so
Restart, and at this point:
1) 0,0 false locks should go away
2) You'll see lots of new GPS debugging info in ADB logcats
Edit: For testing, I usually use the "GPS Status and Toolbox" app from the market, since Google Maps does not show sat status.
With the stock GPS libraries, GPS Status and Toolbox will immediately report a 0,0 fix on startup
With this library, you should see that funky "wait for it circle" in the lower status area until you are locked. As mentioned above - you will not see satellite signal strength reports prior to lock
I was just looking at setting up the kernel build environment myself the other day.
The main useful reference I found was this:
http://forum.ppcgeeks.com/tp2-andro...modules-tinboot-nand-boot-more-beginners.html
However, that one's a bit of a firehose, too, since it deals with a lot of stuff specific to NAND.
In short clone these two repositories into the same directory:
Code:
git clone git://android.git.kernel.org/platform/prebuilt.git
git clone git://gitorious.org/linux-on-qualcomm-s-msm/linux-msm.git
The first is the vanilla kernel, and the second is the XDAndroid kernel modifications. You'll need the first to compile.
From that guide, compile:
Code:
cd android
mkdir modules
cd linux-msm
make clean
make ARCH=arm htc_msm_android_defconfig
make ARCH=arm CROSS_COMPILE=~/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- INSTALL_MOD_PATH=~/android/modules zImage modules modules_install
Follow that guide for putting together the modules for wifi and the location of your compiled files.
Thanks! I will take a look at that, although I get the impression from reading through things that that GPS handling is at a layer somewhere above the kernel but below where we start having to deal with Java. I just can't quite figure out where since I have never done any Android development before.
I am probably going to poke at the kernel at some point though to try and fix the LED behaviors. It is clear from the "sleep of death fix" test kernels that there is knowledge of how to change these behaviors - at the very least I want to make it turn things *off* when in deep powersave. (Seems nonsensical to me to indicate that the device is in a deep power save mode by turning on a bright power-burning LED, although maybe the LED consumption is negligible even when the device is asleep.)
Entropy512 said:
Thanks! I will take a look at that, although I get the impression from reading through things that that GPS handling is at a layer somewhere above the kernel but below where we start having to deal with Java. I just can't quite figure out where since I have never done any Android development before.
I am probably going to poke at the kernel at some point though to try and fix the LED behaviors. It is clear from the "sleep of death fix" test kernels that there is knowledge of how to change these behaviors - at the very least I want to make it turn things *off* when in deep powersave. (Seems nonsensical to me to indicate that the device is in a deep power save mode by turning on a bright power-burning LED, although maybe the LED consumption is negligible even when the device is asleep.)
Click to expand...
Click to collapse
Whoops, didn't read carefully enough at where you'd narrowed the problem down to. I haven't gotten around to setting up an environment for the system build yet, sorry I couldn't be more of a help!
Yup, http://gitorious.org/xdandroid/hardware_libhardware_legacy/blobs/master/gps/gps_msm7k.c is my first target. There may also be issues in gps-rpc.c
http://xdandroid.com/wiki/Getting_the_Source goes thru how to build the system image. It starts with getting the source and cascades all the way thru building a system image.
I'm setup to build it as well, and I've always wondered how we could fix this problem... Love to see it squashed!
Thanks! I'll start working on that, although probably not until after the weekend is over at this point.
The ghetto approach as an interim fix would be to not set GPS_LOCATION_HAS_LAT_LONG if both are exactly zero - This is not the right way to do it, but the chances of it affecting anyone before a proper validity condition is identified are slim. (Even if you ARE near lat/long of 0/0, there will be enough noise in the GPS solution that you'll almost never actually be blanked).
Probably should assume that all of the other validity flags should not be set if we don't have a position fix. (Assumption: The MSM7k GPS does not take inputs from the magnetometer or accelerometer, if the Rhodium even has a magnetometer, didn't think it did.)
Of course, I haven't quite figured out how GPS_LOCATION_HAS_LAT_LONG and such roll up to higher levels. There's some odd interactions in terms of when SV status becomes available, for example.
Entropy512 said:
Thanks! I'll start working on that, although probably not until after the weekend is over at this point.
The ghetto approach as an interim fix would be to not set GPS_LOCATION_HAS_LAT_LONG if both are exactly zero - This is not the right way to do it, but the chances of it affecting anyone before a proper validity condition is identified are slim. (Even if you ARE near lat/long of 0/0, there will be enough noise in the GPS solution that you'll almost never actually be blanked).
Probably should assume that all of the other validity flags should not be set if we don't have a position fix. (Assumption: The MSM7k GPS does not take inputs from the magnetometer or accelerometer, if the Rhodium even has a magnetometer, didn't think it did.)
Of course, I haven't quite figured out how GPS_LOCATION_HAS_LAT_LONG and such roll up to higher levels. There's some odd interactions in terms of when SV status becomes available, for example.
Click to expand...
Click to collapse
Yup, definitely no magnetometer in the Rhodium.
Good luck with this, it'll be a nice little fix if you can get GPS to stop reporting locks before it has one.
Source downloaded, have a build going. (First an unchanged one...)
I'm working on a Froyo tree for the moment, since I think in the Gingerbread alphas GPS is simply "not working", although the degree of "not working" was not defined. Once I'm more familiar with the GPS handling code I might take a look at how it works for Gingerbread.
A few notes about the Froyo repo in its current state:
The URL for Google Apps that device/xdandroid/msm/unzip-files.sh is outdated. cyanogen-mirror.local.host.name does not exist any more. android.local.host.name does but doesn't have the HDPI Froyo apps. I forget which mirror I used - the list is in the CyanogenMod wiki if you search for gapps
The froyo build scripts direct you to http://source.android.com/download - URL no longer exists, it is http://source.android.com/source/download.html now
The process for installing Sun Java 5 on Ubuntu 10.10 is in the URL above - you need it to do a froyo build.
Also, the wiki instructions are missing lib32readline5-dev as an Ubuntu package that needs to be installed (it's in the source.android.com docs tho) - I'll try to update the wiki later.
Entropy512, glad to see someone is interested in looking at the GPS code. I helped phh with it in the last go around to get the RPC messaging part working working, but nothing has been done since.
The NMEA parsing stuff you see in the current gps lib is unused, all the data comes from RPC. Before getting the data directly from RPC was working, we took advantage of the fact that NMEA is output to smd27 and parsed that string data. In any case, once the GPS is brought up, that NMEA data is still viewable by catting /dev/smd27.
If you want to check out other similar code, look at the vogue gps code. I think it supposed to work pretty well, and the RPC behind it is similar. Theirs is a bit different in that they split the gps processing across the kernel and userland, where ours is all userland.
Ultimately, this stuff needs a bit of a rewrite, because the libhardware_legacy interface to GPS that the current lib is written to, is gone for Gingerbread. If we could just get the RPC stubs generated, we might be able to plug into the reference Qualcomm implementation and take advantage of that well sorted code. Check out the cyanogenmod libhardware gps to see what that looks like.
Thanks for the additional pointers bzo.
I'm at the stage where I managed to build the froyo tree, but have not yet had a chance to test the built system ext2 image. That's a goal for tomorrow.
OK, dumb question - Since I'm now trying to understand that RPC code - Where do all those printfs in gps-rpc.c print to?
edit: Never mind, figured it out - it's buried in the logcat... Was trying to go back in time using Android System Info, but adb logcat lets me view it as it happens.
edit 2: Nope, those are D() statements in gps_msm7k.c - don't know where the printf()s in gps-rpc.c are going - nowhere? Should these be D() statements???
those printfs were from when that code was a console test application. Not surprising that they wouldn't show up by default in the logcat. I'm sure there is some way to make them show up. Dunno off hand, but some googling on android debug logging and redirection of stdout and such may dig up that info.
bzo said:
those printfs were from when that code was a console test application. Not surprising that they wouldn't show up by default in the logcat. I'm sure there is some way to make them show up. Dunno off hand, but some googling on android debug logging and redirection of stdout and such may dig up that info.
Click to expand...
Click to collapse
Ah. That makes sense why they aren't D() statements like in gps_msm7k.c
I tried changing as many of the printf()s to D() macros as I could, I'll test it tonight.
Edit: Had a chance to test it this morning. No output from any of the printf()s that I changed to D()s. Either I did something wrong, or none of those code paths are hit in a no-signal/low-signal situation prior to lock. Doing a make clean followed by a rebuild to make sure.
Those debug statements don't display by default. You'll have to change some compile and/or android settings to have them show up.
btw, if you're not already doing this, building just the gps lib and doing a mount --bind with just the lib in your startup.txt is a big timesaver, as opposed to updating the entire build
bzo said:
Those debug statements don't display by default. You'll have to change some compile and/or android settings to have them show up.
btw, if you're not already doing this, building just the gps lib and doing a mount --bind with just the lib in your startup.txt is a big timesaver, as opposed to updating the entire build
Click to expand...
Click to collapse
Hmm, got any pointers in this regard? They are working for gps_msm7k.c, but not my changes to gps-rpc.c - these are built by the same Makefile and components of the same library as far as I can tell. Is there a log tag filter somewhere?
Thanks for the mount --bind tip - will try that on my next build attempt.
if you copied over the same #define for D(...) from gps_msm7k.c, it seems like it should work the same in the other file. I haven't looked that much into android logging though.
For some reason my copy-and-pasted #defines for D() were failing.
Using LOGD() directly works.
I'm adding another set of LOGD()s now - It appears that something is calling update_gps_location() with bogus data.
BINGO! - It appears we are receiving PDSM_PD_EVENT_HEIGHT and PDSM_PD_EVENT_VELOCITY events prior to a position fix. No clue why - but even though GPS_LOCATION_HAS_LAT_LONG is not set, apps assume lat/long is valid when an update_gps_position() callback occurs.
Going to make it so we only do the update_gps_location() callback when GPS_LOCATION_HAS_LAT_LONG is set. Also going to try and figure out the right situations where we can call update_gps_svstatus() - right now it is only done when we get a PDSM_PD_EVENT_POS.
bzo said:
btw, if you're not already doing this, building just the gps lib and doing a mount --bind with just the lib in your startup.txt is a big timesaver, as opposed to updating the entire build
Click to expand...
Click to collapse
This is a good suggestion, but the bind mount statement would go in the froyo.user.conf, not the startup.txt .
arrrghhh said:
This is a good suggestion, but the bind mount statement would go in the froyo.user.conf, not the startup.txt .
Click to expand...
Click to collapse
yea, yea, that's what I meant , thanks for the correction

Samsung Wave custom firmware

Are there any tutorials on how to make custom firmware for the Samsung Wave line of devices? Specifically, a custom firmware that does not signature check applications?
There isn't any tutorial as there isn't such a firmware at the moment. Try reading more posts than You write as it's getting silly - You ask lots of obvious questions without a definite purpose. It's not getting us anywhere. Maybe you should stop 'teaching others know their ****' and actually do something? Google for Mencken's Law.
Original Samsung JB6 is without Sig Check of Apps... this is the oldest FW leaked for S8500 (Wave)...
There are no mandatory RSA 1024 Certificats in JB6...
nearly all system files unsigned... because no BluetoothAppControl.so.htb or sig files...
"Problem".
I am not able to flash this Firmware with Multiloader nor with JTAG Hardware.
Because boot_loader.mbn is NOT encrypted...
For JTAG I'm not able to manipulate correct "Boot Image", because my brain to small...
Read here:
http://forum.xda-developers.com/showpost.php?p=13785413&postcount=64
http://forum.xda-developers.com/showthread.php?t=912728
Best Regards
adfree said:
"Problem".
I am not able to flash this Firmware with Multiloader nor with JTAG Hardware.
Because boot_loader.mbn is NOT encrypted...
For JTAG I'm not able to manipulate correct "Boot Image", because my brain to small...
Click to expand...
Click to collapse
I don't think encryption is the problem here. The algorithm (korean SEED) is already known and we can go both ways - decrypt and encrypt with any key (key for encryption is in plaintext in the description block being last 1024 bytes of the file. What we rather should worry about are the version signatures (with 512 bit RSA keys) also in the same block. The solution I see is loading a crafted file using some Bada 1.0/1.2 bootloader patched in the memory (the shadowed image) to ignore signature. We can do the patching through FOTA. As you have the JTAG we can experiment with that some time next week.
If I'm correct, an RSA key with a 512-bit modulus is easy to crack by modern computing standards.
There is a slight difference between feasibility and reasonable time to achieve that.
If you have enough resources then the modulus is: BF1834F775B9861F13E15BA3E01F91CED970B76F2E9D5767EC39C5C1DAD7A8AF9F2A60F131E1D3715E15FDE4B07AC04BF5FC148D95BFF180E9F675D6211F76F1
exponent: 010001
Thank you. And to be clear, that is the public key used by the bootloader to verify the operating system correct?
Sent from my DROID2 GLOBAL using XDA App
Yes, it's used to validate signatures on bootloader and apps (nucleus kernel and bada).
Each bootloader stage seems to have additional layer of security (some form of signature - 128 bytes at the end of each bootloader, includes some time variable/random data for "signing" as it's different for different releases of same version), but it's yet to be figured out .
As for factoring the 512-bit modulus (scroll down to the part about TI calculators):
http://www.javamex.com/tutorials/cryptography/rsa_key_length.shtml
This is why I said "If you have enough resources" as myself I'm not interested in waiting months for results, haven't got PS3, FPGA cluster or even several hundred PCs. Years back I thought about using public pay-phones network (tens of thousands of units with some RISC uC and FPGA) for distributed computation (back then with a phreaking crew we had such a possibility) like some symmetric and asymmetric cryptography keys brute-forcing and factorizing, but it's all gone now. Some sat-tv conditional access guys had some distributed factorization projects as well, but I never tracked what happened with that.
To make long story short, I know it's all possible with this modulus length, but I'm interested in doing it. If you or anybody have access to computing power (a large grid, cluster, cray or other supercomputer) then I'd be happy to see the results.
I have enough time to run my PC(s) day and night... weeks, months...
Maybe we should for "Brain training"... start with lower RSA...
I've never seen FREE Software for testing... only theory to use Graphiccards like NVIDIA...
Maybe someone is willing to offer Software for noobs like me to compute RSA Keys between RSA "30" and RSA "100"... to understand dreams and reality...
We could make some funny Thread. Who fastest generate "private Key", if public Key is given...
Again, only as lesson. So maximum RSA 100...
Example... with answer...
Code:
P = 0375BA25E7B805
Q = 03B4498980CEAB
Exp1 = 033842E45590F5
Exp2 = 02DCCB06EAF6C9
Coeff = 034F5F18D35B33
Priv Exp = 8A7ED170D08D37ACBC8920D1
Publ Exp = 010001
Modulus = 0CD0F3C2312AED609B775BF157
So the Question would be...
pub key = 0CD0F3C2312AED609B775BF157
Exponent 010001
Please give as private Exponent aka private Key...
Answer:
8A7ED170D08D37ACBC8920D1
adfree said:
I have enough time to run my PC(s) day and night... weeks, months...
Maybe we should for "Brain training"... start with lower RSA...
I've never seen FREE Software for testing... only theory to use Graphiccards like NVIDIA...
Maybe someone is willing to offer Software for noobs like me to compute RSA Keys between RSA "30" and RSA "100"... to understand dreams and reality...
We could make some funny Thread. Who fastest generate "private Key", if public Key is given...
Again, only as lesson. So maximum RSA 100...
Example... with answer...
Code:
P = 0375BA25E7B805
Q = 03B4498980CEAB
Exp1 = 033842E45590F5
Exp2 = 02DCCB06EAF6C9
Coeff = 034F5F18D35B33
Priv Exp = 8A7ED170D08D37ACBC8920D1
Publ Exp = 010001
Modulus = 0CD0F3C2312AED609B775BF157
So the Question would be...
pub key = 0CD0F3C2312AED609B775BF157
Exponent 010001
Please give as private Exponent aka private Key...
Answer:
8A7ED170D08D37ACBC8920D1
Click to expand...
Click to collapse
Great piece of software, if you run Windows, is xca. I've used it to make 8192-bit RSA keys. It is very simplistic, and I consider it a god send after trying to use OpenSSL via the command line.
Edit: I don't know if it will save the factors of the modulus, but I know that OpenSSL will. Anyway, give it a try.
Edit: Sorry, I didn't realize that you meant factoring RSA keys (I forgot about that). xca will generate them for you, though. Unfortunately, there is no (known) classical algorithm that can factor numbers in polynomial time. Shor's algorithm can do it in polynomial time, but only with a quantum computer.
Edit: The 512-bit key could be factored using a distributed effort. (See this: http://en.wikipedia.org/wiki/Texas_Instruments_signing_key_controversy) Time shares could also be rented on a supercomputer.
Code:
BF1834F775B9861F13E15BA3E01F91CED970B76F2E9D5767EC 39C5C1DAD7A8AF9F2A60F131E1D3715E15FDE4B07AC04BF5FC 148D95BFF180E9F675D6211F76F1
is approximately 2.0238493722395799×10^155. To factor a number you only need to test every number from 1 to the floor of the square root of said number. In this case, every number from 1 to about 4.49872134×10^77.
Master Melab said:
Code:
BF1834F775B9861F13E15BA3E01F91CED970B76F2E9D5767EC 39C5C1DAD7A8AF9F2A60F131E1D3715E15FDE4B07AC04BF5FC 148D95BFF180E9F675D6211F76F1
is approximately 2.0238493722395799×10^155. To factor a number you only need to test every number from 1 to the floor of the square root of said number. In this case, every number from 1 to about 4.49872134×10^77.
Click to expand...
Click to collapse
:/
Oh, come on, it is only comparable to the number of atoms in the universe...
The naive fraction algorithm does not make sense for large numbers - rather some specialized variants of Number Field Sieve, where you don't need to test every number
I was only laying out the fundamentals/basics.
Master Melab said:
To factor a number you only need to test every number from 1 to the floor of the square root of said number.
Click to expand...
Click to collapse
Master Melab said:
I was only laying out the fundamentals/basics.
Click to expand...
Click to collapse
The fundamental is you don't need to test every number.

Hardcoded Password in GPS Library

Hey everyone, I've been a lurker for quite sometime, so I'm finally posting something. This is isn't in any of the dev sections because this is my first post.
When I first got my GNex (toroplus) was very annoyed with the capabilities of the gsd4t gps chip. Static navigation makes it really hard to use the chip for telemetry projects and the 1Hz position update doesn't give me enough sample data for the things I'm working on. I decided to do some investigation to see if it was limited to the hardware itself or the driver.
I scoured the forum, and tried a bunch of apps, found datasheets and the what not and nothing really improved my situation. I decided to take matters into my own hands and poke around lib_gsd4t.so (stock).
With verbose logging turned on, I noticed an interesting looking entry.
Code:
Hello EE downloder !!!.
{sgee.samsung.csr.com, instantfix.csr.com}, port : 80
Y3Nyc2xsOmROTkw5NnN1, /diff/packedDifference.f2p3enc.ee, format 2
EE_DOWNLOAD: EE_Download_Init done.
EE_Download_Init - returned 0 !!!.
EE_DOWNLOAD: EE_Download_Start successful.
EE_DOWNLOAD:EE_Download_Scheduler started; server_address=(sgee.samsung.csr.com,instantfix.csr.com), port=80, file=/diff/packedDifference.f2p3enc.ee
...
The string Y3Nyc2xsOmROTkw5NnN1 really stuck out to me. The character set fit in the base64 space which for some reason or another, developers seem to think base64 encoded text is somehow a good way to make things more secure. I have seen this numerous times. To me, it just makes it more noticeable that someone is trying to hide something.
So I went ahead and decoded the string and got
Code:
csrsll:dNNL96su
Just to be sure it wasn't some string unique to my phone, I checked where it most likely came from, which is the lib_gsd4t.so and it is indeed there (@offset 0x1b7429).
What's so special about that string?
I'm almost 100% sure that it is the username : password combo for downloading the SGEE data. I'm guessing it is using a post request (anyone wanting to use wireshark to packet sniff this can confirm) because there are extra parameters being used to retrieve the data.
Have I tried to access the file with those credentials?
No.
Why am I posting this?
I thought it was funny that the username and password are hardcoded in the driver and written to the logs. What's the point of having it password protected if you're just going to tell everyone the account credentials?
My actual job involves application security and I used this as an example for the other programmers on my team as to why we shouldn't ever mistake encoding for encryption and if you try to hide something, chances are you are actually drawing attention to it.
Oh also, is anyone interested in knowing more about the library. I have figured out quite a bit
How odd!
If you've figured out the gps drivers maybe you know how to make an updated file to disable static navigation? I op'd this thread http://forum.xda-developers.com/showthread.php?p=38684789 based on the ics version, but would love an android 422 based mod.
I posted my modded drivers. It may also require new configs.
afrotronics said:
I posted my modded drivers. It may also require new configs.
Click to expand...
Click to collapse
Did you ever figure out the proper request? (curl or wget?)

[Q] Tap triggers swipe (aka sensitive screen)

Some people over at the fairphone.com forum reported a "sensitive" screen. They try to tap on a button (or link) and instead of triggering the button the fairphone starts scrolling. My fairphone also shows this behavior and I tried to find out why. Well, after trying for some time I realized that the shorter I tap on the screen the more likely it happens in a swipe/scroll.
So I enabled the "pointer position" option within the developer tools and shot two screen shots. In the first screenshot I tap for round about 500ms whereas in the second screenshot I tried to tap as short a possible. Like you would click with mouse. It show the error pretty obvious. Any ideas how to adjust that?
Hello
I noticed exactly this behaviour on my Fairphone, too.
That's why I started a thread on the official Fairphone website 22 days ago.
I'm not allowed to post direct links here, so I can give you only the head line here:
"Hyper-sensitive-touchscreen"
And on german Fairphone Freunde forum there's also a thread about this problem
Key-Word:
"Empfindlichkeit-des-Touchscreen"
So far, there is not very much response on these threads, but it seems that not all the handsets are affected, because not all of the answers confirmed the problems. One of the guys on fairphone website sent a request to the support team, a few days ago. Maybe he can forward the answer he gets... I'll ask him in his own fairphone thread - "Sensibility-and-reboots"
Unfortunately my phone broke after just one day, so I'm waiting for a replacement now and can't really offer a solution here...
But during the few hours, my phone worked, I entered the engineering mode (by typing *#*#3646633#*#* in the standard dialler app) and there were many options to manipulate the tuochscreen.
Maybe the more experienced guys here in the forum can work out a solution to solve the problem?!
Thank you in advance!
I have the same "hypersensitive screen" issue
Before I was used to briefly and lightly tapping/touching the screen, but with my Fairphone that often gives a scroll signal.
My developer crosshair option shows short lines, the touchpanel behaves as if I first tapped a few centimers away and then a split second later it registers where I actually touched the screen.
I had to learn to firmly tap and hold, otherwise I couldn't select anything on the screen.
It seems a sofware patch for the touchpanel is needed.
-----------------------------------------------
Fairphone FP1
Caju (v.1.1)
Touchscreen settings
I am copying this from the Fairphone forum, for future reference:
My settings, as copied from engineering mode:
tpd_em_log = 0
tpd_em_log_to_fs = 0
tpd_em_sample_cnt = 16
tpd_em_auto_time_interval = 10
tpd_em_pressure_threshold = 0
tpd_em_debounce_time = 0
tpd_em_debounce_time0 = 1
tpd_em_debounce_time1 = 4
tpd_em_spl_num = 1
tpd_em_asamp = 1
NOTE: Do NOT change any of the values (in this case, under Settings). I do not know what they do, really, and how your device might react! I just report mine, for your comparison.
Just FTR, my device works fine!
Any values different from yours? Then I would suggest reporting the issue to FP while including the link to our discussion here, and on the Fairphone forum. If we can narrow down the source of the problem to be caused by some settings, and not your environment or your specific devices hardware malfunctioning, @benkxda could report this to FP in his next mail.
boondiordna said:
I am copying this from the Fairphone forum, for future reference:
My settings, as copied from engineering mode:
tpd_em_log = 0
tpd_em_log_to_fs = 0
tpd_em_sample_cnt = 16
tpd_em_auto_time_interval = 10
tpd_em_pressure_threshold = 0
tpd_em_debounce_time = 0
tpd_em_debounce_time0 = 1
tpd_em_debounce_time1 = 4
tpd_em_spl_num = 1
tpd_em_asamp = 1
NOTE: Do NOT change any of the values (in this case, under Settings). I do not know what they do, really, and how your device might react! I just report mine, for your comparison.
Just FTR, my device works fine!
Any values different from yours? Then I would suggest reporting the issue to FP while including the link to our discussion here, and on the Fairphone forum. If we can narrow down the source of the problem to be caused by some settings, and not your environment or your specific devices hardware malfunctioning, @benkxda could report this to FP in his next mail.
Click to expand...
Click to collapse
I already put a link on fairphone.com to this XDA thread. Thanks for telling! Well, my settings looks identical to yours. I also played around with them. I have no idea if touch screens nowadays need deboucing or sth like that. So I changed these settings a bit...without improvement though. I am also wondering what tpd_em_log is. It is put to 0. I put it to 1 hoping there is some log written somewhere....but i could not find where unfortunately.
Hey there,
I have the same problem and no solution. But here is my input on that issue. Maybe it helps Fairphone when they investigate that issue, maybe not.
hanzano said:
Well, after trying for some time I realized that the shorter I tap on the screen the more likely it happens in a swipe/scroll.
Click to expand...
Click to collapse
I realized the same thing. BUT in addition, I figured out that it has also something to do with how soft you touch. If I try and touch my screen very very gently, I can reconstruct that behaviour every time. If I press a bit harder, it works better.
I attached a screenshot where I did soft touches, and you see a lot of wiggeling especially in the botom row
Yesterday I was annoyed by this issue. I was a bit in a hurry and the Fairphone touchscreen did not react properly
So I just debugged in Android Studio and this is what I logged:
Code:
12:07:48.874 MotionEvent.ACTION_DOWN: 300.44363, 485.4943
12:07:48.886 MotionEvent.ACTION_MOVE: 293.13342, 499.09888
12:07:48.901 MotionEvent.ACTION_MOVE: 293.45657, 497.48178
...
12:07:49.168 MotionEvent.ACTION_MOVE: 293.45657, 497.48178
12:07:49.183 MotionEvent.ACTION_MOVE: 291.2037, 497.48178
12:07:49.198 MotionEvent.ACTION_MOVE: 290.46213, 497.48178
...
12:07:49.403 MotionEvent.ACTION_MOVE: 290.46213, 497.48178
12:07:49.406 MotionEvent.ACTION_UP: 290.46213, 497.48178
12:07:49.406 event.getDownTime: 566
I tapped for 566ms. Pretty obvious that from ACTION_DOWN to the first ACTION_MOVE there is a big delta of ~14px (is it really pixel?) in y-direction.
Hey there,
probably this does not help anyone, but just for the sake of documentation: due to my headphone-jack issue, my fairphone got replaced by a new one. Now it seems that my sensitive screen issue is gone.
I don't know about how many sources you guys have, but if you have the kernel sources, someone could try to implement a filter (and enable debugging logs in the kmsg ofc) so touches under 400ms (just a value for explanation) are only getting registered as touches, but not as movements. However, this could also have some downsides (pretty fast swipes for example), therefore a sysfs option would be a nice idea
But this would at least be a workaround.
Hyst said:
Hey there,
probably this does not help anyone, but just for the sake of documentation: due to my headphone-jack issue, my fairphone got replaced by a new one. Now it seems that my sensitive screen issue is gone.
Click to expand...
Click to collapse
Hmm, ok.Would you mind doing another sreenshot like you did already? Just in order to see the difference.
laufersteppenwolf said:
I don't know about how many sources you guys have, but if you have the kernel sources, someone could try to implement a filter (and enable debugging logs in the kmsg ofc) so touches under 400ms (just a value for explanation) are only getting registered as touches, but not as movements. However, this could also have some downsides (pretty fast swipes for example), therefore a sysfs option would be a nice idea
But this would at least be a workaround.
Click to expand...
Click to collapse
That is what I also had in mind. I already had a look at Xposed framework trying to find out how to "intercept" global touches. With a normal Android Service it is unfortunately not possible at least what I have read so far.
hanzano said:
That is what I also had in mind. I already had a look at Xposed framework trying to find out how to "intercept" global touches. With a normal Android Service it is unfortunately not possible at least what I have read so far.
Click to expand...
Click to collapse
Xposed is a genious piece of work, however, this should be done via kernel.
Maybe @benkxda could have a chat with Fairphone about that?
hanzano said:
Hmm, ok.Would you mind doing another sreenshot like you did already? Just in order to see the difference.
Click to expand...
Click to collapse
no problem. Here you go!
As far as I am concerned I did the same thing. small fast touches.
although sometimes there is a long line, overall a lot less wiggeling.
Hyst said:
no problem. Here you go!
As far as I am concerned I did the same thing. small fast touches.
although sometimes there is a long line, overall a lot less wiggeling.
Click to expand...
Click to collapse
That looks much better than beforehand. I believe the red lines are not of interest. These just seem to be estimations. I had a look into Android source code com.android.internal.widget.PointerLocationView. The VelocityTracker has an Estimator which is drawn in light red. The MediaTek development tool seems to do it similar. So I would only count the green lines.
But I still think that this is not perfect either. I checked with my old Samsung Galaxy Ace and the Android location pointer which really gives points, no line at all when tapping shortly.
laufersteppenwolf said:
Xposed is a genious piece of work, however, this should be done via kernel.
Maybe @benkxda could have a chat with Fairphone about that?
Click to expand...
Click to collapse
I absolutely agree with you that this should actually be done on kernel/driver level. But I have no idea about Android's kernel structure or any driver layer at all. I used the Android SDK though. And unfortunately MediaTek is not giving all sources for the FairPhone
Where exactly do you expect touches to be evaluated and "forwarded" to Android? Do you have some example code of other phones probably? I am just interested how this works in software.
hanzano said:
I absolutely agree with you that this should actually be done on kernel/driver level. But I have no idea about Android's kernel structure or any driver layer at all. I used the Android SDK though. And unfortunately MediaTek is not giving all sources for the FairPhone
Where exactly do you expect touches to be evaluated and "forwarded" to Android? Do you have some example code of other phones probably? I am just interested how this works in software.
Click to expand...
Click to collapse
Sorry for the late answer, haven't seen you post
Well, kernel sources are quite easily structured, you've got the drivers, in there you find the input drivers, in which you also find the touchscreen drivers. in there are several drivers, you then need to find the correct one (in my case it's THIS file). In there are all functions to make your touchscreen work. This device also has a filter for "ghost" touches, just search for it inside this file
So, if you have located the driver of your device, you can there all needed stuff, such as the filter I mentioned
laufersteppenwolf said:
Sorry for the late answer, haven't seen you post
Click to expand...
Click to collapse
No prob
laufersteppenwolf said:
Well, kernel sources are quite easily structured, you've got the drivers, in there you find the input drivers, in which you also find the touchscreen drivers.
Click to expand...
Click to collapse
Ah ok, got it. In folder alps >> kernel >> drivers >> input >> touchscreen there are 68 files.
laufersteppenwolf said:
in there are several drivers, you then need to find the correct one (in my case it's THIS file).
Click to expand...
Click to collapse
Did you forget the link on "THIS" probably?
laufersteppenwolf said:
In there are all functions to make your touchscreen work. This device also has a filter for "ghost" touches, just search for it inside this file
So, if you have located the driver of your device, you can there all needed stuff, such as the filter I mentioned
Click to expand...
Click to collapse
Vielen Dank! Helps a lot
hanzano said:
Did you forget the link on "THIS" probably?
Click to expand...
Click to collapse
Ooops yeah, I did So HERE you go
Hello @Hyst
In the last week I was discussing with the support team pretty intensively about the touchscreen issue.
Now, they asked me to send them my phone, to see what happens on the device.
But, as I'm working abroad, its not that easy for me, to send it soon.
That's why I suggested, they should ask you, to get the IMEI of your old device - as you offered in the general thread.
Unfortunately Rick de Groot (the support guy) asked me again, to ask you for this number...
A little bit strange, but this is what I want to do now
Can you please send your old IMEI number and the RMA (repair form number) to this email:
<[email protected]>
That would be really great!
PS:
My Name is Florian W. if you want to quote me in your email.
Maybe this helps them to relate your email to my support request.
Thank you in advance!
Holzwurm86
Hi @Holzwurm86
sure thing. I've just send them an email.
Holzwurm86 said:
In the last week I was discussing with the support team pretty intensively about the touchscreen issue.
Now, they asked me to send them my phone, to see what happens on the device.
Click to expand...
Click to collapse
Good to see that there is still progress. The list of phones being affected gets bigger at the fairphone.com forum. If the engineers from Kwamecorp or Changhong need help like debugging or logging touches I am willing to help of course.

Categories

Resources