Emulating sdcard in extSdCard for 4.4.2 - Galaxy S 4 Themes and Apps

Hello everyone, I have been looking for some time a way to exchange sdcard by extSdCard but in ROM 4.4 still fails with vold.fstab nor build.prop.
-First download the "Script Manager"
Link: https://play.google.com/store/apps/details?id=os.tools.scriptmanager
-Create an "Internal" folder on your extSdCard
-Open a text editor and paste this line:
Code:
mount -o bind /storage/sdcard1/Internal /storage/emulated/legacy/
Save named "script.sh"
(You can adapt this code for your ROM)
-Cut out all the files from sdcard and paste into "storage/sdcard1/Internal"
-Open script manager, navigate to where you saved "script.sh". Click "Script / Executable" check Fav, Su, Boot, then "Save" and then "Run"
-Reboot
***I'm sorry if any mistake, do not speak English.***

Anyone tested it?
Sent from my GT-I9500 using Tapatalk 4 Beta

Related

[GUIDE] Triumph - CM9 - CM7 - MIUI - EASY Carrier Name Change

Disclaimer: If your phone explodes, dies a miserable death, or any of a million things, don't come crying to me. Do this at your own risk!
Having said that... this is THE EASIEST way to change the Carrier Name in CM9, CM7, and MIUI on the Triumph.
This will NOT work on stock FROYO!
INSTRUCTIONS:
1. Download flashable Zip at end of post -- triumph_cm7_miui_carrier_name.zip
2. Open the Zip file and extract the eri.xml file in /data/ to your desktop using a zip utility such as WinZip, 7-zip, etc.
3. Open the eri.xml file in your favorite text editor such as notepad++.
4. In LINE 7, change Virgin Mobile in Eritext="Virgin Mobile" to whatever text you want, for example:
Code:
<EriInfo RoamingIndicator="1" IconIndex="1" IconMode="0" EriText="I am AWESOME" CallPromptId="0" AlertId="0" />
IF you want to use the following special characters in the text, you will need to use the escape characters instead (for example instead of & use & ):
Code:
Character Reference
& &
< <
> >
" "
' &apos;
5. Save the eri.xml file after making your changes.
The following are 3 methods of updating your phone. Use whichever method you are most comfortable with.
A. Using the flashable zip and flashing in CWM.
1. Add the updated eri.xml back into the /data folder in the triumph_cm7_miui_carrier_name.zip -- make sure that you use "no compression" or "store" when adding it back.
2. Save the triumph_cm7_miui_carrier_name.zip on your sdcard.
3. Reboot into CWM and flash the zip file as usual.
B. Using ES File Explorer, Root Explorer, or another file explorer capable of root. (In the instructions below, I'll reference ES File Explorer since that is what I use but the instructions should be similar for any of the file explorers.)
1. Copy the updated eri.xml file onto your sd card.
2. On your phone, open up ES File Explorer.
Make sure that you have your settings set to mount the file system as writable:
2a. In ES File Explorer, hit menu --> Settings.
2b. Make sure there is a checkmark in the following checkboxes: "Root Explorer" and "Mount File System".
3. In ES File Explorer, browse to your sd card where you saved the eri.xml file.
4. Long press on eri.xml to bring up the popup menu.
5. Select Copy.
6. Next, browse to /data/. To do that, click the Favorites button on the toolbar and select the / from the Favorites popup window and then go into /data/.
7. Hit the Menu button on your phone and select Operations --> Paste.
8. You should now see the eri.xml file in your /data/ folder.
9. Close out of ES File Explorer.
10. Toggle Airplane Mode on and then off. When your service comes back, the carrier name should reflect your new Carrier name text. If not, reboot your phone.
C. Using ADB. The following instructions are for windows but you should be able to do the same in any other OS.
1. This assumes that the updated eri.xml file is on your desktop as I instructed above and you already have your phone connected to your computer. Open the command line in Windows.
2. type the following commands:
Code:
cd %userprofile%\desktop
adb push eri.xml /data/eri.xml
3. Toggle Airplane Mode on and then off. When your service comes back, the carrier name should reflect your new Carrier name text. If not, reboot your phone.
If you are uncomfortable using adb or don't have it installed or don't know what it is, then I'd recommend using method A or B.
To UNDO all changes:
This is SUPER EASY:
1. Using ES File Explorer, browse to /data/
2. Delete the eri.xml file.
3. Toggle Airplane Mode on and then off. When your service comes back, the carrier name should reflect your original Carrier name text. If not, reboot your phone.
Nevermind. I got it. Lol. very nice.
Sent from my Motorola Triumph using Tapatalk
woot.. been looking all over for a simple method to get my phone to stop saying sprint all the time...

Any tutorial to GK802 root?

Hi guys!
I'd like to give root to GK802 because I need some way to have an power-off button. Do you know any way to do?
Sorry for the inconvenience and sorry for my pitiful English. Thank you very much!: Good:
take a look in the market place section, there's a post about the GK802 and some link, you can take some info there
http://www.armtvtech.com/armtvtechforum/viewtopic.php?f=51&t=1113&start=40#p7840
It's pretty easy to root the gk802 if you have linux on one of your computers.
The easiest way for you to root your stock image is:
-Grab the 1.65.3b update and decompress it
-Mount the system.img using Furious Mount Tools(set loop and nautilus)
-Mount your micro-sd containing the stock image.(You may want to make a backup before you do anything)
-Find which mounted partition has the folders like app, etc, bin, xbin and so on. This is the system partition.
-Launch 2 instances of Nautilus as root(alt-f2 gksu nautilus)
-In one window navigate into the folder where system.img is mounted(on my setup furious iso tools mount it to ~/system_img/
-In the other window navigate to the system partition.
-Copy Superuser.apk or SuperSu.apk from the system.img/apps/ into the system partition/apps/ directory
-Copy the all the .xml files from system.img/etc/permissions/ into the system partition/etc/permissions/ directory
-Copy su and busybox from the system.img/xbin/ to the system partition/xbin/ directory.
Unmount everything and you should be rooted.
Just make sure that you use nautilus as root or the permissions for the files you copy will not be set properly.
Good Luck!

[TUTORIAL] Centering the Lockscreen After Decreasing DPI

[Noob friendly tutorial]
A typical problem when decreasing the DPI of your device is sometimes the lock screen will offset to the right(usually).
This tutorial might help fix this problem.
Requirements:
1. Rooted device
2. File manager for viewing and managing the root directory (e.g. Root Explorer)
3. Software for decompiling and recompiling .apk files
4. Text editor, I recommend Notepad++
Prerequisite:
Backup your current ROM so that I will not be held responsible for problems the may occur on your device
Instructions:
1. Open Play Store and download "ZipSigner" by Ken Ellindwood
2. Go to the root directory which is designated as "/".
3. Open "system" folder
4. Open "framework" folder
5. Look for "framework-res.apk"
6. Copy "framework-res.apk"
7. Navigate back to your SD card directory and paste it to where you want it.
8. Connect your device to your PC.
9. Expand your phone's the notification bar, press "Charging" and change it to "USB mass storage" and press "OK". Your PC will access your phone's storage directories (SD Card and Phone Storage)
10. On your PC, go to your SD Card's directory and navigate to where you put framework-res.apk and move it to your PC's desktop (you can put it to anywhere you like, just make sure you have it in your PC's storage directory).
11. On your PC, transfer framework-res.apk in the directory of your decompiling/recompiling tool with respect to what "tool" you are using.
Main Part:
12. Decompile framework-res.apk
13. Go to its "decompiled" directory
14. Navigate to /res/layout
15. Look for "keyguard_screen_tab_unlock.xml"
16. Open it with a text editor
17. Look for this line:
Code:
<com.android.internal.widget.multiwaveview.GlowPadView
18. Rigt next to this line, look for the lines, "android:gravity" and "android:layout_height".
19. Change their values to "left|top" and "wrap_content" respectively
So "android:gravity" and "android:layout_height" should look like this:
Code:
android:gravity="left|top"
and
Code:
android:layout_height="wrap_content"
20. Recompile framework-res.apk
21. Sign the new, edited framework-res.apk
22. Place it back to your SD Card
23. Disconnect your device from your PC.
24. Go to your SD Card and navigate to where you have put the modified framework-res.apk
25. Using the ZipSigner app, press "Choose In/Out..." and navigate to where you put the edited framework-res.apk
26. Press "Sign The File" and ZipSigner will begin to produce a signed version of the selected apk.
27. Navigate back to where you have created the edited-and-signed framework-res.apk and it will have a "-signed" in it's name.
28. Remove the "-signed" and MAKE SURE the newly-edited-and-signed framework-res.apk is named AS IS, "framework-res.apk".
*If there are others' named "framework-res.apk" in the same directory, rename them into something different before renaming the "newly-edited-and-signed framework-res.apk" so it won't conflict with step 28.
29. After you have successfully renamed the "newly-edited-and-signed framework-res.apk", copy it.
30. Go to the root directory which is designated as "/".
31. Open "system" folder
32. Open "open "framework" folder
33. And paste-and-overwrite/override the "newly-edited-and-signed framework-res.apk" to this "framework" directory.
Note: If in some case you were prevented to paste in the "framework" directory, check to see if your root file manager is mounting the root, if not check for an option to mount the root directory
34. If you have successfully overwritten/overridden the original framework-res.apk, your device should begin to Soft-Reboot automatically. If not then, manually force your device to reboot.
And your lock screen should now be at the center.
35. Done
durancharles27 said:
[Noob friendly tutorial]
A typical problem when decreasing the DPI of your device is sometimes the lock screen will offset to the right(usually).
This tutorial might help fix this problem.
Requirements:
1. Rooted device
2. File manager for viewing and managing the root directory (e.g. Root Explorer)
3. Software for decompiling and recompiling .apk files
4. Text editor, I recommend Notepad++
Prerequisite:
Backup your current ROM so that I will not be held responsible for problems the may occur on your device
Instructions:
1. Open Play Store and download "ZipSigner" by Ken Ellindwood
2. Go to the root directory which is designated as "/".
3. Open "system" folder
4. Open "framework" folder
5. Look for "framework-res.apk"
6. Copy "framework-res.apk"
7. Navigate back to your SD card directory and paste it to where you want it.
8. Connect your device to your PC.
9. Expand your phone's the notification bar, press "Charging" and change it to "USB mass storage" and press "OK". Your PC will access your phone's storage directories (SD Card and Phone Storage)
10. On your PC, go to your SD Card's directory and navigate to where you put framework-res.apk and move it to your PC's desktop (you can put it to anywhere you like, just make sure you have it in your PC's storage directory).
11. On your PC, transfer framework-res.apk in the directory of your decompiling/recompiling tool with respect to what "tool" you are using.
Main Part:
12. Decompile framework-res.apk
13. Go to its "decompiled" directory
14. Navigate to /res/layout
15. Look for "keyguard_screen_tab_unlock.xml"
16. Open it with a text editor
17. Look for this line:
Code:
<com.android.internal.widget.multiwaveview.GlowPadView
18. Rigt next to this line, look for the lines, "android:gravity" and "android:layout_height".
19. Change their values to "left|top" and "wrap_content" respectively
So "android:gravity" and "android:layout_height" should look like this:
Code:
android:gravity="left|top"
and
Code:
android:layout_height="wrap_content"
20. Recompile framework-res.apk
21. Sign the new, edited framework-res.apk
22. Place it back to your SD Card
23. Disconnect your device from your PC.
24. Go to your SD Card and navigate to where you have put the modified framework-res.apk
25. Using the ZipSigner app, press "Choose In/Out..." and navigate to where you put the edited framework-res.apk
26. Press "Sign The File" and ZipSigner will begin to produce a signed version of the selected apk.
27. Navigate back to where you have created the edited-and-signed framework-res.apk and it will have a "-signed" in it's name.
28. Remove the "-signed" and MAKE SURE the newly-edited-and-signed framework-res.apk is named AS IS, "framework-res.apk".
*If there are others' named "framework-res.apk" in the same directory, rename them into something different before renaming the "newly-edited-and-signed framework-res.apk" so it won't conflict with step 28.
29. After you have successfully renamed the "newly-edited-and-signed framework-res.apk", copy it.
30. Go to the root directory which is designated as "/".
31. Open "system" folder
32. Open "open "framework" folder
33. And paste-and-overwrite/override the "newly-edited-and-signed framework-res.apk" to this "framework" directory.
Note: If in some case you were prevented to paste in the "framework" directory, check to see if your root file manager is mounting the root, if not check for an option to mount the root directory
34. If you have successfully overwritten/overridden the original framework-res.apk, your device should begin to Soft-Reboot automatically. If not then, manually force your device to reboot.
And your lock screen should now be at the center.
35. Done
Click to expand...
Click to collapse
This is Q and A thread tutorial should not be here .... Plz post this thread in right place.....
samith.shetty3 said:
This is Q and A thread tutorial should not be here .... Plz post this thread in right place.....
Click to expand...
Click to collapse
Well, can I move this thread in "General"?
durancharles27 said:
Well, can I move this thread in "General"?
Click to expand...
Click to collapse
yup..
samith.shetty3 said:
yup..
Click to expand...
Click to collapse
well I can't I would have to pray that an Admin/Moderator would see this and move it.

I need to edit some xml files

How can I edit some xml files? I want to try the Gpu 1gz but my system fails to save the file once I open it.
I am rooted by the way
I don't think anyone really understands your post, so you haven't received any responses. XML files are just text files so any editor should work. You would need to be sure that you have read / write access to the file.
vijer said:
I don't think anyone really understands your post, so you haven't received any responses. XML files are just text files so any editor should work. You would need to be sure that you have read / write access to the file.
Click to expand...
Click to collapse
Ok, to make it more clear. I am trying to edit a XML file ( Yes Text file ) onthe Product/ETC folder.
The thing is once I open the file with any text editor, or even root browser and try to save the changes I made it gives an error saving file. Tge same thing goes to the Build.prob
If I edit something on it and try and save the changes they won't stick. All the access are correct, read and write permissions are set. Don't know why I can't save the files.
try to edit it on your sd card!
1.) copy xml file to sd
2.) edit and save to sd card
3.) rename original file to . bak
4.) copy xml file from sd card to target folder
5.) compare right permission management flag!!! (rw-r-r /644!)
6.) reboot
(use totalcommander app or similar for it!)
btw: if this doesn’t work for you, you can try the "fastboot" mode (adb shell and connected phone to your pc for it! - push/pull)
this should work going this way:
* you need usb drivers and mini adb to be installed.
* you have to connect phone to pc (debugging must be allowed!)
* check connection with > adb devices in fastboot mode
* if connected, you should be able to copy xml file to pc -> adb pull <source-path>/xxx.xml <target-path>
* then edit and safe xml to pc folder
* then copy file to phone -> adb push <source-path>/xxx.xml <target-path>
maybe you have to remount target folder r/w with:
adb shell
su
mount -o remount,rw /targetfolder
at first to be able to copy.
* set file permission with -> adb shell su -c "chmod -R 644 /target folder/xxx.xml"
BTW: following this description at your own risk!!! Maybe it doesn’t work!!
I have no own experiences with Mate 9!!
non-toxic said:
try to edit it on your sd card!
1.) copy xml file to sd
2.) edit and save to sd card
3.) rename original file to . bak
4.) copy xml file from sd card to target folder
5.) compare right permission management flag!!! (rw-r-r /644!)
6.) reboot
(use totalcommander app or similar for it!)
btw: if this doesn’t work for you, you can try the "fastboot" mode (with adb shell and connected phone to your pc for it! - push/pull)
Click to expand...
Click to collapse
Great! Gonna give it a go that way! I'll check and return with results
Yes let me know too
and? How does it have worked?

[GUIDE]Porting TWRP without source

Yes, I know XDA is filled with such guides.
But you can only port a TWRP if you implement parts of all the guides.
This guide is a summation of all those guides.
NOTE:
I would be using AIK-Linux in this tutorial, since I don't recommend Windows for all this, who knows what problems you will get into.
REQUIREMENTS:
1.Download these TWRP recoveries in accordance with your screen resolution.
A. If your screen resolution is 480x850, 480x854; download
https://twrp.me/lg/lgnexus4.html
B. If your screen resolution is 720x1280, 800x1280 or 720xsomething; download
https://twrp.me/asus/asusnexus720123g.html
C. If your screen resolution is 1080x1920, download
https://twrp.me/motorola/motorolanexus6.html
2. Download Android Image Kitchen-Linux from this thread:
https://forum.xda-developers.com/showthread.php?t=2073775
LET'S BEGIN:
1. Unzip Android Image Kitchen zip file.
3. Now, navigate to the unzipped folder of AIK (Android Image Kitchen).
4. Just Right Click and select "Open Terminal here".
5. Copy and paste your stock recovery.img and paste it in AIK folder.
6. In the terminal, type the command
Code:
su
Enter your root password, then type
Code:
./unpackimg.sh
7. This will unpack your stock recovery.img. Do not close the terminal.
8. Cut the new folders, ramdisk and split_img, and paste them somewhere outside of AIK folder.
9. Remove the stock recovery.img in AIK folder.
10. Now, copy and paste the twrp_recovery.img according to your screen resolution in the AIK folder.
11. Now, revert back to the terminal and type
Code:
./unpackimg.sh
12. This will unpack your twrp_recovery.img
13. Delete all the files in the new split_img folder we got by unpackimg twrp_recovery.img
14. Copy and paste all the files in stock split_img folder to the new split_img folder.
15. Delete following files from new ramdisk folder.
A. default.prop
B. fstab.devicename_or_chipsetname
C. ueventd.rc
D. Any other file like ueventd.devicename.rc
16. Copy and paste these files from stock ramdisk folder to new ramdisk folder.
Code:
default.prop
fstab.devicename
ueventd.rc
17. Now go into stock ramdisk/etc folder and copy recovery.fstab
18. Paste the recovery.fstab file in new ramdisk/etc folder.
19. Edit the twrp.fstab file according to the newly pasted recovery.fstab
20. You will have to replace"/sdcard" with "/external_sd" and "/usb" with "/usb-otg".
21. If the partitions stated above are not available in your fstab files then add these lines. Order may change on the format in which the files are written.
Code:
/external_sd vfat /dev/block/mmcblk1p1 flags=removable;storage;display="SDCARD"
/usb-otg auto /dev/block/sda1 flags=removable;storage;display="USB-OTG"
22. Edit the following lines as shown in default.prop
Code:
ro.secure=0
ro.adb.secure=0
security.perf_harden=0
ro.debuggable=1
persist.sys.usb.config=adb,mtp
23. Now, come out of the ramdisk folder and open the terminal.
24. Type
Code:
./repackimg.sh
25. Your new TWRP img would be generated and named as image-new.img by default. You may change the name later.
When you have successfully built the TWRP, or if you want to request one instead of creating yourself, contact me on this thread:
https://forum.xda-developers.com/android/general/unofficial-twrps-devices-source-code-t3833338
SPECIAL INSTRUCTIONS FOR MEDIATEK DEVICES:
1. The recovery.fstab you will get after unpacking your stock recovery.img would be flawed in most cases. I believe OEMs do this deliberately.
2. In order to know which partition is mounted at which location and at which device, you'll need DiskInfo (Install it from Play Store) and a root explorer.
3. Enable the following Diskinfo settings:
Code:
Show mount path
Show partition name
Show file system
Expert mode
Unmounted partitions
Device Mapper partitions
Temporary filesystems
4. Use the root explorer to find the path of your partitions. They would be located under /dev (mtk devices have bootimg and recovery here generally) and some other partitions like /system, /cache would be deeper inside.
5. You can trace their exact locations by navigating within the /dev directory for partition names like mmcblk0p5.
SPECIAL INSTRUCTIONS FOR DEVICES THAT DON'T HAVE RECOVERY.FSTAB WITHIN STOCK RECOVERY.IMG
1. In the ramdisk/etc folder, there might be a dummy recovery.fstab file with the symbol of link on it.
2. Right click on the file and select "Show Target". You'll get to know the path of original recovery.fstab file. It might be within the unpacked recovery or inside some other partition on your phone.
For example: Honor 7C devices have their recovery.fstab in /vendor/etc folder.
TROUBLESHOOTING INSTRUCTIONS:
1. If you get a dm-verity error or facing an encryption problem, go to this thread and flash the "dm-verity and forceencrypt disabler zip".
https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389
2. If you encounter a bootloop while booting into your new TWRP, please consult post #20 of this thread.
3. At times, the path of partitions during recovery boot is not the same as those during normal boot. That's why you may get errors like
Code:
Updating partitions details...
Failed to mount '/cache' (Invalid argument)
Failed to mount '/system' (Invalid argument)
Failed to mount '/data' (Invalid argument)
Failed to mount '/metadata' (Invalid argument)
...done
Unable to mount storage
Failed to mount '/data' (Invalid argument)
To resolve this, in your TWRP terminal type the following command
Code:
find /dev/block -name by-name
Replace the paths of the partitions in your fstab files with the ones you get as output using the command above (only the partitions which failed to mount).
If there are some bugs or you need some assistance in porting TWRP, contact me by mentioning in your post, for example @Augustoandro, we'll work on it to make it bug-free.
Special thanks to @aIecxs for his troubleshooting instructions of bootloop, "Failed to mount /partition_name (invalid argument)" error and also @inguna for guiding me on how to fix the "SDCARD not detected by the TWRP" problem and also fixing the MTP, ADB not working issue.
Another thanks to @seanybiker and @avirus for their troubleshooting instructions on "DM-Verity and forceencrypt" errors.
CREDITS:
@HostZero for his porting guide.
@osm0sis for his awesome Android Image Kitchen
@Zackptg5 for his "DM-Verity and Forceencrypt disabler zip".
Augustoandro said:
Yes, I know XDA is filled with such guides.
But you can only port a TWRP if you implement parts of all the guides.
This guide is a summation of all those guides.
NOTE:
I would be using AIK-Linux in this tutorial, since I don't recommend Windows for all this, who knows what problems you will get into.
REQUIREMENTS:
1.Download these TWRP recoveries in accordance with your screen resolution.
A. If your screen resolution is 480x850, 480x854; download
https://twrp.me/devices/lgnexus4.html
B. If your screen resolution is 720x1280, 800x1280 or 720xsomething; download
https://twrp.me/devices/asusnexus720123g.html
C. If your screen resolution is 1080x1920, download
https://twrp.me/devices/motorolanexus6.html
2. Download Android Image Kitchen-Linux from this thread:
https://forum.xda-developers.com/showthread.php?t=2073775
LET'S BEGIN:
1. Unzip Android Image Kitchen zip file.
3. Now, navigate to the unzipped folder of AIK (Android Image Kitchen).
4. Just Right Click and select "Open Terminal here".
5. Copy and paste your stock recovery.img and paste it in AIK folder.
6. In the terminal, type
Code:
./unpackimg.sh
7. This will unpack your stock recovery.img. Do not close the terminal.
8. Cut the new folders, ramdisk and split_img, and paste them somewhere outside of AIK folder.
9. Remove the stock recovery.img in AIK folder.
10. Now, copy and paste the twrp_recovery.img according to your screen resolution in the AIK folder.
11. Now, revert back to the terminal and type
Code:
./unpackimg.sh
12. This will unpack your twrp_recovery.img
13. Delete all the files in the new split_img folder we got by unpackimg twrp_recovery.img
14. Copy and paste all the files in stock split_img folder to the new split_img folder.
15. Delete following files from new ramdisk folder.
A. default.prop
B. fstab.devicename_or_chipsetname
C. ueventd.rc
D. Any other file like ueventd.devicename.rc
16. Copy and paste these files from stock ramdisk folder to new ramdisk folder.
A. default.prop
B. fstab.devicename
C. ueventd.rc
17. Now go into stock ramdisk/etc folder and copy recovery.fstab
18. Paste the recovery.fstab file in new ramdisk/etc folder.
19. Edit the twrp.fstab file according to the newly pasted recovery.fstab
20. You will have to replace"/sdcard" with "/external_sd" and "/usb" with "/usb-otg".
21. If the partitions stated above are not available in your fstab files then add these lines. Order may change on the format in which the files are written.
Code:
/external_sd vfat /dev/block/mmcblk1p1 flags=removable;storage;display="SDCARD"
/usb-otg auto /dev/block/sda1 flags=removable;storage;display="USB-OTG"
22. Edit the following lines as shown in default.prop
Code:
ro.secure=0
ro.adb.secure=0
security.perf_harden=0
ro.debuggable=1
persist.sys.usb.config=adb,mtp
23. Now, come out of the ramdisk folder and open the terminal.
24. Type
Code:
./repackimg.sh
25. Your new TWRP img would be generated and named as image-new.img by default. You may change the name later.
When you have successfully built the TWRP, contact me on this thread:
https://forum.xda-developers.com/android/general/unofficial-twrps-devices-source-code-t3833338
SPECIAL INSTRUCTIONS FOR MEDIATEK DEVICES:
1. The recovery.fstab you will get after unpacking your stock recovery.img would be flawed in most cases. I believe OEMs do this deliberately.
2. In order to know which partition is mounted at which location and at which device, you'll need DiskInfo (Install it from Play Store) and a root explorer.
3. Change the Diskinfo settings like this
https://mega.nz/#!fbIR0AoD!ykRMTAitymE4bQMVc6S0qbCYztTkVZDZSgIKcVTxEHg
https://mega.nz/#!yXQzwKJK!rWO_LiKZwFjzw4ZyM0qzzKw6uopxrxAkSkKNRYXVuIY
4. Use the root explorer to find the path of your partitions. They would be located under /dev (mtk devices have bootimg and recovery here generally) and some other partitions like /system, /cache would be deeper inside.
5. You can trace their exact locations by navigating within the /dev directory for partition names like mmcblk0p5.
SPECIAL INSTRUCTIONS FOR DEVICES THAT DON'T HAVE RECOVERY.FSTAB WITHIN STOCK RECOVERY.IMG
1. In the ramdisk/etc folder, there might be a dummy recovery.fstab file with the symbol of link on it.
2. Right click on the file and select "Show Target". You'll get to know the path of original recovery.fstab file. It might be within the unpacked recovery or inside some other partition on your phone.
For example: Honor 7C devices have their recovery.fstab in /vendor/etc folder.
If it works perfectly, I will make it available to others through my thread.
If there are some bugs or you need some assistance in porting TWRP, contact me all the same, we'll work on it to make it bug-free.
CREDITS:
HostZero for his porting guide.
Osm0sis for his awesome Android Image Kitchen
Click to expand...
Click to collapse
I tried all these type op method but didnt work on my android.
Please help.
It alway on bootloop and restart normaly
Sent from my Titanium Vista 4G using Tapatalk
SachinBorkar said:
I tried all these type op method but didnt work on my android.
Please help.
It alway on bootloop and restart normaly
Click to expand...
Click to collapse
Tell me what happened in detail.
Which files you transferred?
Did terminal show you any errors upon running the commands?
It would be better if you did everything using root account.
Btw, you should give executing permissions to all files inside AIK-Linux/bin
No error occurs during packing and unpacking but.
After flash recovery.img phones stuck on bootloop.
Sent from my Titanium Vista 4G using Tapatalk
---------- Post added at 02:59 PM ---------- Previous post was at 02:44 PM ----------
Augustoandro said:
Tell me what happened in detail.
Which files you transferred?
Did terminal show you any errors upon running the commands?
It would be better if you did everything using root account.
Btw, you should give executing permissions to all files inside AIK-Linux/bin
Click to expand...
Click to collapse
No error occurs but after flash recovery.img
Phone stuck on boot.
Here is my stock recovery and important files please port
My recovery
https://drive.google.com/file/d/1SkLx_th8esVi1URWs8-16xv6A9dOF-Bi/view?usp=drivesdk
Sent from my Titanium Vista 4G using Tapatalk
SachinBorkar said:
No error occurs during packing and unpacking but.
After flash recovery.img phones stuck on bootloop.
Sent from my Titanium Vista 4G using Tapatalk
---------- Post added at 02:59 PM ---------- Previous post was at 02:44 PM ----------
No error occurs but after flash recovery.img
Phone stuck on boot.
Here is my stock recovery and important files please port
My recovery
https://drive.google.com/file/d/1SkLx_th8esVi1URWs8-16xv6A9dOF-Bi/view?usp=drivesdk
Click to expand...
Click to collapse
You already requested on my another thread.
Augustoandro said:
You already requested on my another thread.
Click to expand...
Click to collapse
Thanks for replay I am working to create it.
But i also request that you have experience so you may help.
I am not going to request again sorry.
I will wait.
And also i try my best.
Thanks.
Sent from my Titanium Vista 4G using Tapatalk
Another great thread from op...
Thanks a lot @Augustoandro! IMHO this is by far the easiest guide for porting TWRP to unsupported devices. Keep it up!
Augustoandro said:
Yes, I know XDA is filled with such guides.
But you can only port a TWRP if you implement parts of all the guides.
This guide is a summation of all those guides.
NOTE:
I would be using AIK-Linux in this tutorial, since I don't recommend Windows for all this, who knows what problems you will get into.
REQUIREMENTS:
1.Download these TWRP recoveries in accordance with your screen resolution.
A. If your screen resolution is 480x850, 480x854; download
https://twrp.me/devices/lgnexus4.html
B. If your screen resolution is 720x1280, 800x1280 or 720xsomething; download
https://twrp.me/devices/asusnexus720123g.html
C. If your screen resolution is 1080x1920, download
https://twrp.me/devices/motorolanexus6.html
2. Download Android Image Kitchen-Linux from this thread:
https://forum.xda-developers.com/showthread.php?t=2073775
LET'S BEGIN:
1. Unzip Android Image Kitchen zip file.
3. Now, navigate to the unzipped folder of AIK (Android Image Kitchen).
4. Just Right Click and select "Open Terminal here".
5. Copy and paste your stock recovery.img and paste it in AIK folder.
6. In the terminal, type the command
Code:
su
Enter your root password, then type
Code:
./unpackimg.sh
7. This will unpack your stock recovery.img. Do not close the terminal.
8. Cut the new folders, ramdisk and split_img, and paste them somewhere outside of AIK folder.
9. Remove the stock recovery.img in AIK folder.
10. Now, copy and paste the twrp_recovery.img according to your screen resolution in the AIK folder.
11. Now, revert back to the terminal and type
Code:
./unpackimg.sh
12. This will unpack your twrp_recovery.img
13. Delete all the files in the new split_img folder we got by unpackimg twrp_recovery.img
14. Copy and paste all the files in stock split_img folder to the new split_img folder.
15. Delete following files from new ramdisk folder.
A. default.prop
B. fstab.devicename_or_chipsetname
C. ueventd.rc
D. Any other file like ueventd.devicename.rc
16. Copy and paste these files from stock ramdisk folder to new ramdisk folder.
A. default.prop
B. fstab.devicename
C. ueventd.rc
17. Now go into stock ramdisk/etc folder and copy recovery.fstab
18. Paste the recovery.fstab file in new ramdisk/etc folder.
19. Edit the twrp.fstab file according to the newly pasted recovery.fstab
20. You will have to replace"/sdcard" with "/external_sd" and "/usb" with "/usb-otg".
21. If the partitions stated above are not available in your fstab files then add these lines. Order may change on the format in which the files are written.
Code:
/external_sd vfat /dev/block/mmcblk1p1 flags=removable;storage;display="SDCARD"
/usb-otg auto /dev/block/sda1 flags=removable;storage;display="USB-OTG"
22. Edit the following lines as shown in default.prop
Code:
ro.secure=0
ro.adb.secure=0
security.perf_harden=0
ro.debuggable=1
persist.sys.usb.config=adb,mtp
23. Now, come out of the ramdisk folder and open the terminal.
24. Type
Code:
./repackimg.sh
25. Your new TWRP img would be generated and named as image-new.img by default. You may change the name later.
When you have successfully built the TWRP, or if you want to request one instead of creating yourself, contact me on this thread:
https://forum.xda-developers.com/android/general/unofficial-twrps-devices-source-code-t3833338
SPECIAL INSTRUCTIONS FOR MEDIATEK DEVICES:
1. The recovery.fstab you will get after unpacking your stock recovery.img would be flawed in most cases. I believe OEMs do this deliberately.
2. In order to know which partition is mounted at which location and at which device, you'll need DiskInfo (Install it from Play Store) and a root explorer.
3. Change the Diskinfo settings like this
https://mega.nz/#!fbIR0AoD!ykRMTAitymE4bQMVc6S0qbCYztTkVZDZSgIKcVTxEHg
https://mega.nz/#!yXQzwKJK!rWO_LiKZwFjzw4ZyM0qzzKw6uopxrxAkSkKNRYXVuIY
4. Use the root explorer to find the path of your partitions. They would be located under /dev (mtk devices have bootimg and recovery here generally) and some other partitions like /system, /cache would be deeper inside.
5. You can trace their exact locations by navigating within the /dev directory for partition names like mmcblk0p5.
SPECIAL INSTRUCTIONS FOR DEVICES THAT DON'T HAVE RECOVERY.FSTAB WITHIN STOCK RECOVERY.IMG
1. In the ramdisk/etc folder, there might be a dummy recovery.fstab file with the symbol of link on it.
2. Right click on the file and select "Show Target". You'll get to know the path of original recovery.fstab file. It might be within the unpacked recovery or inside some other partition on your phone.
For example: Honor 7C devices have their recovery.fstab in /vendor/etc folder.
If it works perfectly, I will make it available to others through my thread.
If there are some bugs or you need some assistance in porting TWRP, contact me all the same, we'll work on it to make it bug-free.
CREDITS:
HostZero for his porting guide.
Osm0sis for his awesome Android Image Kitchen
Click to expand...
Click to collapse
Pls brother help me port twrp for my device. Here is my stock recovery image link : https://drive.google.com/file/d/1dqBU4f0ZXK8Ot0V9t-4Tw6f_60UHg7ca/view?usp=drivesdk.
My phone's resolution : 720 x 1280 pixel.
Deeni131 said:
Pls brother help me port twrp for my device. Here is my stock recovery image link : https://drive.google.com/file/d/1dqBU4f0ZXK8Ot0V9t-4Tw6f_60UHg7ca/view?usp=drivesdk.
My phone's resolution : 720 x 1280 pixel.
Click to expand...
Click to collapse
This is not a TWRP request thread. I have included a link in the guide which takes you to a TWRP request thread. Post your request over there.
HIT THANKS IF FOUND USEFUL
Hi I tried to Port a Recovery for my H96 Max RK3399 TV Box .
I used TWRP From My RK3328 TVBox.
I can Boot in Recovery, but its not Mounting any Partition (everywhere 0MB)
I Think the problem is in .Fstab File but I am Not sure.
I would appreciate help
Sorry for my poor English
Leone_1 said:
Hi I tried to Port a Recovery for my H96 Max RK3399 TV Box .
I used TWRP From My RK3328 TVBox.
I can Boot in Recovery, but its not Mounting any Partition (everywhere 0MB)
I Think the problem is in .Fstab File but I am Not sure.
I would appreciate help
Sorry for my poor English
Click to expand...
Click to collapse
Partitions not being recognized means the problem is in fstab files. Both recovery.fstab and twrp.fstab need to be edited.
I am sure of it.
HIT THANKS IF FOUND USEFUL
Hi,
I have an unofficial TWRP For my phone (Moto G5s+) but it's broken (It mounts system partitions even in read-only mode breaking things, and the current TWRP devs for the devices won't fix it). If I follow your guide and unpack one of these TWRP, I should be able to edit it to leave certain partitions Read Only, right?
pizzaboy192 said:
Hi,
I have an unofficial TWRP For my phone (Moto G5s+) but it's broken (It mounts system partitions even in read-only mode breaking things, and the current TWRP devs for the devices won't fix it). If I follow your guide and unpack one of these TWRP, I should be able to edit it to leave certain partitions Read Only, right?
Click to expand...
Click to collapse
You have to edit the fstab files for that, look for them in ramdisk/etc folder when you unpack the recovery.
HIT THANKS IF FOUND USEFUL
Augustoandro said:
Partitions not being recognized means the problem is in fstab files. Both recovery.fstab and twrp.fstab need to be edited.
I am sure of it.
HIT THANKS IF FOUND USEFUL
Click to expand...
Click to collapse
thanks for reply.
must be in the fstab TWRP/Stock the identical partitions?
or this only in TWRP.fstab?
Leone_1 said:
thanks for reply.
must be in the fstab TWRP/Stock the identical partitions?
or this only in TWRP.fstab?
Click to expand...
Click to collapse
What are you trying to ask?
HIT THANKS IF FOUND USEFUL
Augustoandro said:
Partitions not being recognized means the problem is in fstab files. Both recovery.fstab and twrp.fstab need to be edited.
I am sure of it.
HIT THANKS IF FOUND USEFUL
Click to expand...
Click to collapse
Augustoandro said:
What are you trying to ask?
HIT THANKS IF FOUND USEFUL
Click to expand...
Click to collapse
must be in the fstab TWRP/Stock the identical partitions?
or this
"/external_sd vfat /dev/block/mmcblk1p1 flags=removable;storage;display="SDCARD"
/usb-otg auto /dev/block/sda1 flags=removable;storage;display="USB-OTG"
only in TWRP.fstab?
Augustoandro said:
You have to edit the fstab files for that, look for them in ramdisk/etc folder when you unpack the recovery.
HIT THANKS IF FOUND USEFUL
Click to expand...
Click to collapse
Found exactly what I needed. Thanks! I've passed this info up to the other devs too since they didn't feel like digging into it.
Leone_1 said:
must be in the fstab TWRP/Stock the identical partitions?
or this
"/external_sd vfat /dev/block/mmcblk1p1 flags=removable;storage;display="SDCARD"
/usb-otg auto /dev/block/sda1 flags=removable;storage;display="USB-OTG"
only in TWRP.fstab?
Click to expand...
Click to collapse
twrp.fstab and recovery.fstab should be identical, so all you have to do is copy and paste the contents of one into the other after rectifying whatever is wrong with them.
HIT THANKS IF FOUND USEFUL
to all people who experience boot loop on TWRP splash screen:
Code:
adb shell
df
you will figure out which mount point is crashing. fix it in fstab. you may have a look in /cache/recovery/last_log too
for me the reason was vold mounts, i simply deleted two lines (yes, its /devices instead of /sys/devices i don't know if it is a bug, its from stock boot.img)
Code:
/devices/mtk-msdc.0/11120000.msdc0* auto vfat defaults voldmanaged=sdcard0:auto
/devices/mtk-msdc.0/11130000.msdc1* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
if touch screen is not working, you can still use touch screen when booted from fastboot (unfortunately no fix, yet):
Code:
fastboot boot <twrp.img>

Categories

Resources