How can I modify "ramdisk.img > init" file? - Android Q&A, Help & Troubleshooting

Hi, recently I've dual-booted my computer with Android & Windows 10. But the android rom has shown too much ads so I've deleted the files causing to show the ads from the "system.img" and also "ramdisk.img" (downloaded from internet) and replaced the files with the original ones. Now the ads are not showing but I had built-in root access with SupperSU which I've lost after replacing "ramdisk.img". So I've extracted the original and the downloaded "ramdisk.img" and found an "init" file which doesn't have any file extensions and the "init" file is differing in size between the original & downloaded "ramdisk.img". So I think this file may be the cause to revoke root access. So need to change the file.
Does anyone knows which type of file is the "init" file and how can I edit it?

Related

Extract *.apk?

If I have a *.apk that I download, is there anyway to backup/extract it?
The apk is really just a ZIP file. Try renaming the file to whatever.apk.zip and open using your favorite ZIP utility. You should be able to view all the contents. Resources (such as images) can be extracted. The java code is compiled into a .dex file so you can't view the raw code, but there are utilities (like this one) to decompile it: http://dedexer.sourceforge.net/
ghostfaced said:
The apk is really just a ZIP file. Try renaming the file to whatever.apk.zip and open using your favorite ZIP utility. You should be able to view all the contents. Resources (such as images) can be extracted. The java code is compiled into a .dex file so you can't view the raw code, but there are utilities (like this one) to decompile it: http://dedexer.sourceforge.net/
Click to expand...
Click to collapse
Right but how do I find the *.apk if I am downloading it off of the market?
apps are located in data/app/
There are also various apps in the market that will backup apps.
I use appmonster incedently.
7zip can extract and view contents of an apk without renaming.
backup and reinstalling apps....
view the first link in my signature.
I used MyBackup Pro to do a backup of my apps onto the sd card, then I used ASTRO file manager to navigate to /sdcard/rerware/MyBackup/AllAppsBackups where I found the file LastBackupApps.zip. I then used androzip or something similar to unzip that file and it contained the apk for every one of the apps I backed up.
how to extract .apk.p files
ghostfaced said:
The apk is really just a ZIP file. Try renaming the file to whatever.apk.zip and open using your favorite ZIP utility. You should be able to view all the contents. Resources (such as images) can be extracted. The java code is compiled into a .dex file so you can't view the raw code, but there are utilities (like this one) to decompile it: http://dedexer.sourceforge.net/
Click to expand...
Click to collapse
I have a zip file with .apk.p files in it which are exracted with package_extract_file in the updater script. Is there a way to manually extract these, since renaming to .zip doesn't help if I open them with any unzipper program?
Thanks
lxrose said:
I have a zip file with .apk.p files in it which are exracted with package_extract_file in the updater script. Is there a way to manually extract these, since renaming to .zip doesn't help if I open them with any unzipper program?
Thanks
Click to expand...
Click to collapse
I believe the files you are referring to - the files ending in ".p" - are "patch" files. They only appear in the OTA download .zip file, and they are worthless to you. They are not complete files, but just enough data to patch the corresponding 1.5 app .apk so that it turns into the 2.1 version.
If you want the complete .apk files which they correspond to, just download the Leak-V3 .zip file, extract the "system.img" file, and then unpack that file using the "unyaffs" utility (search for it, you'll find it at code.Google.com).
bftb0
bftb0 said:
I believe the files you are referring to - the files ending in ".p" - are "patch" files. They only appear in the OTA download .zip file, and they are worthless to you. They are not complete files, but just enough data to patch the corresponding 1.5 app .apk so that it turns into the 2.1 version.
If you want the complete .apk files which they correspond to, just download the Leak-V3 .zip file, extract the "system.img" file, and then unpack that file using the "unyaffs" utility (search for it, you'll find it at code.Google.com).
bftb0
Click to expand...
Click to collapse
Thanks for the info. I thought I can update the apk files manually, because from recovery it doesn't work (it is a rooted image, so signature not accepted) and there are some fixes in the new update that I wanted to give a chance.
Unable to install ddx1.14.jar in my HTC wildire
I hve downloaded dexeder.jar file in to my SD card. but i can't install it in my HTC wildfire...
it shows an error...
"ddx1.14.jar cannot be installed because critical information is missing from the application file (MIDlet-Name). Please contact the application provider for more information."
Help me Pls..... Thanks in advance.....
apk download
did you search for the apk online?

[Q] Modifying .apk

Hello guys. There's this problem that I have with TTR4 for Android, and that problem probably can be solved by modyfing one string in the app's config file (located in /System/App directory), but since it's inside the application file and I can only take a look at it using the Root Explorer - I can't make any changes to that file.
So, my question is: how can I unpack/decompile (dunno which variant is the correct one), change the string in that config file, and pack/compile the .apk back to its state? What tools do I need to do that?

[Q] editing .so file

Howdy.
I'm trying to modify a .so file (libflashplayer.so), but have run into a few problems:
I first tried editing the file after it was installed from an .apk. This appears to work at first, but the edited file is quickly replaced with the original.
I then tried editing the file in the .apk package. This causes the package to fail to install (I'm guessing because the md5 in the certificates no longer matches)
Aldo tried moving a folder with the .so files from the .apk (com.adobe.flashplayer-1 which is what is created when the .apk installs correctly) directly into /data/app-lib/.The directory was created successfully but appears to be immediately deleted.
Is there a way to accomplish what I'm trying to do? If so how?
Other possibly relevant info:
My device is rooted
I did not write the code for anything in the .apk, I got it from a link on xda (pretty dubious i know but I couldn't find another option)
I'm using cyanogenmod 10.2 (based on android 4.2 I believe).
I'm editing the file with a hex editor to change a a few characters ("AND" to "WIN")

Android System ignores hosts file

Hey guys,
I have a problem with editing the hosts file on Android.
At first, some general information: My Phone is a rooted Samsung Galaxy S6 with Android 7.0 and for editing I use the 'Total Commander for Android' tool by C. Ghisler (Version 2.90).
So here's my problem: I put together a huge hosts file for my Windows PC (some own entries, a lot of entries copied from someonewhocares.org/hosts) and wanted to copy the entries from my PC to my phone. So I duplicated the file, used Notepad++ and did " Edit --> EOL Conversion --> Unix (LF) ". I then sent the file via e-mail, so I could easily download it from my phone. Said and done, I downloaded it and put it into /system/etc , but when I try to visit one of the sites in the hosts file, it works although it should'nt work.
When I open the hosts file on my phone via total commander and add an entry manually, it works (site is unavailable after doing so).
But if copied into the file (even in Unix format) the system will just ignore the entry.
I have a list with a little less than 10,000 entries, I can't type them all on my phone. What can I do now, so that the Android system will use the hosts file as it should?
Thank you very much
Sieefi
Sieefi said:
Hey guys,
I have a problem with editing the hosts file on Android.
At first, some general information: My Phone is a rooted Samsung Galaxy S6 with Android 7.0 and for editing I use the 'Total Commander for Android' tool by C. Ghisler (Version 2.90).
So here's my problem: I put together a huge hosts file for my Windows PC (some own entries, a lot of entries copied from someonewhocares.org/hosts) and wanted to copy the entries from my PC to my phone. So I duplicated the file, used Notepad++ and did " Edit --> EOL Conversion --> Unix (LF) ". I then sent the file via e-mail, so I could easily download it from my phone. Said and done, I downloaded it and put it into /system/etc , but when I try to visit one of the sites in the hosts file, it works although it should'nt work.
When I open the hosts file on my phone via total commander and add an entry manually, it works (site is unavailable after doing so).
But if copied into the file (even in Unix format) the system will just ignore the entry.
I have a list with a little less than 10,000 entries, I can't type them all on my phone. What can I do now, so that the Android system will use the hosts file as it should?
Thank you very much
Sieefi
Click to expand...
Click to collapse
Nevermind. Problem solved.
Sieefi said:
Nevermind. Problem solved.
Click to expand...
Click to collapse
Please explain how you solved it, that may help others with the same issue(seek help and provide help ). Thanks!
strongst said:
Please explain how you solved it, that may help others with the same issue(seek help and provide help ). Thanks!
Click to expand...
Click to collapse
Oh, that is, in fact, pretty simple. It was pretty late when I did this yesterday and I was tired but wanted to get this done before going to sleep. So I made some stupid mistake. I don't know what it was, might have been that I reopened the file in windows editor, might be that I copied the wrong file, I really don't know.
Did it again today (this time without making a stupid mistake) and it works like a charm.
So for everyone who wants to do this, here's a step-by-step instruction (works with Total Commander or with ES File Explorer and should also work with every other root file explorer)
1. Edit your hosts file on your Windows (or Apple) PC as you wish
2. Copy the hosts file and put the duplicate into any other folder on your PC (just not the one with the original hosts file )
3. Open the duplicate with Notepad++ and change the format into Unix (Edit --> EOL Conversion --> Unix (LF))
To control whether everything is changed as necessary you can show the format of the line breaks by clicking View --> Show Symbol --> Show End of Line
4. Move the file to your Dropbox or OneDrive or send it to yourself via mail or, or, or...
5. On your Smartphone copy or move (as you wish) the file from your selected file exchange system into /system/etc
6. Done.
Of course this is only possible, if your Smartphone is rooted and your file explorer has root access.
If your using a Linux system and want to copy the hosts file from your PC to your smartphone you can leave out the third step because the file will already be written in Unix format

How to modify hosts file

Hi guys, i got root on my Honor 10 and would like to modify the hosts file to block ads.
I assume the correct one is /sytsem/etc/hosts right?
I can confirm that i have root acces because i can rename the hosts file and create other files.
I am using the AdAway app which worked just fine on my old phones.
But this time it says "replacement of hosts file failed" ... no further information.
Since i know the sources where AdAway is getting its information from i would like to simply modify the host file by myself.
What format does the hosts file needs to have to work? Like .txt file and remove the file extension afterwards.
Any ideas?
If you are rooted why not try masigk host file?

Categories

Resources