Been looking around for a way to change the User Agent of an application.. ? can anyone point me in the right direction?
p.s: I am rooted, and i searched through the forums
You'd have to open up/decompile the .apk, find the file that it's stored in, edit it, recompile/repack and install.
thanks!
what file to edit in particular?
Not a clue, I suspect you'll have to look through the folders 'til you find it.
What are you trying to do?
Apps check with the build prop to see what your is/has and then shows it the appropriate info/features.
Yeah what apk are you trying to change the user agent? mms.apk? ect...
I am trying to "trick" a webserver to think that i am coming from a specific application.. this application has its own UA identifier..
If the server saw any other identifier, it won't display the results of a webquery.
The apk is an app i did in appinventor..
bump anyone?
Related
I'm trying to accomplish something in php format and I'm stuck.
I don't want to go into too much detail because I'm trying to surprise a friend on here so I will only go into specifics via pm but here's what I got so far:
I dl'd the eclipse PHP environment and the Zend debugger, got it all set up just fine (I think, lol)
I'm trying to edit an existing .php and with Treve's help was able to determine just exactly what I needed to edit. But I can't figure out how to "play" the code so I can see the changes, or even the original.
When I go to play the .php thru the web portal I only get code, it sees the file and displays it but doesn't convert it to the format I'm looking for, it just shows a large part of the page in plain text.
Any help would be greatly appreciated.
I will owe you one, or two maybe (and I'll actually pay up on it!!).
Please PM me if you need/want specifics. If there is something I am obviously missing then please help me out.
Thanks!
neb
wish i could help
regaw_leinad said:
wish i could help
Click to expand...
Click to collapse
Move along regaw, nothing to see here...
Anyone else? Anyone... anyone? Bueller?
i'm taking a php class and i know < ? p h p
i think thats right??? lol...
Not real proficient in it, but I figured if I can learn PHP in three weeks to allow me to build a web report group builder for the company I work for, I might be able to help.
First, which web server are you using? Apache, IIS or something else? The answer to that question depends on what happens next.
nebenezer said:
I'm trying to accomplish something in php format and I'm stuck.
I don't want to go into too much detail because I'm trying to surprise a friend on here so I will only go into specifics via pm but here's what I got so far:
I dl'd the eclipse PHP environment and the Zend debugger, got it all set up just fine (I think, lol)
I'm trying to edit an existing .php and with Treve's help was able to determine just exactly what I needed to edit. But I can't figure out how to "play" the code so I can see the changes, or even the original.
When I go to play the .php thru the web portal I only get code, it sees the file and displays it but doesn't convert it to the format I'm looking for, it just shows a large part of the page in plain text.
Any help would be greatly appreciated.
I will owe you one, or two maybe (and I'll actually pay up on it!!).
Please PM me if you need/want specifics. If there is something I am obviously missing then please help me out.
Thanks!
neb
Click to expand...
Click to collapse
tkirton said:
Not real proficient in it, but I figured if I can learn PHP in three weeks to allow me to build a web report group builder for the company I work for, I might be able to help.
First, which web server are you using? Apache, IIS or something else? The answer to that question depends on what happens next.
Click to expand...
Click to collapse
Apache2
And I just realized I apparently need GIFEncoder, reading up on it...
uhmm ill take a stab at it, i can probably guess what you're trying to set up by why you are needing but you want to be secretive. if you are using a decent webserver gifencoder should be installed. if you are running a script on a server you set up on your local pc then maybe you havent installed php correctly or it may not be running that why its coming up as txt in your browser.
edit: i see you installed zend, so youre running a server on your pc. im willing to bet you havent started the php service.
i have some webspace i havent used for years if you want some space let me know, u can run the script there
Bonified PHP Guru here... send me a PM and I will see what I can do to help.
I too am a php programer. Your issue is that to don't have the php integrated into your web server correctly best way to solve that would be to find some one that can host the app for you. I currently have my own servers at several co-location sites all running php and can let u use for a while
Download and install XAMPP web server, it's easy, free and works great. Then you can veiw your changes.
Yes install xampp and you will get a server running in no time ... just copy your php to inside the apache folder.
Thanks guys!
Only PHP thread on XDA??
I was searching to see if anyone has managed to compile PHP cli for rooted Android devices, and the only result I found is this thread ...
So I installed xampp, very neat program, but I can't figure out how to use it right.
I'm not sure what I'm doing wrong...
localhost takes me to the xampp screen and myadmin screen works but when I try opening the php in the browser I get "object not found", and the icon on the browser tab switches from the xampp icon to the Zend icon even though I've uninstalled Zend
xampp says Apache and MySQL are running.
Also I went with eclipse-php. I've set up a galileo w/ adt successfully but have not done something right in the php install, I can't create working php projects or files.
I edited and saved as php in notepad++, if anyone wants to check it out and try to get it to execute please let me know
Any help would be appreciated
Thanks
nebenezer said:
localhost takes me to the xampp screen and myadmin screen works but when I try opening the php in the browser I get "object not found", and the icon on the browser tab switches from the xampp icon to the Zend icon even though I've uninstalled Zend
Click to expand...
Click to collapse
It sounds like you need place the php file into the working root directory for XAMPP. You may even need to rename the php file as index.php and place that in the root.
I think you are just trying to open the php file from your file explorer. The php file needs to be in the web root directory and you access it like you would a webpage. ( http://127.0.0.1/YOURFILE.php ) <--- but like I said it needs to be in the webroot directory.
centran said:
It sounds like you need place the php file into the working root directory for XAMPP. You may even need to rename the php file as index.php and place that in the root.
I think you are just trying to open the php file from your file explorer. The php file needs to be in the web root directory and you access it like you would a webpage. ( http://127.0.0.1/YOURFILE.php ) <--- but like I said it needs to be in the webroot directory.
Click to expand...
Click to collapse
Thank you,
I tried your suggestions to no avail. I put the file in (separately, not multiple copies) c:\, c:\xampp and c:\xampp\php and always get the error.
I tried renaming the file index.php, same error
I need to put this on the shelf for a bit and do something productive...
Thanks for your help guys!
nebenezer said:
Thank you,
I tried your suggestions to no avail. I put the file in (separately, not multiple copies) c:\, c:\xampp and c:\xampp\php and always get the error.
I tried renaming the file index.php, same error
I need to put this on the shelf for a bit and do something productive...
Thanks for your help guys!
Click to expand...
Click to collapse
The correct directory for xampp is in htdocs.
damageless said:
The correct directory for xampp is in htdocs.
Click to expand...
Click to collapse
Tried that one also.. BUT I didn't try it after renaming to index.php
One more shot!
*edit, still just getting raw code, which I suppose is better than an error code
thanks damage
pm me your php script. probably best to just pastebin.ca it. If it is showing you the code after putting it in the htdocs directory that means you found the right directory. Usually when php is not configured correctly on your web server it doesn't just show you the code, the mime type is not recognized and offers it as a download. So your browser would try to download "index.php" or whatever instead of just showing you raw php.
hahhaah.. I know what you're up to....
Here's how I did it before your modifications you're working on: http://i0v.net/matrix/
Hi!
I've been trying to upload an .apk to my webhost (through ftp) and when I try to download it through the given url, the file doesn't download. Instead I only get text, just as if my host don't understand the file.
Any idea how I can fix this? Is it though .htaccess or what? /:
(I've tried to search this but with no luck)
First off I don't know too much about ftp but from what I do know I would imagine what you want to do would involve the .htaccess file in the apk's directory
My guess would be in the .htaccess file you'd have to edit/add the FilesMatch line
(if that doesn't work it may me just "Files" instead of "FilesMatch" - not sure)
Code:
<FilesMatch "\.(apk)$">
ForceType application/octet-stream
Header set Content-Disposition attachment
</FilesMatch>
Other alternatives I can think of are either:
Change the link from [B]ftp[/B]://your.ftp.org/blah/android.apk to [B]http[/B]://your.ftp.org/blah/android.apk when you give it out - but I realize this kinda defeats the purpose of using a FTP in the first place
Upload the .apk into a zip. That should force the 'save as' dialog
Hopefully this does the trick for you
**I hope this post looks correct - adding the html myself I may have messed up somewhere along the line, if it you see /LIST] or anything like that I'll fix it when I have access to a computer **
Sent from my Android using Tapatalk
kyouko said:
First off I don't know too much about ftp but from what I do know I would imagine what you want to do would involve the .htaccess file in the apk's directory
My guess would be in the .htaccess file you'd have to edit/add the FilesMatch line
(if that doesn't work it may me just "Files" instead of "FilesMatch" - not sure)
Code:
<FilesMatch "\.(apk)$">
ForceType application/octet-stream
Header set Content-Disposition attachment
</FilesMatch>
Other alternatives I can think of are either:
Change the link from [B]ftp[/B]://your.ftp.org/blah/android.apk to [B]http[/B]://your.ftp.org/blah/android.apk when you give it out - but I realize this kinda defeats the purpose of using a FTP in the first place
Upload the .apk into a zip. That should force the 'save as' dialog
Hopefully this does the trick for you
**I hope this post looks correct - adding the html myself I may have messed up somewhere along the line, if it you see /LIST] or anything like that I'll fix it when I have access to a computer **
Sent from my Android using Tapatalk
Click to expand...
Click to collapse
Geniuous! Worked like clockwork!
(I used the http://-link from the start, that's where it failed.. but the .htaccess content did it's job!)
1+Thanks! ^^
I don't know how it happened, but it appears that I have somehow changed the path that contains the ringtones. I was looking for them out of curiosity. Now, whenever I try to bring up ringtones, I get a directory listing of /storage/emulated/0. I can probably reset it properly, but I don't know they actually reside. I don't have root access, and I'm afraid that may be a problem in resetting the path. I'm thinking that's why a search with ES File Explorer can't find them, (or maybe I'm not searching for the correct extension). Can anyone offer any guidance?
I would be grateful for any suggestions.
Regards,
pb
Can't help you without root access. The correct path is:
/system/media/audio/ringtones
Edit* In doing some looking. Were you trying to add more ringtones? The folder you gave seems to be the downloads folder. Ringtones you add maybe be in another folder. For example it could be ...../emulated/ringtones
Another example would be any folder in your usable internal storage will come after the emulated/
Sent from my awesome AT&T SAMSUNG GALAXY S4 SGH-I337 using xda developers app.
Hello fellows XDA, after updating my G928T to marshmallow, I can't seem to find setting.db under sqlite or even searching the file doesn't come up in /data/data/com.android.providers.setting/databases. Does anyone know where I could find this file or what may happen to it? Thanks all!
Sent from my SM-G928T using XDA-Developers mobile app
I found some details here: http://stackoverflow.com/questions/...e-settings-how-to-toggle-ringtone-vibration-i
from that page:
"move system settings from db to xml
/data/data/com.android.providers.settings/../settings.db --> /data/system/users/userid/settings_[system|global|secure].xml"
For me it was "/data/system/users/0/settings_system.xml" and I was able to use Root Browser to find and edit it. The file is very long and hard to navigate (i was just using root browsers editor which has no search function) but I was able to add hotspot toggle on my S5 by editing it, just like I used to with the old settings.db
fredknex said:
I found some details here: http://stackoverflow.com/questions/...e-settings-how-to-toggle-ringtone-vibration-i
from that page:
"move system settings from db to xml
/data/data/com.android.providers.settings/../settings.db --> /data/system/users/userid/settings_[system|global|secure].xml"
For me it was "/data/system/users/0/settings_system.xml" and I was able to use Root Browser to find and edit it. The file is very long and hard to navigate (i was just using root browsers editor which has no search function) but I was able to add hotspot toggle on my S5 by editing it, just like I used to with the old settings.db
Click to expand...
Click to collapse
I was able to find it, but after editing and given the right permission also restarted, the setting reset to default and the new changes didn't stick in the new file.
fredknex said:
I found some details here: http://stackoverflow.com/questions/...e-settings-how-to-toggle-ringtone-vibration-i
from that page:
"move system settings from db to xml
/data/data/com.android.providers.settings/../settings.db --> /data/system/users/userid/settings_[system|global|secure].xml"
For me it was "/data/system/users/0/settings_system.xml" and I was able to use Root Browser to find and edit it. The file is very long and hard to navigate (i was just using root browsers editor which has no search function) but I was able to add hotspot toggle on my S5 by editing it, just like I used to with the old settings.db
Click to expand...
Click to collapse
I dont get this, what do you mean with move setting from db to xml do you mean rename or what could you be more detalied ? Thnx
Sry for asking
astrit1 said:
I dont get this, what do you mean with move setting from db to xml do you mean rename or what could you be more detalied ? Thnx
Sry for asking
Click to expand...
Click to collapse
I mean the setting used to be stored in a .db file, but (because samsung changed it i guess) it is now stored in a .xml file. no need to rename anything, just edit the xml.
I was able to find it, but after editing and given the right permission also restarted, the setting reset to default and the new changes didn't stick in the new file.
Click to expand...
Click to collapse
If i recall correctly there are 2 entries pertaining to the toggles and one seems to overwrite the other on boot. Make sure to change both if anyone is still trying to do this. If that doesn't work then I don't know what I did to make it stick.
If i recall correctly there are 2 entries pertaining to the toggles and one seems to overwrite the other on boot. Make sure to change both if anyone is still trying to do this. If that doesn't work then I don't know what I did to make it stick.
Click to expand...
Click to collapse
if he uses only the xxx_reset one they are going to be overwritten by the normal one when he reboots ,it did this to me
fredknex said:
I found some details here: http://stackoverflow.com/questions/...e-settings-how-to-toggle-ringtone-vibration-i
from that page:
"move system settings from db to xml
/data/data/com.android.providers.settings/../settings.db --> /data/system/users/userid/settings_[system|global|secure].xml"
For me it was "/data/system/users/0/settings_system.xml" and I was able to use Root Browser to find and edit it. The file is very long and hard to navigate (i was just using root browsers editor which has no search function) but I was able to add hotspot toggle on my S5 by editing it, just like I used to with the old settings.db
Click to expand...
Click to collapse
I found that xml, I copied it on my pc, opened in browser but in that xml I couldn't find anything related to mobile data toggling, or notification toggling like this: notification_panel_default_active_app_list. Could you pls tell me how did you manage to add mobbile data toggle using this method? I'm on Sprint N920P. Thanks in advance
Hello I created custom header image to use with omnistyle. But I realised I need a full apk to get it work. There is no option in pure nexus ROM to use custom header image (my own image). So how do I create an app (like this https://play.google.com/store/apps/details?id=com.dirtyunicorns.headers&hl=en )for omnistyle? I tried googling but could not find an answer. I am not a developer but some guidance or template would help.
Hello, i don't know if you still need this? I can make a template for Android Studio with a little guide if this is still relevant.
PONYMODZ said:
Hello, i don't know if you still need this? I can make a template for Android Studio with a little guide if this is still relevant.
Click to expand...
Click to collapse
Do you happen to know where to go to change the OmniStyle QS image collection names? For example, I've replace all of the "Nature" images with pictures of sharks. That was easy enough and the new images show up and work, but the image collection in the list still says "Nature." I would like to change it to say "Sharks." I've dug through the OminStyle.apk up and down, but I can't find where those names are set. I see them in the AndroidManifest.xml, but changing the android:label in the androidmanifest.xml has no effect.
sharkie405 said:
Do you happen to know where to go to change the OmniStyle QS image collection names? For example, I've replace all of the "Nature" images with pictures of sharks. That was easy enough and the new images show up and work, but the image collection in the list still says "Nature." I would like to change it to say "Sharks." I've dug through the OminStyle.apk up and down, but I can't find where those names are set. I see them in the AndroidManifest.xml, but changing the android:label in the androidmanifest.xml has no effect.
Click to expand...
Click to collapse
The names are set in the androidmanifest.xml i have no clue why it does not work for you. But it would be easier if you just add your images with an apk or add them directly to the Omnistyle.apk if you need help with that just contact me.
PONYMODZ said:
The names are set in the androidmanifest.xml i have no clue why it does not work for you. But it would be easier if you just add your images with an apk or add them directly to the Omnistyle.apk if you need help with that just contact me.
Click to expand...
Click to collapse
I've already added my images to the OmniStyle.apk, and that works. I just want the image group text to say what the actual images are rather than whatever the text is by default.
I'd rather work it out in the thread, if that's alright. This way others can find it should they need it.
I'm about to go to bed now, but tomorrow I can upload the AndroidManifest.xml, or the APK I'm working with, if you want to have a look. Let me know how to proceed.
Thank you so much for being willing to help me out with this!
Sent from my moto g(6) using XDA Labs
So here's what I have so far:
- You can see in the attached screenshot (AndroidManifext-xml_Changes.png) that I've changed the text in the "android:lable" section of each activity.
- You can see in the attached screenshot (Screenshot_MiXplorer_20190612-122940.png) taken from the OmniStyle.apk on my phone that the AndroidManifest.xml is there on my phone with my new text changes.
- However, you can see in the attached screenshot (HeaderImageCollectionTitle-NoChange.png) that the changed labels did not actually change anything.
More Information:
- This is the OmniStyle.apk from the 6-4-19 release of the Havoc ROM for the Pixel 2 XL. I've also check this ROM's Setting.apk and SystemUI.apk in case the text was set there, but I don't see any reference to those words anywhere in Settings or SystemUI. The link to that ROM is: https://forum.xda-developers.com/pixel-2-xl/development/pie-havoc-os-t3851780
- Here's a link where you can download my already modded apk as well in case you wanted to have a look at it (It's too big to upload directly): https://drive.google.com/open?id=1N-ivQSa3In1LbD8LZ4QrVrzo1HAB0giT
Let me know what else you need, if anything.
@sharkie405
So i have checked the apk and the Androidmanifest.xml is correct but when i tested the apk, for me it wasn't working at all. I use the same ROM as you on my S7(herolte) and when i replace my apk with yours there it cant be loaded at all i just see my custom Headers, maybe it's an issue with your ROM or the apk itself. Try to update your ROM and edit the new apk again, but best would be to restore your Omnistyle.apk and make custom headers with the Android Studio Template from me, if you need help with it just ask