How to edit the /sbin/.magisk/config file to do seamless OTA with Magisk - Moto G6 Play Guides, News, & Discussion

After rooting with Magisk, users of Moto G6 are faced with the “Stock Rom does not exist” error at the Restore Images step of Magisk’s OTA Upgrade Guide. However, the following suggestion was made in the discussion following issue #1870 on Magisk’s git-page:
The backups should be kept in /data (/data/stock_boot_<hash>.img.gz)
You could probably edit /sbin/.magisk/config to point to the backup you want by putting your <hash> after SHA1=
Click to expand...
Click to collapse
With Solid Explorer, I found different directories called /data in Root and in Internal Memory, but only the one in Root had a ./data/ subdirectory. Is that the one to which I should download the stock rom
ALI_RETAIL_9.0_PPSS29.118-15-11-9_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip
which was posted in March, before the latest OTA release? Do I extract this zip, create an img.gz file from the .xml file and rename it stock_boot_<hash> before putting it there? Is <hash> blank-notation for any name that I give it, and which I then add after the “SHA1=” in /sbin/.magisk/config?
Finally, how do I edit the config file? I was able to get to it with Solid Explorer after checking the option to show hidden files in /sbin/. However, I couldn’t send this file to my computer by sharing it through email or messaging apps, as they all denied sending it. Apparently, it’s being blocked by anti-viruses. In this case, is there a safe way to transfer it to a computer, where I’ll be able to more comfortably edit it? Alternatively, if I just omit <hash> in naming stock_boot_.img.gz, can I leave config the way it is?
Best regards!

Related

Android question

I've been searching and searching and really couldn't find a clear answer.
I flashed my phone using method 1 as described in this thread http://forum.xda-developers.com/showthread.php?t=593786
Now I am seeing this other I guess they are android releases like http://forum.xda-developers.com/showthread.php?t=591104
They post these sqsh files. I already got my phone flashed and running Android is there a way I can upgrade or do whatever I need to do to use the sqsh file in the link I mentioned above? I can't find any clear instructions on how to do this really.
Thanks!
Yes, put the system.sqsh file on your SD card, and create a file called 'systemtonand', when you reboot, the bootloader should pick up that you want to transfer the file and do it automatically.
you may want to add blank file "cleardata" to delete your current data file to prevent conflicts (some system files store items in the data file that may not agree with another system file). there is a cache that, alternatively, can be cleared to avoid deleting your data file, have not tried this, another use posted it but I don't recall which thread.

[Q] Fix DNS Facebook, we need an developer to help

Hi everybody.
I'm come from Vietnam, where the Facebook is now banned.
We need someone to write a program to update the host file in /system/etc/ by just a touch.
Please copy the IP from http://armabloggin.com/2009/07/facebook-dns-block-fix/
to the host file (like AdFree program).
We cannot edit this file by Astro because it read-only. We don't know how to S-OFF our Android.
Thank you so much.
I thought that AdFree is for rooted phones only.
Here's the host file
I've modified the host file for you but I don't think you can get much further until you root your phone, giving yourself access to system/etc/ where the "hosts" file is for replacement.
Remove the .txt extension and replace it with your hosts file in /system/etc/ after rooting.
If your phone cannot be rooted at http://unrevoked.com/ have a look on the sub forum here for your phone.
As previously stated, changing any system file is impossible without root.
Why can't you use a one-click-rooting program? There are plenty around that work for quite a lot of phones. If that doesn't work there will be device specific guides available, unless it's a phone that can't be rooted (is there any?).
Sorry, I've already root the HTC Desire by Unrevoked.com and have RA-recovery.
I mean that I don't have S-OFF in my device.
I also used Astro to copy the host file to SD Card and edited it. But I cannot replace the host file to system/etc/.
So I need you help write a mini-soft like AdFree.
Have you tried using adb to push the hosts file (in recovery) or root explorer? No need to S-OFF.
I think a soft will easy to use for everyone, don't need experiment in adb, root or s-off.
Anyone developer can make it easy?
Sent from my HTC Desire using Tapatalk
I think the problem is that you didn't mounted the system partition. Try ES FileExplorer, it can work as root and can mount partitions
Sent from my GT-I5700 using XDA Premium App
Hi,I am vietnamese too,if you can't root your phone you can follow the full instruction on tinhte.vn forum.
I whipped this up for you.
It doesn't look great but it does the job. Put the 'hosts' file on your sdcard (not in any folder) that you want to move and rename it 'hosts.txt'. Then run the app and press the button. You'll probably need to reboot afterwards.
Enjoy.
This doesn't back up the hosts file on your phone so you may want to do that manually.
[YOU NEED ROOT ACCESS]
Thank you so much.
Meltus said:
I whipped this up for you.
It doesn't look great but it does the job. Put the 'hosts' file on your sdcard (not in any folder) that you want to move and rename it 'hosts.txt'. Then run the app and press the button. You'll probably need to reboot afterwards.
Enjoy.
This doesn't back up the hosts file on your phone so you may want to do that manually.
[YOU NEED ROOT ACCESS]
Click to expand...
Click to collapse
Dear Meltus,
Firstly, I thank you very much to write this apk for me. You're so kind.
But it's maybe something wrong!
I install your apk, put the hosts.txt in SDCard (in the root, not in any folder).
Then run the app and press the button, reboot afterwards.
I used Astro to view the hosts file. But this file is error. It has 0 byte and can be read.
Please fix it. Thank you so much, again.
P/S: Maybe you make an options to chose folder of hosts file.
Further, you can develop this apk to change any file of system by chose the source and destiny paths.

[GUIDE] How to easily edit/modify .apk files! (Simple, Noob Friendly)

Hey Guys an' Girls!
Anyway, so when I first learnt how to decompile, modify then recompile .apks I found it was a rather slow process and figured out a far faster way.I searched google and xda many times and couldn't find my method anywhere. So without further ado, let's go through an easy, simple, step by step guide on how to modify .apk files!
Step 1 - Getting the .apk
Firstly, of course, you will need to obtain the .apk file that you want to edit. There are two methods to do this:
a) If you have the recovery flashable zip for the rom you are currently on, simply open it up, navigate to the file you want to edit (in my case system -> app -> settings.apk) and drag the .apk file onto your desktop.
b) Using root browser or a similar app on your device, navigate to the .apk you wish to edit and copy it onto your sdcard. Then connect to your computer and copy the file from your phone to the computer.
Step 2 - Editing/Modifying your .apk
Now is the important part. Install Winrar by clicking the link. http://www.win-rar.com/download.html?&L=0 Then open the .apk by right clicking the file -> open with -> WinRar. Now you can look around the .apk file. Find a file inside the .apk you wish to edit. (In my case I'm going to navigate to res -> mipmap-hdpi -> ic_launcher_settings.png). Just drag the file from the .apk and edit to your liking.
NOTE: It is recommended never to completely take everything out of the .apk and then put it all back in. Just do one file at a time.
Then when your finished, select the old file in the .apk and press the delete button. Now drag in the new edited file into where you found it. Easy!
Step 3 - Putting the new .apk back where it belongs
Now of course, your going to have to put it back on your device to see the changes in effect, there's no point having it on your computer! There are two ways to go about this:
a) Open up your rom and navigate to the place where you took your .apk file from. Click on the old .apk file and press the delete button. Now drag your new edited .apk file into the zip. Then connect your device to your computer and drag the rom onto the sdcard and flash it via recovery. Now reboot the system and see your change/s in effect!
b) Copy your new .apk file from your computer to your device. Then, using Root browser or a similar app, navigate to the old .apk file and look at the permisions. (eg. RW--r--) Now delete the old file and replace with the new, but make sure to set the permissions the same as they were before. Now Simply reboot and see your change/s in effect!
NOTE: For some .apk files (eg. Framework-res.apk) there might be missing folders inside the .apk (eg. Values).
Just hit the thanks button, he doesn't bite your finger!
This is an easy way to edit the images only(icons,wallpaper,etc),not XML files,Smali's and such.I do this using the kitchen,easy way if you theme alot.
Diablo67 said:
This is an easy way to edit the images only(icons,wallpaper,etc),not XML files,Smali's and such.I do this using the kitchen,easy way if you theme alot.
Click to expand...
Click to collapse
You don't have to use this guide just for images. That was just the example. You can use it for almost any file inside an .apk. I was just saying that SOME folders aren't there.
Can you guide me to how do i keep same apps of diff versions.
i tried to modify a 3rd party app e.g whatsapp and when i tried installing i got an error which said "the app is not signed", may u kindly assist!
tendyfish said:
i tried to modify a 3rd party app e.g whatsapp and when i tried installing i got an error which said "the app is not signed", may u kindly assist!
Click to expand...
Click to collapse
You also have this tool
Easy Apk Dissassembler
http://forum.xda-developers.com/showthread.php?p=14049173
How do I use a flashable to get rid of .apks??? ₩
On the app I have here it returns 20 results that it scrapes from a website. I only want it to return 3 or 4. How do I get in there and change that value?
I want to change values on touchwiz launcher on my note 3, to use it in 440 dpi. When I use it there is so much margin on all sides, and I need to reduce. I need to add a new icon row as well. Can I do that just by modifying the app?
Sent from my GT-I9505 using Tapatalk
are the .xml files encrypted or something? when i try to edit them, it is a bunch of strange characters
Hi,
I would like to modify the tinychat.apk so that i can find how to change my device info/platform from android to something else, like pc or whatever. I dont want to be identified as using an android device. Is this possible?
Regards.
ksaul said:
are the .xml files encrypted or something? when i try to edit them, it is a bunch of strange characters
Click to expand...
Click to collapse
Yes, depending on what tool you use to decompile the apk files it may or may not decrypt them. I use apktool and it decrypts them just fine.
I think this method is no longer working for 4.3+
Modify JAR files
littlejoelgriffo said:
Hey Guys an' Girls!
Anyway, so when I first learnt how to decompile, modify then recompile .apks I found it was a rather slow process and figured out a far faster way.I searched google and xda many times and couldn't find my method anywhere. So without further ado, let's go through an easy, simple, step by step guide on how to modify .apk files!
Step 1 - Getting the .apk
Firstly, of course, you will need to obtain the .apk file that you want to edit. There are two methods to do this:
a) If you have the recovery flashable zip for the rom you are currently on, simply open it up, navigate to the file you want to edit (in my case system -> app -> settings.apk) and drag the .apk file onto your desktop.
b) Using root browser or a similar app on your device, navigate to the .apk you wish to edit and copy it onto your sdcard. Then connect to your computer and copy the file from your phone to the computer.
Step 2 - Editing/Modifying your .apk
Now is the important part. Install Winrar by clicking the link. http://www.win-rar.com/download.html?&L=0 Then open the .apk by right clicking the file -> open with -> WinRar. Now you can look around the .apk file. Find a file inside the .apk you wish to edit. (In my case I'm going to navigate to res -> mipmap-hdpi -> ic_launcher_settings.png). Just drag the file from the .apk and edit to your liking.
NOTE: It is recommended never to completely take everything out of the .apk and then put it all back in. Just do one file at a time.
Then when your finished, select the old file in the .apk and press the delete button. Now drag in the new edited file into where you found it. Easy!
Step 3 - Putting the new .apk back where it belongs
Now of course, your going to have to put it back on your device to see the changes in effect, there's no point having it on your computer! There are two ways to go about this:
a) Open up your rom and navigate to the place where you took your .apk file from. Click on the old .apk file and press the delete button. Now drag your new edited .apk file into the zip. Then connect your device to your computer and drag the rom onto the sdcard and flash it via recovery. Now reboot the system and see your change/s in effect!
b) Copy your new .apk file from your computer to your device. Then, using Root browser or a similar app, navigate to the old .apk file and look at the permisions. (eg. RW--r--) Now delete the old file and replace with the new, but make sure to set the permissions the same as they were before. Now Simply reboot and see your change/s in effect!
NOTE: For some .apk files (eg. Framework-res.apk) there might be missing folders inside the .apk (eg. Values).
Click to expand...
Click to collapse
That's very helpful thank you for sharing. Is there a way to modify JAR files the same way?
gilbertgk said:
That's very helpful thank you for sharing. Is there a way to modify JAR files the same way?
Click to expand...
Click to collapse
rename the jar to apk..after done,rename it back to jar
zamzameir said:
rename the jar to apk..after done,rename it back to jar
Click to expand...
Click to collapse
Can this work on my note 3 4.3 not rooted?
gilbertgk said:
Can this work on my note 3 4.3 not rooted?
Click to expand...
Click to collapse
idk..but you can try n report back
littlejoelgriffo said:
Hey Guys an' Girls!
Anyway, so when I first learnt how to decompile, modify then recompile .apks I found it was a rather slow process and figured out a far faster way.I searched google and xda many times and couldn't find my method anywhere. So without further ado, let's go through an easy, simple, step by step guide on how to modify .apk files!
Step 1 - Getting the .apk
Firstly, of course, you will need to obtain the .apk file that you want to edit. There are two methods to do this:
a) If you have the recovery flashable zip for the rom you are currently on, simply open it up, navigate to the file you want to edit (in my case system -> app -> settings.apk) and drag the .apk file onto your desktop.
b) Using root browser or a similar app on your device, navigate to the .apk you wish to edit and copy it onto your sdcard. Then connect to your computer and copy the file from your phone to the computer.
Step 2 - Editing/Modifying your .apk
Now is the important part. Install Winrar by clicking the link. http://www.win-rar.com/download.html?&L=0 Then open the .apk by right clicking the file -> open with -> WinRar. Now you can look around the .apk file. Find a file inside the .apk you wish to edit. (In my case I'm going to navigate to res -> mipmap-hdpi -> ic_launcher_settings.png). Just drag the file from the .apk and edit to your liking.
NOTE: It is recommended never to completely take everything out of the .apk and then put it all back in. Just do one file at a time.
Then when your finished, select the old file in the .apk and press the delete button. Now drag in the new edited file into where you found it. Easy!
Step 3 - Putting the new .apk back where it belongs
Now of course, your going to have to put it back on your device to see the changes in effect, there's no point having it on your computer! There are two ways to go about this:
a) Open up your rom and navigate to the place where you took your .apk file from. Click on the old .apk file and press the delete button. Now drag your new edited .apk file into the zip. Then connect your device to your computer and drag the rom onto the sdcard and flash it via recovery. Now reboot the system and see your change/s in effect!
b) Copy your new .apk file from your computer to your device. Then, using Root browser or a similar app, navigate to the old .apk file and look at the permisions. (eg. RW--r--) Now delete the old file and replace with the new, but make sure to set the permissions the same as they were before. Now Simply reboot and see your change/s in effect!
NOTE: For some .apk files (eg. Framework-res.apk) there might be missing folders inside the .apk (eg. Values).
Click to expand...
Click to collapse
Thnax for great guide but,my gopro app has a update and I have changed the icon on it but the app store dosent show me the update button. How to fix so I can update?
What do I need to change in an app to substitute it for another app?
OK so I've installed a new ROM and it comes with a kernel setting app preinstalled. This app has been integrated into the system settings portion of the ROM. I want to replace this kernel settings app with one of my choice but I want to be able to integrate it into the system settings like the original app is. I tried disguising the new app by changing the name of the app and .apk files but that didn't work. Closest I got was being able to convert my app to system app but even though I changed the name, the app, when installed goes back to it's original name. Or what permissions or files do I need to change to allow the integration of my app into the settings interface. Thanks ahead of time, it's appreciated.

[GUIDE] To change the Truecaller dialer to stock Android dialer in 5.1.1 on Yureka

One of the main drawbacks of 5.1.1 update on Yureka was that the stock dialer had been replaced by Truecaller dialer. I, for one, liked the original dialer a lot. It had dynamic speed dial tiles which changed according to how much you called, which is probably one of the best features. Also, there's privacy issues associated with Truecaller dialer, if you're into that sort of thing.
To change the dialer, we'll simply replace the phone UI components with blisspop components. Blisspop has stock Android dialer.
Also, this is my first guide, so if mods think this is not in appropriate section, please move it to proper section.
Prerequisites:
1. You should have Yureka [duh]. I don't know if this works on Yureka+. Maybe someone can test & tell me so that I can update this guide.
2. You should have write access to the root partition of your phone.
What is root partition you ask? Yureka has Internal memory [Sdcard0], External memory card [Sdcard1] & a third partition, root partition[/].
You can access this partition using any reputed file manager such as ES file Explorer, Solid Explorer, Root Explorer etc.
However ES, Solid etc. had problem writing files in my phone. I therefore went with Root Explorer which works flawlessly.
From hereon, I'll consider you are using Root Explorer. However using any other file manger will be similar.
The only caveat in using Root Explorer is that writing permission requires root access.
Steps:
1. Open Root Explorer. Tap "Mount R/W". Grant it the superuser permission when it asks. This puts the Root explorer in Write mode for root partition & we can now write or over-write files which we want.
2. Download the zip file from here & extract it somewhere on you phone.
3. In root partition [the one with symbol "/"], go to system-->app and replace or overwrite the InCallUINext folder with the folder which you have downloaded from the zip file. Make sure you have backed up the original folder which was previously present i.e copy it somewhere on phone memory just in case.
4. Then go to system-->priv-app and replace or overwrite the DialerNext folder with the folder from the zip. Again make sure you've backed it up.
5. That's it. Reboot the phone & you have the stock dialer.
Credits to @Sundara Prakash & also to @Vams for prodding me in the right direction.
Hit Thanks if you think this helped!

Unable to move Android 11 file to root folder (Magisk is installed)

Hey guys, just got my 8 Pro today, patched image and installed root
and confirmed root is working. downloaded oxygen 11 to download folder
and downloaded root explorer and gave it root permission. When I try to move the Oxygen 11 file to root
folder I get " The current file system is ready only. Do you wan to remount as read-write and continue"
I hit yes but then I get copy failed.
Any advice?
Thank you!
ShayMagen said:
Hey guys, just got my 8 Pro today, patched image and installed root
and confirmed root is working. downloaded oxygen 11 to download folder
and downloaded root explorer and gave it root permission. When I try to move the Oxygen 11 file to root
folder I get " The current file system is ready only. Do you wan to remount as read-write and continue"
I hit yes but then I get copy failed.
Any advice?
Thank you!
Click to expand...
Click to collapse
Depending on the folder you may not be able to modify system files..
Another chap was trying to edit a file in system, I don't believe you can do this with a conventional root explorer anymore. Should be able to copy it but changing that part of the system is not allowed.
You could make s magisk module to edit something, that should work.
dladz said:
Depending on the folder you may not be able to modify system files..
Another chap was trying to edit a file in system, I don't believe you can do this with a conventional root explorer anymore. Should be able to copy it but changing that part of the system is not allowed.
You could make s magisk module to edit something, that should work.
Click to expand...
Click to collapse
I'm just trying to out it in the root folder, following the instructions to do a local upgrade to oxygen 11. It's strange the others can do that local upgrade.. The instructions are even on oneplus site
ShayMagen1 said:
I'm just trying to out it in the root folder, following the instructions to do a local upgrade to oxygen 11. It's strange the others can do that local upgrade.. The instructions are even on oneplus site
Click to expand...
Click to collapse
You mean in the folder called sdcard.
That's where its meant to be..
You do not need to be rooted to install from local storage infact is best if you aren't.
dladz said:
You been in the folder called sdcard.
That's where its meant to be..
You do not need to be rooted to install from local storage infact is best if you aren't.
Click to expand...
Click to collapse
Thank for the tip, I was able to move the installation file and find it in the updater but I'm getting system update installation failed right at the start
Possible file corruption?
ShayMagen1 said:
Thank for the tip, I was able to move the installation file and find it in the updater but I'm getting system update installation failed right at the start
Click to expand...
Click to collapse
As @ShayMagen1 has said, it's more than likely borked.
Also are you rooted??
I have a guide you can follow in the guides section.
Sounds like your trying to put it in a System folder? You should Move the downloaded file to your Internal Storage (root directory)...
galaxys said:
Sounds like your trying to put it in a System folder? You should Move the downloaded file to your Internal Storage (root directory)...
Click to expand...
Click to collapse
Aye he has done that. But it's corrupt.
Needs to delete it and redownload.
dladz said:
Aye he has done that. But it's corrupt.
Needs to delete it and redownload.
Click to expand...
Click to collapse
Yup, had to redownload.. all good now..
Thanks!

Categories

Resources