[HACK] Apps2SD improvement - Milestone XT720 Android Development

For those people who are still using the Apps2SD approach, I have made a few modifications to some of the scripts. Primarily it adds the capability of users to remove/change their SD card without causing the phone to go on a boot loop.
The file can be found here:
https://github.com/trajano/xt720opt/blob/master/pkgexec/system/etc/install-recovery.sh
Readme can be found here:
https://github.com/trajano/xt720opt/tree/master/pkgexec/system/etc
This one gets put into /system/etc and the existing mot_boot_mode.bin should be put back to mot_boot_mode
This is the approach that link2sd used. so it saves one modification from the existing apps2sd/apps2card approach.
It also supports ext3 if you have the required kos loaded into the /system/lib/modules folder.
NOTE: The fix is to allow you to change and replace your SD card after an app2sd without having to deal with reflashing, but it will *try* to get your applications working again if you try to put back your original SD card. There are problems with the apps not loading after doing the reload most likely permissions problems in the data/data folder.

the link is not working dude.

Related

How to install new updates

I want to know how to install new updates ?
There are many files that is usually updated
modules-xxxxxxx.tar.gz
zImage
rootfs.img
system.ext2
froyo.user.conf
my question is .. it it enough to just replace files to memory card and when pre-installed Andriod starts it will use the new file
or I have to format the memory card and paste the files before install Andriod ?
Also it would be nice if someone can share any tutorial about these files and the role of each one ?
Updates that should not require formatting SD card (or other changes):
-> zImage and modules-xxxxxx.tar.gz - linux kernel image and the corresponding modules, they need to be updated both at the same time
-> rootfs.img - root file system image
-> initrd.gz - initial ram disk
-> XXXX.user.conf - additional boot options (swap/compcache/other stuff)
You don't have to but I would say it is better to remove the data.img file (data partition image) prior to updating system.ext2 (Android system). Android will create a new one in this case but all your personal data and settings will be lost.
You should be able to update pretty much everything w/o problems but in some cases something may go wrong. Always backup your data.img before updates - just to be safe.
Formatting SD card is required only when the file system is broken (one of the symptoms is Android's inability to read anything from the SD card).

[Q] How can I add a small Ext partition to my SD card and fill it with symlinks?

So I am an organization freak, and the root of my SD card had gotten a bit out of control. Not unusual, I know, but having just installed Titanium Media Sync and inKa File Manager, I've been doing a lot more file management and the constant scrolling through crap folders that I'll never need to access is getting old. So I've been trying a bunch of stuff to create what basically amounts to a folder full of shortcuts or symlinks that reference the various folders I need to use.
Now I could just create some sort of MyHome directory on my SD card and store my **** in there, but that doesn't solve the problem of having easy access to some of the folders that need to be in /sdcard, like the Download folder.
So the solution I came up with was to create a folder called 'Home' in the root of my phone. I added a bunch of symbolic links to Music, Photos, Downloads, Documents, etc, and the beauty is I can have stuff scattered all around my SD card and still access them neatly from this one folder. And filter out the crap I don't ever need. Doing this produced the exact effect I was hoping for, and I set it as my Home in InKa File Manager. However it comes with two problems:
First, this folder disappears every time I restart my phone! And second, even if this didn't happen I would still be faced with the folder disappearing every time I installed a new ROM. Oh, and in case it isn't obvious, FAT filesystems don't support symbolic links so this Home folder has to exist somewhere outside of the main SD card.
So, in conclusion: I would like to create a very small partition on my SD card that I have read/write access to, so that I can fill it with symbolic links that will stay put and always re-mount. My problem now is that I'm not familiar enough with the Unix file system or with mounting disks to determine how to make sure this partition gets mounted every time I start my phone. Or, if this happens automatically, where to look for the partition.
Thanks in advance to anyone who can point me in the right direction!! I'm pretty sure I have already created an ext2 partition on my card, by using iPartition on my Mac to place it after the FAT partition. But it won't let me name it so I don't even know where to begin looking for the partition itself.
Why can't you just make a folder called "Home" in /data somewhere? Shouldn't matter where the folder is since you can default your file manager to whatever folder upon opening.
Edit: Just tested it by making a folder /data/Home/
It survived a reboot fine.
Shouldn't be wiped when installing new roms either, as long as they don't wipe data like I know the ACS roms don't. Also if the rom you are flashing backs up and restores your data before flashing like some do, it MIGHT, idk for sure, but might backup this folder as well.
That... totally works. Stays after a reboot too. Thanks! This at least solves one problem and makes the idea totally doable again
Im still curious about a solution to the partition thing though. It would be nice to have a Home folder that was literally always around and that I wouldn't have to worry about even after installing new roms. I know some of them don't wipe data but I would generally Odin when installing a new ROM anyway. Installing Cyanogen for the first time definitely requires that and I feel like I may go back to a stock rom once or twice before CM goes final.
The reason nothing "sticks" when you put it in the root FS if because it is a RAM filesystem, loaded from a file image (zImage) at boot -- it's not a more typical file system in secondary storage like all the other filesystems. This is simply an artifact of how embedded linux systems work.
Sent from my mind using telepathitalk

"live" version of root for Nook Touch

I have done multiple searches and not found anything like this, apologies if I missed it. Here goes ...
Is their a version of rooting for the Nook N2E that can be run completely from the SD card? (Think a Linux LiveCD) I would like to try some of the other eReader software available to see if I like them before I decide to fully root my Nook. If I knew enough about Android, I would attempt this myself, but I don't want to brick my device.
Currently, no. It is possible, and is widely used on the Nook Color, but the work just hasn't been done on the Nook Touch. There was someone working on it a while ago, but it seems to have been dormant lately...
WIP thread
There appears to be a semi active thread about this here. At least is should provide a starting point.
David0226 said:
There appears to be a semi active thread about this here. At least is should provide a starting point.
Click to expand...
Click to collapse
I can't post on the development forum yet, so I am posting this here hoping others working on an SD boot image will see it.
I have been working on this myself.
I made a backup of my NST and then wrote that image to an SD card (4GB).
I changed the init.rc file and change all the mmcblk0p? file names to mmcblk1p?. I also changed the booting.png image so that I could confirm that my NST was booting from the SD Card.
I than inserted the SD Card and powered up. The booting.png image from the SD card showed up, but the device hung right there.
So I started looking at some other files. There is a file called env.txt that contains the following string:
root=/dev/mmcblk0p2 rw rootdelay=1 mem=512M
so I changed that to
root=/dev/mmcblk1p2 rw rootdelay=1 mem=512M
and attempted another boot. It still hung at the booting screen.
I suspect that it may not be able to access all the partitions on the SD card (after writing the backup image to the SD card, it contains 8 partitions, the 7 partitions from the NST and an eighth unallocated partition with the remaining 2GB from the card.)
My next idea is to attempt to get all the files off the SD card and create one partition that contains all the files in their correct directories and comment out the mount and mkdir commands from init.rc to see if I can get it to boot. (My problem is I have no easy access to a Linux system and WinBLOWS will not access the Ext2 and Ext3 partitions.)
Any comments or suggestions would be appreciated.
My goal here is to attempt to get it to boot the "standard" NST firmware and if I get that working, then attempt to set up a "rooted" OS on the SD card.
Progress????
Okay, now I got it to start a boot from the SC card and eventually I got a message that said failure to install.
Here is what I did.
After inserting the SD card into a linux machine, I mounted all the partitions.
I then copied all of the data into a single directory preserving the directory structure from the mounts.
I tar'd up this directory and ftp'd it to my windows machine.
On the Windows machine, I used bootutil to unpack the init.rc and env.txt files from uRamdisk.
I modified the files as can be seen in the attachments and repacked them.
Then I renamed the directories to correspond with the device file names they were supposed to mount from.
Then I created a single FAT partition on the SD Card and copied the directory structure to it.
It did not hang this time, so perhaps I am getting closer.

[Q] EXT on Internal SD Card

I need to use symbolic links and UNIX permissions on some of the sub-directories under my main directory (/storage/emulated/0/). I have C4Droid and GCC installed, and I want to be able to compile and execute apps through a terminal emulator. I can compile just fine inside the app and export, but I cannot run the exported binaries. After tearing apart the internet in searching why, it appears that the internal SD card is FAT and not EXT4 (or 3).
I don't care if I have to delete my files or if I will need to reinstall apps or whatever, I have backups and root, but I don't want to trip KNOX.
So how does one go about to format this? Other threads indicate that plugging into a computer and formatting will not work since it will be reformatted on the next boot. Android has native EXT support, so surely this can't be impossible...

SM-T230nu SD Swap woes

Okay, I've literally been working on this for the last 2 days, tried everything I've found so far, and the most progress I've made was (somehow) making both sdcard and extsdcard show the same storage mount, but I have no clue what change made that occur for one reboot. So far, I've tried the following:
vold.fstab editing
build.prop editing
FolderMount (desparate...)
I've even tried the debuggerd script I found in this other forum, and yes I edited the script to point to the correct vold blocks (in my case they're 179:96 and 179:97 for the internal and external storage, respectively)
While I'm not against using a fully custom rom for these tablets (I have two), the dilemma is that my 4-year-old sons use them, so the KidsMode needs to function properly. They've run out of storage space on these due to three FREAKING HUGE games they absolutely insist on keeping on the tablets at all times, and apps like GL to SD need to be run and remounted on every reboot, so it isn't a suitable solution...
Best case, I would love a boot.img swap so it'll be zero-maintenance. I've been searching and so far I haven't turned up anything I can use... I'm a long-time "power user" with several devices running custom kernels, various builds of CM, and even a modded version of CM12 on my tablet I compiled myself. I'm not a beginner, but I'm definitely out of my league on this one.. Any assistance will be appreciated.
UPDATE
I'ne partially succeeded. I've figured out how to remount /sdcard to the external sd card, but it's not a perfect redirect. It shows in file managers, but not in the Settings under Storage, and the free space shown in Application Manager is blank (crashes in a few seconds), or it continues to show the real internal sd card info. I used the following single command in the debuggerd.mnt file:
Code:
mount -t vfat -o rw /dev/block/vold/179:97 /storage/sdcard0
no luck
No luck with the swap... The only option I believe I have at this point is to either install a custom rom (but I haven't found a single one...), or I need to pull the boot.img to edit it. So far I've not been able to find the boot partition, and the "by-name" list doesn't mention anything related to "boot"
My last thought is to try to extract it from a stock firmware. Is that possible? I don't have linux running, and all boot devices are disabled on my work laptop so a live distro isn't an option...
Any help or opinions will be greatly appreciated...

Categories

Resources