[Q] Moving apps to sd without app2sd - Android Software/Hacking General [Developers Only]

Ive been trying to mod the stock rom on my MyTouch 3g Slide so that it automatically uses a folder on the sd card as the data folder for apps using the inherent "everything is a file" rule from linux.
I do have SU permissions on the ADB.
My theory is this:
If I replace the folder "data" with a link to the folder on the sd card, then I should be able to have as many apps as I want, I would just need to get a bigger sd card eventually.
Another benefit of this is it will actually be superior to App2SD as ALL apps will not only be able to be on the SD but they will all work properly (so pandora will let me still use the widget)
I am however not that well versed in linux or in modding a folder to be a link and just look like a folder. Anyone want to help?
I also know that, at first, I would need to ADB pull all the files from the required folders and push them back onto the SD folder. I did it once now if only I could get the link working.
edit: I have noticed that certain changes to the filesystem in the stock rom rewrite themselves on reboot. (ex: I tried to change the permissions on the built in shell to root but when I rebooted it changed them back, worked until then though)
edit: another thing I could do is have multiple sd cards with entirely different roms on them and just switch SDs when I want to change roms. But that's a project for another time.

Xperia X10 is still running 1.6.
Apps2SD is a 2.1 minimum so, somebody started to work on exactly what you want.
http://forum.xda-developers.com/showthread.php?t=800555

Related

Battery widget A2SD

I formatted my card for ext2 and swap and am Using A2SD with Modaco 1.1 but the battery widget no longer works. How do I move it back to internal storage?
Also the Handcent widget won't work so I have to just use a shortcut, is this something taht is known to not work from sd? is it possible to use droid explorer to move these applications to internal memory also, I'm that that good with the console.
did you uninstall them then reinstall them after the rom reboot
ap2sd works when you have and ext2 on your sd card, it creates and envronmental variable to tell android that all the user installed apps are now on the sd card.
if you installed these apps before you formated your sd card to ext2 the data for these apps... executeables etc are still located in data/app instead of /system/sd/app
blah blah... long story short, uninstall the app and reinstall it via market. There might be an additional problem with the app uninstalling because android doesn't know where to look for the original app.
in that case try turning off your phone
removing the sd
restart the phone
uninstall the app agian (the link will be restored at that point)
turn off the phone
put the sd card back in
turn phone back on,
reinstall the app you want
It seems that with Modaco's rom the apps automatically moved to the system/sd/apps at least thats where they all show up when I look for them in the console. Long story short though everything started working after enough time and a restart and they are on the sd card now. It was just odd that they wouldn't for a while when everything else was working. It works now though.
thezero4 said:
It seems that with Modaco's rom the apps automatically moved to the system/sd/apps at least thats where they all show up when I look for them in the console. Long story short though everything started working after enough time and a restart and they are on the sd card now. It was just odd that they wouldn't for a while when everything else was working. It works now though.
Click to expand...
Click to collapse
might be the boot cache that's doing it then
yeah, im using handcent and experienced the same widget problem.
It happens when you update a program that is stored on the sdcard. There's another thread in here that talks about it in more details, but you basically have to remove the contents of the boot-cache folder and restart the phone for it to rebuild all the data.
Works perfectly after this...but everytime you update you will have to do this.
You could probably just move the handcent program to the phone (i.e. off the sdcard) to fix this issue. Follow the same methods that are described in the thread that talks about fixing google maps/google voice search....its the exact same principals:
http://forum.xda-developers.com/showthread.php?t=582549

[Q] Copying .apk Files Directly to microSDHC Card

Hello,
I'm a long-time Linux user (since 1997) who is just stating to get into this newfangled Android thing. I've ordered a Nook Color from eBay, and in anticipation of its arrival next week, have been downloading deeper-blue's Honeycomb images, dd-ing them to microSDHC cards, and poking around just to get a feel for how the filesystem is organized. Now, let's say I've got a Honeycomb v03 image on a microSDHC card that's plugged into my computer, and accessible as /dev/mmcblk0. I have some .apk files that I've downloaded, and would like to put them on the microSDHC card so they're ready to start using once my NC arrives. All of the instructions I've seen talk about installing stuff with adb, but is there any reason that I couldn't just mount /dev/mmcblk0p2 (the system partition) on an empty directory on my Linux box, copy the .apk files to the app directory, adjust the permissions with chmod (seems like some things need setuid/setgid), unmount, and be good to go? Ditto for NuroSlam's modified su command... can I just copy that to the xbin directory? Most of the instructions I've found use adb push, or even cat to manipulate files on the Android device, which seems weird to me... any reason I can't just use trusty old cp?
Thanks,
Nate
Most of what you wrote is over my head, but I have never used adb to install an apk from my SD card. Just put the file on the card, find it with any of the free file explorers from the market, then click on it. Android will show the permissions and ask if you want to install. Just remember to allow 3rd party apps in the settings.
Evo running UD 2.5
Thanks for the quick reply. I guess it's a bit unusual to be a Linux expert but an Android newbie. I just want to make sure that all of my Linux skills still apply to this variant of the operating system, especially since the Android guys seem to have a completely different way of going about things than I'm used to.
Nate

[Q] change mountpoint of sdcard so that it goes to the actual sdcard

Does anyone know how to update the mount points so that when I insert a microsd card it is mounted to the mnt/sdcard folder? I still would like to be able to use the internal storage though. Maybe it can be mounted someplace else.
I ask because I would like to backup my apps to the SD card using Titanium backup and Astro. Backing up my apps to the internal memory makes no sense. Especially when you are trying to move Angry Bird saved games between devices.
I did the opposite when I was running the CM7 on the GTablet: all the ROMs mapped sdcard to the internal memory while CM7 had it the way you want it. I didn't need an SD card for the GTab, so suffice to say, I updated it to change it back so all my apps would work again.
Anyway, you need root, and all you have to do is find /etc/fstab and change the mount points to where ever you want them. On the GTab, I just switched emmc and sdcard around. This worked on Android 2.3, so I assume its the same for 3.x. I don't have my Transformer with me here at work or I'd look to make sure.
IMPORTANT: Make sure you make a system backup before you mess with it, cause you could mess up the file and then nothing will mount on start up, so proceed at your own risk.
http://forum.xda-developers.com/showthread.php?t=1122710
Last page has a script you can use or you can use the app method, I think it is towards the end of the 2nd page, its a 1.99 app but works fine and survives reboots
EDIT: Post 38 and 41

[Fix]: Solution for games not working after binding obbs with Link2SD

OK guys, I had a problem recently with games not being able to find their obb expansion files after linking/binding them to SD card 2nd partition with Link2SD. I could link anything else, like the game's internal data, library files, etc, and they would still work. But after linking the obb file, they stopped working. I remember this working fine on previous phones I've owned, so I figured that this must be an issue with how the stock system deals with interacting with the SD card, creating symbolic links, etc. Or more specifically a faulty 'sdcard' file at /system/bin/sdcard. I never had any issues with this when running unofficial CM12.1 on the v10 as far as games not working when their obbs were linked (except CM kept crashing so I switched back to stock). So I figured that maybe replacing the sdcard file with the one from CM might work. And my hunch was right.
I bought a 200GB SD primarily so I could link games and other big apps, this failure really pissed me off. Especially having spent a decent amount on it and not being able to use it for what I bought it for!
This fix may also work for games not working after binding their obbs with FolderMount, or with the Xposed module Obb On SD (http://repo.xposed.info/module/com.smartmadsoft.xposed.obbonsd). I havent did extensive testing with these, so if anyone wants to try and report back, then feel free.
Why should you trust me? Well, you don't have to. Go ahead and link a game obb with Link2SD, while using the standard sdcard file. Then launch the game. It most likely wont work, will probably say that it couldn't find its' data, need to download files and fail, etc. Then flash the zip I'm providing and try again. Your linked games should now work. Be sure you back up the original sdcard file in case you run into issues. I havent found any yet. Your SD should still be available on boot, and if you have an EXT4-formatted SD in conjunction with the Evil Yummy Gumdrop kernel, it will be available as well. I've only tested with the T-Mobile variant of the v10, but this should work with other variants, as long as you have root access, mount /system as writable, and replace the file. Permissions should be set to 0755. If you don't have a custom recovery then you can also try flashing with FlashFire (http://forum.xda-developers.com/general/paid-software/flashfire-t3075433 and https://play.google.com/store/apps/details?id=eu.chainfire.flash&hl=en)
The only caveat I've run into is that X-plore, my favorite file manager, now both shows a "Internal storage" and "/storage/emulated" heading, which both link to the same area (internal/emulated storage). No big deal.
I hope this fix helps some people out. Report back and give thanks.
Edit: I havent tried this with Marshmallow, I doubt it would work, because of how MM handles external SDs. Try at your own risk. This has only been tested on a stock rooted Lollipop 5.1.1 ROM on the T-Mobile LG v10.
Edit#2: I just finished testing this with FolderMount and Obb On SD. They work flawlessly, but didnt before. No major issues yet.
I'm using Marshmallow now, so I cant provide any support for this. This file doesnt work on MM, I'm trying to find a new fix.
Can you provide a solution for marshmallow? I'm facing the problema only on marshmallow
Can I ask you a question. I purchased this phone because is 64GB and that's just about perfect for my green plus games. And I play RPGs which are GB heavy. So why l Iink2sd?
Any news?
I found 2 solutions which work on MM and Lollipop, and they don't involve replacing system files. One is an app, the other needs Xposed. I no longer recommend using Link2SD with MM, since it seems to be incompatible anyway. Some people did manage to get it working, but still no obb linking. Here are 2 superior solutions:
1. XInternalSD:
Download via Xposed Installer, activate module, reboot. Open a root file manager, go to /storage/, look for the folder that goes to your external SD's 1st partition. Open XInternalSD, where it says 'path to internal SD card', make sure it contains the right path to your external. The point is to trick certain apps (mostly games) into thinking your external is the internal storage. Check the box that says "full access to external SD". You can either "enable for all apps", or just certain apps. I recommend only for apps where obb linking doesn't work. Go to /storage/<external path here>, go into Android folder, create obb folder if it doesn't exist. Next, install your games. If you get them from Play Store, you will need to manually move the obbs to the folder above *before* running the app. Make sure you move the obb file itself *and* the folder above it. As an example, the game "Secret of Mana", my path looks like /storage/<external>/Android/obb/com.square_enix.secret/main.201410302.com.square_enix.secret.obb. When you have finished moving, open XInternalSD, tap "enable for apps", put check beside your app, then OK. Then you can run the app, this method should work for most regular apps and games. The downside of this approach is that you can only force an app to store most/all of its' external data on SD. External data is defined as anything that is stored on internal or external storage. All other parts of an app usually go into /data.
2. Apps2SD (search in Play Store):
There are free and paid versions (2nd is called Apps2SD Pro). I think free version has same features as Pro, but with ads. You can deal with them, block ads with the hosts file, or use Lucky Patcher to patch out the ads/create a modded APK with no ads. I recommend you buy pro version, it has so many features, and is way better than Link2SD, and is MM/Nougat-compatible. It's updated often and only costs a few dollars at most. *Please* don't steal from this great developer.
Anyway, for this to work, your SD needs 2 partitions. Apps2SD has a partitioning tool, I tried it, it deleted all my files. You can still use the app's partition tool to create 2 partitions, then copy your personal files back when finished. 1st partition is for personal stuff, 2nd partition is for Link2SD/App2SD (I dont recommend storing other files here, but App2SD shouldnt mess with them). I assume most people use Windows, so backup all your SD files to PC, online, wherever, just in case. Download the free version of MiniTool Partition Wizard, resize the first partition so that it's smaller. 1st partition should either be exFAT or FAT32. Then create 2nd partition, format it as ext4. You can use almost any Linux-based filesystem for 2nd partition, but I recommend ext4. Choose whatever size you want for each. You can also use any other partitioning tool of your choice (I prefer GParted, a Linux software). Then put SD back into phone and install App2SD. Make sure you use v11.4 of the app or newer, this is the version that fixed sdcardfs, which is what causes this problem in the first place, and why I started this topic. Tap "link apps to SD card", select ext4 (if this is what you used) and advanced mount option. I have tried the init.d and su.d methods, but after rebooting I got errors like "root access denied", "soft reboot required", and linked apps missing. Advanced method has something to do with Android's vold, is all I know, but works flawlessly for the v10 MM. Apps2SD is better than XInternalSD because you can link all parts of an app (APK, dex/odex, libraries, internal/external data, and caches), XInternalSD only works for external data and obb files.
For Apps2SD, you also need this file:
https://forum.xda-developers.com/attachment.php?attachmentid=3987630&d=1483343643
Unzip the file, force stop Apps2SD, then go to /data/data/in.co.pricealert.apps2sd.pro/app_binary/apps2sd. Delete this file, leave the rest. Then copy the file from the zip into the same folder. For the next part you need to set permissions, I use Total Commander. In TC I hold my finger on the file, select Properties, select RWX, type 777, then Apply. Go to Properties again, select UID, in both fields select the # that says Apps2SD, then Apply again. You can use any root file manager for this, instructions will vary, I just used TC as an example (great and powerful app, BTW). Make sure you do this step. This fix may not be needed in future Apps2SD version, so my advice is dont do this unless obb/external data linking doesnt work or gives an error ("invalid argument"). But this is definitely necessary for v11.4.
If you are still having issues, try these:
In SuperSU, disable mount namespace separation and enable su on boot.
Try setting SELinux to permissive instead of enforcing. For this you can use SELinux Mode Changer, an init.d/su.d script, or you can manually type "su" then "setenforce 0" in a terminal app.
Change your root management app. I used to use SuperSU, but switched to phh's Superuser not too long ago. There is a regular version and a Magisk version, take your pick. I'm loving it and have no intention of going back to SuperSU unless I have serious issues (none so far in the few months I've used it).
XInternalSD only requires Xposed but doesnt need root access, so it may be better for unrooted users. The Xposed framework itself can be installed into system partition with no need for being rooted, but I do believe that the systemless version of Xposed needs SuperSU. The one exception I can think of is the Magisk version of Xposed, which only needs Magisk but not root.
Apps2SD needs root, except maybe for the regular/normal mounting method (haven't tested that). I'm not aware of any solutions for unrooted users, your choices are very limited.
In further testing FolderMount and Obb On SD still do not work with v10 MM. I also dont recommend using adoptable storage for your SD, it's confusing and too much of a headache.
As of v11.5 of Apps2SD Pro, the part about manually replacing the appp2sd binary file is no longer necessary. You only need to do this if you're using v11.4.
Apps2SD v11.5 also supports systemless modification/injection, so that the app can do its' work without modifying the /system partition. But you need SuperSU installed, modifications are installed to /su.
I no longer own the v10, I got sick and tired of the issues I was having with it. I found a good deal on EBay for a new Note 4 still in the factory-sealed box. It does not exhibit any of the linking/obb binding issues I was having. So I can't provide support for this anymore. The last time I had the v10 was a few weeks ago, running stock modded Marshmallow. At that point Apps2SD Pro worked perfectly on it for all my needs, it solves all linking/binding issues without replacing system files, and only needs root. It's only a few $$$ and the dev updates it often. It also has support for SuperSU, Magisk, phh's Superuser, and pretty much any other root solution out there. So that's my final word, this app is your best bet.
Can I do something to undo this, it made both my internal and external storage disappear.
@NguyenDucAnh01: If You made a copy of the original sdcard and vold files, then you can just restore them to /system/bin/. Set permissions to 0777, you can do this from TWRP. If you didn't make a backup then you will have to reflash your firmware.
Thanks man
AnonVendetta said:
@NguyenDucAnh01: If You made a copy of the original sdcard and vold files, then you can just restore them to /system/bin/. Set permissions to 0777, you can do this from TWRP. If you didn't make a backup then you will have to reflash your firmware.
Click to expand...
Click to collapse
Thanks for the suggestion, but I found a way myself :highfive:
Since the script only replace sdcard file, I take the one from the original rom, replace the file in that .zip with it, then adb sideload it with TWRP
Also that srcipt didn't backup the file, I had to do that way.
@NguyenDucAnh01: I now recommend using Apps2SD instead of Link2SD, it has many more features and is more up to date. You can get it for free in Play Store. With this app it isn't necessary to replace system files at all. And it works on all Android versions up to Oreo, haven't tested with Pie yet.
XInternalSD, Obb On SD, and FolderMount should work too, in most cases. But the first 2 need Xposed.
Oh, one more thing, I no longer own the LG v10, not for a very long time. I'm now using a ZTE Axon 7. The v10 is the worst phone I've ever owned.

Modified LG E400-boot from external sd?

Hi guys! Sorry if I'm posting in the wrong place, I'm new here. So basically, i have an LG E400 (i know its a really old phone, i don't use it as my regular phone) which has been modified so it can not be used in the regular way (i wont go into the reasons its been modified, its complicated). The USB port has been modified so it cant be connected with a pc (it will only charge), the cell and wifi chips have been removed so it cant be connected to the internet and the system modified so i cant install new apps (if i try to install apks it says the application google play store (process com.android.vending has stopped unexpectedly. Also, its somehow made to boot and run off external sd, if i take out the sd the screen goes blank, if i try to switch on without sd it just shows the LG logo. Recently i installed linux file systems for windows by paragon software on my pc and using it when i put the sd card in my pc it shows 2 hidden linux volume partitions or whatever its called. in there is the entire system or root or whatever it is (sorry, if this doesn't make sense, I'm new to all this stuff).
So basically i have 3 questions.
1. How was it made to run from sd card?
2. Can install apps by putting the apks in the root or sd or whatever it is? i googled about it and it seems to be possible but i would have to change permissions, is it possible to do that on pc?
3. Can i fix the google verification thing so i can install apks in the regular way?
thanks in advance!
AFAIK it's not possible to boot Android from an external SD-card this because when the phone powers up the Boot ROM code starts executing from a predefined location on NAND which is hardwired in ROM, and you can't change that.
Are you saying that my phone is impossible? what about a custom rom? i don't know if it has a custom rom but if i go into about phone, it shows build number palmoid 2 which as far as i know doesn't exist so could it be a custom rom made the company that modified the phone?

Categories

Resources