RIL definitions - Windows Mobile Development and Hacking General

Hi.
I read the forum a while ago, even posted a question. A while ago, RIL was quite an issue here and since i needed the spec myself desperately, since it is the last straw for me to save the project (USSD related), i started to look around for sort of .h file for RIL.
And i found it. It is originating from the source itself, i hope, since the file header says:
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Copyright (c) 1995-1999 Microsoft Corporation
And the file is called ril.h And it contains definitions for all possible RIL events, structures and function signatures that supposed to be in the ril.dll and/or rilgsm.dll. So, the rest should be just LoadLibrary() and GetProcAddress() magic. I'm about to start testing it.
If anyone else is interested in that file, please let me know (reply for this post would do). Then i know whether to post it here os send it to someone.

When I was interested in RIL I've found this file with google. Its size is 321285 bytes.

Related

Simple Reverse Engineering

I'm currently doing a little reverse engineering of Coredll so that I can understand how a few functions work. Occasionally I run across a function call to an address similar to F000BDD8. Is this a function call into the kernel or does it correspond to an address in the dll? If someone could point me to the correct reference, I'd appreciate it.
This is how it is layed out:
LDR r0, &0000b650
MOV lr, pc
MOV pc, r0
And at address 0000b650 the value is F000BDD8.
Thanks!
it is something like a "syscall" command on WinCE. The "FIRST_METHOD" value (0xF0010000) is subtracted form the given address, then value is divided by 2 (in your case we get -8468 or 0xff..ffdeec). If the value is negative it is "API call to an implicit handle. In this case, bits 30-16 of the method index indicate which entry in the system handle table." (probably its a typo in comment, bits 8-22 are used instead of 30-16). Lower bits are offset in SystemAPISets[] table for the function address.
For more information look into PrefetchAbort function in "PRIVATE\WINCEOS\COREOS\NK\KERNEL\ARM\armtrap.s" file, and ObjectCall function in "PRIVATE\WINCEOS\COREOS\NK\KERNEL\objdisp.c"
You should get PlatformBuilder and look into Wince 4.20 partial source code that is coming with it. It does not have much information on indexes inside SystemAPISets table for any table except for SystemAPISets[SH_WIN32] (SH_WIN32 == 0).
see this page for a list of systemcalls.
and this page for a description of how systemcalls work.
to convert a trap address ( like 0xF000BDD8 ) back to the syscall nrs:
Code:
$a= (0xf0010000-$addr)/4; # = 0x108a
$api=$a>>8; # 0x10 = SH_GDI
$call=$a&0xff; # 0x8a = ExtCreateRegion
( call defined in public/common/oak/inc/mwingdi.h )
hmm. not sure which is correct though, my wince-systemcalls page lists a different call signature than the headerfile. they should match.
Thank you for the information. I actually have the sample source that comes with the Platform Builder demo. In this case, the call I was investigating was the GetSysColorBrush API.
That brings me to another point. In several of the APIs a check is made to a value (KData->lpvTls[-20], I believe) to see if the 0-bit is 1. The only thing I can determine is whether or not this is checking for the ready state of the API. Whatever the case, it seems that this bit determines whether the function I mentioned earlier is called or whether a function address is loaded from RAM. It's really weird.
The main reason I'm doing this is so that I can access the system's brush cache for the system colors. I've noticed that if I intercept calls to GetSysColor and GetSysColorBrush, it only works for applications that have not called them yet. So, if I override the color for COLOR_BTNFACE, menubars for newly launched applications are colored correctly, but buttons (which belong to GWES) do not use the appropriate color. It's weird because my code has been injected into GWES.Exe.
I guess that brings me to my ultimate question of whether or not someone can point me to the location in RAM where the system brush cache is stored.
Thanks!
is the '-20' in bytes ?
in PUBLIC/COMMON/OAK/INC/pkfuncs.h
#define PRETLS_THRDINFO -5
#define UTLS_INKMODE 0x00000001 // bit 1 set if in kmode
#define IsThrdInKMode() (UTlsPtr()[PRETLS_THRDINFO] & UTLS_INKMODE)
this must be the bit that is set when calling 'SetKmode();'
Yeah, the -20 is in bytes. Here's the disassembly of what I was looking at:
00B5EC E59F6068 LDR r6, &0000B65C
00B5F0 E59F5060 LDR r5, &0000B658
00B5F4 E5960000 LDR r0, [r6, #0]
00B5F8 E5101014 LDR r1, [r0, #-20]
00B5FC E3110001 TST r1, #1
00B600 15950000 LDRNE r0, [r5, #0]
...
00B650 F000BF08 ANDNV r11, r0, r8, LSL #30
00B654 01FC6758 MVNEQS r6, r8, ASR r7
00B658 01FC6760 MVNEQS r6, r0, ROR #14
00B65C FFFFC800 SWINV &FFC800 <-- Points to KDataStruct
What you said makes sense, yet it seems kind of strange that this API would be looking at an offest of -20.
so what you are seeing, is a call to 'IsThrdInKMode()' .
there is a space of thread local storage used by the kernel, just before the publicly accessible thread local storage. - look for SIZE_PRETLS, and PRETLS_RESERVED in the wince source.
this function ( well implemented as a macro actually ) is not a very strange function to call from a system call.
btw, you should have a look at IDA from datarescue. it will give you a much more readable disassembly. the stuff in your example from 00b650-b65c will be recognised as a constant pool, and the references to it, like at 00b5ec will be disassembled as 'LDR r6, =0xffffc800'
The only problem I have with IDA is that I can't afford it and their demo doesn't handle ARM processors. The generated output was done with a fairly simple program and has forced me to learn quite a bit about the underlying code in the OS. I've had to go back and forth between the disassembly and the shared source, but I've managed so far (with this exception).
I do have one other question while I have your attention. I've managed to inject a dll into all of the running processes and I've successfully managed to intercept several APIs by patching an application's IAT (and all attached modules, too) in an attempt to provide a better color handler for the system. It appears, however, that some programs, like Gwes.exe, don't use call my functions, but instead call the functions built into Coredll. For example, the GetSysColorBrush I mentioned earlier. This is what prompted me to begin reverse engineering Coredll in the first place. Do you know if the addresses are being stored somewhere? If so, that would explain why even though I've patched the IAT that the original function is still being called.
contact me in PM, I can help with IDA 4.51 full
gwes.exe is the program implementing the API, so quite likely it either calls it's api's directly, or calls the systemcalls directly.
and maybe someprograms are linked to a statically linked version of coredll?
a while back I experimented with trapping systemcalls, by modifying the method table in an API. ( see hookapi.cpp )
I do remember that my device became very unstable. so I guess that it somewhat worked, but haven't figured out what exactly I did wrong yet.
btw, I would be quite interested to see your code to trap calls via the IAT.
When you have a look to romimage.exe source code in platform builder you will notice that there is a special handling for coredll.dll.
All programs included in the MODULES section will directly resolve calls to coredll.dll. Only if you build a new XIP section a warning will appear "missing coredll.dll ... will late bind".
This means that a hook to coredll.dll will not be visible for in ROM programs since they will call the system functions directly (without the trap).
John
itsme said:
btw, I would be quite interested to see your code to trap calls via the IAT.
Click to expand...
Click to collapse
Unfortunately, I'm not at the computer where I have the code, so I'll have to upload it to you tomorrow. However, it involves extracting the IAT from the PPROCESS structure of a given program, then enumerating through the entries until I find the API I'm looking for. It's actually pretty straight forward. Give me your email address and I'll send it to you as soon as I can.
JohnSmith said:
When you have a look to romimage.exe source code in platform builder you will notice that there is a special handling for coredll.dll.
All programs included in the MODULES section will directly resolve calls to coredll.dll. Only if you build a new XIP section a warning will appear "missing coredll.dll ... will late bind".
This means that a hook to coredll.dll will not be visible for in ROM programs since they will call the system functions directly (without the trap).
Click to expand...
Click to collapse
I don't have the full source code, only what's available in the shared source, so I'm not sure what modules would be affected. However, I'm really only interested in a few of the Gwes APIs. I know it's possible at least at some point to hook into those as I've seen it done, though the individual who did it is under an NDA and can't tell me how he did it.
Itsme's process looks to be about the best so far, assuming I can get it to work. The only thing is that I need to find a way to translate the physical address to a virtual adress (and vice-versa) for MIPS, SH3 and the emulator, not just the ARM/XScale processors. If I could do that, then I might be able to get things to work.
Thanks for all of your help so far. I appreciate the time you have spent in explaining a few things to me.
[email protected]
for translating physical to virtual you would need to find the translation tables for each process, which I assume must exist somewhere, but have not found them yet. - my guess is it may be the 'pPTBL' entry from the process struct, but have not verified this yet.
( you know that virtual addresses can not uniquely be translated back to physical without knowing what process they are for? for instance the virtual address 0x11000 is visable in each process, and mapped to a different physical address each time. )
Fortunately, I've written an OS before, so I know what you mean about address mapping. If the pTBL does contain the page mappings, that would make sense. I found it easier in my OS to keep the TLB entries with the process they belonged to. That way the OS wouldn't have to search through its memory chain looking for the process's mappings.
Also, if the pTBL does contain the TLB entries, then it should be relatively easy to decode the addresses. After reading your code, itsme, I determined that the CINFO structure holds a pServer field which points to the process which contains the APIs. So, for example, the GDI and USER API sets are being held in Gwes.exe (at least, according to the pServer field). The ppfnMethods field is a VA referring to the pServer. If pServer is NULL, then the ppfnMethods field seems to be a PA. So, what I could do is check for pServer. If it is NULL, I could use the current process's pTBL structure to map the PA to a VA. If the pServer field is non-NULL, then I could try the pServer's pTBL field to do the mapping and then do the replacement that way.
If this works, I owe you big!
here is another experimental program, that investigates all the handles present in the system.
I used it to generate this overview of handles.
Progress So Far
I just thought I'd post an update on my progress so far. It appears that I can overwrite the API table pretty easily. Instead of taking a physical address, the table takes a pointer to a function in virtual memory. You just need to map it to slot 0 using MapPtrToProcess.
I've come across two issues in doing this. The first thing is that I can't call the original function address. For example, I store the original address contained in ppfMethods[x] and then attempt to typecast it to the proper function type, passing the incoming variables.
The other issue is that it appears that the API table is NOT refreshed upon a soft-reset. Fortunately, I was playing around with it on the emulator. Had I not, I would have been forced to hard-reset my device.
Does anyone have ideas on either of these issues?
Thanks again for your help so far!
a thing that just occurred to me, is that if you duplicate the apiset struct, the memory pointed to by ppfnMethods should be readable from the process specified in pServer.
so you should allocate the memory in the address space of pServer.
or set pServer to yourself, and add some hook code which does not modify the stack, so you can just pass most calls directly to the original server.
to call the original function address, you have to somehow switch process context, and then call it.
Well, in the case that I tested, I replaced the QueryAPISetID API which exists in Wn32 and therefore has no pServer. It appears that if there is no pServer, then there is no context switch needed. I've been able to verify that the API will execute my code and the generated assembly does not modify the stack in any way.
This one is really weird. Thanks for the suggestions.
chmckay said:
itsme said:
btw, I would be quite interested to see your code to trap calls via the IAT.
Click to expand...
Click to collapse
Unfortunately, I'm not at the computer where I have the code, so I'll have to upload it to you tomorrow. However, it involves extracting the IAT from the PPROCESS structure of a given program, then enumerating through the entries until I find the API I'm looking for. It's actually pretty straight forward. Give me your email address and I'll send it to you as soon as I can.
Click to expand...
Click to collapse
Hi,
Just wondring if you could post/PM/email me the code that lets you replace the API call. This is for the purpose of hooking a different DLL to do my own thing, or see here:
http://forum.xda-developers.com/viewtopic.php?p=131857#131857
I just sent you a PM with the information you requested.

INFLATE WIN32 FILE

Hi to all you experts,
I am not a software engineer, however, I have some good experience with assembly code as I am an electronic engineer. Now here's the thing:
I have an .exe file which is a win32 application. I have disassembled it and I can see parts of the code, but most of it looks compressed. There is a reference in the file about "Inflate" and "deflate" by Jean Loup, and I have found the source code for this inflation/deflation algorithm, called ZLIB along with compiled dlls. Now as I said before, I don't have any experience whatsoever on windows programming apart from simple pascal and C programming, so i don't know how to manipulate dlls etc. So as I said before, I would like to see if indeed parts of the file are compressed and in this case, inflate them, and hopefully see the rest of the code! Any help?
Cheers,
Angelos
This is the wrong forum to ask. You should ask in the reverse engeneering forums. For example http://tsehp.cjb.net or if you know russian - wasm.ru, reng.ru, reversing.net
Typically you should run the program under debugger, trace the program until it decompresses/decrypts the needed parts and dump them to disk. I think that you are studying a PC program, so I recommend you using IDA 4.70 (Interactive Disassembler - www.datarescue.com). It is the best disassembler I know and has a built-in x86 debugger.

[64 bit] GRP DevKit v1.4.3 (9/17/11)

GreenRom DevKit is now available. It has the tools for compiling roms from source and a script that installs the rest of the tools you need. Although synaptic and gdebi have been removed, they can be easily installed in the terminal with apt-get. I have written instructions to facilitate the installation of this software. This distro was designed for ease of use and is for both the novice and highly experienced developer. On a side note, neither xda nor myself are rsponsible for any damages that may occur from the Iinstallation of this distro. By downloading and installing you take full responsibility for your own actions. Relax, you know the drill. Follow the instruction to a tee and you'll be fine.
*Note: Contact either metalcated or myself with any questions concerning GRP Dev Kit. You can also contact us over at: http://www.greenromproject.com
Some common questions might be:
?-Why is this important?
!-Because there seems to be a shortage of Android developers as a result of the intimidation of setting up a build environment and having what you need to get started. Now you can install this os and be on your way to becoming a developer if you have the desire.
?-Do I have to install GRPdevkit to my HDD?
!-No, you can install it on a pen/usb drive and run it from that if your bios detects usb drives. Since you will have to run a script to finnish installing a few tools, you can't run it from a live session. Just set up your usb pen drive by partitioning it as you would a hdd, install the devkit and store your progress as you normally would. The decision was made to make this os fit on a cd. Nevertheless, you can install it on your pen drive(usb stick) and carry it with you anywhere!
?-Will I be able to install this alongside another OS?
!-Possibly, although LivLogik and I haven't had any luck with dual booting this nor Ubuntu.
?-Will this screw up my computer?
!-As with any Linux OS that's experimental, the possibility is there, although LivLogik and I have been testing this OS extensively to ensure all the bugs have been work out before making it available to you. Nevertheless, we are in no way responsible for your actions!
?-What if I don't want to dev and just want to use this for an every day system?
!-That will be up to you as this os is attractive and practical. Follow the instructions to the letter and you can install anything else that will suite your fancy.
?-What if I can't burn an installation disk?
!-As with the majority of mainstream Linux Distros, we will be offering an installation disk for a small fee + s&h. LivLogik and I have to come up with a design for the cd decal as I have access to a cd printer. We will post the availability when we come up with it.-Now available
?-How do I use the tools that are in this?
!-There is a get started guide that automatically appears on the desktop. The guide can be disabled in the startup apps settings. The guide explains briefly how to use the tools, however, I didn't include instructions on Eclipse as I've never used it. For Eclipse just go to it's website here: http://eclipsetutorial.sourceforge.net/totalbeginner.html and learn how to use it. Eclipse is used to make programs for Android.
LivLogik will be making a video so that you can see it in action. Enjoy!!
Note: you may need to right click on the desktop and change the wallpaper mode setting from zoom to whatever fits your screen best. -Fixed in update
Stoute will be trying to upload the iso to GRP a.s.a.p.
Pre-installation Instructions
======> Video on partitioning <======
After you download the iso you'll need to burn it onto a cd: http://www.wikihow.com/Burn-ISO-Files-to-DVD and then boot it selecting Live mode. Instructions are basically the same for linux but you'll have to use xfburn, brasero or another app that burns iso files to disc. Next, you may have to use cfdisk to partition your hard drive if the Installer doesn't take you to the partitioner automatically. To do this, open a terimnal and type:
sudo cfdisk
and hit enter. Now you need to select a partition that you want to install to. Pick one and delete it to create a new one or create a new one altogether. You don't have to select type but make sure you make it a primary partition and make it bootable. Then you need to create a swap partition. Make it 512Mb or you could try 256Mb if you have limited hdd space and make sure you choose swap(82) for the type. After you've set up the partitions you can quit the cfdisk and start the Installer. The partitioner may give you some sort of error such as "unable to unmount partition 10GB or something similar. Don't worry about that, just continue with the Installer.
**VBox instructions (Tools now included in new build)
when setting up your vm, you must first choose new. Then when it asks you what system you choose Linux and then for the distro choose ubuntu if you have a 64bit host or choose Gentoo[64bit] if you're using a 32bit host. The rest is pretty much preference. I chose 512Mb for memory. Now when you first boot your newly install vm of grpdevkit, you'll notice that the screen res is 800x600. That's not good unless you're using a laptop or netbook. metalcated wrote some instructions to solve this resolution dilemma as follows:
Installing Guest Additions on Debian
Follow these steps to install the Guest Additions on your Debian virtual machine:
Open the Root Terminal
Install required packages --> apt-get install build-essential module-assistant
Configure your system for building kernel modules by running --> m-a prepare
Click on Install Guest Additions… from the Devices menu, the cd should mount --> /media/cdrom
Run sh /media/cdrom/VBoxLinuxAdditions.run, and follow the instructions on screen
Log out and Log back in... your resolution should be adjusted
~ metalcated
*Note-This distro has sun java 6 installed on it and by downloading this distro you agree to the following:
Code:
[FONT="Arial"][size="1"]Sun Microsystems, Inc. Binary Code License Agreement
for the JAVA SE DEVELOPMENT KIT (JDK), VERSION 6
SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE
THE SOFTWARE IDENTIFIED BELOW TO YOU ONLY UPON THE
CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED
IN THIS BINARY CODE LICENSE AGREEMENT AND SUPPLEMENTAL
LICENSE TERMS (COLLECTIVELY "AGREEMENT"). PLEASE READ
THE AGREEMENT CAREFULLY. BY DOWNLOADING OR INSTALLING
THIS SOFTWARE, YOU ACCEPT THE TERMS OF THE AGREEMENT.
INDICATE ACCEPTANCE BY SELECTING THE "ACCEPT" BUTTON
AT THE BOTTOM OF THE AGREEMENT. IF YOU ARE NOT WILLING
TO BE BOUND BY ALL THE TERMS, SELECT THE "DECLINE"
BUTTON AT THE BOTTOM OF THE AGREEMENT AND THE DOWNLOAD
OR INSTALL PROCESS WILL NOT CONTINUE.
1. DEFINITIONS. "Software" means the identified above
in binary form, any other machine readable materials
(including, but not limited to, libraries, source
files, header files, and data files), any updates or
error corrections provided by Sun, and any user
manuals, programming guides and other documentation
provided to you by Sun under this Agreement.
"Programs" mean Java applets and applications intended
to run on the Java Platform, Standard Edition (Java
SE) on Java-enabled general purpose desktop computers
and servers.
2. LICENSE TO USE. Subject to the terms and conditions
of this Agreement, including, but not limited to the
Java Technology Restrictions of the Supplemental
License Terms, Sun grants you a non-exclusive,
non-transferable, limited license without license fees
to reproduce and use internally Software complete and
unmodified for the sole purpose of running Programs.
Additional licenses for developers and/or publishers
are granted in the Supplemental License Terms.
3. RESTRICTIONS. Software is confidential and
copyrighted. Title to Software and all associated
intellectual property rights is retained by Sun and/or
its licensors. Unless enforcement is prohibited by
applicable law, you may not modify, decompile, or
reverse engineer Software. You acknowledge that
Licensed Software is not designed or intended for use
in the design, construction, operation or maintenance
of any nuclear facility. Sun Microsystems, Inc.
disclaims any express or implied warranty of fitness
for such uses. No right, title or interest in or to
any trademark, service mark, logo or trade name of Sun
or its licensors is granted under this Agreement.
Additional restrictions for developers and/or
publishers licenses are set forth in the Supplemental
License Terms.
4. LIMITED WARRANTY. Sun warrants to you that for a
period of ninety (90) days from the date of purchase,
as evidenced by a copy of the receipt, the media on
which Software is furnished (if any) will be free of
defects in materials and workmanship under normal use.
Except for the foregoing, Software is provided "AS IS".
Your exclusive remedy and Sun's entire liability under
this limited warranty will be at Sun's option to
replace Software media or refund the fee paid for
Software. Any implied warranties on the Software are
limited to 90 days. Some states do not allow
limitations on duration of an implied warranty, so the
above may not apply to you. This limited warranty
gives you specific legal rights. You may have others,
which vary from state to state.
5. DISCLAIMER OF WARRANTY. UNLESS SPECIFIED IN THIS
AGREEMENT, ALL EXPRESS OR IMPLIED CONDITIONS,
REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED
WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO
THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE
LEGALLY INVALID.
6. LIMITATION OF LIABILITY. TO THE EXTENT NOT
PROHIBITED BY LAW, IN NO EVENT WILL SUN OR ITS
LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR
DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL,
INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED
REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
OR RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE,
EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES. In no event will Sun's liability to you,
whether in contract, tort (including negligence), or
otherwise, exceed the amount paid by you for Software
under this Agreement. The foregoing limitations will
apply even if the above stated warranty fails of its
essential purpose. Some states do not allow the
exclusion of incidental or consequential damages, so
some of the terms above may not be applicable to you.
7. TERMINATION. This Agreement is effective until
terminated. You may terminate this Agreement at any
time by destroying all copies of Software. This
Agreement will terminate immediately without notice
from Sun if you fail to comply with any provision of
this Agreement. Either party may terminate this
Agreement immediately should any Software become, or
in either party's opinion be likely to become, the
subject of a claim of infringement of any intellectual
property right. Upon Termination, you must destroy all
copies of Software.
8. EXPORT REGULATIONS. All Software and technical data
delivered under this Agreement are subject to US
export control laws and may be subject to export or
import regulations in other countries. You agree to
comply strictly with all such laws and regulations and
acknowledge that you have the responsibility to obtain
such licenses to export, re-export, or import as may
be required after delivery to you.
9. TRADEMARKS AND LOGOS. You acknowledge and agree as
between you and Sun that Sun owns the SUN, SOLARIS,
JAVA, JINI, FORTE, and iPLANET trademarks and all SUN,
SOLARIS, JAVA, JINI, FORTE, and iPLANET-related
trademarks, service marks, logos and other brand
designations ("Sun Marks"), and you agree to comply
with the Sun Trademark and Logo Usage Requirements
currently located at
http://www.sun.com/policies/trademarks. Any use you
make of the Sun Marks inures to Sun's benefit.
10. U.S. GOVERNMENT RESTRICTED RIGHTS. If Software is
being acquired by or on behalf of the U.S. Government
or by a U.S. Government prime contractor or
subcontractor (at any tier), then the Government's
rights in Software and accompanying documentation will
be only as set forth in this Agreement; this is in
accordance with 48 CFR 227.7201 through 227.7202-4
(for Department of Defense (DOD) acquisitions) and
with 48 CFR 2.101 and 12.212 (for non-DOD
acquisitions).
11. GOVERNING LAW. Any action related to this Agreement
will be governed by California law and controlling
U.S. federal law. No choice of law rules of any
jurisdiction will apply.
12. SEVERABILITY. If any provision of this Agreement
is held to be unenforceable, this Agreement will
remain in effect with the provision omitted, unless
omission would frustrate the intent of the parties, in
which case this Agreement will immediately terminate.
13. INTEGRATION. This Agreement is the entire agreement
between you and Sun relating to its subject matter. It
supersedes all prior or contemporaneous oral or
written communications, proposals, representations and
warranties and prevails over any conflicting or
additional terms of any quote, order, acknowledgment,
or other communication between the parties relating to
its subject matter during the term of this Agreement.
No modification of this Agreement will be binding,
unless in writing and signed by an authorized
representative of each party.
SUPPLEMENTAL LICENSE TERMS
These Supplemental License Terms add to or modify the
terms of the Binary Code License Agreement.
Capitalized terms not defined in these Supplemental
Terms shall have the same meanings ascribed to them in
the Binary Code License Agreement . These Supplemental
Terms shall supersede any inconsistent or conflicting
terms in the Binary Code License Agreement, or in any
license contained within the Software.
A. Software Internal Use and Development License
Grant. Subject to the terms and conditions of this
Agreement and restrictions and exceptions set forth in
the Software "README" file incorporated herein by
reference, including, but not limited to the Java
Technology Restrictions of these Supplemental Terms,
Sun grants you a non-exclusive, non-transferable,
limited license without fees to reproduce internally
and use internally the Software complete and
unmodified for the purpose of designing, developing,
and testing your Programs.
B. License to Distribute Software. Subject to the
terms and conditions of this Agreement and
restrictions and exceptions set forth in the Software
README file, including, but not limited to the Java
Technology Restrictions of these Supplemental Terms,
Sun grants you a non-exclusive, non-transferable,
limited license without fees to reproduce and
distribute the Software, provided that (i) you
distribute the Software complete and unmodified and
only bundled as part of, and for the sole purpose of
running, your Programs, (ii) the Programs add
significant and primary functionality to the Software,
(iii) you do not distribute additional software
intended to replace any component(s) of the Software,
(iv) you do not remove or alter any proprietary
legends or notices contained in the Software, (v) you
only distribute the Software subject to a license
agreement that protects Sun's interests consistent
with the terms contained in this Agreement, and (vi)
you agree to defend and indemnify Sun and its
licensors from and against any damages, costs,
liabilities, settlement amounts and/or expenses
(including attorneys' fees) incurred in connection
with any claim, lawsuit or action by any third party
that arises or results from the use or distribution of
any and all Programs and/or Software.
C. License to Distribute Redistributables. Subject to
the terms and conditions of this Agreement and
restrictions and exceptions set forth in the Software
README file, including but not limited to the Java
Technology Restrictions of these Supplemental Terms,
Sun grants you a non-exclusive, non-transferable,
limited license without fees to reproduce and
distribute those files specifically identified as
redistributable in the Software "README" file
("Redistributables") provided that: (i) you distribute
the Redistributables complete and unmodified, and only
bundled as part of Programs, (ii) the Programs add
significant and primary functionality to the
Redistributables, (iii) you do not distribute
additional software intended to supersede any
component(s) of the Redistributables (unless otherwise
specified in the applicable README file), (iv) you do
not remove or alter any proprietary legends or notices
contained in or on the Redistributables, (v) you only
distribute the Redistributables pursuant to a license
agreement that protects Sun's interests consistent
with the terms contained in the Agreement, (vi) you
agree to defend and indemnify Sun and its licensors
from and against any damages, costs, liabilities,
settlement amounts and/or expenses (including
attorneys' fees) incurred in connection with any
claim, lawsuit or action by any third party that
arises or results from the use or distribution of any
and all Programs and/or Software.
D. Java Technology Restrictions. You may not create,
modify, or change the behavior of, or authorize your
licensees to create, modify, or change the behavior
of, classes, interfaces, or subpackages that are in
any way identified as "java", "javax", "sun" or
similar convention as specified by Sun in any naming
convention designation.
E. Distribution by Publishers. This section pertains
to your distribution of the Software with your printed
book or magazine (as those terms are commonly used in
the industry) relating to Java technology
("Publication"). Subject to and conditioned upon your
compliance with the restrictions and obligations
contained in the Agreement, in addition to the license
granted in Paragraph 1 above, Sun hereby grants to you
a non-exclusive, nontransferable limited right to
reproduce complete and unmodified copies of the
Software on electronic media (the "Media") for the
sole purpose of inclusion and distribution with your
Publication(s), subject to the following terms: (i)
You may not distribute the Software on a stand-alone
basis; it must be distributed with your
Publication(s); (ii) You are responsible for
downloading the Software from the applicable Sun web
site; (iii) You must refer to the Software as JavaTM
SE Development Kit 6; (iv) The Software must be
reproduced in its entirety and without any
modification whatsoever (including, without
limitation, the Binary Code License and Supplemental
License Terms accompanying the Software and
proprietary rights notices contained in the Software);
(v) The Media label shall include the following
information: Copyright 2006, Sun Microsystems, Inc.
All rights reserved. Use is subject to license terms.
Sun, Sun Microsystems, the Sun logo, Solaris, Java,
the Java Coffee Cup logo, J2SE, and all trademarks and
logos based on Java are trademarks or registered
trademarks of Sun Microsystems, Inc. in the U.S. and
other countries. This information must be placed on
the Media label in such a manner as to only apply to
the Sun Software; (vi) You must clearly identify the
Software as Sun's product on the Media holder or Media
label, and you may not state or imply that Sun is
responsible for any third-party software contained on
the Media; (vii) You may not include any third party
software on the Media which is intended to be a
replacement or substitute for the Software; (viii) You
shall indemnify Sun for all damages arising from your
failure to comply with the requirements of this
Agreement. In addition, you shall defend, at your
expense, any and all claims brought against Sun by
third parties, and shall pay all damages awarded by a
court of competent jurisdiction, or such settlement
amount negotiated by you, arising out of or in
connection with your use, reproduction or distribution
of the Software and/or the Publication. Your
obligation to provide indemnification under this
section shall arise provided that Sun: (a) provides
you prompt notice of the claim; (b) gives you sole
control of the defense and settlement of the claim;
(c) provides you, at your expense, with all available
information, assistance and authority to defend; and
(d) has not compromised or settled such claim without
your prior written consent; and (ix) You shall provide
Sun with a written notice for each Publication; such
notice shall include the following information: (1)
title of Publication, (2) author(s), (3) date of
Publication, and (4) ISBN or ISSN numbers. Such notice
shall be sent to Sun Microsystems, Inc., 4150 Network
Circle, M/S USCA12-110, Santa Clara, California 95054,
U.S.A , Attention: Contracts Administration.
F. Source Code. Software may contain source code that,
unless expressly licensed for other purposes, is
provided solely for reference purposes pursuant to the
terms of this Agreement. Source code may not be
redistributed unless expressly provided for in this
Agreement.
G. Third Party Code. Additional copyright notices and
license terms applicable to portions of the Software
are set forth in the THIRDPARTYLICENSEREADME.txt file.
In addition to any terms and conditions of any third
party opensource/freeware license identified in the
THIRDPARTYLICENSEREADME.txt file, the disclaimer of
warranty and limitation of liability provisions in
paragraphs 5 and 6 of the Binary Code License
Agreement shall apply to all Software in this
distribution.
H. Termination for Infringement. Either party may
terminate this Agreement immediately should any
Software become, or in either party's opinion be
likely to become, the subject of a claim of
infringement of any intellectual property right.
I. Installation and Auto-Update. The Software's
installation and auto-update processes transmit a
limited amount of data to Sun (or its service
provider) about those specific processes to help Sun
understand and optimize them. Sun does not associate
the data with personally identifiable information.
You can find more information about the data Sun
collects at http://java.com/data/.
For inquiries please contact: Sun Microsystems, Inc.,
4150 Network Circle, Santa Clara, California 95054,
U.S.A.[/size][/font]
If you don't agree with the Sun Java license then don't download this distro!! ;-)
Here's an outside link:
->>>========> GRP DevKit v1.4.3 64 bit <========<<<-
Code:
[color=blue]Change Log: [/color]
(9-17-11 v1.4.3) fixes by metalcated
-updated the repo to the most current (apt-get update)
-updated Kernel from 2.6.32-35 to 2.6.32-36 as well as other packages (apt-get upgrade)
-updated adbinstaller.sh with usability enhancements for the end user
-added LXTerminal replacing mrxvt and terminator (updated wbar icons)
-added A new theme to solve issues with adbinstaller.sh EULA crashing
-added Minor changes to the menubar (usability)
-added VirtualBox Tools for running in a virtual machine (http://www.virtualbox.org/)
-corrected Problem with sudo not working (made changes to the default groups settings)
(9-14-11 v1.4.2)
-added gtk2-engines-murrine murrine-themes(fix by metalcated)
-added mrxvt mrxvt-common(again, fix by metalcated)
-ran sudo update to fix issues with Eclipse install(solution by metalcated)
**above fixes allow installers on desktop to function properly.
(9-14-11 v1.4.1)
-removed Midori browser
-removed Xarchiver
-removed Pinta
-removed mrxvt
-added Terminator terminal(has copy/paste feature)
-added synaptic package manager(install any software now)
-added new sources.list by Metalcated
-added auto-add user to sudoer list by Metalcated
-added root terminal to Wbar
-added Synaptic package manager to Wbar
-added Chrome browser
-added Gimp
-added new GRP DevKit wallpaper
-centered GRP name over Wbar
-changed browser icon in Wbar from Midori to Chrome
-added a launcher on desktop to install:
*SDK&NDK
*adb
*Eclipse
(9-8-11 v1.4)
-removed adb, SDK, NDK, and Eclipse
-removed Chrome browser
-removed Xarchiver
-removed File-Roller
-removed SDK/NDK shortcut(shortcut not needed anymore)
-removed Gdebi
-removed Synaptic package manager
-Debian Squeeze for the base of distro
-added Xfce4 for the desktop
-added Xfce Theme Installer
-added Wbar dock for shortcuts
-added Midori as a lightweight browser
-added Squeeze as a lightweight archiver
-added Xfburn as a lightweight cd/dvd/iso/data burner
-added README guide to autostartup list
-added Linux Mint icons & Mint-x-Meatal-Dark theme
-added Pinta as lightweight graphical editing app
-added Leafpad as lightweight notepad
-added Bleachbit to clean junk files(be careful)
-added new GRP DevKit wallpaper
-added Gpicview as a lightweight image viewer
-added Remastersys installer shortcut on desktop
-changed Remastersys boot menu colors to better accommodate GRP theme.
-repositioned and sized Xfce-panel adding it to top left to make room for Wbar.
-added a script on desktop to manually run in terminal to install:
*SDK&NDK
*adb
*Eclipse
(versions 1.2-1.3 not listed)
(07-22-11 v1.1) :
~Added Chrome Browser
~Added plugin for Gtalk
~Shortcut for SDK/NDK in home folder
~Added shortcut for GRP forum
~Added different wallpaper([color=blue]thanks LivLogik[/color])
(6-?-11 v1) :
~Linux Mint 11(Katya) as Distro base [URL=http://www.linuxmint.com/]Linux Mint11[/URL]
~Remastersys(for building the distro [url]http://remastersys.sourceforge.net/[/url])
~Added GRP custom default wallpaper([color=blue]thanks LivLogik[/color])
~Added Android NDK
~Added Android SDK
~Added all required dependencies for compiling Android OS as follows:
git-core, gnupg, flex bison, gperf, libsdl1.2-dev, libesd0-dev, libwxgtk2.6-dev, squashfs-tools, build-essential zip curl, libncurses5-dev, zlib1g-dev,
sun-java6-jdk, pngcrush, schedtool, lib32z1-dev, lib32ncurses5-dev, lib32readline5-dev
~Added adb(thanks to Tahl:[URL=http://www.rootzwiki.com/showthread.php?589-Android-SDK-NDK-Eclipse-and-ADB-Auto-Installer-(Ubuntu-Linux-Mint)]Tahl's tread[/URL])
~Added Gimp
~Added ThemerStudio(thanks to CorCor67:[URL=http://corcor67.blogspot.com/p/themer-studio.html]CorCor's blog[/URL])
~Added Repo Init to home directory
Credits
I would like to take this time to thank the following
for either their contribution to this project or their
resources:
Treken(me)-Head developer of the GreenRom DevKit
~ metalcated(now the Co-Developer)-For creating a new sources.list and scripting that adds user to the sudoers list during installation of GRP DevKit and many other enhancements.
LivLogik-For his graphical wizardry
Stoute-For the GreenRomProject site
GreenRom Dev Team-For testing and suggestions
Debian-For the base of this distro
XFCE-For a slim and cool desktop
Google-For Android and development tools
Fragadelic-For the Remastersys tool
Tahl-For his adb installer (modified by ~ metalcated)
Shiki-Wise-Shiki-Wise Green Theme (compatibility)
Cliz-For Xfce Theme Installer
*Note: If I left anyone out, I appologize. Let me
know and I'll add you to the list.
Whoever else has tested or is running the Dev Kit let me know so I can include you in the testers credits. ;-)
Thank You xda for providing a site for those of us that need answers!!
Testers:
-metalcated
-treken
-Ask to be added
click on my sig :-/
Moved to Software Development
Thank you for moving my tread!
Pm sent
Sent from my SCH-I510 using Tapatalk
black02ss said:
Pm sent
Sent from my SCH-I510 using Tapatalk
Click to expand...
Click to collapse
I pmed you back.
Thanks for the quick response.
Sent from my SCH-I510 using Tapatalk
This looks great. Thanks for your work.
No prob !
Looks good, I'll definitely have to try this on VMware with my 300GB usb hdd
Sent from my Zio using xda premium
Going to try and get an update uploaded today or tomorrow. Metalcated is working on a script that will add the user to the sudoers list as part of the installation process so you can run sudo commands.
hmm, is this working on a VM?
Yes. Two people are running it on vm
Treken said:
Yes. Two people are running it on vm
Click to expand...
Click to collapse
No luck in Virtual Box here; Whether I push enter at the countdown, or wait, I can't get it to move on from there.
I just recently updated the tread with another distro with some fixes. Also, livlogik over at green rom project can give you sound advice on running in a virtual machine. I don't think he was able to get it going in virtual machine, but I think he got it working in parallel machine, and in virtual box. This is a 64 bit os. So maybe you need to set it up for that? I really don't have much experience with virtual machines. I always install locally
Treken said:
I just recently updated the tread with another distro with some fixes. Also, livlogik over at green rom project can give you sound advice on running in a virtual machine. I don't think he was able to get it going in virtual machine, but I think he got it working in parallel machine, and in virtual box. Thia is a 64 bit os. So maybe you need to set it up for that? I really don't have much experience with virtual machines. I always install locally
Click to expand...
Click to collapse
And there lies the problem, I'm running a 32 bit only processor in the laptop I attempted to run it on (core duo). Goes to show I didn't really read
I actually didn't specify 64 bit. Guess I dropped the ball on that one. I added that to the tread title. Thanks
You mentioned that it can installed to a usb stick, but how??
After you burn the iso to a disc, you plug in your usb stick and boot the cd. When you run the installer, select your usb stick to install to. You'll need to partition it as though it were a hdd.
Ok, Thanks
synergye said:
And there lies the problem, I'm running a 32 bit only processor in the laptop I attempted to run it on (core duo). Goes to show I didn't really read
Click to expand...
Click to collapse
Just found a work around. When you set up your vm in vbox, select gentoo[64bit] and you can run this from a 32 bit host.

Kernel Source (Jelly Bean 4.1–4.3.1) ...Send them a compliance Letter

I Just Sent Blu Products Service Center a request for kernel source code. Blu Products Sells Re-branded Gionee Cell Phones. They are exactly the same Hardware/OS Just a different name Here in America. My E-mail Looked just like this:
There is no provision in the GPL to withhold access to sources based on time or other conditions. I failure to comply will result in report to [email protected]
http://www.gnu.org/licenses/gpl-2.0.html#SEC3
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
one line to give the program's name and an idea of what it does.
Copyright (C) yyyy name of author
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'. This is free software, and you are welcome
to redistribute it under certain conditions; type `show c'
for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision'
(which makes passes at compilers) written
by James Hacker.
signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License.
Thank you Kindly for your complience.
okey i am send a email
hahaha lol please just ask them weather they will release it or not these letter won't do a thing.. search the forums these types of mail return -0% SUCESS lol yeah that is a -0 lol..

C++: open file for writing in the LocalStorage

Hi guys, could you tell me how to open file for writing in the phone app LocalStorage for the non-unlocked handset (regular app for store)?
Code below doesn't work
Code:
FILE *tmp;
auto tmpPath = Windows::Storage::ApplicationData::Current->LocalFolder->Path + "\\tmp.txt";
auto tmpErr = _wfopen_s(&tmp, tmpPath->Data(), L"w");
Any suggestions?
Try looking though msdn articles. I found it somewhere in there. But I have forgotten it now.
Sent from Board Express on my Nokia Lumia 1020. Best phone ever!!
Note to noobs: DON'T PM ME WITH QUESTIONS. POST IN THE FORUMS. THAT'S WHAT THEY ARE HERE FOR!
@wcomhelp, please keep your rtfm advices for yourself, OK? I'm not a noob and of course I've searched msdn, google, codeplex, github etc. and so on before posting here. If you don't know how, much better be silent (like others who read this post but have no idea what I'm talking about)
I've tried a few possible methods including ugly "MS-way" with task & lambda syntax (see below) but nothing worked as it should be (code below works if no file exist and fails if file already exist - CreationCollisionOption::ReplaceExisting options is not worked/not implemented/buggy/billgates_knows_only ).
Code:
auto folder = Windows::Storage::ApplicationData::Current->LocalFolder;
Concurrency::task<Windows::Storage::StorageFile^> createFileOp(
folder->CreateFileAsync(CONFIG_FILE_NAME, Windows::Storage::CreationCollisionOption::ReplaceExisting));
createFileOp.then([=](Windows::Storage::StorageFile^ file)
{
return file->OpenAsync(Windows::Storage::FileAccessMode::ReadWrite);
})
.then([=](Windows::Storage::Streams::IRandomAccessStream^ stream)
{
auto outputStream = stream->GetOutputStreamAt(0);
auto dataWriter = ref new Windows::Storage::Streams::DataWriter(outputStream);
// data save code skipped
return dataWriter->StoreAsync();
})
.wait();
BTW, I've used workaround, to save ported C++ app data to the LocalSettings instead of text file (as it was in original code).
"Doesn't work" doesn't give us a lot to go on, troubleshooting-wise. Can you tell us what error you get?
Only thing I see in the code that looks a little weird is that the
Code:
"\\tmp.txt"
part isn't explicitly a wide-character string, but I'd expect string concatenation to take care of that.
Also, out of curiosity, why libc functions instead of Win32? Obviously, the code you're writing here isn't intended for much portability...
@GoodDayToDie, there is no error code at all - standard POSIX functions returns NULL FILE, the ::GetLastError() also return 0.
I'm porting old C-style app to WinRT platform and don't care about portability (but the first post code - just a simplified example, nothing more).
POSIX (libc) functions works pretty well for reading only but not for writing - that's the problem...
As I said before, I resolved my issue by workaround but still curious why the POSIX calls fails for file writing in the app storage.
buuuuuuuuuuuuuuuuh
No need for lambdas
https://paoloseverini.wordpress.com/2014/04/22/async-await-in-c/
You may also want to rethink your strategy
You can't create files at arbitrary locations, so your method is kinda redundant. All the locations you are allowed to create and read files to/from are available through KnowFolders and ApplicationData classes. These return StorageFolders which in turn can create files with CreateFileAsync (used for both creating and opening existing files) and get files with GetFilesAsync ( I recommend against this one though) and similar methods.
@mcosmin222, could you please re-read my posts one more time? I'm not trying to create files at "arbitrary locations"; I wanna create/write simple text file at the app's local storage (which one should be available for reading/writing). And the problem not in the lambdas or task usage (yes, it looks ugly but it works as it supposed to be).
Could you provide a working example instead of words? And I'll be glad to say you "thanks a lot"; can't say now...
sensboston said:
@mcosmin222, could you please re-read my posts one more time? I'm not trying to create files at "arbitrary locations"; I wanna create/write simple text file at the app's local storage (which one should be available for reading/writing). And the main problem not in the task (async execution).
Could you provide a working example instead of words? And I'll be glad to say you "thanks a lot"; can't say now...
Click to expand...
Click to collapse
Sure, just gimmie a few hours till I can get near a compiler that is capable of doing that
Of course, no rush at all, take your time. It's not a showstopper for me now (actually, my workaround with AppSettings is more preferable way - at least for universal app and roaming settings) but the issue still has an "academic interest" and maybe will be useful in the next projects for porting old C/C++ code to WinRT.
sensboston said:
Of course, no rush at all, take your time. It's not a showstopper for me now (actually, my workaround with AppSettings is more preferable way - at least for universal app and roaming settings) but the issue still has an "academic interest" and maybe will be useful in the next projects for porting old C/C++ code to WinRT.
Click to expand...
Click to collapse
hi
in vs 2015
#include <pplawait.h>
Something of the like should work
Code:
WriteSomeFile() __resumable
{
auto local = ApplicationData::Current->LocalFolder;
auto file = __await local->CreateFileAsync("some file", CreationCollisionOption::eek:penIfExists);
__await FileIO::WriteTextAsync(file, "this is some text");
}
However, as of right now, in VS 2015 RC, you have a host of limitations when dealing with this, but I do not believe this will be of any issue to you.
Code:
Cannot use Windows Runtime (WinRT) types in the signature of resumable function and resumable function cannot be a member function in a WinRT class. (This is fixed, but didn't make it in time for RC release)
We may give a wrong diagnostic if return statement appears in resumable function prior to seeing an await expression or yield statement. (Workaround: restructure your code so that the first return happens after yield or await)
Compiling code with resumable functions may result in compilation errors or bad codegen if compiled with /ZI flag (Edit and Continue debugging)
Parameters of a resumable function may not be visible while debugging
Please see this link for additional details
http://blogs.msdn.com/b/vcblog/archive/2015/04/29/more-about-resumable-functions-in-c.aspx
you should also note that this works with native, standard C++ types.
@mcosmin222, looks like unbuffered writing works (i.e. without streams) fine but it still not an answer for my initial question
I'm curious why the standard POSIX libc writing operations are not working on the app's local storage (but reading from files works fine). Actually, it's all about porting old C/C++ code for WinRT; of course for the new app it's not a problem but re-writing old code to FileIO should be a huge pain in the ass. What I did: I've "mechanically" changed all libc formatted outputs from file to string, and use LocalSettings class (actually it's XML file) to store that string (I'm planning also change LocalSettings to RoamingSettings, to provide settings consistency between WP & desktop app).
P.S. <pplawait.h> is not available in my VS 2015 (release pro version) so I've tested by using lambda pattern.
OK, first things first, LIBC != POSIX! The POSIX way to do this would be to call the open() function and get back an int as an "fd" (file descriptor), which is of course not implemented on Windows Phone because Windows Phone is not a POSIX platform (you might find the Windows compatibility functions _open() and _wopen(), but I doubt it). You are attempting to use the standard C library functions, which are portable but implement kind of a lowest common denominator of functionality and are generally slightly slower than native APIs because they go through a portability wrapper.
Second, sorry to be all RTFM on you but you should really Read The Manual (or manpage, or, since this is Windows, the MSDN page)! Libc APIs set errno (include errno.h) and use different error values than Windows system error codes (or HRESULT codes, or NTSTATUS codes, or...). Error reporting in C is a mess. If you were calling CreateFile(), you would check GetLastError(), but since you're calling _wfopen(), you check errno (not a function).
@GoodDayToDie, _wfopen_s returns 0 (i.e. "no error") but tmp pointer receives also 0 (NULL) Could you explain why libc file functions are working for reading (at the app installation & local data folders of course) but not for writing? Any logical ("msdn based") explanation? Or you just... don't know, heh?
sensboston said:
@GoodDayToDie, _wfopen_s returns 0 (i.e. "no error") but tmp pointer receives also 0 (NULL) Could you explain why libc file functions are working for reading (at the app installation & local data folders of course) but not for writing? Any logical ("msdn based") explanation? Or you just... don't know, heh?
Click to expand...
Click to collapse
LIBC functions will most likely work just in debug mode. The moment you try to publish the app it will fail. You can do lots of crazy stuff on your developer device with basic C functions, but if you try publishing, it won't pass the marketplace verification.
Most C APIs are simply not supported, since they do not comply with the sandbox environment of the Windows Runtime.
The code I gave you is tested with VS 2015 RC. You should be able to include <pplawait.h> just fine, if you are targeting toolchains newer than November 2013.
mcosmin222 said:
The moment you try to publish the app it will fail. You can do lots of crazy stuff on your developer device with basic C functions, but if you try publishing, it won't pass the marketplace verification.
Click to expand...
Click to collapse
Hmm... Are you sure or it's just your assumption? My app is still under development but (just for test!) I've made store app package for WP and it passed local store verification I also uploaded package to the store (via browser) and it also passed. I don't have time to create all tiles and fill all fields to complete beta-submission (actually, I don't know how to mark app as beta in the new dashboard) but for me it looks like app don't have any problem and will pass store certification easily. And you may be sure - it uses A LOT of libc calls 'cause originally it was written for Linux (or kind of UX system)
sensboston said:
Hmm... Are you sure or it's just your assumption? My app is still under development but (just for test!) I've made store app package for WP and it passed local store verification I also uploaded package to the store (via browser) and it also passed. I don't have time to create all tiles and fill all fields to complete beta-submission (actually, I don't know how to mark app as beta in the new dashboard) but for me it looks like app don't have any problem and will pass store certification easily. And you may be sure - it uses A LOT of libc calls 'cause originally it was written for Linux (or kind of UX system)
Click to expand...
Click to collapse
Once usage reports get up to microsoft, you will be given a notice to fix the offending API (happened to be once). You are much better off using the platform specific tools: not only they are much faster, they are also much safer and you won't have problems later on.
You might get away with reading stuff (since reading is not that harmful), but you should be using the winRT APIs each time they are available.
Simply uploading your app to the marketplace just reruns the local tests in their cloud servers: once you submit the actual app (not beta, not tests) for consumers, it will be much more aggressively checked. This is because the store allows specific scenarios for distributing apps in close circles that may break the usual validation rules.
@mcosmin222, one more time: is it your assumptions or personal experience? I don't know how many apps you have in store (I do have a lot) but I never heard that you said. I've used C++ libraries with WP hacks in some of published apps but never had any problem with "aggressive checks". What I know: if you are using some "prohibited" calls, your app will not pass uploading to the store (uploading, not a certification).
P.S. I'll send you personally a link when I publish release Hope, you'll like it
sensboston said:
@mcosmin222, one more time: is it your assumptions or personal experience? I don't know how many apps you have in store (I do have a lot) but I never heard that you said. I've used C++ libraries with WP hacks in some of published apps but never had any problem with "aggressive checks". What I know: if you are using some "prohibited" calls, your app will not pass uploading to the store (uploading, not a certification).
P.S. I'll send you personally a link when I publish release Hope, you'll like it
Click to expand...
Click to collapse
By "hacking" you mean recompiling the code to fit the windows phone toolchain? if so, then you shouldn't have to worry about too many things.
but even so, calling stuff like fopen in locations other than local storage will get your app banned. Even if it makes past the first publication, you can get noticed weeks later or even months (yes, it did happen to me personally).
In most cases, calling C APIs that can potentially break the sandbox (like opening a file in doc library with fopen) will always fail the marketplace verification, eventually. If it hasn't happened to you yet, then you may have not been using such APIs.
No, my C++ code is not accessing other than approved locations but the app has a lot of libс (and of course other C/C++ libs) calls; I'm 99.9% sure it's legitimate and will be not a source of any problem. Otherwise what is the advantages of having C++ compiler?!
As far as I know, just some of API's are prohibited but you will notice it right after local store compatibility test run...
As for "hacks" I mean usage of undocumented ShellChromeAPI calls (including loading hack).
P.S. I've found why <pplawait.h> header is missing. Initially I've created solution with the 12.0 toolset but now I can't (or don't know how to) change it to 14. However creating the new empty universal solution in VS 2015 also gives me toolset 12 by default. What is the toolset 14 for? Windows 10?
sensboston said:
No, my C++ code is not accessing other than approved locations but the app has a lot of libс (and of course other C/C++ libs) calls; I'm 99.9% sure it's legitimate and will be not a source of any problem. Otherwise what is the advantages of having C++ compiler?!
As far as I know, just some of API's are prohibited but you will notice it right after local store compatibility test run...
As for "hacks" I mean usage of undocumented ShellChromeAPI calls (including loading hack).
P.S. I've found why <pplawait.h> header is missing. Initially I've created solution with the 12.0 toolset but now I can't (or don't know how to) change it to 14. However creating the new empty universal solution in VS 2015 also gives me toolset 12 by default. What is the toolset 14 for? Windows 10?
Click to expand...
Click to collapse
The advantage of C++ is the obvious versatility: the standard C++ APIs will work fine for you as long as you stay inside the sandbox (this means you can't access files even in locations that are outside of sandbox but you have permission to them, such as music library). You can use most classic C/C++ libraries without issues as long as you do the interface with the runtime broker yourself. That means using windows runtime APIs instead of classic C APIs when dealing with stuff such as file access, for example. This is a pretty extensive topic and It is rather difficult to explain it all with 100% accuracy, especially when there is lots of docs running around.
You also get deterministic memory management, which is huge in specific scenarios.
Long story short
You will be fine with standard C/C++ when using
any in-memory functions supported by the compiler (you can manipulate data types, string, mutex, etc).
File IO in isolated storage only (applicationData folder)
Threads (although you are better off using threadpool or the like, it is much easier and cleaner). You can also use futures, and std::this_thread.
You will have to use winRT replacement
File system access in any other location than application data (you must use the windows::storage APIs)
sockets, internet access and the like.
any hardware related thing: music&video playerback must be interfaced through winRT (although the underlying decoders can be classic C/C++), messing around with the device sensors.
Retrieving system properties (internet connection state etc)
cross process communications
communicating with other apps
There are also win32 equivalents
mutex, threading, fileIO (isolated storage only)
Media playback with custom rendering pipeline.
Basically, winRT functions as an abstraction layer between the hardware and your code. You can use classic C++ up to the point where you need to interact with the system in any way. At that point, system interaction must be done with winRT. This way, microsoft ensures a higher degree of stability and security for devices.
check this link out for more information on the toolchains. You should be able to use this in VS 2013 as well with windows 8 (this is a compiler feature, has nothing to do with supported platform)
https://paoloseverini.wordpress.com/2014/04/22/async-await-in-c/

Categories

Resources