Question to ROM devs - file type sharing restriction - Nexus 4 Q&A, Help & Troubleshooting

Hello, I'm currently running a stock 4.4.4 with some smali mods. I recently noticed that file types you can receive via Bluetooth are limited (and some googling revealed it's a whitelist in Bluetooth.apk). However, there's also some kind of restriction in sending, which (as I can understand) only makes a couple apps show up in the Send/Share intent window (I saw apks, isos, debs are some of the restricted files). I couldn't locate this black list though. Any hint as to where it is (even in the android source)?

I have never had any problem sending or receiving an apk file.

Gallardo994 said:
I have never had any problem sending or receiving an apk file.
Click to expand...
Click to collapse
Yeah, I think most custom ROMs remove these limits. Also, some file managers like ES work around the sending blacklist somehow. Root explorer doesn't sadly

So i solved this... Basically each app can accept some kinds of files via sharing, and Bluetooth.apk is no exception, you can find the white list in its manifest. Too bad that to edit it, you also need to disable the signature checking with tools like lucky patcher, or resign all system apps and framework-res...

Once i experienced the same problem..
all i did was using ES file manager..
compress the file in zip and send via Bluetooth
i recommend u to try it... it worked for me all the time..(even .apk files)

Sidnexus4 said:
Once i experienced the same problem..
all i did was using ES file manager..
compress the file in zip and send via Bluetooth
i recommend u to try it... it worked for me all the time..(even .apk files)
Click to expand...
Click to collapse
Yeah, the problem is it whitelists (only allows) specific file types (zips, pdfs, office documents, audio, video, image files, html, txt, maybe I forgot some others). But it was a chance to learn something about the OS.:laugh:
If anyone is interested, I unlocked all file types both in sending and receiving in Bluetooth.apk and kept Google's signature (so you need to disable the signature verification in core.jar with Lucky Patcher, it's the first patch of the three and then you can uninstall it). Otherwise the apk will just not load. Only for stock 4.4.4 for Nexus 4!

Related

[Q] htc_cime for legend with froyo 2.2

Hi,
I live in China and got an already rooted legend from a super friendly little shop in the neighbourhood here, but it came with a horrendous goapk.com rom which severely locked down my ability to install anything from the market - instead, it tried to force me into this relatively useless Chinese goMarket thing. So, waiting patiently, I finally installed the MoDaCo custom ROM last week and everything is running sweetly.
Only now I find I actually miss a couple of the customisations the Chinese ROM had on it. In particular, the htc_cime was very useful to me because it supported handwriting input - the Google Pinyin IME is less useful to Chinese noobs like me who can't read the sound of the characters and need to input the handwriting.
I have had a http://forum.xda-developers.com/showthread.php?p=7276627 rummage around these threads and found lots of htc_cime packages, none of which work on Legend under Froyo. Does anybody have a solution? The apk's that do install die immediately when I try to input text, and I don't know what to do with the zip files available on that site - I can extract them, but then it says "Application not installed" without any further help.
Cheers and thanks! Maybe the IME will turn up when 2.2 finally comes out for stock Legends, which will surely happen any minute now
So, a few hundred reads and no replies. Seems like a difficult issue, and obviously not many people are interested in using Chinese handwriting. Should I post this on the development thread? Can anyone at least give some advice on how to install these .zip distribution packages? I know how to install a .apk using the file manager, is some other app necessary to install the .zips?
strophy said:
So, a few hundred reads and no replies. Seems like a difficult issue, and obviously not many people are interested in using Chinese handwriting. Should I post this on the development thread? Can anyone at least give some advice on how to install these .zip distribution packages? I know how to install a .apk using the file manager, is some other app necessary to install the .zips?
Click to expand...
Click to collapse
I just downloaded the .zip file from your link and it had the .apk file inside it and another zip (?).
A zip file is a zip file, they are not android specific, have been around at least 20 years now, it is a compressed file, windows or whatever os you use should be able to open it no problems and then just extract/copy the apk inside to your phones sd card and install it, you also need to open the other zip file INSIDE the zip file (yay recursion) and extract/copy the folder to your sd card as well.
I didn't install it myself as I am still on éclair.
It may be that ZIP files are not Android specific, but to install one you should flash it with ROM Manager or from Clockworkmod Recovery. I don't know if extracting the zip and installing the .apk is working like that. The reason for doing this is mainly because some files cannot be written or replaced when phone is in normal use. From that link I saw it is a signed package (by the name) and it should be installed via ROM Manager or recovery
Hi again,
I tried unzipping the .apk file and installing it, but also no luck. I am fairly sure the .apk installer references the "zi" folder ("zi" means character in Chinese), as that folder seems to contain a lot of files describing the metrics and probably recognition of each character as you write it. Still no luck though.
Using the ROM manager to install packages seems a bit like overkill though - if the Google IME can be installed as an apk without rebooting, surely any IME can be installed like that?
I might ask htc about this when the official 2.2 FOTA comes out, if I claim I had it before and it wasn't in the update they might just send me an .apk that will sort this out once and for all. No big hopes on that one though.
Cheers,
Leon

[HOW-TO] [Flash] [HULU] How to make Hulu (and others) work on the Samsung Galaxy Tab

The Galaxy Tab uses a custom build of Flash. If you try to install one of the hacked Nexus One Flash apks that are floating around, it won't work. Not only will you not be able to access Hulu, but Flash won't work at all. You also can't use the Android Market version.
Here's how to hack the Galaxy Tab to make Flash work with Hulu and other sites that block Android. These instructions are intended for more advanced users. Maybe someone nice will come along and post a pre-hacked apk, but I'm not going to post one myself. Sorry
1. Make sure your Galaxy Tab is rooted. If it isn't, you can easily root it by downloading z4root from the Android Market and running it.
2. Make sure you have Root Explorer installed. You can buy it for a few bucks in the Market if you don't already have it. It's a great program and worth the few dollars.
3. First, you need to get rid of the pre-installed version of Flash that comes with the Tab. Using Root Explorer, move install_adobe_flash.apk from /system/app/ to /sdcard/. You want to make sure it no longer exists in /system/app/ but that you have a backup copy in /sdcard/.
If you are like me and already deleted the original install_adobe_flash.apk from the Tab without backing it up, you will have to grab a new copy from a Galaxy Tab ROM. Find a Galaxy Tab ROM online (P1000XXJK5 works), uncompress it, mount factoryfs.rfs as an ISO, and get a new copy of the apk file out of it.
4. Next, you need to hex edit this version of Flash to make it appear as though it was Flash for Windows.
Now that you have install_adobe_flash.apk in the /sdcard folder, plug in the tab and enable USB file sharing.
Copy the apk file to your computer and unzip it. Inside, you will find /lib/armeabi-v7a/libflashplayer.so.
Open libflashplayer.so file in your favorite hex editor (Hex Fiend is good on OSX). Search for the ascii string "AND 10,1,92,8" (the numbers might be slightly different depending on your Tab's ROM). Replace that string with "WIN 10,1,102,64". Make sure the hex editor is in overwrite mode when you do this. The new string is longer than the old string, but you don't want to change the file size. Save the file.
5. Now you need to get your hacked version of Flash back onto the Tab.
You have a few options. You could install the flash apk using "adb install install_adobe_flash.apk". That would get you flash back. Then you could copy your hex edited libflashplayer.so to the /sdcard folder and then use Root Explorer to replace /data/data/com.adobe.flashplayer/lib/libflashplayer.so with your version. That will work fine, but you will have to recopy your modified libflashplayer.so over the original one every time you reboot.
The better option would be to rebuild install_adobe_flash.apk with your hacked library included. Then you can install your modified flash apk.
6. Browser Settings
Dolphin HD is the best choice. You need to make sure the user agent is set to "Desktop". It seems like you also need Flash set to "Always On", not "On Demand". It seems to act flakey with On Demand but your experience might vary.
You can alternatively use the Hulu Bookmark app in the app store instead of Dolphin HD.
Playback can be a bit choppy on Hulu in full resolution. Play around with other sites besides Hulu too. Other sites like cbs.com and adultswim.com worked for me.
Have fun!
Thx great work, any instructions on how to rebuild the apk ?
Sent from my GT-P1000 using XDA App
Nice, thanks for the writeup. Flash is still far too flaky on mobile for my taste though. Its a complete mess IMO.
Would you be able to post the apk you used? I would gladly host it.
Rebuilt .APK is not installing
Followed the directions but I am not sure if I rebuilt the .apk properly as my modified Flash Player package fails to install. Can someone please post a working modified .apk?
I was following great until
... rebuild install_adobe_flash.apk with your hacked library included ...
How is that done?
Sign APKs
here is a tutorial on creating a key and how to sign an apk. hope this helps.
http://www.androiddevelopment.org/tag/apk/
I tired following your instructions to the letter then returning the edited hex file into the apk replacing the existing one, but no go. Is there a particular way it needs to be recompiled? If anyone knows how and can provide the edited apk for an ATT galaxy tab I would happily donate and I'm sure I'm not alone.
no dice
hulu and other sites gives me an error "requires flash player 10.0.32 or higher..."
as far as hexing, signing, and installing everything works a charm.
http://www.pixeldesire.com/box/install_flash_player.apk-signed
Wondering if you could use the Flash apk from the files for the Epic: http://forum.xda-developers.com/showthread.php?t=841472
Does anyone know about that apk?
Which apk?
Sent from my SGH-T849 using XDA App
hulu and other streamers
okay so a whole peck of websites are rolling out xda's howto for the hulu hack, but any comment says it no workee. anybody that can confirm or deny? also, anybody got a line on netflix for the Galaxy Tab?
crazyhack said:
okay so a whole peck of websites are rolling out xda's howto for the hulu hack, but any comment says it no workee. anybody that can confirm or deny? also, anybody got a line on netflix for the Galaxy Tab?
Click to expand...
Click to collapse
im on sprint tab and it def dont work. spent a few hours with it one day...maybe intended for an older flash like the firmware op suggests...just amazed how many stupid blogging sites repost info w/o testing...way to spread the ignorance...i have another idea on how to make it work using what i know about my evo. this MAY work. if it does i will post the apk...
it would be cool if we can get something working.
Success! Thanks to the OP for the write-up. I took the stock AT&T flash player apk, hex edited the version in libflashplayer.so and replaced it on the phone. It works fine in Dolphin HD (plugins set to Always; haven't tried On-demand) for Hulu.
I tried my hand at repacking the apk and signing it, but it doesn't seem to register the plugin using my apk, even though it's properly signed. So for now, the only approach that seems reliable is to install the stock apk and once installed, copy the modified libflashplayer.so over to /data/data/com.adobe.flashplayer/lib.
See attached. I provide no guaranties, so YMMV. Unzip libflashplayer.so.zip prior to copying.
EDIT: Works great on southparkstudios.com too!
Would this work with the netflix web site?
Thanks for your efforts.
agentdr8 said:
Success! Thanks to the OP for the write-up. I took the stock AT&T flash player apk, hex edited the version in libflashplayer.so and replaced it on the phone. It works fine in Dolphin HD (plugins set to Always; haven't tried On-demand) for Hulu.
I tried my hand at repacking the apk and signing it, but it doesn't seem to register the plugin using my apk, even though it's properly signed. So for now, the only approach that seems reliable is to install the stock apk and once installed, copy the modified libflashplayer.so over to /data/data/com.adobe.flashplayer/lib.
See attached. I provide no guaranties, so YMMV. Unzip libflashplayer.so.zip prior to copying.
EDIT: Works great on southparkstudios.com too!
Click to expand...
Click to collapse
bhagiratha said:
Would this work with the netflix web site?
Thanks for your efforts.
Click to expand...
Click to collapse
Browsing their website works fine, but you can't stream directly to the browser. That requires Silverlight, which I don't believe is available for the Android platform.
agentdr8 said:
Success! Thanks to the OP for the write-up. I took the stock AT&T flash player apk, hex edited the version in libflashplayer.so and replaced it on the phone. It works fine in Dolphin HD (plugins set to Always; haven't tried On-demand) for Hulu.
I tried my hand at repacking the apk and signing it, but it doesn't seem to register the plugin using my apk, even though it's properly signed. So for now, the only approach that seems reliable is to install the stock apk and once installed, copy the modified libflashplayer.so over to /data/data/com.adobe.flashplayer/lib.
See attached. I provide no guaranties, so YMMV. Unzip libflashplayer.so.zip prior to copying.
EDIT: Works great on southparkstudios.com too!
Click to expand...
Click to collapse
Sorry, does not work for me. Any suggestions? I did try in Miren and the default browser so perhaps browser specific?
Just tried Dolphin HD, no go. using your files.
I hope someone who knows better can get this working on a Tmo tab and confirm it before I blow mines up.
Hulu is a must have for long trips!

Need a means to compile apks

OK seeing as my computer currently doesn't work, I need to know if there is an app for my phone that will at least edit the contents of an apk, if not compile one. Anyone?
Also, if this is in the wrong section, feel free to move it, mods.
From my X10a running WB CM 6.1.3 V053
Realorasz said:
OK seeing as my computer currently doesn't work, I need to know if there is an app for my phone that will at least edit the contents of an apk, if not compile one. Anyone?
Also, if this is in the wrong section, feel free to move it, mods.
From my X10a running WB CM 6.1.3 V053
Click to expand...
Click to collapse
apk's are just renamed zip files.
If so, then is there an app that will directly edit zip files? And do they need to be set to store compression level? If so, is there an app that does so?
From my X10a running WB CM 6.1.3 V053
Realorasz said:
If so, then is there an app that will directly edit zip files? And do they need to be set to store compression level? If so, is there an app that does so?
From my X10a running WB CM 6.1.3 V053
Click to expand...
Click to collapse
yes, set to store...all you have to do is long-press the file and select rename...same to change it back afterward. I don't know about what app will allow you to set to store, but there are a TON of free zip apps. Check the market
I need to edit them though, and if I extract it edit it then zip it with an app, it's not set to store.
From my X10a running WB CM 6.1.3 V053
Root explorer can open xml files in apps but I don't think it can edit them.
After modding the contents of a non-system apk file i believe you'll have to re-sign the apk. I dont know of any way to do that on your phone, i am admittedly not an expert though. Ive modded icons and such for apps and the only way I could find out how to get them installed was to re-sign them on my PC and push back to the phone.
Sent from my X10i using XDA App
CMoney87 said:
After modding the contents of a non-system apk file i believe you'll have to re-sign the apk. I dont know of any way to do that on your phone, i am admittedly not an expert though. Ive modded icons and such for apps and the only way I could find out how to get them installed was to re-sign them on my PC and push back to the phone.
Sent from my X10i using XDA App
Click to expand...
Click to collapse
Yeah signapktic can sign on the phone, all I need is an app that either will, zip things set to store like in sundae or one that will directly modify the contents of the zip.
From my X10a running WB CM 6.1.3 V053
The files inside apk is I think encrypted. normal text viewers (ex. notepad) cant see it. and the resource files (styles strings colours ) are archived again. Btw it would be great if we have an app to disassemble them within 4n. Coz copying apk from and to to computer is a pain
akila87 said:
The files inside apk is I think encrypted. normal text viewers (ex. notepad) cant see it. and the resource files (styles strings colours ) are archived again. Btw it would be great if we have an app to disassemble them within 4n. Coz copying apk from and to to computer is a pain
Click to expand...
Click to collapse
Well making it a zip on my phone didn't screw anything up. I can still browse normally. What I need is a means to edit a zip without compressing it, like you have to for bootanimatjons and everything else.
From my X10a running WB CM 6.1.3 V053
I would suggest having a look through the market....download every free app you can find and see if any help. There are so many out there that I have no idea which would work for exactly what you will want it to do. Really, trial and error is the best way, sometimes lol
eclipse
I'm not sure I understand correctly, some previously mentioned are right on track.
Contents of an APK file are as normal zip files, extract the APK with winrar, 7zip or similar program.. make modifications and re-zip it and change the file name.
Important process called "Zip Align" optimizes the file for the APK format and helps to optimize and align the archive for memory mapping I/O ensuring the payload is delivered correctly, for more info - mmap
If you would like to reverse an APK file, I choose to use APKTOOL a Google hosted project and complete with it's own reverse engineering syntax called "baksmali" - This wraps AAPT - Android Asset Packaging Tool part of the android SDK - need this installed.
An issue exists with obfuscated Java classes. Meaning source code has been scrambled (obfuscation algorithm) enabling it be understood by a compiler but no longer is human readable. Another issue is Signing the APK file as most installers are to authenticate the issuing publisher.
To build an APK anyone only need's have the Eclipse IDE and Android SDK installed and you can do this without even having an Android device by using the emulator to build and test your application.
Happy play!
EDIT: Apk edit and Apk tool are both able to help in this situation also.

Why aren't my deleted files being deleted?

When deleting files on my tablet sometimes its still there when I plug it into my PC. What's causing this?
rquinn19 said:
When deleting files on my tablet sometimes its still there when I plug it into my PC. What's causing this?
Click to expand...
Click to collapse
What file manager are you using to delete the files? I have found that some managers / programs do not delete files without issues for some reason, for example when I play video files via MX video player, if i delete a file using MX it is often not removed, whereas with Root Explorer or ES file explorer I have never had any issues like that.
Also are you sure the files are really there? Maybe your PC is just showing you cached data, try a refresh/rebot of both devices, check again? Are the deleted files still intact if you copy them from tab to PC, or are they damaged?
entropy.of.avarice said:
What file manager are you using to delete the files? I have found that some managers / programs do not delete files without issues for some reason, for example when I play video files via MX video player, if i delete a file using MX it is often not removed, whereas with Root Explorer or ES file explorer I have never had any issues like that.
Also are you sure the files are really there? Maybe your PC is just showing you cached data, try a refresh/rebot of both devices, check again? Are the deleted files still intact if you copy them from tab to PC, or are they damaged?
Click to expand...
Click to collapse
I've tried all the popular file managers and the files are indeed there and intact. I think I ruined file permissions or something, I have no clue.
rquinn19 said:
I've tried all the popular file managers and the files are indeed there and intact. I think I ruined file permissions or something, I have no clue.
Click to expand...
Click to collapse
Did you alter the permissions of the files in question? Are you rooted? Does a root access file explorer (ie root explorer) cause the same issues when deleting a file?
Where is the file you are deleting, /sdcard/* or is the file actually in the system root (/)?
Is it on microsd?
Possibly a corrupt file system, or perhaps you are deleting a file that is currently locked by a running app?
Can you post a logcat of what happens when deleting a file? The clue to solve your problem might be in the system logs, snag a free copy of catlog if you don't have it, launch catlog, have catlog start recording, start a file explorer, delete the file, switch back to catlog and stop recording and then post/examine the log, might be a clue in there.
Also, as a wild idea - assuming the issue is coming from files, snag a copy of "sdrescan" from market, it is free, and give it a run. Perhaps you have a corrupted gallery view or something.
Hope we can figure it out

Can't update HOSTS file

I'm sure I'm missing something but don't know what it is.
I have a T-Mo OP6t, converted to International OOS Beta 8
TRWP installed
Magisk installed
Solid Explorer installed (paid version)
I'm trying to edit/update my HOSTS file for ad blocking but I can't.
I've tried to edit the properties of the HOSTS file in system/etc/ but the changes don't stick.
See attached thumbnails.
Any help/advise is appreciated.
Need to enable systemless hosts file option in Magisk manager, that's it.
I use adaway and do not toggle the system less switch in magisk and things work fine. I thought the system less toggle were for the modules you could download not separate sops
I use Solid Explorer all the time to modify hosts file on all my devices, inlcuding my 6T. The editor built into Solid Explorer has issues with larger files, so many larger hosts files can't be copied / pasted / saved in the editor in my experience. You can however just copy / paste / replace the entire hosts file with another one though. Just make sure the hosts file has Linux line endings, so use a Linux PC or notepad++ in Windows and use the conversion to Unix line endings and save it.
Jager said:
Need to enable systemless hosts file option in Magisk manager, that's it.
Click to expand...
Click to collapse
I have that option already enabled. No luck.
OhioYJ said:
I use Solid Explorer all the time to modify hosts file on all my devices, inlcuding my 6T. The editor built into Solid Explorer has issues with larger files, so many larger hosts files can't be copied / pasted / saved in the editor in my experience. You can however just copy / paste / replace the entire hosts file with another one though. Just make sure the hosts file has Linux line endings, so use a Linux PC or notepad++ in Windows and use the conversion to Unix line endings and save it.
Click to expand...
Click to collapse
I've always copied and pasted with Solid Explorer and that's what I'm trying to do this time but haven't had any luck.
Any other suggestions?
mine420 said:
I use adaway and do not toggle the system less switch in magisk and things work fine. I thought the system less toggle were for the modules you could download not separate sops
Click to expand...
Click to collapse
Personally I don't care for Adaway (no particular reason), I'm just quirky and prefer to use an edited HOSTS file.
brisseau said:
I've always copied and pasted with Solid Explorer and that's what I'm trying to do this time but haven't had any luck.
Any other suggestions?
Click to expand...
Click to collapse
Have you gone in Magisk, and under SuperUser and made sure Solid Explorer is approved for Root use?
OhioYJ said:
Have you gone in Magisk, and under SuperUser and made sure Solid Explorer is approved for Root use?
Click to expand...
Click to collapse
Yep. See attached.
Note: I'm only using adfree until I can get the HOSTS file copied and pasted over
brisseau said:
Yep. See attached.
Note: I'm only using adfree until I can get the HOSTS file copied and pasted over
Click to expand...
Click to collapse
Don't know what changed but AFTER installing the adfree.apk and allowing that to update the HOSTS file, I was able to copy/paste my HOSTS file like normal.
Crisis solved.
Moderator, please close and thanks to everyone who suggested fixes.
Edit the host file here, it's the one that is used when the magisk module is enabled.
/sbin/.core/img/hosts/system/etc
Try debloating the rom. Having same issue getting error message "that there are no enough space on the system". After I removed built in system app i'm not using, all went fine after. I removed google play music, movies and other stuffs I don't use.

Categories

Resources