Hi,
Does anyone know how to edit registry entries from within KovskyKitchen or any other kitchen? I mean before the ROM is flashed is it possible to tweak the registry?
Thanks,
Phil Rich
Sorry but, bump.
http://www.google.com/cse?cx=000825...tries&sa=Search&cof=FORID:0&ie=utf-8&oe=utf-8
or from Helmi
How-To build your own OEM Package:
An OEM Package is just a simple folder containing files and registry settings for the ROM
First of all you'll need a GUID number for your Package. Go to http://www.famkruithof.net/uuid/uuidgen to get one. For example: 283b9db7-cb03-4c1b-820e-ca49b2c3b5db
Necessary steps:
1. Create a new folder: Dev/Helmi_UNI_WM6_Kitchen_R0/OEM/Your package name/
2. Create a empty text file: Dev/Helmi_UNI_WM6_Kitchen_R0/OEM/Your package name/283b9db7-cb03-4c1b-820e-ca49b2c3b5db.dsm (?CreateOS.exe will finish this file for you)
3.
(Optional) Create an UNICODE text file: Dev/Helmi_UNI_WM6_Kitchen_R0/OEM/Your package name/283b9db7-cb03-4c1b-820e-ca49b2c3b5db.rgu
This file could be used to add registry entries to the ROM First line is: REGEDIT4 ... and there MUST be a empty line at the end!!
4.
Create an UNICODE text file: Dev/Helmi_UNI_WM6_Kitchen_R0/OEM/Your package name/initflashfiles.txt
This file could be used to create folders or copy files, shortcut on the ROM. For Example/Ilustration: Open or read Dev/Helmi_UNI_WM6_Kitchen_R0/LOC/initflashfiles.dat using a text editor or any premake initflashfiles.txt at one of the OEM folder.
and there MUST be a empty line at the end of iniflashfiles.txt also!!
Copy all files you need to Dev/Helmi_UNI_WM6_Kitchen_R0/OEM/Your package name/
The next time you build your ROM (as described above), the OEM package will be included in the ROM.
Click to expand...
Click to collapse
Hi,
I want to use sqlite in my xposed module but i don't have any activity or context to send the database constructor.
Is it possible to overcome this?
I tried to send null as a context, but i'm getting nullPointerException when i try to open the database.
Thanks,
Gidi
If you can't get a context from the method you're hooking, you could try the AndroidAppHelper.currentApplication method.
Code:
Context ctx = AndroidAppHelper.currentApplication();
Context myCtx = ctx.createPackageContext("com.developer.app");
pyler said:
Code:
Context ctx = AndroidAppHelper.currentApplication();
Context myCtx = ctx.createPackageContext("com.developer.app");
Click to expand...
Click to collapse
HI Guys,
I tried the AndroidAppHelper.currentApplication() option, but it returns NULL in my case...
shnapsi said:
HI Guys,
I tried the AndroidAppHelper.currentApplication() option, but it returns NULL in my case...
Click to expand...
Click to collapse
If you are editing a database using sqlite and the current process you are hooking as no context reference, you can use root to set the database file to readable, then have your own service running in the background with a file observer tracking changes to a file on the device. Inside xposed module you will write to the file with a command instructing the file observer what to do. Then your service will "hear" the command and execute the changes needed.
I plan on writing up a guide for this. Tomorrow
elesbb said:
If you are editing a database using sqlite and the current process you are hooking as no context reference, you can use root to set the database file to readable, then have your own service running in the background with a file observer tracking changes to a file on the device. Inside xposed module you will write to the file with a command instructing the file observer what to do. Then your service will "hear" the command and execute the changes needed.
I plan on writing up a guide for this. Tomorrow
Click to expand...
Click to collapse
Thanks, I'll be happy to read your guide and learn new stuff
Anyway, I read that it's possible to use Sqlite DB without using SQLiteOpenHelper, this way, i don't need context.
the problem is that when i do it i get exception:
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database
this is my code:
database = SQLiteDatabase.openOrCreateDatabase(DB_NAME,null);
database.execSQL(CREATE_TABLE);
Thanks.
shnapsi said:
Thanks, I'll be happy to read your guide and learn new stuff
Anyway, I read that it's possible to use Sqlite DB without using SQLiteOpenHelper, this way, i don't need context.
the problem is that when i do it i get exception:
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database
this is my code:
database = SQLiteDatabase.openOrCreateDatabase(DB_NAME,null);
database.execSQL(CREATE_TABLE);
Thanks.
Click to expand...
Click to collapse
You probably don't have the required permissions to read/write to that location.
GermainZ said:
You probably don't have the required permissions to read/write to that location.
Click to expand...
Click to collapse
Thanks GermainZ,
which permissions do i need?
I tried to do it this way too:
Code:
File db = new File("/data/data/com.example.mytest/databases/" + DB_NAME);
db.setReadable(true);
db.setWritable(true);
File path = new File("/data/data/com.example.mytest/databases/");
path.setReadable(true);
path.setWritable(true);
path.mkdirs();
database = SQLiteDatabase.openOrCreateDatabase(db,null);
Still same result...
Thanks!
shnapsi said:
Thanks GermainZ,
which permissions do i need?
I tried to do it this way too:
Code:
File db = new File("/data/data/com.example.mytest/databases/" + DB_NAME);
db.setReadable(true);
db.setWritable(true);
File path = new File("/data/data/com.example.mytest/databases/");
path.setReadable(true);
path.setWritable(true);
path.mkdirs();
database = SQLiteDatabase.openOrCreateDatabase(db,null);
Still same result...
Thanks!
Click to expand...
Click to collapse
Let's differentiate between two things: your module (normal code) and the hooked process (the Xposed code).
Remember that hooked code runs as the hooked process (that is, the app you're hooking — *not* your module), so you won't be able to write to your module's data directory.
I don't know if you can change that. Maybe you could create the database and use Context.MODE_WORLD_WRITABLE (from your module, when it firsts open), but I don't think you'll have any luck creating it from the hooked process directly.
GermainZ said:
Let's differentiate between two things: your module (normal code) and the hooked process (the Xposed code).
Remember that hooked code runs as the hooked process (that is, the app you're hooking — *not* your module), so you won't be able to write to your module's data directory.
I don't know if you can change that. Maybe you could create the database and use Context.MODE_WORLD_WRITABLE (from your module, when it firsts open), but I don't think you'll have any luck creating it from the hooked process directly.
Click to expand...
Click to collapse
So where is the best place to use AndroidAppHelper.currentApplication(); so it won't return null and i will be able to use it in my hooked method?
Hello gays, i read all post's . I've the same problem. I start develop a module for xposed for my thesis the goal of application is return fake data when some aplications want access features that they don't need. I all ready can save in sqlite database the restrictions that the user want to restrict, the package name of application and uid. Now i want to access to the database methods by the main class (with implements IXposedHookLoadPackage) and i allways getting nullPointerException when i try connect to database. Anyone can solve this problem?? I will attach my main class IdentitySpoofing and my DatabaseHelper Best Regards Joao Marques
I questions are :
1.
Is it possible to add Service into an app's AndroidManifest.xml ?
For example , I write a Service and I need an app start that service as local service.
( I need to use IBinder to interact with this service. )
2.
Is it possible to add permissions into an app's AndroidManifest.xml ?
For exmaple, I'd like to create a floating window when some method is called.
But the app do not have "android.permission.SYSTEM_ALERT_WINDOW".
So it will throw a permission deny error.
Is it possible to add that permission into the target app ?
Thanks!
darkk6 said:
I questions are :
1.
Is it possible to add Service into an app's AndroidManifest.xml ?
For example , I write a Service and I need an app start that service as local service.
( I need to use IBinder to interact with this service. )
2.
Is it possible to add permissions into an app's AndroidManifest.xml ?
For exmaple, I'd like to create a floating window when some method is called.
But the app do not have "android.permission.SYSTEM_ALERT_WINDOW".
So it will throw a permission deny error.
Is it possible to add that permission into the target app ?
Thanks!
Click to expand...
Click to collapse
you can hook package installer and do the modifications there before it passes to the native binaries the contents of AndroidManifest.xml (Similar to what XInstaller module does)
I am modifing the code created by another guy. For example, when I see:
Code:
myButton = (Button)findViewById(android.R.id.button);
How can I locate the real button location in the layout, without checking the id of each item in all layouts manually? It is because the app that I am modifying has many layouts file and View.
Thank you.
Try doing this, click and highlight the id, myButton = (Button)findViewById(android.R.id.button); and then right click, scroll to "go to" and then declaration, that should take you to the id in layout in xml file.
You can look for the ”Inflate”, it will tell you which layout were used.
in the xml file try to locate the button that you want to change the id
android:id="buttonid"
Hello. I'm new to the forum and to programming aswell. I'm trying to learn how to make an app so I started with a tutorial online, but I'm having a problem. I can't post a link but the tutorial is called "Make Your First Android App: Part 2/3 - Ray Wenderlich". On the section "Accessing Views From Within Java" when I add "android:text= @string/hello_world"" I get an error. On the bottom it says I should be using a @string but when I do the preview window displays the @string/" aswell. What's that about?
Second, I can't rename the string after changing hello_world to something else. Why is the tutorial even saying I should rename it? What will that do?
Lastly, in MainActivity.java above onCreate I have to insert a line of code. The tutorial doesn't explain why I need to do that. Where should the line go, the code is
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
wherever I insert the code and press Alt+Enter I mess up the whole thing...
Sorry that these questions are annoying and basic, I just really want to learn to make apps and I'm trying to figure things out alone.
Thanks.
P.S. one more thing, in "Buttons and Listeners" there is a part saying:
"Then there’s text, for which you need to add a line in strings.xml such as the following:
<string name="button">Update The TextView</string>"
when I do that I get an error in strings.xml
If you are having problems related to Java, the following tips should help you getting things working -
» Download and Install Java
» Use Java
» Test Java
» Remove Old Versions of Java
» Find Java.
basic issues
1) all strings you use needs to be defined in string.xml file, by doing so, you separate messages and names from code and it can be re used in your app from single source, easy to maintain.
2)ALT + ENTER is used to resolve import, when you add code and introduce new class, you need to import it.
3)Oncreate method in activity is used to setup layout for activity and provide content to be displayed on screen for the activity