Backing up before rooting - EVO 4G Android Development

As we've noted, the Hero unrEVOked exploit works on the EVO. It gives you userland root, but does not stay rooted after the device powers off. Toast's exploit is more robust, but wipes user data in the process.
I'm wondering if I could combine the two to preserve my files:
Code:
sh unrevoked
mkdir /sdcard/backup
busybox cp -R /data /sdcard/backup/data
#install toast's root
rm -R /data
busybox cp /sdcard/backup/data /data
#nandroid backup
#flash to froyo rc
Would that enable permanent root without wiping the device?

Related

something up with my shell scripts.

I seem to be frequently flashing or messing up my G1 so I decided to write some shell scripts to help out but they seem to only half work if at all. Actually I'm not sure what they did because they displayed no output.
This script is supposed to backup the default init.rc and mountd.conf files then replace the existing ones with the modified ones.
Though it does not work.
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mkdir /system/sd
busybox cp -a /system/etc/mountd.conf /sdcard/recovery/mountd.conf.bak
busybox cp -a /system/init.rc /sdcard/recovery/init.rc.bak
busybox cp -a /sdcard/recovery/mountd.conf /system/etc/mountd.conf
busybox cp -a /sdcard/recovery/init.rc /system/init.rc
then this is the next set to move the apks and the program caches which doesn't work.
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
busybox cp -a /data/app /system/sd
rm -r /data/app
ln -s /system/sd/app /data/app
busybox cp -a /data/app-private /system/sd/app-private
rm -r /data/app-private
ln -s /system/sd/app-private /data/app-private
rm -R /data/data/com.android.browser/cache/webviewCache
ln -s /sdcard/cache/webviewCache /data/data/com.android.browser/cache/webviewCache
rm -R /data/data/com.android.vending/cache
ln -s /sdcard/cache/marketCache /data/data/com.android.vending/cache
rm -R /data/data/com.google.android.street/cache
ln -s /sdcard/cache/streetCache /data/data/com.google.android.street/cache
reboot
Plus both run and output no errors either. Who knows what problems I'll run into because I have no idea what they actually did.
Anyone see anything wrong here?
Well I'll help you.
1-) After you back up the mount and stuff and put the other back, you MUST reboot before keep going.
2-)After boot then you can copy the files or make the symlink. I suggest you dont copy the app to the sdcard on teh scrip since they should be there already. so do that manually once then the script just delete the folders and then crate the symlinmks.
I have a menu that does that and I have got some experience as why it works one day and not the other.
Rafase282 said:
Well I'll help you.
1-) After you back up the mount and stuff and put the other back, you MUST reboot before keep going.
Click to expand...
Click to collapse
I took the reboot out after the mountd.conf and init.rc did not appear to copy due to the lack of /dev/mmcblk0p2 hoping to see some sort of output why it did not run. Unfortunately it runs and backs up the files but does not replace them with the modded ones.
Rafase282 said:
2-)After boot then you can copy the files or make the symlink. I suggest you dont copy the app to the sdcard on teh scrip since they should be there already. so do that manually once then the script just delete the folders and then crate the symlinmks.
Click to expand...
Click to collapse
Not copying the apps is a good idea, modified the script to not do so.
Rafase282 said:
I have a menu that does that and I have got some experience as why it works one day and not the other.
Click to expand...
Click to collapse
Does Android require that you do a chmod on all shell scripts first?
On Debian I usually just use sudo sh ./ and it runs the script w/o changing anything on the file permissions so I figured Android would be similar if I just ran them as root. Still I see a lot of people requiring a chmod 777 on any guide referring to running shell scripts.
I will try that and report back with my findings. Thanks for replying.
Does Android require that you do a chmod on all shell scripts first? I just have to type m oon anywhere in the androud shell and my scripts run, for that i put it on /system/bin and do a chmod 4755 to the file. it is still needed to type su before you run the script.
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mkdir /system/sd
cp /sdcard/media/Data/mountd.conf /system/etc/mountd.conf
cp /sdcard/media/Data/init.rc /system/init.rc
Thats my code for copying the modified files to the right place. So maybe you should try that.
Oh for androoid you dont unless you put it on /system/bin then you will have to use sude and sometiems it still wont run due to lack or permisions so is better to do a chmod 4755
Well I made the changes suggested and did a chmod on all the files prior to running but with no luck.
The odd thing is if I use the shell scripts as a guide list it works perfectly but if I try to launch them as a shell script all sorts of strange undesirable things happen to my phone.
The time consumed trying to use the scripts and recover from what happens from what they do out weight the effects of typing everything in.
joshtheitguy said:
Well I made the changes suggested and did a chmod on all the files prior to running but with no luck.
The odd thing is if I use the shell scripts as a guide list it works perfectly but if I try to launch them as a shell script all sorts of strange undesirable things happen to my phone.
The time consumed trying to use the scripts and recover from what happens from what they do out weight the effects of typing everything in.
Click to expand...
Click to collapse
you can only run the script once .. when the "ln -s" has already been done it has to be undone before trying to run the script again .. otherwise you would be copying the files onto themselves .. not sure if you've tried running it more than once
LucidREM said:
you can only run the script once .. when the "ln -s" has already been done it has to be undone before trying to run the script again .. otherwise you would be copying the files onto themselves .. not sure if you've tried running it more than once
Click to expand...
Click to collapse
These scripts were intended for my usage after a system restore from a update.zip file which wipes /system in the process.
My intentions were to:
1. remount the fs rw
2. copy the original init and mountd files to the sd then copy the modified to their respective places in the system folders then reboot
3. reboot then create the sym links appropriately then move my caches too
Well unfortunately the only thing that works is the backing up of the original init and mountd files.
joshtheitguy said:
These scripts were intended for my usage after a system restore from a update.zip file which wipes /system in the process.
My intentions were to:
1. remount the fs rw
2. copy the original init and mountd files to the sd then copy the modified to their respective places in the system folders then reboot
3. reboot then create the sym links appropriately then move my caches too
Well unfortunately the only thing that works is the backing up of the original init and mountd files.
Click to expand...
Click to collapse
yes .. but you can't create the sym links when they already exist .. running the update.zip only wipes the /system .. not /data .. if the links were there before the update.zip they will be there after

Telstra T-Touch Tab aka Huawei S7 root

Hey guys, just got my hands on one of these suckers, it runs 2.1
Can anyone point me in the right direction to get root?
Im also looking for froyo, however dont expect it soon, manufacturer is working on it.
Sent from my S7 using XDA App
I second davidcampbell! We need froyo here
The root method is the same as the s7.
download z4root from market and root, after wards install busybox by titanium backup and you are set.
The app2sd mod works for this device since it is similar to the sony x10 on 2.1 but is risky because i lost wifi aftewards. So just explore until we get some real developers working on it hopefully cm6.1 port but after huawei realeases the recovery.img and source to mess around with though.
being able to overclock to 1ghz wouldnt hurt either.
S7 Bootloader?
Has anyone figured out how to get into the bootloader for this device?
Havent been able to through any apps \ commands. Just go to a black screen and thats it, and recovery sends you into factory settings for your device
I only know that pressing back key and call\send key when when powering on the device puts it into update mode.
alexisprz said:
The root method is the same as the s7.
download z4root from market and root, after wards install busybox by titanium backup and you are set.
The app2sd mod works for this device since it is similar to the sony x10 on 2.1 but is risky because i lost wifi aftewards. So just explore until we get some real developers working on it hopefully cm6.1 port but after huawei realeases the recovery.img and source to mess around with though.
being able to overclock to 1ghz wouldnt hurt either.
Click to expand...
Click to collapse
Zomg, nice, thank you alexisprz, it's rooting time
I really wish Android had a better term for rooting, it sounds like I'm either breaking it, or trying to cram my man bits into it some how.
Will this affect my ability to use the manufacturers update to froyo in the future?
UPDATE: z4root worked great, I installed busybox no problemo, very happy forum member here
sir i just bought one telstra touch tab can you plz help me to debrand it and unlock it i also have jtag too
pre needs, new rom and rooted with busybox on SD with linux ext2/3 Partition.
download z4root from market and root
copy 3 files to sd
run App-2-sd.sh
File 1 "App-2-sd.sh"
#!/bin/sh
# untitled.sh
#
#
# Created by Andew Blazely on 5/02/11.
# Copyright 2011 SOFTHOUSE. All rights reserved.
#
# un Hash data if you wish but it will slow the S7 down and cause lots of waiting problems
# pre needs, new rom and rooted with busybox on SD with linux ext2/3 Partition.
# mount the file systems
mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system
busybox mkdir /system/sd
mount -t ext2 /dev/block/vold/179:2 /system/sd
# archive dirs (easier than copying)
cd /data/
busybox tar -cvf /system/sd/app.tar app
busybox tar -cvf /system/sd/app-private.tar app-private
# busybox tar -cvf /system/sd/data.tar data
busybox tar -cvf /system/sd/dalvik-cache.tar dalvik-cache
# unpack arcives in correct place
cd /system/sd
busybox tar -xvf app.tar
busybox tar -xvf app-private.tar
# busybox tar -xvf data.tar
busybox tar -xvf dalvik-cache.tar
# cleanup
busybox rm *.tar
# copy and set system files
busybox cp /sdcard/install-recovery.sh /system/etc
busybox cp /sdcard/init-sd.sh /system/etc
busybox chmod 755 /system/etc/install-recovery.sh
busybox chmod 755 /system/etc/init-sd.sh
# un Hash whatis needed if you intend NOT to remove SD
#cd /data/app
#busybox rm -rf *
#cd /data/app-private
#busybox rm -rf *
#cd /data/data/
#busybox rm -rf *
#cd /data/dalvik-cache
#busybox rm -rf *
# binding mount of new file structure
mount -o bind /system/sd/app /data/app
mount -o bind /system/sd/app-private /data/app-private
# mount -o bind /system/sd/data /data/data
mount -o bind /system/sd/dalvik-cache /data/dalvik-cache
reboot
File 2 "init-sd.sh"
#!/system/bin/sh
#
MYLOG=/sdcard/install-recovery.log
echo "$(date) Starting install-recovery.sh" > $MYLOG
echo "$(date) Waiting SD to become ready..." >> $MYLOG
sleep 10
# un Hash whatis needed if you intend NOT to remove SD
#echo "$(date) Erasing system files..." >> $MYLOG
#cd /data/app
#busybox rm -rf *
#cd /data/app-private
#busybox rm -rf *
#cd /data/data/
#busybox rm -rf *
#cd /data/dalvik-cache
#busybox rm -rf *
#echo "$(date) Erased system files..." >> $MYLOG
mount -t ext2 /dev/block/vold/179:2 /system/sd 1>>$MYLOG 2>>$MYLOG
mount -o bind /system/sd/app /data/app 1>>$MYLOG 2>>$MYLOG
mount -o bind /system/sd/app-private /data/app-private 1>>$MYLOG 2>>$MYLOG
# Hash this out if you haven't moved /data/data
#mount -o bind /system/sd/data /data/data 1>>$MYLOG 2>>$MYLOG
# Hash this out if you haven't move /data/dalvik-cache
mount -o bind /system/sd/dalvik-cache /data/dalvik-cache 1>>$MYLOG 2>>$MYLOG
mount >> $MYLOG
echo "$(date) Finishing install-recovery.sh" >> $MYLOG
File 3 "install-recovery.sh"
#!/system/bin/sh
#
/system/etc/init-sd.sh&
And BOB's your uncle.. this has worked many times for me give it a try

[TUT + ROM] Using s-off to Maximize ROM Efficiency

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is a picture of the memory layout of a regular HTC Desire running an RCMIxHD derivative (SupeROM) with the speed and responsiveness of a Desire HD.​
Premise:
1. Performance degradation with HD roms (and regular ones as well) occur when essential parts of the device's operation are from the sd card, instead of working as much as possible from the internal memory.
2. Deodexed roms render a substantial part of the /system partition into a bloated archive, since no apk or jar file is actually used. Everything is odexed and copied into the dalvik-cache, which leads to -
3. The dalvik-cache of a deodexed rom is much larger than that of an odexed rom. So now we have large portions of the system partition that are not used, and a clogged data partition.
4. So we use a2sd, a2sd+, d2ext or d2we - and essentially, what we get is that almost nothing is being run from the internal memory. What a waste.
This post will be a guide for both devs and advanced users on a process that utilizes s-off'ed devices' ability to change partition layouts in order to maximize the efficiency of the device.
For devs:
0. Require the target device to be s-offed and have an hboot in accordance with the following ideas:
1. Instead of using d2ext, d2we or even a2sd+ - use a regular a2sd script, and move only /data/app to the sd card. This will act as the apk archive of downloaded apps, while the dalvik-cache, from which the apps actually run, will remain on the data partition.
2. Symlink the entire /system/app folder and /system/fonts folder to sd-ext. Symlink everything in /system/framework to sd-ext, except framework-res.apk and possibly framework.jar (for theme modding and rtl fixes, if necessary).
The result - a regular Sense FroYo rom will take only 89mb of the /system partition. RCMixHD will take 180mb - and that is after returning the VR lib folder and some other libs to the /system partition.
In other words - you can use the oxygen hboot for normal Sense FroYo, and the data++ hboot for HD-based roms. All the files will run from the dalvik-cache on the data partition, and all the user data will be there as well.
Fixing market downloads
If you wish to bypass the problem of the small cache partition limiting market downloads, then do the following steps:
1. Use the wonderful dsixda kitchen to unpack your boot.img
2. Edit the init.rc. In the exports section add the following:
Code:
export DOWNLOAD_CACHE /mnt/asec/download
and add the following right under the section titled "# Secure container public mount points":
Code:
# Market downloads
mkdir /mnt/asec/download 0777 root system
mount tmpfs tmpfs /mnt/asec/download mode=0777,gid=1000
This will place all market downloads into a temporary ram disk, which will be deleted upon the completion of the installation.
3. Repack your boot.img and place it in the rom.
You can see an example of an edited init.rc here:
http://wbss.ro/coolexe/Extra/init.rc
Note: The users of your rom will still have to flash radio updates through fastboot.
(Thanks, coolexe and baadnewz, for this idea!)
The result is maximal device responsiveness, as well as battery conservation.
An example for a modified rom (SupeROM) can be downloaded here. This one requires the data++ hboot. baadnewz's newest iNserCoinHD rom also uses it - see here.
The following post is a guide for advanced users on how to achieve the same effect on an already running rom.
For Advanced Users:
Any advanced user can turn his or her currently flashed rom into a faster rom, and gain additional space on the data partition.
Please read everything in the first post so you know what you're about to do.
Prerequisites:
adb on your system, and you know how to use it.
An ext3 or ext4 partition after the fat partition on your sd card (512mb minimum).
Your rom is an a2sd or a2sd+ rom (not d2ext or d2we).
YOU MADE A NAND BACKUP.
1. Reboot into recovery and connect your phone to the computer. Mount system, data and sd-ext. Use adb to move files from /system to /sd-ext:
Code:
adb shell
mkdir /sd-ext/system
mkdir /sd-ext/system/app
mkdir /sd-ext/system/framework
mkdir /sd-ext/system/fonts
mv /system/app/* /sd-ext/system/app/
mv /system/framework/* /sd-ext/system/framework/
mv /system/fonts/* /sd-ext/system/fonts/
2. Now we have to symlink all the files we moved. This was a trial and error process for me, since I am not a programmer. But it works.
First of all, we create files that list all the names of the files we moved:
Code:
ls /sd-ext/system/app > /tmp/sysapp
ls /sd-ext/system/framework > /tmp/sysframe
ls /sd-ext/system/fonts > /tmp/fonts
Now we check how files are already symlinked to the ext partition in our rom (so we know how to symlink ours):
Code:
ls -all /data
This will show you the symbolic links. In my case, for instance, they were pointing at /system/sd, which is common.
Now we use arrays to create all the symlinks we need. Replace /system/sd if necessary:
Code:
c=0; while read line; do array[c]=`ln -s /system/sd/system/app/"$line" /system/app/`; let c=$c+1; done < /tmp/sysapp
c=0; while read line; do array[c]=`ln -s /system/sd/system/framework/"$line" /system/framework/`; let c=$c+1; done < /tmp/sysframe
c=0; while read line; do array[c]=`ln -s /system/sd/system/fonts/"$line" /system/fonts/`; let c=$c+1; done < /tmp/fonts
This will give you a nice output of errors, but will get the job done. Just to make sure, run these commands:
Code:
ls -all /system/app
ls -all /system/framework
ls -all /system/fonts
If all is well, you just viewed your newly created symlinks.
You can run the command
Code:
df
in order to see your new memory usage.
Now you can reboot your device. If all went well, you will notice absolutely no difference from before. If this is the case, make a second nand backup (without deleting the first one).
3. So now we have a nand backup of our rearranged rom. It is time to go to http://alpharev.nl, if you have not done so already, and follow the instructions there in order to s-off your device. If you are modifying a regular Sense rom (or anything without Sense) then choose to flash the oxygen hboot. For HD roms, choose the data++ hboot.
4. Restore your second nand backup.
5. If you used a2sd+, you need to move the dalvik-cache back to your internal memory, on the /data partition (that has plenty of space for it now).
If your a2sd is darktremor's script, you can simply enter
Code:
adb shell a2sd nocache
while your device is running (NOT in recovery) and reboot.
If you have a different a2sd script, you need to reboot to the recovery, and use adb to find out where it is:
Code:
adb shell mount /system
adb shell ls /system/etc/init.d
This will show you what's the name of your script. Mine was the usual 40a2sd.
Pull this file from your device:
Code:
adb pull /system/etc/init.d/40a2sd
Open the file in a text editor, search for every occurrence of "dalvik-cache" and "app-private" and delete them, without harming the command's syntax. Save the file (don't forget to back it up as well), push it back to the device and restore its owner and permissions:
Code:
adb push 40a2sd /system/etc/init.d
adb shell chown root:shell /system/etc/init.d/40a2sd
adb shell chmod 755 /system/etc/init.d/40a2sd
Now all we have to do is to move the actual dalvik-cache and app-private.
Code:
adb shell mount /data
adb shell mount /sd-ext
adb shell rm /data/dalvik-cache
adb shell mv /sd-ext/dalvik-cache /data/
adb shell rm /data/app-private
adb shell mv /sd-ext/app-private /data/
That's it. Reboot, and you'll notice an increase in performance, as well as in storage space on the data partition.
Remember: from now on you cannot flash new themes with the usual recovery zips (unless you opted to leave the file framework-res.apk inside the original /system/framework folder). You have to push the files through adb.
Also, if you use the data++ layout, you have to use fastboot to flash new radios, and you may have trouble installing very large apps.
There is a way to enable the installation of large apps from the market, but this is for EXTREMELY advanced users, so I will not even go into details. Simply follow the section "Fixing market downloads" in the first post and flash your new boot.img using fastboot flash boot boot.img.
very nice tut
ClassicalDude said:
...
Now all we have to do is to move the actual dalvik-cache and app-private.
Code:
adb shell rm /data/dalvik-cache
adb shell mv /sd-ext/dalvik-cache /data/
adb shell rm /data/app-private
adb shell mv /sd-ext/app-private /data/
That's it. Reboot, and you'll notice an increase in performance, as well as in storage space on the data partition.
Click to expand...
Click to collapse
Everything went well for me on Cool Z v8 A2SD, thanks a lot!
Only one thing: you should edit the 2nd post just before the section I'm quoting, adding "adb shell mount /data" and "adb shell mount /sd-ext" before trying to move dalvik back to NAND, otherwise it won't work
Amazing.... just when you think thought of it all... a new bright idea pops up
Nicely done mate
nice idea, if i understand this correctly this looks like something that could help with sd speeds.
because currently even a fast sd card with a2sd/data2sd/data2ext chokes when /sd-ext/dalvik is read and /sdcard being written to.
is that about right ?
@grooltor - thanks. I fixed it. I have a few more additions that will be incorporated soon, such as coolexe's idea to increase the cache partition.
@nerdo - thanks. Like all good ideas, it came in the shower.
@ciukacz - that's the idea, and it is working indeed. You can check out the rom I posted, or the newest iNsertCoin rom, which is based on this method. Every rom, including HD and Z roms, runs smoothly this way.
Anyone tested this guide on Leedroid 2.3d? I'd do it, but i am currently overwhelmed by my final exams...
Bobuscho said:
Anyone tested this guide on Leedroid 2.3d? I'd do it, but i am currently overwhelmed by my final exams...
Click to expand...
Click to collapse
Worked perfectly on modaco r10. See no reason why it should not work on LeeDroid.
so this is basically a way of trimming up /system by relocating it and symlinking so you can reallocate the space using an alpharev table / Custom mtd layout?
Suppose for sense roms, that makes sense (forgive the pun). Cool
@ClassicalDude: thanks for the reply, i will definitely try that and post back.
however i am fairly new to all things android and need to read up before i try.
Will try that on Al-Maisan ROM (Arabic version of Starburst) tomorrow and see how it will go.
I have a problem with Titanium backup... wan't have a download a busybox.
mexxxico said:
I have a problem with Titanium backup... wan't have a download a busybox.
Click to expand...
Click to collapse
I did not encounter this problem, so I cannot help. Like it is said in the beginning of this thread - this process is for very advanced users, who know what they are doing, and who can google their way to a solution to such problems, or figure it out themselves. I will help as much as I can, but I will not do the research for you.
Thanks to baadnewz and coolexe, I added a section called "Fixing market downloads" to the first post. It's a very elegant way of placing market downloads into a temporary ram disk, which self-deletes after the app is installed.
ok,tnx. I'll tray to find a solution
swyped from my HTC Desire using XDA Premium App
wollyka said:
Will try that on Al-Maisan ROM (Arabic version of Starburst) tomorrow and see how it will go.
Click to expand...
Click to collapse
Just to report it works on Al-Maisan. (with modified boot.img for market fix too)
Thanks for the tut
I've just tried this guide on Leedroid 2.3d, here's my experience:
After sticking closely to the Guide in the 2nd post, i am getting LOADS of FCs as i boot up the device. Sense crashes, the IME crashes...everything fcs immediately.
I analysed everything but i've entered the correct commands...
So maybe the integrated A2SD script is the problem? I've cleaned it from all content saying "app-private" and "dalvik cache", as advised in the 2nd post.
Code:
#!/system/bin/sh
#
# Apps2SD using symlinks and bind mounts
# [email protected] (cyanogen)
# Adapted by Teknologist
#Removed this as there is no /etc/sysctl.conf as of now in MCR
/system/bin/strt
# execute any postinstall script then kill it
if [ -e /dev/block/mmcblk0p2 ];
then
# mount and set perms
busybox mount -o noatime,nodiratime -t auto /dev/block/mmcblk0p2 /system/sd;
busybox chown 1000:1000 /system/sd;
busybox chmod 771 /system/sd;
# clean up any old symlinks, create data directories
for i in data;
do
if [ -h /data/$i ];
then
rm /data/$i;
fi;
if [ ! -d /data/$i ];
then
mkdir /data/$i;
busybox chown 1000:1000 /data/$i;
busybox chmod 771 /data/$i;
fi;
done;
# don't allow /data/data on sd because of upgrade issues - move it if possible
if [ -d /system/sd/data ];
then
busybox cp -a /system/sd/data/* /data/data/;
busybox rm -rf /system/sd/data;
fi;
# move apps from internal memory to sdcard
for i in app;
do
if [ ! -d /system/sd/$i ];
then
mkdir /system/sd/$i;
fi
busybox chown 1000:1000 /system/sd/$i;
busybox chmod 771 /system/sd/$i
if [ -d /data/$i ] && [ ! -h /data/$i ];
then
busybox cp -a /data/$i/* /system/sd/$i/;
busybox rm -f /data/$i/*;
fi;
done;
# symlink app dirs - they must be on the same filesystem
for i in app;
do
if [ -d /data/$i ] && [ ! -h /data/$i ];
then
busybox rm -rf /data/$i;
busybox ln -s /system/sd/$i /data/$i;
fi;
done;
# clean up old whiteouts
for i in local misc property system tombstones data;
do
if [ -h /system/sd/$i ]; then rm -f /system/sd/$i; fi
done;
# please don't put odex files in the app directory people!
# it causes dexopt to crash when switching builds!
busybox rm -f /system/sd/app/*.odex
setprop cm.a2sd.active 1;
echo "+++ Apps-to-SD successfully enabled";
else
# replace symlinks with directories so we can boot without sd
for i in app;
do
if [ -h /data/$i ];
then
rm -f /data/$i;
mkdir /data/$i;
busybox chown 1000:1000 /data/$i;
busybox chmod 771 /data/$i;
fi;
done;
setprop cm.a2sd.active 0;
fi;
sync;
Your a2sd script is fine. Probably some other small thing you did not notice.
how much internal memory would I have on cool z v8 after applying all those steps?

Fix_permissions mistery

Ok, so here is what puzzles me:
I have a MT3G, SuperOneClick rooted, with RA 1.7.0, busybox 1.18.4, all apps requiring superuser permissions are working flawlessly (Titanium, SetCPU, Root Explorer, Droid Wall, etc). Fix_permissions works with RA (other/fix uid mismatches) and ROM Manager, but when I open the emulator and type $su #fix_permissions, it gives me
bash: fix_permissions: command not found
In adb shell fix_permissions, permission is denied. All useful ideas how to solve this are much appreciated, thanks...
Anyone?
Sent through XDA App
Ok, I don't want to open a new topic, but really need some advice here! I just used Root Check in advanced mode, before it ran it asked for and received superuser permissions, then the detailed results were:
Congratulations! You have root access!
Alternate su bin location:
/sbin/su: Permission denied
Root user id:
uid=0(root)
Root group id:
gid=0(root)
Click to expand...
Click to collapse
Seriously, guys, please help, I dont have a clue whether I have a permanent root or not. I forgot to mention I'm using the T-Mobile OTA Froyo 2.2.1 FRG83D. I've rooted this same ROM once, 5-6 months ago, when it was pushed out, I had no problems, fix_permissions were working. Then I nandroid backed it up, so I can restore it if I don't like the other ROMs I used later (which were Ginger Yoshi RC7 -a great ROM, but the launcher was constantly restarting, and then back to Super D - most stable one, but lots of the good apps are not for 1.6 anymore). However, when I tried to restore Froyo, it didnt work, so I had to start over, using the following steps to get the OTA and root it. Please, let me know if I missed something or did it wrong:
1. I flashed sappimg.nbh with hboot to get to unrooted Cupcake
2. Flashed DRC92 and DMD64 Donut updates with stock recovery <3e>
3. Got the OTA Froyo from T-Mobile (*#*#checkin*#*#)
4. Used SuperOneClick to root, then restarted the phone
5. Using Droid Explorer, I installed a terminal emulator, then I uninstalled Superuser (have read in several threads people saying they had problems with it when it comes with SuperOneClick), using
$ su
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# rm /system/app/Superuser.apk
# pm uninstall com.noshufou.android.su
# mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
# exit
$ exit
and reinstalled it from the market.
6. Installed the latest busybox with Busybox Installer.
7. Pasted flash_image and recovery.img (Amon RA 1.7.0) to the sdcard, then installed recovery:
$ su
# mount -o remount,rw -t yaffs2 /dev/mtdblock3 /system
# rm /system/etc/install-recovery.sh
# cd sdcard
# mount -o remount,exec /dev/block//vold/179:1 /sdcard
# ./flash_image recovery /sdcard/recovery.img
# exit
$ exit
8. And finally I started removing the unnecessary system apps (Amazon, MyFaves, etc) with the emulator, using the same method I did to remove Superuser in step 5
Click to expand...
Click to collapse
Now, as I mentioned before, I cannot run fix_permissions through the emulator, but it runs through ROM Manager and RA (fix package uid mismatches).
Why is that? Is it the ROM, which causes the problem?
I'm clueless, please help!

Adding su to blob.APP

Hi All, I've been researching on how to modify the blobs that are present in the OTA and custom roms, I've used blobunpack to extract the various blobs and managed to mount blob.APP using this syntax: mount blob.APP -loop -o remount,rw /mnt/Transformer. I can then add / remove files to the *mounted* blob file and run umount /mnt/Transformer followed by blobpack etc... to recreate the updated blob, what do I need to put in the blob.APP image so that when I flash it I will have root ? ( hope this makes sense )
You'll need /system/app/Superuser.apk and /system/xbin/su. Superuser can have the same persmissions as all the other apps, but su should have 6755 or rwsr.sr.x. I think there are other superuser.apk available now. The su binary is usually in sbin or xbin, but it has to be in your path so that other apks can find it.
Have fun!
Thanks very much will have a go
So the device wil be rooted automatically on first boot ? No need to run exploit ?

Categories

Resources