update.zip error (status 6) - Galaxy S I9000 Q&A, Help & Troubleshooting

Hi guys,
i just tried to make my own update.zip.
The files inside are like this:
Code:
META-INF/
-com/
-google/
-android/
update-binary
updater-script
system/
-app/
TouchWiz30Launcher.apk
I took update-binary and updater-script from another update.zip (Theme).
Then i modified updater-script to this:
Code:
show_progress(0,0);
mount("MTD", "system", "/system");
delete_recursive("/system/app/TouchWiz30Launcher.apk");
package_extract_dir("system", "/system");
unmount("/system");
show_progress(10.000000, 1);
Unfortunately it doesn't work. This is what i get if i try to apply the .zip:
Code:
-- Installing: SDCARD:TouchWizGTG_v1.1.1_update.zip
Finding update package...
Opening update package...
Installing update...
E:Error in /mnt/sdcard/TouchWizGTG_v1.1.1_update.zip
(status 6)
Installation aborted.
Whats wrong with it? I already googled Status 6, and found theres something wrong with the script e.g. file was not saved in unix format or something.
I tried several text editors like notepad, wordpad, notepad++ and even dreamweaver.
I just don't get it. Why isn't it working?

Try to get a "fresh" updater-script which is untouched, maybe from the swype zips that doc has posted on his doc rom page and edit it again. I was editing with textpad and switched to notepad++ but it didnt help.. So i tried a fresh script with notepad++ again and it worked..

SysTem-X said:
Try to get a "fresh" updater-script which is untouched, maybe from the swype zips that doc has posted on his doc rom page and edit it again. I was editing with textpad and switched to notepad++ but it didnt help.. So i tried a fresh script with notepad++ again and it worked..
Click to expand...
Click to collapse
can you teach me your way, sorry my bad english

quyrauxanh said:
can you teach me your way, sorry my bad english
Click to expand...
Click to collapse
Find an update.zip that has already been done by someone else.. Then extract the zip file, and take the update-script/updater-script from the folder. After that open it with notepad++ or any other editor that won't add extra spaces for no reason.

Use notepad or gedit to edit script, worpad and others may corrupt it.
Also if you are only replacing an app you dont have to remove it first, when the package is extracted it will overwrite files automatically.

SysTem-X said:
Try to get a "fresh" updater-script which is untouched, maybe from the swype zips that doc has posted on his doc rom page and edit it again. I was editing with textpad and switched to notepad++ but it didnt help.. So i tried a fresh script with notepad++ again and it worked..
Click to expand...
Click to collapse
franklin01 said:
Use notepad or gedit to edit script, worpad and others may corrupt it.
Also if you are only replacing an app you dont have to remove it first, when the package is extracted it will overwrite files automatically.
Click to expand...
Click to collapse
thank i'm doing

Thank you guys, i'm going to trying it. I'll let you know if it works.

It works
I took update-binary and updater-script from swype update.zip.
Is the update-binary "bound" to a specific updater-script?
If yes, how can i create my own?

loco- said:
It works
I took update-binary and updater-script from swype update.zip.
Is the update-binary "bound" to a specific updater-script?
If yes, how can i create my own?
Click to expand...
Click to collapse
I guess you do this on windows.
Maby gnuzip work.
The problem you have is the zip you create is wrong for linux/android system.
You can always make an wmware with linux and use that to make things for the phone.
I use unbutu to compile kernels and all other stuff for the phone.
Sent from GT-I9000 jpo. My own kernel for z4mod and with 342MB Ram

Hi guys, I've just found the solution to this problem. To be short it's all about newline characters. Windows and Unix systems treat the newline chars differently. All you need to do is change the Windows newlines with the Unix ones. You can do it easily with Notepad++. So open the script, click the "Show All Characters" icon (you should see the newlines here), then navigate to "Edit-->EOL Conversion-->Convert to UNIX Format" and that's it. Finally, you should end up with single LFs. And don't forget about encoding, should be ANSI.

thanks
thanks it helped me a lott

Logo Freez
SysTem-X said:
Find an update.zip that has already been done by someone else.. Then extract the zip file, and take the update-script/updater-script from the folder. After that open it with notepad++ or any other editor that won't add extra spaces for no reason.
Click to expand...
Click to collapse
Phone Xperia X10
Current ROM : CyanogenMod 7.1
.... installing CyanogenMod 7.2 .
Yeah ,i followed your advice , modifing the build.prop in Word was the problem . instaled notepad++ , that error didn't came up anymore ,but ....
Xrecovery said the instalation is complete. It took 2 sec :O .that can't be right !!
And now the phone freezes at the Sony Ericsson LOGO
I have installed CM before with no prob ,but now this ... .CAN ANYONE HELP ?

Check this
Check this it sould solve your problem http://forum.xda-developers.com/showthread.php?t=1588439 :fingers-crossed:
IT ISN'T MINE BUT MAY HELP YOU.

illtown said:
Hi guys, I've just found the solution to this problem. To be short it's all about newline characters. Windows and Unix systems treat the newline chars differently. All you need to do is change the Windows newlines with the Unix ones. You can do it easily with Notepad++. So open the script, click the "Show All Characters" icon (you should see the newlines here), then navigate to "Edit-->EOL Conversion-->Convert to UNIX Format" and that's it. Finally, you should end up with single LFs. And don't forget about encoding, should be ANSI.
Click to expand...
Click to collapse
I'm using Ubuntu, so shouldn't the newline characters be the Unix ones by default? I got the error after modifying AOSP 4.1.2 for Galaxy S Plus with dsixda's Android Kitchen. The Text Editor I'm using is gedit (default Ubuntu Text Editor). Does anyone know a Ubuntu Text Editor that is similar to Notepad++?

illtown said:
Hi guys, I've just found the solution to this problem. To be short it's all about newline characters. Windows and Unix systems treat the newline chars differently. All you need to do is change the Windows newlines with the Unix ones. You can do it easily with Notepad++. So open the script, click the "Show All Characters" icon (you should see the newlines here), then navigate to "Edit-->EOL Conversion-->Convert to UNIX Format" and that's it. Finally, you should end up with single LFs. And don't forget about encoding, should be ANSI.
Click to expand...
Click to collapse
Thanks bro!!
This instructions really helped me to solve my elife e7 update issue. :good:

Related

how to edit system files

I'm now running a hero rom, and I need to edit some files in /system/bin in particular user.conf and a2sd. I managed to move it from phone to sd, but I'm afraid that editing and saving the files by notepad is not right. when I save the file with notepad, they became text file and the icon changes for the phone too. which sw I should use in order to leave the format unchanging?
Linux... if you must use windows though, notepad++
soulife said:
Linux... if you must use windows though, notepad++
Click to expand...
Click to collapse
notepad++ id different from notepad yes?
.... google it
When you go to save the file, rather than saving as a text file, choose "all files" in the drop down box. I hope that's right, haven't used a windows computer in ages =D

.png question

Is there a way i can change png files on my phone from my phone? I want to change the calling icon in the framework-res.apk. i found out a way to change it with an app in the market. But i dont know how to put it back in the apk. Help please.
find the picture --> backup it --> put in your picture with the same name and exactly the same bigness (pixels) --> bingo
cheers, stephan1
its not that easy. any other ideas anybody please.
Well if the file is a .9.png then it won't be that easy because these files are compiled to binary. (correct me if I'm wrong devs) You will need to do a little more reading to figure this one out. Also, you can't just "unzip" an apk and mess around with the pics and think that it's going to work when you zip it backup. My understanding is that you have to place the file that you are replacing into the compressed(i.e. zipped) apk.
Once again, Devs, correct me if I am wrong but all my info comes straight from using the search button...Try it out
jballz0682 said:
Well if the file is a .9.png then it won't be that easy because these files are compiled to binary. (correct me if I'm wrong devs) You will need to do a little more reading to figure this one out. Also, you can't just "unzip" an apk and mess around with the pics and think that it's going to work when you zip it backup. My understanding is that you have to place the file that you are replacing into the compressed(i.e. zipped) apk.
Once again, Devs, correct me if I am wrong but all my info comes straight from using the search button...Try it out
Click to expand...
Click to collapse
You're right, and wrong. You can unzip an .apk and mess with the images, then rezip it back up and rename it to (yourapk).apk from (yourapk).zip, you just need to sign it when you're done.
I haven't messed with anything entitled ".9.png", but if it's binary then hex editing it is probably the quickest way to edit it, otherwise there is a program called 'apktool' that can decompile apk's and is pretty effective, I've used it a few times
dmullins80 said:
its not that easy. any other ideas anybody please.
Click to expand...
Click to collapse
Pull framework-res.apk from your phone, to your computer's desktop. Use Winrar, or a similar archive extracting program, to open the file, then click Extract -> (some folder on your desktop that has nothing else in it)
Find the picture you want to change, make sure your new picture is the same dimensions (e.g; 320x480) and is the same type of file (e.g; .png) and replace the stock image with your custom image.
Once that's done, highlight all files and folders in the root of the folder you extracted framework-res.apk to -> (if using Winrar) Right-Click -> Add to archive -> Change archive type to .zip and click OK -> Right click on your newly created framework-res.zip and change the extension to .apk (you might need to open a windows explorer window and select tools->folder options->view tab->uncheck 'hide extensions for known filetypes).
Once that's done, you'll need to sign your new framework-res.apk. You can do that with EasySign. Download EasySign to your desktop, extract the archive and open a Windows Command Prompt (Start->All Programs->Accessories->Command Prompt). You'll need the Java JDK installed.
Drag your newly created framework-res.apk file into your EasySign folder on your desktop and down the following;
Type the following, assuming you have Windows 7 or Vista:
Code:
cd C:\Users\(your username on your PC)\Desktop\EasySign
You should now see the following;
Code:
C:\Users\(your username on your PC)\Desktop\EasySign>
You should now type the following;
Code:
java -jar signapk.jar testkey.x509.pem testkey.pk8 framework-res.apk framework-res_signed.apk
It'll take a moment, then you'll see;
Code:
C:\Users\(your username on your PC)\Desktop\EasySign>java -jar signapk.jar testkey.x509.pem testkey.pk8 framework-res.apk framework-res_signed.apk
C:\Users\(your username on your PC)\Desktop\EasySign>
...and you should now have framework-res_signed.apk in your EasySign folder on your desktop.
Pull it to your desktop and rename it framework-res.apk and put it back where you got it, most likely using adb (if using adb, put it in C:\(your androidsdk folder)\tools and type the following;
Code:
adb remount
adb push framework-res.apk /system/framework
adb reboot
Alternatively, you can place it on your sdcard and use a program like Astro to move it to /system/framework and immediately reboot your phone for the changes to take effect.
Enjoy, it took me like 10 minutes to type this
-mak
Thanks for the wirte up, (i've been try to do something simaler to this for a while). I got to the end but then I get this error in the cmd window. Any thoughts?
'java' is not recognized as an internal or external command,
operable program or batch file.
jadesdan said:
Thanks for the wirte up, (i've been try to do something simaler to this for a while). I got to the end but then I get this error in the cmd window. Any thoughts?
'java' is not recognized as an internal or external command,
operable program or batch file.
Click to expand...
Click to collapse
Sorry, I should have mentioned you'll need the Java JDK installed.
.mak is that the same one by Stericson?
here
sorry if that is slightly OT, just rebuilding the PC setup and need the files, so not sure which one I want to use - his worked last time for me well.
thanks~
dianeofarcadia said:
.mak is that the same one by Stericson?
here
sorry if that is slightly OT, just rebuilding the PC setup and need the files, so not sure which one I want to use - his worked last time for me well.
thanks~
Click to expand...
Click to collapse
EasySign? I'm not sure, I've only downloaded it from grdlock's site. The one you linked to actually looks easier to use..
when you re-zip the file after editing do you use normal compression or store?
Magnum72 said:
when you re-zip the file after editing do you use normal compression or store?
Click to expand...
Click to collapse
Normal if you're in Windows, otherwise .gz (most compatible) under linux.
.mak said:
Sorry, I should have mentioned you'll need the Java JDK installed.
Click to expand...
Click to collapse
I've installed it, but I still get the same error. Do I need to set a system path within java?
If I get this working it will solve many of my 'problems' Thank you!
I used ubuntu... what I did was change the default unknown call icon... I opened the Phone.apk in ubuntu and replaced the pic with another icon from another rom of my choice making sure it had the exact same name.. then went back to windows, pushed phone.apk and got it no problem... ubuntu opens the apk's without having to unzip them...
droidfreak said:
I used ubuntu... what I did was change the default unknown call icon... I opened the Phone.apk in ubuntu and replaced the pic with another icon from another rom of my choice making sure it had the exact same name.. then went back to windows, pushed phone.apk and got it no problem... ubuntu opens the apk's without having to unzip them...
Click to expand...
Click to collapse
I did that with the numbers on the dialer and the home launcher icon in the Tainted Vanilla thread. But there are other apk's that are a bit touchy. Once I learn how to sign them, I think it might open up a whole new world of skinning for me.
Yeh it would be good to get that down... it would open a huge door.. make things easier..
Question; in order for the above process to work, must you be rooted? I would love to change icons...unfortunately my naive-impatient self flashed the leak when it was first brought public.
Ngmanis said:
Question; in order for the above process to work, must you be rooted? I would love to change icons...unfortunately my naive-impatient self flashed the leak when it was first brought public.
Click to expand...
Click to collapse
Unfortunately you do need to be rooted for these changes to occur, however you can still do some customization with apps like Bettercut or ones similar.
jadesdan said:
I've installed it, but I still get the same error. Do I need to set a system path within java?
If I get this working it will solve many of my 'problems' Thank you!
Click to expand...
Click to collapse
I didn't, and it works for me. Are you using the proper commands, exactly as shown in my tutorial?
.mak said:
I didn't, and it works for me. Are you using the proper commands, exactly as shown in my tutorial?
Click to expand...
Click to collapse
Yes! Even coy and paste (except for changing the name of the apk I'm trying to sign).
I've downloaded the java link that you provided and installed, redownloaded and installed the JRE, rebooted. THe java site tells me I have the latest and greatest of everything.
I know it's got to be something I'm doing wrong, I get the same error with Autosign and other batch signing tools. I just don't know what my problem is.
jadesdan said:
I've installed it, but I still get the same error. Do I need to set a system path within java?
If I get this working it will solve many of my 'problems' Thank you!
Click to expand...
Click to collapse
jadesdan said:
Yes! Even coy and paste (except for changing the name of the apk I'm trying to sign).
I've downloaded the java link that you provided and installed, redownloaded and installed the JRE, rebooted. THe java site tells me I have the latest and greatest of everything.
I know it's got to be something I'm doing wrong, I get the same error with Autosign and other batch signing tools. I just don't know what my problem is.
Click to expand...
Click to collapse
Did you make sure to cd into the proper folder from command prompt? I've made this mistake a time or two;
Code:
cd C:\Users\(your username on your PC)\Desktop\EasySign>
^^ assuming you have EasySign in a folder called EasySign on your desktop, and that you change (your username on your PC) to your actual username.

Updater-script

I put together a theme that I want to be able to install on my phone. Issue is I am not 100% what updater-script to use nor how to have it setup so that it will put the files in the correct place...do I have to have a command to delete the .apk files that I am theming? Any help would be appreciated. I have attached my file. I am getting a status 6 error so I know that it cannot read something. Not sure what is wrong.
Hatman41 said:
I put together a theme that I want to be able to install on my phone. Issue is I am not 100% what updater-script to use nor how to have it setup so that it will put the files in the correct place...do I have to have a command to delete the .apk files that I am theming? Any help would be appreciated. I have attached my file. I am getting a status 6 error so I know that it cannot read something. Not sure what is wrong.
Click to expand...
Click to collapse
I use update-scripts mainly because if you do something wrong in the script it tells you what line you failed on and you can fix it. Also it's just what I learned on and what I'm comfortable with. If you're flashing a theme good rule of thumb is to make sure you wipe the dalvik cache you can do this with your script.
If you're working with windows don't use note pad it doesn't format the script properly. Try notepad++ if you're on linux just use gedit mac text wrangler.
Make sure you have the correct directory structure set up ie
META-INF/com/google/android/update-script then system/app and or framework.
Here's a simple script that will do the trick for you.....
Code:
show_progress 0.1 0
delete_recursive DATA:dalvik-cache
copy_dir PACKAGE:system SYSTEM:
show_progress 0.2 100
Hope this helps.
Thanks Lou, but I am still getting the error Status 6...that means that it cannot read the file...I am using notepad ++ to edit it. I used only what you provided in the file and the path to the file is Themename\META-INF\com\google\android I also have an update-binary in that dir...do I delete that file?
Try this one.
touchpro247 said:
Try this one.
Click to expand...
Click to collapse
I did not get any error this time and it said that it installed but when I boots up nothing was actually installed.
Hatman41 said:
I did not get any error this time and it said that it installed but when I boots up nothing was actually installed.
Click to expand...
Click to collapse
You don't need an update-binary if you're using an update-script. When you zip up your folders make sure you only have at minimum to folders on your desktop that your compressing the META-INF and it's sub directories and the system folder and it's sub directories don't put those inside anything just select and compress them. Once they're zipped make sure to sign the folder.
If the script didn't give you any errors it sounds like you may have put the META-INF and the system folders inside another folder before you zipped it which may be why nothing installed.
HeyItsLou said:
I use update-scripts mainly because if you do something wrong in the script it tells you what line you failed on and you can fix it. Also it's just what I learned on and what I'm comfortable with. If you're flashing a theme good rule of thumb is to make sure you wipe the dalvik cache you can do this with your script.
If you're working with windows don't use note pad it doesn't format the script properly. Try notepad++ if you're on linux just use gedit mac text wrangler.
Make sure you have the correct directory structure set up ie
META-INF/com/google/android/update-script then system/app and or framework.
Here's a simple script that will do the trick for you.....
Code:
show_progress 0.1 0
delete_recursive DATA:dalvik-cache
copy_dir PACKAGE:system SYSTEM:
show_progress 0.2 100
Hope this helps.
Click to expand...
Click to collapse
+1 I had the error 6 when I made one in notepad and switched to notepadd++. I think I also had to stop using windows explorer to copy it to my phone, but rather adb pushed it. Windows is kinda quirky like that, sometimes.
HeyItsLou said:
You don't need an update-binary if you're using an update-script. When you zip up your folders make sure you only have at minimum to folders on your desktop that your compressing the META-INF and it's sub directories and the system folder and it's sub directories don't put those inside anything just select and compress them. Once they're zipped make sure to sign the folder.
If the script didn't give you any errors it sounds like you may have put the META-INF and the system folders inside another folder before you zipped it which may be why nothing installed.
Click to expand...
Click to collapse
Ok so I took both the META-INF folder and the system folder and moved them both to the root of C and then I zipped both and then signed the zip...now it does nothing...I go into recovery....then I select the zip file and the screen just flashes and nothing happens.
If you want to see what I have done you can get the theme file here. This is for SkyRaider 3.3.3 with the Ucommon pack and all credit for the .png files goes to RUJELUS22, Riptide9, Defitism, Jascias and of course to Ihtfp69 for making the ROM
Download --->> http://bit.ly/aGP66D
Hatman41 said:
I did not get any error this time and it said that it installed but when I boots up nothing was actually installed.
Click to expand...
Click to collapse
I'll try flashing your theme and let you know.
touchpro247 said:
I'll try flashing your theme and let you know.
Click to expand...
Click to collapse
Ok...i forgot to include that it is for the uncommon theme pack for SkyRaider 3.3.3 as it has a custom Rosie that is themed.
Hatman41 said:
Ok...i forgot to include that it is for the uncommon theme pack for SkyRaider 3.3.3 as it has a custom Rosie that is themed.
Click to expand...
Click to collapse
To late lol...
Worked, use this one. Just add the files to the zip.
touchpro247 said:
To late lol...
Worked, use this one. Just add the files to the zip.
Click to expand...
Click to collapse
So I took your file and added it to mine...took both directories and moved them to my C drive...then zipped them up and signed them...went to recovery and installed it...says it was installing...when phone boots back up...no theme installed.
Hatman41 said:
So I took your file and added it to mine...took both directories and moved them to my C drive...then zipped them up and signed them...went to recovery and installed it...says it was installing...when phone boots back up...no theme installed.
Click to expand...
Click to collapse
Don't do that. Just drag your app and framework folders to my zip.
Or
Copy and paste your apps/framework where you see the placeholders.
The reason you can't add it to your file is in your file where it saids "services" it should say "system". And a few other things is wrong w/ your file that I will list when I get a chance.
touchpro247 said:
Don't do that. Just drag your app and framework folders to my zip.
Or
Copy and paste your apps/framework where you see the placeholders.
The reason you can't add it to your file is in your file where it saids "services" it should say "system". And a few other things is wrong w/ your file that I will list when I get a chance.
Click to expand...
Click to collapse
Woot...worked perfect...thanks alot touchpro247!!!!
Hatman41 said:
Woot...worked perfect...thanks alot touchpro247!!!!
Click to expand...
Click to collapse
Np...
This theme is badas* btw
touchpro247 said:
Np...
This theme is badas* btw
Click to expand...
Click to collapse
Thanks...soon as I figure out why my Rosie is not working as it should I will post the theme for peeps to dl. I only put the theme together...I took 2 EVO themes and took the .png files that I liked and made this one. I am using the uncommon Rosie. I will prob also pull the clock as you can see in this screen shot you can see some of the other numbers in it...it only does this for the flip clock...the regular non-flip clock it does not do that.
***Edit*** Ok have the Rosie fixed...I forgot to include the services.jar from the uncommon pack.
Ok I have everything working correctly now have I have posted it here http://forum.xda-developers.com/showthread.php?p=9034373#post9034373

Razr I XT890 bloat apps safe to remove from JB?

Hi,
Just wondering if anyone has tried and tested the removal of bloatware apps from their Razr I XT890 running 4.12?
I'd be interested in cleaning the phone up a bit just to make it less crowded, I like to use real calc instead of stock calculator, go sms instead of stock messaging, zeam launcher instead of stock launcher etc etc.
I'm quite a novice when it comes to the technical side of things so would be too afraid to start deleting system apps incase they messed something up.
If anyone has seen a list compiled and could share, that would be great. Also, would it be Razr I specific, or would a general 4.12 safe removal list be safe to follow?
Any feedback appreciated
Here you can find answers.: http://forum.xda-developers.com/showthread.php?t=2223482
Read the forum.
Sent from my XT890.
Thanks a lot, have you any idea what to do with them zip files and how can I keep some of the google apps in the list? I'm not sure where to put the #?
cormie said:
Thanks a lot, have you any idea what to do with them zip files and how can I keep some of the google apps in the list? I'm not sure where to put the #?
Click to expand...
Click to collapse
I think that for you would be easier use Titanium Backup or SystemAppRemover (need root acces) to remove apps.
If you want use the zip file you have to unlock bootloader and flash CWM. In CWM you can install zip files. # you must put in front of the line where is written desired app. Updater-script you can fing in the zip file /META-INF/com/google/android/
Thanks again, I actually have my phone rooted and was able to apply the debloater, however I don't want to remove everything so will restore the backup I took before trying it, I tried install the zip file with the edited script (with the # in front of the ones I wanted to keep) but it failed to install via recovery so I must be doing it wrong
I extracted the script file, opened with wordpad, edited, closed and saved, put it uncompressed back into the zip and tried it.
that failed, so I tried open directly from the zip, edit, close and save and flash that too but that failed too the original unedited one doesn't fail.
The error I get is something referring to error in zip file.
cormie said:
I extracted the script file, opened with wordpad, edited
Click to expand...
Click to collapse
Do not use WordPad. Edify scripts require line endings to be linux style (LF only). Wordpad converts them to windows style (CR LF). Use another editor; I recommend notepad2-mod (set syntax highlighting, F12, to shell script)
See I edited and saved in wordpad and wasn't prompted to save in any other format, do you think it still saved in CR LF?
In the same script and another edit, I think I pasted something from somewhere else and went to save, but then it prompted me to save in the wordpad format itself (rtf I think it was) which I didn't, when I simply added a # or two, it just prompted to save without asking for format so it appeared to save as it was and not change anything? So you reckon it still changed it to the non-readable CRLF?
Would basic windows notepad be ok to edit it instead of having to download notepad 2?
Thanks for tyour help so far!
Maybe I'd be better just doing this via root explorer, of which I have some experience of. Is it just a case of locating each of the files listed in the script and deleting them or is there other hidden crap elsewhere that the script gets rid of which a simple root explorer delete won't?
cormie said:
See I edited and saved in wordpad and wasn't prompted to save in any other format, do you think it still saved in CR LF?
In the same script and another edit, I think I pasted something from somewhere else and went to save, but then it prompted me to save in the wordpad format itself (rtf I think it was) which I didn't, when I simply added a # or two, it just prompted to save without asking for format so it appeared to save as it was and not change anything? So you reckon it still changed it to the non-readable CRLF?
Would basic windows notepad be ok to edit it instead of having to download notepad 2?
Thanks for tyour help so far!
Click to expand...
Click to collapse
Try notepad++

[Q] How to enable mass storage in CM 10.1 ?

Does anyone know how to enable USB Mass Storage on our phones under CM10.1? I've searched around and found this thread. But since I'm not familiar with changing build.prop I don't dare to do it myself. There are some CWM .zip files around to enable it, but they are on other phone's forums and I'm sure they just replace/change the build.prop so it's definitely not a good idea to flash those on a different phone than the ones they were intended for....
Long story short, does anyone know how to enable it on ours?
TIA!
Update on the process:
I was able to edit the build.prop according to the instructions, but that alone doesn't seem to do anything.
So I decided to try the next step, but where it tells me to do the changes below I wasn't sure what to do.
Thom75 said:
in framework-res.apk/res/xml/storage_list.xml
where oryginal line look like this:
Code:
<storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_sd_card" android:primary="true" android:removable="true" android:maxFileSize="4096" />
after change look like this:
Code:
<storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_sd_card" android:primary="true" android:removable="true" android:allowMassStorage="true" android:maxFileSize="4096" />
Click to expand...
Click to collapse
I was able to find the framework-res.apk file, copied to my computer and tried to open it with an XML editor... looked too complicated so I left it alone.
Does anyone know how to mess with that?
Open the .apk file with WinRar
-Drag the file you want to edit on your computer
-Edit the file on your computer
-Delete the old file in Winrar from the apk file
-Put the new file from your computer back in Winrar and save the "new" apk file
-Put the new .apk file on your smartphone
Before you install the new .apk file take a Root Explorer and look at the permissions of the old .apk file and set this permission on the new once...
I hope i could help you
Sivvis said:
Open the .apk file with WinRar
-Drag the file you want to edit on your computer
-Edit the file on your computer
-Delete the old file in Winrar from the apk file
-Put the new file from your computer back in Winrar and save the "new" apk file
-Put the new .apk file on your smartphone
Before you install the new .apk file take a Root Explorer and look at the permissions of the old .apk file and set this permission on the new once...
I hope i could help you
Click to expand...
Click to collapse
Thank you very much for your help! I didn't know apk files were just a compressed library of other files.
Now I am stuck trying to edit the "storage_list.xml" file... I tried to open with a few different xml editors, but could not get clean text like the example before. Any sugestions?
I attached the file below:
Apoena said:
Now I am stuck trying to edit the "storage_list.xml" file... I tried to open with a few different xml editors, but could not get clean text like the example before. Any sugestions?
Click to expand...
Click to collapse
Well, how about decompiling the .apk file with APK Tools instead of just opening it with WinRar? :laugh:
Yes, now I get a clean, editable, decompiled xml file.
I'll try editing both when I get home tonight and will post the results.
I guess this is a problem because of the emulated layout. There is a trick with setprop sys.usb.storage.config mass_storage but it does not work.
Keep me informed if you find something valuable (i'm on original CM10.1, latest nightly 0423 actualy).
Ok, here's the update from last night:
I started over since I flashed the nightly, which is good so I restarted with a clean slate.
- Edited build.prop - OK
- Copied framework-res.apk to my computer
- Decompiled framework-res.apk
- Edited storage_list.xml
- Recompiled framework-res.apk with new storage_list.xml
- Copied framework-res.apk back to my phone
- Deleted original framework-res.apk
- ...... instant restart & bootloop before I could paste the new framework-res.apk in its place
No big deal, just restored a nandroid backup I made before messing with anything and I'm back in business.
Apparently you can't mess with the framework-res.apk while your phone is on (with the OS running)... so now I need to research the right way to push/pull these files from ADB while on CWM recovery. I appreciate if someone could point me in the right direction since I'll be busy at work today.
To be honest, my gut feeling tells me that this is not going to work anyway. But look at what I learned so far... two days ago I wouldn't even think of compiling/decompiling anything... this is what XDA is all about, right?
Imho, the framework_res.apk and various tricks are all enabling or disabling a sys.usb.storage.config key. I'm not understanding nor finding informations about CM10.1 emulated layout, and if there are any reasons to forbid mass storage (because, yes, it seems it is disabled because it is not compatible).
This is something i have hard time with. On Android, you have tons of improvement for rom or kernel XY, but generally undocumented. If you apply this 'per device', the information is very fragmented and difficult to grab.
I was looking for a simple brief on base MTD partitions layout for LG P880, it seems the only way to have this is to dig KDZ files. Perhaps a Wiki would help the wannabe contributers like me to start ?
Any Solution For This Problem ??? I Can't Transfer Any Files To My O4X , What's The Point Of Cyanogenmod Then ??????????????
Nooby305 said:
Any Solution For This Problem ??? I Can't Transfer Any Files To My O4X , What's The Point Of Cyanogenmod Then ??????????????
Click to expand...
Click to collapse
Flash the latest nightly. MTP is working and you cab transfer files that way.
Sent from my tree using a ladder
effectively, if you are flashing for USM, you should stay on LG stock.
I know that the topic got a little old but I'd like to refresh it since more people (e.g. Ubuntu users) could be interested in enabling Mass Storage.
What I've done is:
1) pulled /system/framework/framework-res.apk
2) decompiled it with APKtool
3) added
Code:
android:allowMassStorage="true"
in storage_list.xml
4) builded a new apk
then I've rebooted my phone into recovery and (@Apoena you may be interested in it - there is a possibility to access /system through adb connected with phone in recovery mode) pushed the new framework-res.apk. I've also changed the entry in build.prop to
Code:
persist.sys.usb.config=mass_storage,adb
Everything seemed fine until I've tried to reboot the phone: instead of CM boot logo I got a black screen. Anybody has an idea what went wrong (maybe something during recompilation of the apk)?
And of course sorry for any language mistakes, I'm not a native speaker

Categories

Resources