[SCRIPT][17.04.22][v1.2.0] MIUI Power Menu Patcher - add recovery & fastboot reboot - Redmi Note 2 Android Development

[SCRIPT][17.04.22][v1.2.0] MIUI Power Menu Patcher - add recovery & fastboot reboot
This patch your system to have got recovery & fastboot reboot from power menu.
Download latest release
Changelog
-Added visual menu
-Added function to restore backups
-Added ability to supply environment directory as argument with `-d <dir>`
-Added a lot of code improvements
-Fixed correct build number in backup folder
-Fixed some Busybox issues
Thanks to @DarthJabba9 for all the work of this update.
All releases and changelogs
Source code on Github
How-To
This script is to use from Android, need a terminal app as Terminal Emulator for example and a rooted device. Tested in Redmi Note 2 with Xiaomi EU & MultiROM
Run from terminal this
Code:
su
sh DIR/miui-powermenu-patcher.sh
Change "DIR" to the location where is the script.
Pro tip: move the script to /data and rename to mpp for example to have easy access from terminal.
Example (click image)

Patch sh no such, following dir change it, any solution?
Sent from my Redmi Note 2 using Tapatalk

if i move file to /data so what command..still DIR?

rockadz9 said:
View attachment 4095317
Patch sh no such, following dir change it, any solution?
Sent from my Redmi Note 2 using Tapatalk
Click to expand...
Click to collapse
The problem is that tail search for $0 variable and in your case is miuipm.sh, so as in the script the current directory is changed and the script isn't in it, occurs that.
Thanks for report it, I will fix it. ATM run as: sh $(pwd)/miuipm.sh
harizamzi said:
if i move file to /data so what command..still DIR?
Click to expand...
Click to collapse
Run from terminal this
Code:
su
sh DIR/miui-powermenu-patcher.sh
Change "DIR" to the location where is the script.
Click to expand...
Click to collapse
Please read...

Updated to v1.1.1

Deic said:
The problem is that tail search for $0 variable and in your case is miuipm.sh, so as in the script the current directory is changed and the script isn't in it, occurs that.
Thanks for report it, I will fix it. ATM run as: sh $(pwd)/miuipm.sh
Please read...
Click to expand...
Click to collapse
Yes mate my ROM 7.3.23 xiaomi.eu, this file change name & directory same problem. (Miui-powermenu-patcher.sh =old version / mpp.sh =new version)
Any solution?
Sent from my Redmi Note 2 using Tapatalk

rockadz9 said:
Yes mate my ROM 7.3.23 xiaomi.eu, this file change name & directory same problem. (Miui-powermenu-patcher.sh =old version / mpp.sh =new version)View attachment 4096809
Any solution?
Sent from my Redmi Note 2 using Tapatalk
Click to expand...
Click to collapse
Did you try run as "sh /data/mpp.sh" (add "/" before "data") or "cd /data" and after "sh mmp.sh"?

Deic said:
Did you try run as "sh /data/mpp.sh" (add "/" before "data") or "cd /data" and after "sh mmp.sh"?
Click to expand...
Click to collapse
I try run as "sh data/mpp.sh" and run as "sh /data/mpp.sh"
Sent from my Redmi Note 2 using Tapatalk

rockadz9 said:
I try run as "sh data/mpp.sh" and run as "sh /data/mpp.sh"
Sent from my Redmi Note 2 using Tapatalk
Click to expand...
Click to collapse
and the result is the same? that is strange... what is your busybox version? and you can provide miui-powermenu-patcher.log under /data/miui-powermenu-patcher folder? looks like you have not got proper unzip busybox built-in command...

@Deic There seem to be 2 problems:
1. wget.zip - it seems that it does not get decoded properly with base64; in any case, the error log shows that it cannot be unzipped
2. The call to patch.sh - you might want to provide the full pathname
Edit: I think the wget problem is that the zip file is corrupt - probably a result of a wrong START_LINE

DarthJabba9 said:
@Deic There seem to be 2 problems:
1. wget.zip - it seems that it does not get decoded properly with base64; in any case, the error log shows that it cannot be unzipped
2. The call to patch.sh - you might want to provide the full pathname
Edit: I think the wget problem is that the zip file is corrupt - probably a result of a wrong START_LINE
Click to expand...
Click to collapse
The START_LINE is good in all versions released, I tested before of release them and all is fine... And the output of no patch.sh is because, no wget = no patch.sh. I will wait to @rockadz9 to see what is the issue, I maybe due to bad unzip or that seems.

Deic said:
and the result is the same? that is strange... what is your busybox version? and you can provide miui-powermenu-patcher.log under /data/miui-powermenu-patcher folder? looks like you have not got proper unzip busybox built-in command...
Click to expand...
Click to collapse
Yes results is the same, version Busybox1.26-2_arm64. and patch log attch
Sent from my Redmi Note 2 using Tapatalk

@rockadz9 Open the script file with a text editor, and add these lines near the top of the file
Code:
alias basename="busybox basename"
alias dirname="busybox dirname"
alias tail="busybox tail"
alias base64="busybox base64"
alias unzip="busybox unzip"
alias sed="busybox sed"
alias awk="busybox awk"
Then add 7 to the value of START_LINE, save the file, and run the script again.

1.2.0 released!
All the nice stuff of this update is thanks to @DarthJabba9, I did almost nothing.
Go to OP to download!

It's work for me, first one i run as 'sh data/mpp.sh and i got message no such....
and second time i run as 'sh /data/mpp.sh its work fine. thx bro

I'm trying to get this to work on stable EU version 7.0.6. After running the script the menu can be displayed but only the reboot option works. Both the fastboot and recovery cause the screen to become blurred and nothing happens. Pressing the back button clears the screen and I'm back at the point prior to pressing the power button. I've attached the script log. Can anyone tell me what's wrong ?

Cannot show text bellow addition icon
MIUI 9 7.9.7 global dev

worked great
thanks a lot

Related

[23/Jan/2012][NST][1.1] Current book cover screensaver + custom shutdown image

UPDATE 23/01/2012:
Added support for content on sd-card (BETA). Further details on this post.
UPDATE 03/01/2012:
WARNING: some users reported troubles starting custom launcher and application after installation of this mod; a full backup before installation of this mod is strongly suggested!
UPDATE 27/12/2011:
Added custom shutdwown image mod.
UPDATE 18/12/2011:
Complete refactoring of Hack; now it's based on firmware 1.1.
Older firmware (1.0 and 1.0.1 no more supported).
Hi all,
i made a modification on Nook Simple Touch to use, as screensaver, the cover of the current reading book (i.e. the last book opened in the stock reader application).
Of course, it's necessary that the book has a cover (i.e. the cover is shown in the library application); on contrary, the default screensaver will be displayed (i.e. "authors").
Usage:
to activate the "current reading book cover screensaver: go to settings / screen / screensaver and select the new option, called "Current reading book image";
to set the custom shutdown image: copy an image called "shutdown.png" inside folder "screensavers" of Nook internal drive, when the Nook is connected with USB; the image "shutdownLowBattery.png" is displayed in case the Nook turns off due to low battery.
If the images are not found, the default ones are used.
Thanks to:
XorZone for it's really useful modification "Edit n/reading now/side btns/RecentApps+ActivityPicker+ForceOrient";
WARNING: as usual, modifying system files you may risk to brick your Nook, unless you know what you are doing. You are strongly advised to make a full backup before proceeding. I don't take any responsibility if you decide to apply this mod.
WARNING-2: this modification could only be appied on firmware 1.1 .
Installation:
download and unpack one of the attached files:
screensaver-hack-110-xor.zip in case you are using XorZone mod to improve button mappings etc..;
screensaver-hack-110.zip otherwise (i.e.: you are just using plain firmware from B&N);
verify that the archive you downloaded contains these 4 files:
android.policy.jar [needed only for "current book cover screensaver"];
services.jar [needed only for "current book cover screensaver"];
Settings.apk [needed only for "current book cover screensaver"];
framework.jar [needed only for "custom shutdown image"];
please consider that if you want to apply just one of the 2 modification included, you may limit the execution of next steps just to the relevant files as listed above;
(optional) make backup of original files, in case of problems with the modded ones (in case you revert to original files, remember to set the permissions of the original files, and delete the dalvik-cache)
remount system partition r/w
Code:
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
copy the downloaded files to Nook
Code:
adb push android.policy.jar /system/framework
adb push services.jar /system/framework
adb push framework.jar /system/framework
adb push Settings.apk /system/app
change the permission
Code:
adb shell chmod 644 /system/framework/android.policy.jar
adb shell chmod 644 /system/framework/services.jar
adb shell chmod 644 /system/framework/framework.jar
adb shell chmod 644 /system/app/Settings.apk
delete dalvik-cache
Code:
adb shell rm /data/dalvik-cache/[email protected]@[email protected]
adb shell rm /data/dalvik-cache/[email protected]@[email protected]
adb shell rm /data/dalvik-cache/[email protected]@[email protected]
adb shell rm /data/dalvik-cache/[email protected]@[email protected]
delete packages.xml [needed only for "current book cover screensaver"] (it will be regenerated at next boot; optionally make a backup also of this file, in case of troubles)
Code:
adb shell rm /data/system/packages.xml
(optional) due to packages.xml regeneration, it's possible (in my case it occurred) that now when you turn on the NST, the demo mode starts automatically; in any case, it's turned off as soon as you click any button, so it doesn't make any harm; but, if you want, you can simply delete the apk to get rid of it:
Code:
adb shell rm /system/app/DemoMode.apk
reboot your Nook
Code:
adb reboot
Thanks to user persichini, it's also available an alternative installation guide using RootExplorer directly from Nook (i.e. no need of ADB commands): in any case, please take into account that the same considerations about the relevance of modified files (in case you only want to install either "current book cover screensaver" or "custom shutdown image").
In case of issue, please provide the logcat log. You can redirect the log to a file (logcat.log) with the ADB command (launch it when Nook is booting to have all useful info):
Code:
adb logcat > logcat.log
Hit Ctrl+C to stop logging.
Hope you will enjoy it!
PS: as soon as i will have time, i will post sources, so you can build the mod by yourself (meanwhile, if you need them, just decompile and compare to original files of firmware 1.1 )
PS2: attached to this message you can also find 2 nice possible shutdown / lowBattery images.
I know you said that it's not compatible with v1.0.1, but is there a reason why you don't have v1.0.1 firmware on your nook? It's been out since July/August and works just as (un)well with the rooting scripts out there.
nickveldrin said:
I know you said that it's not compatible with v1.0.1, but is there a reason why you don't have v1.0.1 firmware on your nook? It's been out since July/August and works just as (un)well with the rooting scripts out there.
Click to expand...
Click to collapse
mostly, just because i'm lazy! and on changelog it's just mentioned that 1.0.1 hav some improvement on wifi, that i don't use at all.
In any case, this doesn't matter for my mod, since i downloaded the manual upgrade file from B&N, so that it would be easy to apply the mod to 1.0.1. I just need to find some time. I hope i will do it during the week-end.
Regards
traycold said:
mostly, just because i'm lazy! and on changelog it's just mentioned that 1.0.1 hav some improvement on wifi, that i don't use at all.
In any case, this doesn't matter for my mod, since i downloaded the manual upgrade file from B&N, so that it would be easy to apply the mod to 1.0.1. I just need to find some time. I hope i will do it during the week-end.
Regards
Click to expand...
Click to collapse
Okay thank you! I will look forward to the 1.0.1 release.
Another option is to use Cool Reader 3. It has Nook Simple Touch features (e.g.: type of refresh - full, fast; you can map the physical buttons) and, starting with cr3.0.51-20, it automatically creates one folder (currentbook) in screensavers and saves the current book's cover in that directory (deleting all others when the current book is changing). You can then choose that directory in the standard screensaver option of your Nook.
Not to mention other nice touches not present in the standard reader (showing the clock and the battery percentage or bars while reading a book, very customizable).
Yeah, problem encountered when I try reading or going into settings.. here's the log:
http://pastebin.com/fGGJVnGQ
I'm using 1.0.0
EDIT: Restored the backuped files, reader's back online, settings still not working :[
This particular error appears when I'm trying to launch the settings panel:
Code:
No Activity found to handle Intent { act=android.settings.SETTINGS flg=0x14400000 }
Touching the wifi icon doesn't open up any popup, it just fast reboots the nook
koltzu said:
Yeah, problem encountered when I try reading or going into settings.. here's the log:
http://pastebin.com/fGGJVnGQ
I'm using 1.0.0
EDIT: Restored the backuped files, reader's back online, settings still not working :[
Touching the wifi icon doesn't open up any popup, it just fast reboots the nook
Click to expand...
Click to collapse
hi,
sorry for your issue.
Actually, i also had some issue just opening the wifi-tab of the settings. I didn't found it before simply because i don't use wifi at all, so normally i don't have any reason to open it!
To solve this issue, you just need to update the file settings.apk, following the instruction on post 1. I updated the file "Settings.apk" in the firtst post.
In your case, if you reverted to original file, then there is no trace left of my modification, so i really don't understand what may occur. It could be useful to get a complete logcat trace since boot. To do so, launch the logcat command, as soon as the Nook is booting (tipically, as soon as the Nook drive appears on Windows): this way, you don't miss the first log lines that could help understanding your issue.
Additional advices: check that, after reverting to original files, you set the right permissions; wipe dalvik-cache:
Code:
adb shell rm /data/dalvik-cache/*.*
Thanks for the answer, I did as you told and the settings started working [by using your apk] but the reader died again. Replaced it again by using my files and the reader started working while the settings menu stopped working.
I seem to be unable to do a logcat while booting [can't connect through cable for some reason].
I blame all of these problems on my own previous tinkering with my nook.
Luckily I have a backup that I've done before rooting the nook. I'll just restore it and try again on a 'clean' and newly rooted Android system as soon as I get my hand on a microSD card.
If I bang into any more problems after restoring, I'll let you know
Any update on this? Possibly getting it to work on the (yes just released) v1.1 update?
I'm interested to see if this has been worked on anymore? Is there any plans for bring this to V1.1? I would love to use this on my nook.
persichini said:
I'm interested to see if this has been worked on anymore? Is there any plans for bring this to V1.1? I would love to use this on my nook.
Click to expand...
Click to collapse
hi, i will try and find the time to make the updates for firmware 1.1 as soon as possible (possible, this week-end).
Regards
traycold said:
hi, i will try and find the time to make the updates for firmware 1.1 as soon as possible (possible, this week-end).
Regards
Click to expand...
Click to collapse
Hey tray - thanks a lot!
But many of us here have already installed modified versions of android.policy.jar and services.jar...it's not possible to release a patcher, right? Can't ask for too much, and don't mean to be belittling your contributions...
And, btw, I'm seeing all these different patches here...does anybody have a primer on patching these jars? Or at least some intro? I'd google it but I'm not quite sure what to search for...
traycold said:
hi, i will try and find the time to make the updates for firmware 1.1 as soon as possible (possible, this week-end).
Regards
Click to expand...
Click to collapse
That would be awesome if you did bring it to 1.1. I under stand developers have lives outside of development thank you for your time.
traycold said:
hi, i will try and find the time to make the updates for firmware 1.1 as soon as possible (possible, this week-end).
Regards
Click to expand...
Click to collapse
Since you are going to patch Reader.apk, how hard would it be to modify it so that it can be launched from standard drawer as any other app?
It would be great to be able to add a big icon (e.g. with Desktop VisualizeR) to the home page that opens the book your currently reading...
traycold said:
hi, i will try and find the time to make the updates for firmware 1.1 as soon as possible (possible, this week-end).
Regards
Click to expand...
Click to collapse
Hey trey- instead of releasing a jar file, which many of us have modified, what about just giving us whatever you modify in the smalis, and then we go ahead and apply the patch ourselves?
You could also take the stock 1.0.0 files and make the patches yourself.
LOL, right, if I knew just what the heck I was looking for...
LastSilmaril said:
LOL, right, if I knew just what the heck I was looking for...
Click to expand...
Click to collapse
You don't need to know! Decompile the original files, decompile the files from this thread (apktool). Make a diff of the to decompiled folders (diff -crB folder_with_decompiled_stock_files folder_with_decompiled_files_from_this_thread > diff.patch ). Now you know what has been changed and you can try to use the patch with the 1.1 files.
mali100 said:
You don't need to know! Decompile the original files, decompile the files from this thread (apktool). Make a diff of the to decompiled folders (diff -crB folder_with_decompiled_stock_files folder_with_decompiled_files_from_this_thread > diff.patch ). Now you know what has been changed and you can try to use the patch with the 1.1 files.
Click to expand...
Click to collapse
Thanks...I've never had to really use diff for anything before so I never really thought about it. I'll try it out, but likely not today - I need a break from Nook testing/hackery already (see my dhcp thread...)
bump.........

[MOD] New Flashex v2.05 Hulu auto hexediting script (Comments,Support,Links)

Would you like to watch hulu in your browser on your tablet like you do on your PC? This script is written modify adobe flash to allow you to do exactly that.
Heads up! I have just released version 2.05 of Flashex (formerly hulumod)
Some of the new features include
-Added the ability the verify the version number for Busybox(v1.19.4-cm9)
-Added a feature to verify Busybox location, permissions, version and inform user of incompatibilities and make appropriate suggestions to enable compatability if possible.
-Automatic re-edit of edited source file, when either an upgrade or downgrade is detected. This allows the script to be run at boot via Script Manager, or other while still leaving, Adobe Flash to auto update.
-Script is now a single executable file that will both hex edit Adobe Flash(each update), and copy the edited file over to /data when needed.
-Improved version detection
-Improved output messages
The info and download can be found HERE
I'm cross linking it here to allow feedback posts. If you have questions about the app or would like help getting it to work on another device, flash version etc. You may post here and/or PM me. I'm happy to try an expand support provided I have the time.
ALSO Please remember to hit that Thanks button if you find my script useful.
I am trying to get this to work with init.d but it gives some kind of error when I try to run it from that folder something about no sh is there a command I can use to just copy the file over via init.d instead of running the entire script as that will likely also increase boot time?
Also this works on a nexus 4 running 4.4.2 just need to get the right version of flashplayer
OK I can run it from the init.d folder after android starts but its not running automatically I'm on CyanogenMod if that matters I have set file permissions to 755 all I have it doing is deleting the original and copying the edited after am I missing something here?
#!/system/bin/sh
rm /data/data/com.adobe.flashplayer/lib/libflashplayer.so
cp /storage/emulated/0/Flashex2/libflashplayer.so /data/data/com.adobe.flashplayer/lib/
Mark12343 said:
I am trying to get this to work with init.d but it gives some kind of error when I try to run it from that folder something about no sh is there a command I can use to just copy the file over via init.d instead of running the entire script as that will likely also increase boot time?
Also this works on a nexus 4 running 4.4.2 just need to get the right version of flashplayer
OK I can run it from the init.d folder after android starts but its not running automatically I'm on CyanogenMod if that matters I have set file permissions to 755 all I have it doing is deleting the original and copying the edited after am I missing something here?
#!/system/bin/sh
rm /data/data/com.adobe.flashplayer/lib/libflashplayer.so
cp /storage/emulated/0/Flashex2/libflashplayer.so /data/data/com.adobe.flashplayer/lib/
Click to expand...
Click to collapse
Hey - which version of flashplayer did you get this to work with 4.4.2?
Thanks
rasen1 said:
Hey - which version of flashplayer did you get this to work with 4.4.2?
Thanks
Click to expand...
Click to collapse
http://forum.xda-developers.com/nexus-4/general/flash-player-4-4-kitkat-instructions-t2548037
Dont need this, download puffin browser in the play store
Sent from my SCH-I605 using XDA Premium 4 mobile app

[TOOL] [v3.2] [09NOV] Ubuntu Touch "system-image" Installer // w/o computers

[TOOL] [v3.2] [09NOV] Ubuntu Touch "system-image" Installer // w/o computers
# All credit goes to Ubuntu and contributors
ut-system-installer
I wanted to install Ubuntu Touch system-image (official, ro, OTA-enabled, for-sale-in-the-future) on my Galaxy Nexus, but there were some limitations and disadvantages to do so. It requires Ubuntu on my computer and completely wipes my device. Compared to cdimage-touch, which one can install easily with his/her phone, system-image is hard for some people to try, so I made a simple recovery-flashable zip with shell scripts to install it without computer and losing data. It downloads and installs system-image on your device(officially supported ones only).
What is does:
The same thing as doing
Code:
phablet-flash ubuntu-system --channel devel --no-backup
but without wiping the device, so
-Download files for installing Ubuntu Touch system-image (half-automatically)
-Install it on your device (supported ones by Canonical)
Supported Devices:
-Galaxy Nexus (maguro, toro, toroplus)
-Nexus 7 (grouper, tilapia)
-Nexus 4 (mako)
-Nexus 10 (manta)
Downloads:
http://d-h.st/users/zittoro/ut
Do not use anything in wip folder.
* This will install a CWM-based recovery from Ubuntu, and your device could brick but will not be compensated. *
How-to:
1. Download the zip.
2. Unzip it in /sdcard/Download/ut
3. Move or copy ut-system-dl(read "Arguments for "ut-system-dl"" in second post for options) to /data. Then run the script with root(su). You can just type these in terminal instead of doing this step manually (You need busybox and su installed)
Code:
su
cp -a /storage/emulated/0/Download/ut/ut-system-dl /data
sh /data/ut-system-dl
4. Zip everything in /sdcard/Download/ut
5. Flash it in recovery and reboot recovery (Just use the default install menu at home if you are using special recoveries like MultiROM)
6. Enjoy Ubuntu Touch
Bug reports: post your /sdcard/Download/ut/ut-system.log, /cache/recovery/last_log, and copy of the error if possible
Changelogs:
Code:
[b]09NOV2013[/b]
v3.2
-Added official UT disclaimer link
-Cleaner code
[b]07NOV2013[/b]
v3.1
-Support for "generic customization" channels
[b]03NOV2013[/b]
v3
-Support for "*-customized" channels
-More consistent and easier way of configuring files names to download
v2.2
-Download the recovery image properly as saucy-named doesn't exist in the path anymore. --Thanks to @pildoc for reporting.
[b]21OCT2013[/b]
v2.1
-Log file support to the installation script; still need recovery log because of "system-image-installer"
-Support for trusty-related channels
-Workaround for delta images when device files are the same
-Dropped support for old-channel device images
-Workaround for non-patched recoveries
-Show the actual device names rather than codenames to avoid confusion
[b]19OCT2013[/b]
v2
-Add support for deciding which build number to download --$4
-Fix delta image download
-Mount before extracting files
[b]18OCT2013[/b]
v1.2
-Fix for script error
-Aborts installation if script fails
v1.1
-Recovery installation fix; it wasn't moved to the correct path, my bad:(
-Added log file: ut-system.log
[b]16OCT2013[/b]
v1
-Initial
Arguments for "ut-system-dl":
-$1: -auto: default for script, automatically detects the device's codename using the value for "ro.build.product"
-DEVICE_NAME: images for DEVICE_NAME devices
-$2: -full: default for script, full images used for initial installation
-delta: delta images used for updates(OTA)
-$3: -CHANNEL: use CHANNEL channel to download images, default "devel"
-$4: -BUILD_NUMBER: build number of image
I dont get it
Sent from my Nexus 4 using xda app-developers app
gazhead said:
I dont get it
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
It basically installs the recommended version of ubuntu touch
Looks like your path is wrong? If its going into download/ut shouldn't it be:
su
cp -a /storage/emulated/0/download/ut /data
sh /data/ut-system-dl
hockeyadc said:
Looks like your path is wrong? If its going into download/ut shouldn't it be:
su
cp -a /storage/emulated/0/download/ut /data
sh /data/ut-system-dl
Click to expand...
Click to collapse
Dang I made a mistake
Zittoro said:
Dang I made a mistake
Click to expand...
Click to collapse
Haha no problem. I'm trying this out on my phone(Maguro) and it gets stuck at connecting to the server. Any ideas? Just a ton of people trying to download right now?
hockeyadc said:
Haha no problem. I'm trying this out on my phone(Maguro) and it gets stuck at connecting to the server. Any ideas? Just a ton of people trying to download right now?
Click to expand...
Click to collapse
Can you get a screenshot for me?
Zittoro said:
Can you get a screenshot for me?
Click to expand...
Click to collapse
Actually, i just tried again and its working. 53 min ETA but its ok. When I zip this and flash it, does it remove my current recovery? How do I go back to my current rom in the future?
hockeyadc said:
Actually, i just tried again and its working. 53 min ETA but its ok. When I zip this and flash it, does it remove my current recovery? How do I go back to my current rom in the future?
Click to expand...
Click to collapse
It installs a CWM-based recovery with some tweaks and workout for system-image installation. Since it doesn't even touch your system partition, you can just flash an android kernel and get back to android.
Zittoro said:
It installs a CWM-based recovery with some tweaks and workout for system-image installation. Since it doesn't even touch your system partition, you can just flash an android kernel and get back to android.
Click to expand...
Click to collapse
Nice! That makes it pretty easy. Now we just need a way to dual boot lol. Perhaps a program that allows you to select android or ubuntu, and upon android selection it flashes a new kernel?
hockeyadc said:
Nice! That makes it pretty easy. Now we just need a way to dual boot lol. Perhaps a program that allows you to select android or ubuntu, and upon android selection it flashes a new kernel?
Click to expand...
Click to collapse
It's already possible on gnex.
http://forum.xda-developers.com/showthread.php?t=2480404
This kernel has tri-boot option for android and ut and recovery dual-boot using its recovery
Zittoro said:
It's already possible on gnex.
http://forum.xda-developers.com/showthread.php?t=2480404
This kernel has tri-boot option for android and ut and recovery dual-boot using its recovery
Click to expand...
Click to collapse
Awesome!
hockeyadc said:
Awesome!
Click to expand...
Click to collapse
Hey did you get it installed successfully? Some people in a different community say it doesn't. Did it boot into a new recovery when you rebooted it?
Zittoro said:
Hey did you get it installed successfully? Some people in a different community say it doesn't. Did it boot into a new recovery when you rebooted it?
Click to expand...
Click to collapse
I haven't tried yet. I realized how many apps I need and use on a daily basis, so I would rather not install it yet. Just gonna wait it out until Ubuntu is more complete.
Changelogs:
18OCT2013
v1.1
-Recovery installation fix; it wasn't moved to the correct path, my bad
-Added log file: ut-system.log
v1.2
-Fix for script error
-Aborts installation if script fails
Blur
can you guys explain to me step by step in doing so. Sorry for being a noob. i want to learn how to so that i can help others and also improve my knowledge..
subaash said:
can you guys explain to me step by step in doing so. Sorry for being a noob. i want to learn how to so that i can help others and also improve my knowledge..
Click to expand...
Click to collapse
1. Download the zip from the link
2. Unzip it to the specified directory on your phone (you can do this with a file explorer app)
3. Download a terminal app and copy and paste the "code" into it.
4. If you get an error, post your /sdcard/Download/ut-system.log. If you don't, zip everything in the specified folder and flash it in recovery
5. Reboot recovery right after the installation
Changelogs:
19OCT2013
v2
-Add support for deciding which build number to download --$4
-Fix delta image download
-Mount before extracting files
Will this work with kulturom(nexus7) AS secondary ROM?
Wysłane z mojego Nexus 7 przy użyciu Tapatalk

Cyanogen 12.1 test builds for Raspi2

Download:
https://www.androidfilehost.com/?w=files&flid=39635
Let me know if these work out for you. You can smack the ramdisk to the original kernel zimage to make the boot.img partition.
Source will be released if this works...
Cheers!
hey!
i would really love to test this.
im just now sure how to get the different .img-files to my SD card (win or osx)
do i partition manually first and then write each IMG seperately? what file system?
i'm really interested in this since im planning to construct my very own RPi2-Android-Car-Headunit...
I really wold like to test this out, I would really appreciate when someone gives install instructions
@Childofthehorn
don't take this the wrong way but can you highlight the zImage your referring too?
are you talking about the android generic device kernel?
are you talking about pulling it from another distro?
just a tad more explanation and I can give this a try. I have scoped out your git for some other clues but come up empty
feherneoh said:
As there is no kernel provided, try raspbian kernel first
I will check it later as I have a "working" lollipop kernel for rPi2 somewhere, but I have to find it
Click to expand...
Click to collapse
Thanks, if we can get some source of stuffs working i would give building a crack as well
feherneoh said:
Building CM12.1 using the same device tree that I used for AOSP 5.1, will see if it works
Click to expand...
Click to collapse
Hi, news about it?
feherneoh said:
I'm buildind inside screen, so I cannot scroll (I have no idea, how to do that) and the error message is outside of the 80x50 terminal I'm using
Click to expand...
Click to collapse
Many thanks for your effort.
If you could build it and boot it, please create your own topic so you are able to upgrade changelog and so on..
feherneoh said:
I'm buildind inside screen, so I cannot scroll (I have no idea, how to do that) and the error message is outside of the 80x50 terminal I'm using
Click to expand...
Click to collapse
Well, You could redirect the output to a file and read that file using vim. To redirect to file run
Code:
command > file.txt
Is it possible to write install instructions?
yes,I want to obtain the install instruction.
Sent from my MI 2S using Tapatalk
I'm interested too!
partition boot as fat,system as ext4, cache as ext4, and data as ext4, then restore file.
Sent from my MI 2S using Tapatalk
feherneoh said:
I know how to do this, and I would need to use command &> file.txt, as I need stderr, too
Click to expand...
Click to collapse
To put also stderr to the same file use:
Code:
command > file.txt 2>&1
To use different files:
Code:
command > file.txt 2> err_file
Another possibility to see output and stderr on screen and also put it in a file:
Code:
command 2>&1 | tee file.txt
i have a working rom for raspberry pi 1, 2 and 3. the only issue im having is getting the wifi and bluetooth to work. any suggestions?
How to install it ?
Badfiler said:
How to install it ?
Click to expand...
Click to collapse
Why install something that isn't working?

[LINUX] Unlock bootloader of HUAWEI P20 lite with PotatoNV in Linux

The genius Andrey Smirnoff, author of PotatoNV, offers a version of the program that can be used in Linux, called PotatoNV-crossplatform, written in python3.
Steps to unlock bootloader of HUAWEI P20 lite with PotatoNV in Linux (can be used for any Huawei phone listed, tested in Arch Linux)
1) Prepare the software
- Download PotatoNV-crossplatform, unpack and cd inside it
- Prepare a venv, using python3/pip3 :
Code:
python -m venv ./
source ./bin/activate
pip install -r requirements.txt
- Fix some bugs of the software:
i. in file main.py, line 48, replace %s with the name of the folder, that lies under ./bootloaders and contains the bootloader of your phone, eg for P2 lite:
Code:
args.manifest = "./bootloaders/hisi659a/manifest.json".format(args.bootloader)
ii. in file imageflasher.py, comment out lines 59, 67 and 76, as function ui.debug is not defined in module ui
2) Prepare the hardware (omitting the details, you can find them easily online)
- open the back case using heat from a hair dryer, better start from the left side as you see the phone from the back
- connect (short, ground) the test point with the adjucent metal case
- connect the phone to USB cable with the spare hand (eg. by pushing the cable while the phone is hold at a fixed edge)
- notice if the phone screen lights on. If it does, unplug the cable and try again until no light comes up (you can see light through the chips of the open phone)
- check that the device /dev/ttyUSB0 shows up (the interface well known to those who connect devices with UART...)
3) Run the program:
-
Code:
python -m usrlock
(if you hit at permission problem run the above as root)
- select any bootloader (as you have hardcoded the correct one)
- select any 16-digit code, eg 1111111111111111
Wait as the 'magic' happens!
Your phone's bootloader in now unlocked. The phone will reboot, low level reset and start!
Good luck with flashing!
Thanks for sharing!
Thanks for sharing this quide.
In my case it didn't work. Lack of knowledge, propably. I got message
Code:
PotatoNV-crossplatform-master]$ python -m usrlock
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/xxxx/Lataukset/PotatoNV-crossplatform-master/usrlock/__main__.py", line 2, in <module>
import chalk
ModuleNotFoundError: No module named 'chalk'
Everyting seemed to be installed. But I quess something is missing. There is no "chalk" in anywhere. Do you happen to know about this case?
kuukkeli01 said:
Thanks for sharing this quide.
In my case it didn't work. Lack of knowledge, propably. I got message
Code:
PotatoNV-crossplatform-master]$ python -m usrlock
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/xxxx/Lataukset/PotatoNV-crossplatform-master/usrlock/__main__.py", line 2, in <module>
import chalk
ModuleNotFoundError: No module named 'chalk'
Everyting seemed to be installed. But I quess something is missing. There is no "chalk" in anywhere. Do you happen to know about this case?
Click to expand...
Click to collapse
same boat here
kuukkeli01 said:
Thanks for sharing this quide.
In my case it didn't work. Lack of knowledge, propably. I got message
Code:
PotatoNV-crossplatform-master]$ python -m usrlock
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/xxxx/Lataukset/PotatoNV-crossplatform-master/usrlock/__main__.py", line 2, in <module>
import chalk
ModuleNotFoundError: No module named 'chalk'
Everyting seemed to be installed. But I quess something is missing. There is no "chalk" in anywhere. Do you happen to know about this case?
Click to expand...
Click to collapse
Use this on your terminal:
Bash:
python -m venv ./
source ./bin/activate
pip install -r requirements.txt
After that don't close the terminal and continue with the next command:
Bash:
python -m usrlock
To running as root you must first do:
Bash:
sudo su
and next run all the above commands (you can skip the install part: "pip install -r requirements.txt").
In my case this didn't work even after OP bug fixes. I had to add one line to main.py file in write_nvme function after ui.success("Bootloader code updated") just before rebooting:
Code:
fb.unlock(key)
Which makes sense to me, if script wasn't even trying to unlock bootloader then why should it be? Wonder why this worked for you guys, maybe I have too new EMUI?
Hello!
Just updating since I just followed your tutorial and ended up unlocking my P8 so thank you!
For anyone encountering an error with M2Crypto when performing pip install requirements.txt, it's a problem with depedencies that I solved following this post: https://github.com/google/python-adb/issues/112#issuecomment-530824958
Also, I used the bootloader from the main PotatoNV release, doing so I had to use another manifest.json since the windows release bootloaders use a xml file, i just modified the name of it and dragged it in the directory of the new bootloader, it went fine. I precise that I have no idea wtf I was doing but since the "adress" line of the two other file was the same I assumed the manifest was the same with just another format. Anyway it worked, and I think I had to do this because installing the "old" bootloaders, hisi659a, returned an error in potatoNV, whilst hisi65x_a went fine.
Thanks again, I will now brick it while installing shady roms and making big mistakes.
LeSplendide said:
Hello!
Just updating since I just followed your tutorial and ended up unlocking my P8 so thank you!
For anyone encountering an error with M2Crypto when performing pip install requirements.txt, it's a problem with depedencies that I solved following this post: https://github.com/google/python-adb/issues/112#issuecomment-530824958
Also, I used the bootloader from the main PotatoNV release, doing so I had to use another manifest.json since the windows release bootloaders use a xml file, i just modified the name of it and dragged it in the directory of the new bootloader, it went fine. I precise that I have no idea wtf I was doing but since the "adress" line of the two other file was the same I assumed the manifest was the same with just another format. Anyway it worked, and I think I had to do this because installing the "old" bootloaders, hisi659a, returned an error in potatoNV, whilst hisi65x_a went fine.
Thanks again, I will now brick it while installing shady roms and making big mistakes.
Click to expand...
Click to collapse
On debian I had to add a bit more of dev packages:
- libxslt1-dev
- libxml2-dev
- python3-dev
- libssl-dev
- python3-m2crypto
- swig
- python3-rsa
I have a question though, as I am not familiar with those bootloader for huawei devices.
Is there a specific fastboot image (bootloader) for P8 ?
Thanks
I have a general question, though, might not be the place but.
The phone I have is FRP locked and bootloader locked.
If I can unlock the bootloader would I be able to run some kind of `fastboot oem erase-frp`?
Thanks
dave2017 said:
fastboot oem erase-frp`?
Click to expand...
Click to collapse
for what reason? You can change FRP status in settings > developers option. Btw, the command fastboot oem erase-frp doesn't work on Kirin, afaik.
-Alf- said:
for what reason? You can change FRP status in settings > developers option. Btw, the command fastboot oem erase-frp doesn't work on Kirin, afaik.
Click to expand...
Click to collapse
The reason is that phone was given to me, reset and frp locked. The previous user does not remember the account she used.
dave2017 said:
The reason is that phone was given to me, reset and frp locked. The previous user does not remember the account she used.
Click to expand...
Click to collapse
so you need google account bypass, not FRP unlock on the phone, it's not the same...
dave2017 said:
The previous user does not remember the account she used
Click to expand...
Click to collapse
Really?
-Alf- said:
so you need google account bypass, not FRP unlock on the phone, it's not the same...
Really?
Click to expand...
Click to collapse
Yeah really, she is 70 year old and does not really get an understanding of what an account is.
-Alf- said:
so you need google account bypass, not FRP unlock on the phone, it's not the same...
Really?
Click to expand...
Click to collapse
And what is a google account bypass? How can I get something for that? Thanks
Amazing!
I just discovered it. Thank you so much! We're going to be able to unlock our phones finally!

Categories

Resources