[DEV DISCUSSION] PC Free Flashing - HTC Desire X

[DEV DISCUSSION]
THIS IS ESSENTIALLY IDEAS FROM Dees_Troy and TEAMWIN, and they can ease much of our procedures.
Guys,
I was thinking about it long and hard and i think i may have a system in mind where we never need to connect to a PC before flashing ROMs. Roms are meant to flash boot.img but the limitation of recovery partition forces us to do this via fastboot. Ok, here's what i have in mind.
Pre-requisites:
1. You should have a working ROM installed on your phone.
2. You should have superuser or root.
3. You should have my custom made recovery.
4. You should have the app. Say "xyz" (actually its htcdumlock but i'm going somewhere a bit different, so i'll modify it a bit.)
Procedure:
1. You're in your ROM and you run the app, The app "xyz" runs a script which does three things. (Dump boot to sdcard, dump recovery to sdcard, flash recovery to boot) and reboot.
2. It automatically boots to recovery, where you flash your desired ROM (which will also flash the boot), but this ROM zip also runs another script during installation to flash recovery to recovery.No need
3. We now have boot in boot, recovery in recovery and a reboot takes us to our newly installed ROM.
What i need from ROM chefs:
1. Do some test trials with me, by including some scripts which i will provide.
2. Implement these features in future ROM releases so that we can get rid of fastboot for the time being.
3. HELP me in building the said app in above points.
Trust me, once its implemented properly, i think it will be less of a hassle then our current procedure.
What a noob will see:
1. YOU RUN AN APP WHICH TAKES YOU TO RECOVERY. (HE CAN BACKUP HERE JUST FOR SAFETY)
2. YOU FLASH ROM.
3. YOU REBOOT and Voila !!! New Rom is there.
NOTE:
All comments are welcome, but i would prefer if only those people comment which understood the steps.
Regards
Yasir

That's a great idea! And I'd be glad to help making the app
Sent from my awesome fridge

I'm here for any help, too.
xpirt

Did you tried change the kernel with dd ? Is it working? (I didn't try it yet.) If not, i think no way to change kernel without pc.

Ok, i need a very simple app, which has a single button.
When i press the button, it runs a script. I am making that script, but until then , please create that app if you can.
Also, there will be some files which will be included in the app as prebuilts. They will be copied to system before running the script.
1. Button press
2. App copies some files to a location
3. App runs some scripts
4. Auto reboot
For now, this is the target.

atis112 said:
Did you tried change the kernel with dd ? Is it working? (I didn't try it yet.) If not, i think no way to change kernel without pc.
Click to expand...
Click to collapse
Dont worry, i m not doing what you are saying. I'm essentially doing the dumlock method but automating it enough so that Desire X users dont need PC. the app will do the initial (flash boot to recovery.) Users installing from this recovery will flash rom, during which the kernel will also be flashed and reboot. Thats it. I'm pretty sure it will work coz a recovery flashed on boot can alter all partitions. (and i am using ICS kernel in the recovery.)

neXus PRIME said:
Dont worry, i m not doing what you are saying. I'm essentially doing the dumlock method but automating it enough so that Desire X users dont need PC. the app will do the initial (flash boot to recovery.) Users installing from this recovery will flash rom, during which the kernel will also be flashed and reboot. Thats it. I'm pretty sure it will work coz a recovery flashed on boot can alter all partitions. (and i am using ICS kernel in the recovery.)
Click to expand...
Click to collapse
Ohh, sorry. I didn't see dumlock yet. It's new for me.

neXus PRIME said:
Ok, i need a very simple app, which has a single button.
When i press the button, it runs a script. I am making that script, but until then , please create that app if you can.
Also, there will be some files which will be included in the app as prebuilts. They will be copied to system before running the script.
1. Button press
2. App copies some files to a location
3. App runs some scripts
4. Auto reboot
For now, this is the target.
Click to expand...
Click to collapse
That won't be hard at all I'll make it tomorrow, no time today :/
Sent from my awesome fridge

If you'll need someone for testing, I'm in as well. Maybe I can take a look at the script too.
Sent from my HTC Desire X using xda premium
---------- Post added 19th June 2013 at 12:00 AM ---------- Previous post was 18th June 2013 at 11:50 PM ----------
So you'll adapt the C code making a script of it? What do you want to change?
Sent from my HTC Desire X using xda premium

Don't worry. No c. Just good old linux scripts for now. I'll tell you soon enough. For now , let's just focus on the app.
Sent from my HTC Desire X using xda app-developers app

Someone make me a flashable zip, which contains this in the updater-Script:
Code:
ui_print("Please wait, boot.img being flashed...");
show_progress(0.1, 0);
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
show_progress(0.1, 10);
ui_print("It is now safe to reboot! :)");
The zip should contain a boot.img (anything, nexuskernel, prototype kernel or any other) and preferably nothing else.
I wanna try flashing this zip on my phone.

MaartenXDA said:
That won't be hard at all I'll make it tomorrow, no time today :/
Sent from my awesome fridge
Click to expand...
Click to collapse
Root tools
@op Can you upload the script soon?

Okay I made the app, could you upload the script?

neXus PRIME said:
Someone make me a flashable zip, which contains this in the updater-Script:
Code:
ui_print("Please wait, boot.img being flashed...");
show_progress(0.1, 0);
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
show_progress(0.1, 10);
ui_print("It is now safe to reboot! :)");
The zip should contain a boot.img (anything, nexuskernel, prototype kernel or any other) and preferably nothing else.
I wanna try flashing this zip on my phone.
Click to expand...
Click to collapse
I don't think that'll work.
Sent from my Nexus 7 using Tapatalk 4 Beta

Stereo8 said:
I don't think that'll work.
Sent from my Nexus 7 using Tapatalk 4 Beta
Click to expand...
Click to collapse
Why do you think so?

neXus PRIME said:
Why do you think so?
Click to expand...
Click to collapse
But the methods like in One S Roms with install_kernel.sh, flashboot.sh and this:
Code:
ui_print("Writing boot image.");
ui_print(" ");
ui_print("This can take up to 5 minutes.");
ui_print(" ");
package_extract_file("boot.img", "/tmp/boot.img");
package_extract_dir("kernel", "/tmp/kernel");
show_progress(0.200000, 10);
set_perm_recursive(0, 2000, 0777, 0777, "/tmp/kernel");
run_program("/tmp/kernel/install_kernel.sh", "/tmp/boot.img", "/tmp/bootready.tmp");;
ifelse(file_getprop("/tmp/bootready.tmp","kernel.ready") != "READY",(
ifelse(file_getprop("/tmp/bootready.tmp","kernel.ready") == "STARTUP",
ui_print("Kernel Will Be Installed On Startup."),
ui_print("Snap! We've encountered an error, ERR1!")
)
));
Will work?
xpirt

neXus PRIME said:
Why do you think so?
Click to expand...
Click to collapse
That's just the standard write_raw_image method... Htc should be bright enough to prevent that...
Sent from my Nexus 7 using Tapatalk 4 Beta

I would suggest you to take some parts of my released s-on Kernel flasher Script for this app
Sent from my HTC Desire X using xda premium

greeneyes2910 said:
I would suggest you to take some parts of my released s-on Kernel flasher Script for this app
Sent from my HTC Desire X using xda premium
Click to expand...
Click to collapse
Hmmm, that just might work. Thanks for the heads up.
I know this thing is possible because 4ext recovery is doing this just fine in its SmartFlash feature. HTC dumlock so far isnt working, but i'm reading more and more.
Once it is completed, all our fastboot problems will be over.

I'm in, pm me for any testing
Sent from my HTC Desire X using xda premium

Related

[Q] Remove full wipe command on a rom

hello there! i think this is my first post here but ive been lurking since my evo 4g days. But my question is, is there anyway to remove the full wipe that comes with some roms? sometimes ill flash a kernel that hates my rom or my phone or more likely me. Or some other error happens and i would like to just flash the same rom over top to repair and be on my way. ive been running meanrom gb and it works no problem. but i tried running mikrunny 1.13 and i tried flashing rcmix kernel on it and apparently it wasnt for gingerbread i guess. but since it had full wipe built in i lost all my stuff and had to start fresh. sorry for the drawn out post but just trying to explain what my reasonings are. thanks everyone for being awesome here!
You can always do a advance backup of your data in 4ext recovery, cwm recovery I believe also has that option
(Don't ask me for help as I couldn't care if your phone explodes, eh!
It's a command in the install script. Now where and how to remove, I'm not sure.
jump454 said:
hello there! i think this is my first post here but ive been lurking since my evo 4g days. But my question is, is there anyway to remove the full wipe that comes with some roms? sometimes ill flash a kernel that hates my rom or my phone or more likely me. Or some other error happens and i would like to just flash the same rom over top to repair and be on my way. ive been running meanrom gb and it works no problem. but i tried running mikrunny 1.13 and i tried flashing rcmix kernel on it and apparently it wasnt for gingerbread i guess. but since it had full wipe built in i lost all my stuff and had to start fresh. sorry for the drawn out post but just trying to explain what my reasonings are. thanks everyone for being awesome here!
Click to expand...
Click to collapse
Look at the updater-script in the meta-inf folder you will see something that looks like this at the top of the script
Code:
format("ext4", "EMMC", "/dev/block/mmcblk0p24");
Remove any line that references formatting a partition. I wanna say that's all you'd need to do. If that doesn't work PM me a link to the ROM and I'll play with it and get it how you want it.
Editing the updater-script file
This might be more than you are interested in trying, but maybe not if you've been lurking since Evo 4G days.
All Android ROM and kernel installation scripts ultimately perform the installation using a scripting language called Edify, but some of them also have an Aroma script included as a preprocessor. Here's a good description of the relationship between Edify and Aroma explained by the Aroma developer.
To do what you are asking requires editing the /META-INF/com/google/android/updater-script file within the zip file you are going to flash. I use WinZip and UltraEdit on my PC but there are a number of editors and archiving programs that will work. You have to use an editor that will leave the Unix/Linux end-of-line characters and Notepad++ is a free editor that can do that.
Once you have the updater-script file open, look for lines like this:
Code:
ui_print("Formatting DATA Partition...");
unmount("/data");
run_program("/sbin/erase_image", "userdata");
format("ext4", "EMMC", "/dev/block/mmcblk0p24");
and change them to this:
Code:
# ui_print("Formatting DATA Partition...");
# unmount("/data");
# run_program("/sbin/erase_image", "userdata");
# format("ext4", "EMMC", "/dev/block/mmcblk0p24");
The lines above are from the updater-script file in the MikVirgin 1.01 zip file.
That will prevent your data partition from being formatted, although flashallthetime's suggestion to do an advanced backup of the data partition before flashing and advanced restore afterwards is effectively the same as the above script change. However, you may find other things you want to change in updater-script files if you become more familiar with them.
For more help with editing scripts just do a Google search for "edify script". If it's more than you want to tackle, PM ItzCrooK2UxD and ask him to make the changes for you.
ramjet73
thanks guys for the fast reply. i dont wanna do a backup everytime because the backup alone takes up more time then flashing the rom over itself plus then youd have to reflash the backup after the fact. i will try some suggestions and see if they work.
Not a full back up, just an advance data back up which takes no time at all
(Don't ask me for help as I couldn't care if your phone explodes, eh!
advance databackup? ive never heard of that. im gonna see if i can locate it in 4ext right now!
When you go into recovery you'll see backup/restore and you'll see advance restore
Sent from my PG86100 using Tapatalk 2

[Q] Superuser update

Simple question...
I'm developing a custom ROM and I got the idea to update the SuperUser apk and the binaries so I've downloaded the .zip and got the su binary and the app, but it has other files...
Should I replace all the files that has in that .zip to my custom ROM?
Thanks in advance and happy new year!
Read the update-script and do as it says...
Sent from my Nexus 4 using Tapatalk
SMillerNL said:
Read the update-script and do as it says...
Sent from my Nexus 4 using Tapatalk
Click to expand...
Click to collapse
Thank you for replying, but how I can do the permissions and the symlink part?
Happy new year!
If you're doing it in dsixda's kitchen then it will do it for you, otherwise you have to do it in your own update-script
XxPixX said:
If you're doing it in dsixda's kitchen then it will do it for you, otherwise you have to do it in your own update-script
Click to expand...
Click to collapse
Is there a way to do without it?
Trying to not using Kitchen at all.
manudo said:
Is there a way to do without it?
Trying to not using Kitchen at all.
Click to expand...
Click to collapse
To add the set permissions part and symlinks park you can use the following commands in your updater-script (These references here and here will also be helpful):
To set permissions:
Code:
set_perm(uid, gid, mode, "filepath1", "filepath2");
Example:
Code:
set_perm(0, 0, 06755, "/system/xbin/su");
To set symlinks:
Code:
symlink("filepath", "filepathyouwanttolinkto");
Example:
Code:
symlink("/system/xbin/su", "/system/bin/su");
Let me know if you still have questions I'll be happy to answer them.
shimp208 said:
To add the set permissions part and symlinks park you can use the following commands in your updater-script (These references here and here will also be helpful):
To set permissions:
Code:
set_perm(uid, gid, mode, "filepath1", "filepath2");
Example:
Code:
set_perm(0, 0, 06755, "/system/xbin/su");
To set symlinks:
Code:
symlink("filepath", "filepathyouwanttolinkto");
Example:
Code:
symlink("/system/xbin/su", "/system/bin/su");
Let me know if you still have questions I'll be happy to answer them.
Click to expand...
Click to collapse
Thanks, that commands I have to enter them in Linux Terminal?
manudo said:
Thanks, that commands I have to enter them in Linux Terminal?
Click to expand...
Click to collapse
These are the commands that you add to the updater-script file found in your custom ROM's flashable .zip file. The commands are not entered in terminal. If you need me to explain this further just let me know.
shimp208 said:
These are the commands that you add to the updater-script file found in your custom ROM's flashable .zip file. The commands are not entered in terminal. If you need me to explain this further just let me know.
Click to expand...
Click to collapse
Ok, so, let me get this straight...
When I download a update package it comes with an updater script with few commands written in it.
All I have to do is copy and paste every command to the updater-script file in my custom ROM folder, for any change I make to the ROM.
manudo said:
Ok, so, let me get this straight...
When I download a update package it comes with an updater script with few commands written in it.
All I have to do is copy and paste every command to the updater-script file in my custom ROM folder, for any change I make to the ROM.
Click to expand...
Click to collapse
This is correct, plus any resources included in the .zip package. It's essential that you preserve the directory structure of the .zip package in your custom ROM .zip package in order for the updater-script to execute properly. For example if the updater package .zip includes a /system folder your custom ROM .zip package must include the /system folder with the resources from the updater .zip package as well as whatever resources your custom ROM needs. Let me know if you need me to clarify or explain this further.
shimp208 said:
This is correct, plus any resources included in the .zip package. It's essential that you preserve the directory structure of the .zip package in your custom ROM .zip package in order for the updater-script to execute properly. For example if the updater package .zip includes a /system folder your custom ROM .zip package must include the /system folder with the resources from the updater .zip package as well as whatever resources your custom ROM needs. Let me know if you need me to clarify or explain this further.
Click to expand...
Click to collapse
Yeah, I have to place the other files in the directory as the update zip is, example:
update.zip/system/app/
rom/system/app
manudo said:
Yeah, I have to place the other files in the directory as the update zip is, example:
update.zip/system/app/
rom/system/app
Click to expand...
Click to collapse
That is correct, you got it! To answer the question in your signature I would stay away from using a name like Splenda while it is a clever idea, but it's best to avoid trademarks when branding your custom ROM.
shimp208 said:
That is correct, you got it! To answer the question in your signature I would stay away from using a name like Splenda while it is a clever idea, but it's best to avoid trademarks when branding your custom ROM.
Click to expand...
Click to collapse
Thank you for your help and your opinion, I'll build it tomorrow.
Are you kidding me? I can have issues with trademarks if I name a custom ROM like that?
Ha, the worst case scenario is that I'm in a court because of naming Splenda a custom ROM. Doesn't seem possible.
manudo said:
Thank you for your help and your opinion, I'll build it tomorrow.
Are you kidding me? I can have issues with trademarks if I name a custom ROM like that?
Ha, the worst case scenario is that I'm in a court because of naming Splenda a custom ROM. Doesn't seem possible.
Click to expand...
Click to collapse
While I doubt the Splenda company would personally come hunting through the XDA forums to come after you it's still proper practice to not use trademarked names or copyright trademarks in your projects. Besides you never know what kind of popularity and exposure your ROM may get. Looking at your modified signature if you named your ROM "Splenda ROM" that would be questionable. However if you named it Jelly Bean sweetened with Splenda then I believe that falls under fair use context (Full disclosure: I am not a lawyer and as such any opinion of mine that reflects legal matters should not be taken a official legal advice).
shimp208 said:
While I doubt the Splenda company would personally come hunting through the XDA forums to come after you it's still proper practice to not use trademarked names or copyright trademarks in your projects. Besides you never know what kind of popularity and exposure your ROM may get. Looking at your modified signature if you named your ROM "Splenda ROM" that would be questionable. However if you named it Jelly Bean sweetened with Splenda then I believe that falls under fair use context (Full disclosure: I am not a lawyer and as such any opinion of mine that reflects legal matters should not be taken a official legal advice).
Click to expand...
Click to collapse
Splenda ROM sounds great, but it's basically the same thing.
Chill dude, I'm not taking your advice.
Gotta email Splenda company, I hope they don't take it as a joke.
Sent from my XT1034 using XDA Premium 4 mobile app
SU Binary
I am using ODIN Rom and when I run SuperSU I get msg " The SU Binary needs to be updated. Continue?" I do so and get..
a question to use "Normal" or TWRP/CWM. I am using PHILZ. It says the SuperSU will attempt to reboot your device into TWRP or CWM. and it does nothing. So I then restart and select normal, it tell me the install failed ande reboot and try again.
Nothing seems to work, what am i missing?
Israel
Download the latest SuperUser.zip and flash it trough recovery by yourself.
http://download.chainfire.eu/372/SuperSU/UPDATE-SuperSU-v1.86.zip
Gesendet von meinem GT-N8010 mit Tapatalk 2

[CAN FLASH EVERYTHING] Clockworkmod Recovery 6.0.4.6 Galaxy 5

CWM Recovery 6.0.4.6 capable of flashing all the zip files....
recovery-clockwork-6.0.4.6-galaxy5.zip (Mediafire)(5.25 mb)
I made this cwm recovery 6.0.4.6 with the help of Jenkins.
Features...
->Fully functional. (Still no option for partition sdcard)
->This recovery can flash all the roms and also older recoveries and all the valid zip files. (even cm7)
->Use this until psyke officially release a properly working cwm.
How to use?
->Flash recovery-clockwork-6.0.1.2-galaxy5.tar (or any older) using Odin.
->Flash this zip file provided by me in the above link.
->After that boot into this new recovery and perform a cache wipe (NOT dalvik-cache). Then you're done....!!! Now, start flashing everything or reboot to system back...
Acknowledgements:-
-> First and very important fact I want you all to know is that from CM11 (CWM 6.0.4.5 onwards), a major security step has been taken up by Koush (CWM creator) by introducing SElinux and so one more security enhancement that came with it is: That...now you need to keep your updater-script as precise as possible. For e.g :- Not giving permission command for such files that doesn't even exist.
-> Another thing I saw was that now, format command in updater-script requires 5 args instead of 4 or 3.
-> Psyke83's cm7 can be flashed using this recovery but there were some mistakes in few of the updater-script lines. I removed those Mistakes (not added a single word more) and now...cm7 can be flashed right away using this recovery 6.0.4.6.
Corrected updater-script file for cm7 (for latest v3.0):-
updater-script (9 KB)
(If after download, your file is named like this- "updater-script.bin", please rename it to "updater-script".)
Where to replace this file?
->Those who don't know where to replace this updater-script file:- Open psyke83's latest v3.0 cm7 zip file. Go to META-INF/com/google/android and there in 'android' folder you'll see updater-script file. Just replace that file with mine (given above).
->Now, your cm7 zip file is ready to be flashed with cwm 6.0.4.6 provided above.
ENJOY.....!!!!
PROJECT Closed: Use PhilZ Touch Recovery which is based on CWM. It can flash everything.
Wanna know what were the mistakes in cm7 script according to new rules of cwm 6.0.4.5 (or newer)?...Here you go...
->First one: Format requires five args instead of three or four or lesser.
So, it is the line in original updater-script:-
format("ext4", "EMMC", "/dev/block/stl12");
But, it has to be like this according to new pattern of cwm 6.0.4.5 (or newer):-
format("ext4", "EMMC", "/dev/block/stl12", "0", "/system");
So, I corrected it.
->Second one & the last one is that not giving permissions to the file that doesn't exist.
Line in original file:-
set_perm(0, 0, 0544, "/system/etc/install-recovery.sh");
But, the file 'install-recovery.sh' doesn't exist. So, I removed this line.
And so finally tried flashing CM7 and it was successfully flashed with the new recovery and booted up very fast...
Is it 100% safe?
Sent from my GT-I5500 [CM11]
Vagelis1608 said:
Is it 100% safe?
Sent from my GT-I5500 [CM11]
Click to expand...
Click to collapse
Yupp bro...
I myself use this since a long time..You can see madteam's "Clockworkmod Recovery for Galaxy 5" topic to see user replies confirming the recovery to be working.
bhattbhargav60 said:
Yupp bro...
I myself use this since a long time..You can see madteam's "Clockworkmod Recovery for Galaxy 5" topic to see user replies confirming the recovery to be working.
Click to expand...
Click to collapse
Ok.I just wanted to be sure.
Downloading now.
Thanks for it :good:

[Q] flashable zip

Hello there , im trying to make a flashable zip to puch an apk on the system , or replace systemui.apk but it always give me this error
"Finding update package...
Opening update package...
Installing update...
Installation aborted."
i tried a lot of ways like this : http://forum.xda-developers.com/showthread.php?t=2163974 but still the same error
btw my cwm version is 5.0.2.8​
mohabmoka said:
Hello there , im trying to make a flashable zip to puch an apk on the system , or replace systemui.apk but it always give me this error
"Finding update package...
Opening update package...
Installing update...
Installation aborted."
i tried a lot of ways like this : http://forum.xda-developers.com/showthread.php?t=2163974 but still the same error
btw my cwm version is 5.0.2.8​
Click to expand...
Click to collapse
Can you upload that flashable zip? I will check it for errors, I will try to solve errors and give it back to you.
Sent from my GT-I9001 Gadget of Mass Destruction with CM11 using XDA Developers App.
hnkotnis said:
Can you upload that flashable zip? I will check it for errors, I will try to solve errors and give it back to you.
Sent from my GT-I9001 Gadget of Mass Destruction with CM11 using XDA Developers App.
Click to expand...
Click to collapse
oky no problem sure here you are , p.s : i tried to replace META-INF with other that worked ob my mobile before
from the attached zip i want to push this apk to system ik that there is alot of ways but i want to make this way is that possible? and also 3 days ago i wanted to replace my systemui.apk with edited and signed one by me , thanks man for help !!
If you get a chance read through this a bit
http://forum.xda-developers.com/showthread.php?t=2290009
It may help understand the structure and how to use edify. I'm on mobile right now so it may be a bit tough to look at your current .zip but if you don't have an answer by the time I get to a PC I'll have a look
But I will say off hand what youre trying to do will be fairly easy.
Grab a ROM that works for your phone
Extract the contents of the zip
Get rid of everything but the META-INF folder
Go to the updater-script
Erase all and write your own (if on windows use notepad++)
What you will need to do is mount system, then say where to take the app from and where to put it
Then have it fix permissions
The unmount system
Now zip it up with your app
Sign
And your good
Sent from my Nexus 4 using XDA Premium 4 mobile app
demkantor said:
If you get a chance read through this a bit
http://forum.xda-developers.com/showthread.php?t=2290009
It may help understand the structure and how to use edify. I'm on mobile right now so it may be a bit tough to look at your current .zip but if you don't have an answer by the time I get to a PC I'll have a look
But I will say off hand what youre trying to do will be fairly easy.
Grab a ROM that works for your phone
Extract the contents of the zip
Get rid of everything but the META-INF folder
Go to the updater-script
Erase all and write your own (if on windows use notepad++)
What you will need to do is mount system, then say where to take the app from and where to put it
Then have it fix permissions
The unmount system
Now zip it up with your app
Sign
And your good
Sent from my Nexus 4 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
well !! frist of all thanks for you help ! and i will try again and tell you , thanks again
mohabmoka said:
well !! frist of all thanks for you help ! and i will try again and tell you , thanks again
Click to expand...
Click to collapse
See HERE.
so just had a look at you .zip
youre missing your updater script and update-binary
so again, take this from a recent rom from your device and put them in META-INF
so file structure
META-INF/com/google/android and here put those two files
and your updater script should be simple, something like
Code:
ui_print("mounting system");
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("fbutton/system", "/system");
ui_print("setting permissions");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
ui_print("unmounting system");
run_program("/sbin/busybox", "umount", "/system");
but feel free to edit in whatever or define the actual system partition, your choice
best of luck!
demkantor said:
so just had a look at you .zip
youre missing your updater script and update-binary
so again, take this from a recent rom from your device and put them in META-INF
so file structure
META-INF/com/google/android and here put those two files
and your updater script should be simple, something like
Code:
ui_print("mounting system");
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("fbutton/system", "/system");
ui_print("setting permissions");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
ui_print("unmounting system");
run_program("/sbin/busybox", "umount", "/system");
but feel free to edit in whatever or define the actual system partition, your choice
best of luck!
Click to expand...
Click to collapse
well but i aslo used the meta-inf file which is in my root file (attached ) and root file worked well , i uploaded the root file and the file after edit with meta-inf from root file can you check it out?
XperienceD said:
See HERE.
Click to expand...
Click to collapse
oky thanks i will check it out and reply :] thanks for you help ^_^
XperienceD said:
See HERE.
Click to expand...
Click to collapse
demkantor said:
so just had a look at you .zip
youre missing your updater script and update-binary
so again, take this from a recent rom from your device and put them in META-INF
so file structure
META-INF/com/google/android and here put those two files
and your updater script should be simple, something like
Code:
ui_print("mounting system");
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("fbutton/system", "/system");
ui_print("setting permissions");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
ui_print("unmounting system");
run_program("/sbin/busybox", "umount", "/system");
but feel free to edit in whatever or define the actual system partition, your choice
best of luck!
Click to expand...
Click to collapse
well , i edited the updater-script and still the same problem :s i attach the final zip and can anyone of you check it out for me :] , also when i enter cwm i selcet install zip for sd card is that right? or i should do anything else ?
mohabmoka said:
well , i edited the updater-script and still the same problem :s i attach the final zip and can anyone of you check it out for me :] , also when i enter cwm i selcet install zip for sd card is that right? or i should do anything else ?
Click to expand...
Click to collapse
you have an extra folder, META-INF ans system folders should not be inside lite
if you open your zip youll see what i mean
so rezip these two folders, sign then flash through recovery
also you may need to add a chmod for permissions in your updater-script - either just for new app or all of system, either way will work
demkantor said:
you have an extra folder, META-INF ans system folders should not be inside lite
if you open your zip youll see what i mean
so rezip these two folders, sign then flash through recovery
also you may need to add a chmod for permissions in your updater-script - either just for new app or all of system, either way will work
Click to expand...
Click to collapse
Yuup finally ! its worked welll !!! thanks alot man :]
well it said success but when i opened my mobile again i found nothing !
Did you add the set_permissions to the updater-script? If not it won't show up
Sent from my Nexus 4 using XDA Premium 4 mobile app
demkantor said:
Did you add the set_permissions to the updater-script? If not it won't show up
Sent from my Nexus 4 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
this is my updater-script , is that right ?
Depending on your file structure it looks good enough to me, what happens when you flash it now?
Sent from my Nexus 4 using XDA Premium 4 mobile app
demkantor said:
Depending on your file structure it looks good enough to me, what happens when you flash it now?
Sent from my Nexus 4 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
it says install form sd card complete but i found nothing ..
Can you upload the whole zip again and I'll see
Sent from my Nexus 4 using XDA Premium 4 mobile app
demkantor said:
Can you upload the whole zip again and I'll see
Sent from my Nexus 4 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
here you are
mohabmoka said:
here you are
Click to expand...
Click to collapse
just took a look at it, you have it searching for flite/system which does not exist so change this
package_extract_dir("flite/system", "/system");
to
package_extract_dir("system", "/system");
in your updater-script
at this point all should work fine, if not let me know!

How To Fix CPU Core1 Always Offline

I have seen so many people facing this problem. Since they used a rom that's build with dev_harsh1998 source code (before 13April). Then, i made this Thread about how the way to fix (trick) it.
Step :
1. Go to /sys/devices/system/cpu/cpu0 , and you will find file named 'online'
2. Open it and see if there listed as 0 (mean offline) change to 1 (mean online), save. Set permission file 'online' to r-r-r (read only).
* You have to do this in every reboot
Or
You can Flash this :
Set CPU0 AlwaysOn.zip
https://drive.google.com/file/d/0B6DpzXcsAckTYzduYUY0dnNnT0k/view?usp=drivesdk tested with twrp 3.1.0
* Make sure your system rom run Init.d in every reboot or turn-on "Emulate Init.d" through KernelAdiutor.
* Some Suggest if you still in Old Builds with min_freq 800mhz.
You can add 533333:75 , in KA/CPU/CPU Gov Tunables/target_loads. Between 1 and 800000.
Then, change the min_freq to 533mhz.
## For the latest Build Rom and you still facing this freq bug. Try change to 400mhz first and look to the core. Someone told it will make the first core online again. Then, after u do it. You can freely change the freq whatever u want.
### Latest build after 20170422 doesn't have this bug. Dev already solved it.
Hit Thanks if I help you
Not a good solution if we have to do the same thing after each reboot.
Actually there are two things here we need to fix .
1. CPU0 offline issue .
2. Frequency automatically goes up . I mean when we set max frequency to 800mhz , it automatically jumps to 1200mhz.
Harsh!t already provided a simple solution. We need to flash stock lollipop first to get latest firmware & modem . Then flash other rom. It will fix these issues.
I have not tried it yet , but I am going to download stock rom because I am facing these issues in official mokee rom.
@shivdroid, you should GIVE THIS A TRY too. This has the updated firmware files.
sasukay said:
@shivdroid, you should GIVE THIS A TRY too. This has the updated firmware files.
Click to expand...
Click to collapse
Thanks for these files . I will try it in free time . I will report back after flashing.
But a little bit confusion here . Since I don't want to go back to KitKat which file should I use ?
Do you know which flashable zip contains firmware/radio of stock lollipop rom ?
shivdroid said:
Thanks for these files . I will try it in free time . I will report back after flashing.
But a little bit confusion here . Since I don't want to go back to KitKat which file should I use ?
Do you know which flashable zip contains firmware/radio of stock lollipop rom ?
Click to expand...
Click to collapse
Yeah, the KK2L one. Actually, its me who has prepared those zips.
shivdroid said:
Not a good solution if we have to do the same thing after each reboot.
Actually there are two things here we need to fix .
1. CPU0 offline issue .
2. Frequency automatically goes up . I mean when we set max frequency to 800mhz , it automatically jumps to 1200mhz.
Harsh!t already provided a simple solution. We need to flash stock lollipop first to get latest firmware & modem . Then flash other rom. It will fix these issues.
I have not tried it yet , but I am going to download stock rom because I am facing these issues in official mokee rom.
Click to expand...
Click to collapse
I've already tried it. Still didnt work. Just to let u know. Everytime before i flash a rom, i will flash a firmware.zip (by @sasukay) lollipop first. Then, the rom. It has no fix. Im also flashed firmware.zip given by hasrhit, but still no luck. So, those trick is the last option to fixed it.
Flash it, then tell here. It fixed the cpu bugs or not. So, people will know.
sasukay said:
Yeah, the KK2L one. Actually, its me who has prepared those zips.
Click to expand...
Click to collapse
Yeah, thanks bro. I've used it always before flash a rom. It's helpes me down/upgraded base firmware ? Since im A6000+ user. If i A6000 user, i better choosen firmware from rahulsnair
GuestStar said:
I've already tried it. Still didnt work. Just to let u know. Everytime before i flash a rom, i will flash a firmware.zip (by @sasukay) lollipop first. Then, the rom. It has no fix. Im also flashed firmware.zip given by hasrhit, but still no luck. So, those trick is the last option to fixed it.
Flash it, then tell here. It fixed the cpu bugs or not. So, people will know.
Click to expand...
Click to collapse
Then a script would be better which execute on every boot set the value automatically.
I flashed mokee build today....
Full wipe
Flashed Kk2L.zip
Then Rom & other things.
But the frequency and core 0 offline issue is still there .
Now Going to try the full lollipop zip ...
Deleted
sasukay said:
@GuestStar, @shivdroid - I wrote the init.d script to automate the process of setting CPU0 online. Can you please test this for me. Its a flashable zip.
Click to expand...
Click to collapse
??
shivdroid said:
?
Click to expand...
Click to collapse
Working on it.
Still couldn't understand why it isn't working.
the 01cpuon init.d scipt
Code:
#!/system/bin/sh
#Sets CPU0 online
echo "1" > /sys/devices/system/cpu/cpu0/online
#Sets permission to r--r--r--
chmod 0444 /sys/devices/system/cpu/cpu0/online
updater-script
Code:
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
package_extract_file("01cpuon", "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/init.d/01cpuon");
unmount("/system");
Can anyone help me with it.?
sasukay said:
Working on it.
Still couldn't understand why it isn't working.
the 01cpuon init.d scipt
updater-script
Can anyone help me with it.?
Click to expand...
Click to collapse
I can try to make it works
I've remake the flashable zip
Set CPU0 AlwaysOn.zip
Here :
https://drive.google.com/file/d/0B6DpzXcsAckTYzduYUY0dnNnT0k/view?usp=drivesdk already tested using twrp 3.1.0
Thanks to me and @sasukay for the Init.d script
@GuestStar, Gg bro. So, what I did wrong was I didn't mount the system correctly. Bro, but can you point out why this didn't work.
Code:
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
Actually, I'm a newbie and picked that line from some other updater-script. So, technically it should've worked.
sasukay said:
@GuestStar, Gg bro. So, what I did wrong was I didn't mount the system correctly. Bro, but can you point out why this didn't work.
Actually, I'm a newbie and picked that line from some other updater-script. So, technically it should've worked.
Click to expand...
Click to collapse
Yeah, you forgot to mount system.
Wht do you mean dint work?
GuestStar said:
Yeah, you forgot to mount system.
Wht do you mean dint work?
Click to expand...
Click to collapse
Code:
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
This didn't work for me. I tried to mount system with this command but the twrp recovery still showed error 6.
sasukay said:
This didn't work for me. I tried to mount system with this command but the twrp recovery still showed error 6.
Click to expand...
Click to collapse
Those command is right as well. If still didnt work. Then, the problem could be from the update-binary files
Have u looked into my zip i made.. To mount system i better used busybox/sbin. For update-binary i get from harsh flashable zip (the zip is about copying modules). I've tried to use that, and its works
GuestStar said:
Those command is right as well. If still didnt work. Then, the problem could be from the update-binary files
Have u looked into my zip i made.. To mount system i better used busybox/sbin. For update-binary i get from harsh flashable zip (the zip is about copying modules). I've tried to use that, and its works
Click to expand...
Click to collapse
Well thanks for the info. There were two things that I saw in your zip that weren't reqd. 1) online file was not reqd. 2) setting its permission to 644 was not reqd
Anyways, it is working. That will be enough for us.
sasukay said:
Well thanks for the info. There were two things that I saw in your zip that weren't reqd. 1) online file was not reqd. 2) setting its permission to 644 was not reqd
Anyways, it is working. That will be enough for us.
Click to expand...
Click to collapse
Yeah, i know it ? forget to remove. At the first time, i just want to make sure file online listed as '1'

Categories

Resources