yashsingh1/xdaforums huggingface dataset:
[Android Q&A, Help & Troubleshooting] adhammagdy:
Ok how about at least protecting your phone from that annoying friend who knows how to open recovery on your phone and keeps wiping your data ??..
[Android Q&A, Help & Troubleshooting] adhammagdy:
It worked thanks..

Here is what I did:

I did the python script on windows and kubuntu and both gave forbidden 403 in the download of aik.. so I downloaded manually and put in download folder.. ran the script and it gave file not found..

So I did the manual way of unpacking, modifying, repacking..

It didn't work at first after changing the password in line 742 and flashing.. I type the password and it says incorrect.. I type 0 and it unlocks..

So I return to the file again and I notice the line where you put the password is written twice so I set the password in both lines and it now works..

Thanks.. it should work on my annoying cousins and stop them from pranking me..
[Android Q&A, Help & Troubleshooting] adhammagdy:
Also I have another idea to protect twrp and don't need to go through the hoops of securing the password and trying to prevent hacking...

You know that when people encrypt their data partition with a startup password or pattern etc., TWRP asks for the decryption password when it starts.. just give an option to disable the "cancel" button on this screen and now the encryption password will preventing TWRP from starting up just like it protects the Android system from starting up... Very simple.. disabling the "cancel" button should prevent entring TWRP for people who opted in for password encryption.. also should disable adb, mtp, mounting partitions in recovery until password is correctly inserted...

Such change should be very easy to do and if it fails, the personal data is still protected by encryption password which is fairly secure...
[Android Q&A, Help & Troubleshooting] Lanchon:
https://www.zdnet.com/article/hands...-installing-and-activating-in-the-real-world/

https://www.laptopmag.com/articles/upgrade-to-windows-10-free
[Android Q&A, Help & Troubleshooting] Lanchon:
what if /data gets corrupted? you buy a new phone?
[Android Q&A, Help & Troubleshooting] JaggedPill:
Oh! Thanks a ton:svetius: Thanks again for this thread:)
[Android Q&A, Help & Troubleshooting] Mycroft2046:
Add an option to create a rescue USB drive. Simple.
[Android Q&A, Help & Troubleshooting] BananaMaster:
What if I uninstall TWRP and lock the bootloader? I know that if anything goes wrong my phone will brick, I'm just asking if there's any way to get into my phone if I uninstall TWRP and lock the bootloader... I've disabled the power button (I use an app to lock the screen with a touch on the figerprint sensor) so the thief can't turn off the phone (unless they open up the phone and remove the battery which is not very easy nowadays) and this way I can always locate my phone as they can't turn it off.
[Android Q&A, Help & Troubleshooting] dhnasa:
when you long press power and vol down your phone will reboot. I think this is bootloader controlled so you can't easily disable that.
[Android Q&A, Help & Troubleshooting] 01_02_03:
Hi,

I have a problem with customizing or renewing the portrait.xml.

I have the special image twrp-3.1.1-1-vie.img for P9 plus

link:

https://xdaforums.com/p9-plus/development/twrp-t3584486

I have done:

- recovery image unpacked with AIK

- default.prop adjusted (ro.adb.secure = 1)

when twrp-3.1.1-1-vie.img but it would be line 674 which needs to be adjusted when comparing the environment.

it is correct to create a new portrait.xml with the line <action function = 'set'> tw_unlock_pass = 0 </ action>

in the right place and this Immediately replace with the line <action function = 'set'> tw_unlock_pass = MyUnguessableNewPassword </ action>?

z.b.

Modified theme for TWRP 3.2.1.0 (from antonio)

739 <action function="set">tw_show_reboot=0</action>

740 <!-- Set tw_unlock_pass to anything different from 0 to activate password locking -->

741 <!-- WARNING: you should also set the property ro.adb.secure=1 to block root adb access from untrusted computers -->

742 <action function="set">tw_unlock_pass=0</action>

743 <action function="page">%tw_clear_destination%</action>

Modified theme for TWRP 3.1.1.1 (from me)

673 <action function="set">tw_show_reboot=0</action>

674 <!-- Set tw_unlock_pass to anything different from 0 to activate password locking -->

675 <!-- WARNING: you should also set the property ro.adb.secure=1 to block root adb access from untrusted computers -->

676 <action function="set">tw_unlock_pass=0</action>

677 <action function="page">%tw_clear_destination%</action>

my english is not the yellow from egg...

:rolleyes:

edit:

python says syntax error to me

(maybe because of different line)
[Android Q&A, Help & Troubleshooting] 01_02_03:
What do you mean by double writing?

Can you write a screen or an example?

---------- Post added at 07:32 PM ---------- Previous post was at 07:15 PM ----------

another question.

must always line 176 and 293 in the portrait.xml

be deleted, even if ro.adb.secure = 1 has been adjusted?
[Android Q&A, Help & Troubleshooting] 01_02_03:
[MENTION=220185]Antonio[/MENTION]

Your python protected script works under os win 10.

the protect.py must be executed under the folder 'Android Image Kitchen', otherwise you will get the error 'file not found'

thanks to my friend t. for help...
[Android Q&A, Help & Troubleshooting] 01_02_03:
[MENTION=220185]Antonio[/MENTION]

I have compared the overwritten and the original portrait.xml from my pack twrp 3.1.1.1.img and there are several differences.

is it better just to insert your password lines in my file, so that everything goes well?

I could post the differences.
[Android Q&A, Help & Troubleshooting] antonio.galea:
Sorry for the late replies - I see you already solved almost everything, good!

Have a look at the differences between my portrait.xml and Omnirom's original one: you will need to port the same differences into your file.

I've introduced a few modifications into my protect.py script - hopefully now it should be able to download AIK directly, and it should also work on Windows.

Antonio
[Android Q&A, Help & Troubleshooting] 01_02_03:
copying the password lines to the right place is not the problem.

There are about 20 lines that can not be easily adjusted or replaced, I do not know if I can post the twrp code here.

it's about basic (SHA2 for hashing vs. MD5 verification)

I want to show you this first.

that's the thread where olddroid says ...

https://xdaforums.com/p9-plus/development/twrp-t3584486

'WARNING: since 3.1.0-2 update we've enabled image flashing to special partitions -

not just / recovery or / boot partition.

That means your device could be bricked in a few seconds if you do not pay attention

or do not know what you're doing. (Noobs please stay away from this section!) '

That's why I want to know for sure.

(I could give you a screenshot)
[Android Q&A, Help & Troubleshooting] 01_02_03:
[MENTION=220185]Antonio[/MENTION]

the current twrp supports sha ...

<text>{@restore_enable_digest_chk=Enable Digest Verification of Backup Files}</text>

and the twrp 3.1.1.1 only md5 ...

<text>{@restore_enable_md5_chk=Enable MD5 Verification of Backup Files}</text>

I think the complete adjustment is the decryption and saving in twrp not more.

does your password query work with the old md5 lines?

:rolleyes:
[Android Q&A, Help & Troubleshooting] antonio.galea:
It works the other way around: you look at the differences between my version and the original one in 3.2.1 - and then you integrate those changes into yours.

I've attached you a patch, so you see what's changed. It might even work directly with

patch < portrait.xml.password.patch

if you have portrait.xml in the same directory.

Antonio
[Android Q&A, Help & Troubleshooting] 01_02_03:
ok, so the decryption part remains unchanged.

Thanks, I'll take a look.

Is there a specific line where the patch should be inserted?

edit:

compared it has a reason why you the page

<page name="installsu">

compared to the original 3.2.1 removed?
[Android Q&A, Help & Troubleshooting] 01_02_03:
final ;) only the twrp 3.1.1-1.img password is protected.

who wants the portrait.xml from 3.1.1-1, can get it from me have adapted it with hand.

big thanks to antonio for your help and ideas!

:good:

(antonio are you taking stylus studio for xml patching?)
[Android Q&A, Help & Troubleshooting] 01_02_03:
[MENTION=220185]Antonio[/MENTION]

is there a possibility to install your cutom code in an oreo twrp?

P9-VIE_EVA-8.0.0-TWRP-v4.img

https://androidfilehost.com/?fid=1322778262904008816

I did not succeed.

01_02_03
[Android Q&A, Help & Troubleshooting] antonio.galea:
I attach here two patch files, containing the differences between the original TWRP xml and my version.

Unpack your TWRP image with AIK and got to ramdisk/twres/ - there you will find either portrait.xml or landscape.xml (for tablets).

If you are on Linux, you can apply the difference with the patch command, like this:

patch < portrait.xml.patch

For Windows there are a few ports of patch, like this one.

Antonio
[Android Q&A, Help & Troubleshooting] 01_02_03:
[MENTION=220185]Antonio[/MENTION]

thanks for the information.

I know about the difference and can use it.

the twrp from oreo is different. after editing, the oreo twrp freezes.

can you see it yourself please. I can also provide you with my edited oreo twrp img.

01_02_03
[Android Q&A, Help & Troubleshooting] antonio.galea:
I run Nougat on my phone, but the TWRP I use is compiled from the android-8.1 branch, so I very much doubt your problems are with Oreo - I'd say the chances are high that something is wrong with your patched image.

Cannot test it myself, since the images are device specific: kernel and partition table are, at the very least - and there may be more.

Just a basic check: if you unpack then repack that image without any changes, does it run on your phone?

Antonio
[Android Q&A, Help & Troubleshooting] 01_02_03:
I do not think it's unpacking and packing, but I can try it with a clean image.

in the oreo twrp P9-VIE_EVA-8.0.0-TWRP-v4.img a separate password query is planned, which does not work yet.

https://androidfilehost.com/?fid=1322778262904008816

when you insert your custom password query then there are practically two and it comes to the error.

the code lines are in the right place, have checked it.

in my nougat your code is also great.

with the oreo twrp it is so that the password which is used for the log on android os, also at the same time for the registration over twrp to go.

I could imagine that these code lines cause the crash.

01_02_03
[Android Q&A, Help & Troubleshooting] antonio.galea:
The image I use on my device is for Oreo, but works correctly on Nougat too.

From Omnirom I've yet to see any attempt at adding password protection (actually, they argued quite strongly against it), so I assume that the image you refer to is not the standard TWRP from Omnirom but a custom one.

I don't think I can help you, unless you can point me to the actual source code for that: reverse engineering the image requires too much of an effort.

Antonio
[Android Q&A, Help & Troubleshooting] 01_02_03:
[MENTION=220185]Antonio[/MENTION]

thanks for the information.

which oreo twrp image do you have as a base currently twrp 3.2.1.0.img?

yes the twrp image I mean is a custom one from xda.

it has been modified by a user here on xda for the P9 plus for oreo to work on the P9 plus.

which image of omnirom was the basis I do not know, but I will inform.

01_02_03
[Android Q&A, Help & Troubleshooting] antonio.galea:
My Android Bootable Recovery/ is a fork from Omnirom's. I build TWRP for my device with android-8.1 branch, following the official guide.

If the developer is working on password stuff, then there will be more than simple P9 plus related changes. You might want to contact him directly and ask.

Antonio
[Android Q&A, Help & Troubleshooting] 01_02_03:
ok

I first have to gather information about the twrp image ...
[Android Q&A, Help & Troubleshooting] adhammagdy:
Hello, any update for 3.3.0.0?

I tried the python posted here and it worked correctly.. but twrp gives some error in red..
[Android Q&A, Help & Troubleshooting] antonio.galea:
Actually, my code is updated for 3.3.1 - and works for me, of course. Which errors are you referring to, exactly?

Antonio
[Android Q&A, Help & Troubleshooting] adhammagdy:
Yeah my mistake.. the python script failed to work saying access denied to the ramdisk folder.. so I did the modification manually and repacked.. could have caused a problem.. when I ran the script on another pc it worked and no errors popped up..

Update.. no the problem is still there.. see screenshot..

I'm using official twrp for beryllium
[Android Q&A, Help & Troubleshooting] governmentissuejoe:
Any way to fix the "String resource 'lock_twrp_btn' not found." error?
[Android Q&A, Help & Troubleshooting] rouenmod:
How do I dosable security pattern every startup?

After boot animation, pattern required to continue starting up my phone, after pattern entered, then the bootanimation continues, then my phone successfully boot and enteres lockscreen, which I need to enter my pattern again, please help me I want a quick boot for my phone
[Android Q&A, Help & Troubleshooting] KaMyKaSii:
Just remove the unlock pattern
[Android Q&A, Help & Troubleshooting] Carl.Johnson:
Ui.zip password method fo twrp 3.x.x

https://forums.oneplus.com/threads/how-to-password-protect-twrp.321491/

Can someone make this working on twrp 3.3.x?

Is this possible?
[Android Q&A, Help & Troubleshooting] quanqw:
How to fix this?
[Android Q&A, Help & Troubleshooting] AshhRED:
Settings=>languages=>English
[Android Q&A, Help & Troubleshooting] :
Backup unencrypted. Then far file with high encrypttion. Then upload SDcard to home server which syncs with a cloud service. Problem solved
[Android Q&A, Help & Troubleshooting] techniker82:
I solved the problem with the "String resource 'lock_twrp_btn' not found". the string in the language translation files in the language folder is missing. is not bad for the function. can be solved by adding.

en.xml

regards
[Android Q&A, Help & Troubleshooting] JaggedPill:
Hi! [MENTION=7384409]antonio.galea[/MENTION]. Twrp PW Lock works for 3.4 boot only. When installer flashed Twrp boots without the PW screen. Any way to fix it?
[Android Q&A, Help & Troubleshooting] antonio.galea:
I've rebased my repo over TeamWin's - now it follows version 3.4.0.

As before, my only changes are in gui/theme/portrait.xml, gui/theme/landscape.xml files - and now both contain the new TWRP stuff.

Can you try and see if those do work correctly?
[Android Q&A, Help & Troubleshooting] mulcahey:
Question about this TWRP: I've noticed that I can bypass the password screen by pressing Cancel and I'm still able to access features like the File Manager. Is this normal behavior? What does the password in TWRP protect?
[Android Q&A, Help & Troubleshooting] antonio.galea:
I don't know about that specific password implementation. I've added a protection myself to standard TWRP and it definitely can't be bypassed like that. I've not been updating it in a while, but it applies cleanly to version 3.4.0.

That said, anyone with the skills can always overwrite your recovery with a passwordless one (unless you are one of the lucky fews who can re-lock their bootloader) - so password can only be treated as a protection against a casual prankster and not against a determined attacker.
[Android Q&A, Help & Troubleshooting] adhammagdy:
Sheesh.. that's a lot of complex techy stuff.. I only wanted a password for stopping my little nephews from wiping my phone as a prank not for hacking the pentagon 😂

Then again the stock recovery is no better.. the manufacturers really need to start protecting the phones booting like laptops have this bios password thing.. anyone can just reboot to recovery and wipe the phone.. one of the few things that apple did better I guess..
[Android Q&A, Help & Troubleshooting] Sense_101:
Is there any UI.zip file that works for twrp 3.6.0?

I don't care about absolute security, all I need is a way to have a password show up when entering twrp so idiots can't reset the device from recovery.

Any help on this would be greatly appreciated.
[Android Q&A, Help & Troubleshooting] ale5000:
@Lanchon Any recent development for this?
[Android Q&A, Help & Troubleshooting] Sense_101:
Also, if I have to use python tool, how can I use it on a A/B device, as I can't find out how to change the recovery when its part of the boot image?
[Android Q&A, Help & Troubleshooting] Sense_101:
I do that, but when I reboot to recovery again, it's switched back to 0. I'm pushing a different default.prop file with twrp, using adb root. Is there something I'm doing wrong?
[Android Q&A, Help & Troubleshooting] 2331151796:
Hello, I'm using an older Galaxy S2-i9100 with TWRP 3.1.0. (latest working version) I do not have the option in TWRP > Backup to backup the "Recovery" partition. Just Boot, System, Data, Android Secure, and Cache.

I tried using dd if=/dev/block/mmcblk0p6 of=/sdcard/recovery.img then adb to pull the recovery file to my PC and I renamed the file to recovery.img and It doesnt work with AIK. It says "Unrecognized format. Error!". Any ideas how to get twrp to backup the recovery?
[Android Q&A, Help & Troubleshooting] Sense_101:
It seems like you might have a dual boot device, which has no recovery partition. If that is the case, you'll need to get any twrp working on your device, use the password protection python script to modify a twrp image to be password protected, and then take that image and put it onto your device using the "install recovery ramdisk" on the twrp on your device. Then your twrp should be password protected.
[Android Q&A, Help & Troubleshooting] 2331151796:
Yes that is the case, it was pre-only-recovery days. So it uses the boot.img and recovery.img that work together. A popular project on this forums called IsoRec. I use TWRP v3.1.0 recovery.img with the extracted LineageOS boot.img file together to. Then after that you can flash any twrp recovery. Unfortunately any higher version after 3.1.0 does not work on the i9100 due to storage issues on the recovery partition. Would it be possible if I can ask you for a favor? Would you be able to modify the twrp img and compile it for me? I'm new to these things and don't want to brick my phone. Would you know how to do this? https://twrp.me/samsung/samsunggalaxys2i9100.html

The lastest working version is twrp-3.1.0-0-i9100.img

Thanks for replying and taking the time to understand. I would just like to password protect my twrp using @antonio.galea's password protect and usb adb disable mods.
[General Questions and Answers] AK47.1:
Slim-p3100-5.0.2.alpha.0.92-UNOFFICIAL-20150107-0658.zip

cm-12-20141226-UNOFFICIAL-p3100.zip

omni-5.0.2-20150107-p3100-HOMEMADE.zip

...

I found those 3 Android 5.0 roms on Android-Andi's page on androidfilehost.

I'd like to know which of these roms now support 3G and wifi tethering 'coz I can't afford to download them all.

Thanks in advance.
[G 2014 General] ksuuk:
Use Greenify to force stop unwanted apps.
[G 2014 General] KrishnaSagar:
Eventhough Greenify works without root....

I was going to add that but then held back as the true potential of greenify could be better achieved with root. I'll surely add this when I update this guide with Root based methods.
[G 2014 General] m666p:
Bro are you using titan rom(5.0.2) or are you on 5.0.1

Also the reason I'm on kitkat is xposed

and lastly can you change the dpi manually(I'm loving 240) and reduce the minimum brightness to 1 instead of 10(I read manga before I go to sleep)

Edit: happy new year bro
[G 2014 General] KrishnaSagar:
I checked out the Titan Prime 1.2 but now am on 5.0.1. I'm waiting for a more stable and feature rich version of the Titan Prime.
[G 2014 General] Tani2:
Motorolla says 3g consumes less power you say 3g consumes more power, who is right?

By the way thank you, this point was also in my mind regarding auto brightness I was already against the point of auto brightness, because I really don't like high brightness so I've set it on a constant percentage.
[G 2014 General] Neperpika:
Like he said 3g>2g>wifi (: do your test charge your phone to 100% and use 3g see how much screen on time you get to 98% then do it with wifi :thumbup:
[G 2014 General] KalolParty:
Just my 2 cents : Google Now Launcher drains a lot of battery irrespective of the fact Google Now is installed/disabled
[Nexus 5 Q&A, Help & Troubleshooting] AppEx213:
Title^^

?

I have only power which is the stock option but is there a way to add more? like reboot and recovery
[Nexus 5 Q&A, Help & Troubleshooting] rajneeshk:
You have to root your phone for that. Check if Xposed support included for Android 5, if yes you can do that with Xposed
[Nexus 5 Q&A, Help & Troubleshooting] hr_kaleu:
Xposed does not run on Android 5 (ART runtime), xposed only runs on DALVIK

For the reboot options I'm fine with Simple Reboot by Francisco Franco - https://play.google.com/store/apps/details?id=simple.reboot.com&hl=de

Cheers
[Nexus 5 Q&A, Help & Troubleshooting] AppEx213:
Simple reboot is fine, but its still an app. I wanted something that is on the power menu.

Is there nothing you can do to the framework apk or system ui?
[Nexus 5 Q&A, Help & Troubleshooting] BirchBarlow:
Everyone and their mother knows that Xposed is incompatible with Lollipop.

You can flash a custom ROM with that option i.e. Cataclysm.
[Nexus 5 Q&A, Help & Troubleshooting] gee2012:
Not on the stock framework (if you are rooted) atm as Xposed doesn`t support ART yet and maybe never will.
[Nexus 5 Q&A, Help & Troubleshooting] Elluel:
Pure AOSP and stock do not have the functionality to add more reboot options.

Without modifying anything else, the only thing you can add is a shortcut to settings, airplane mode, and the silent/vibrate/sound-thing.

frameworks_base/core/res/res/values/config.xml

<!-- Defines the default set of global actions. Actions may still be disabled or hidden based
on the current state of the device.
Each item must be one of the following strings:
"power" = Power off
"settings" = An action to launch settings
"airplane" = Airplane mode toggle
"bugreport" = Take bug report, if available
"silent" = silent mode
"users" = list of users
-->
<string-array translatable="false" name="config_globalActionsList">
<item>power</item>
<item>bugreport</item>
<item>users</item>
</string-array>
[Nexus 5 Q&A, Help & Troubleshooting] AppEx213:
So I decompile framework-res.apk go to values and edit config.xml, search for silent and change false to true?
[Nexus 5 Q&A, Help & Troubleshooting] Elluel:
This part is commented out (isn't included when built/compiled, used in source to usually provide info) and won't appear when you decompile it:

<!-- Defines the default set of global actions. Actions may still be disabled or hidden based
on the current state of the device.
Each item must be one of the following strings:
"power" = Power off
"settings" = An action to launch settings
"airplane" = Airplane mode toggle
"bugreport" = Take bug report, if available
"silent" = silent mode
"users" = list of users
-->

It tells you the possible options you can use in the power menu array

See this part, which is the actual array:

<string-array translatable="false" name="config_globalActionsList">
<item>power</item>
<item>bugreport</item>
<item>users</item>
</string-array>

Bug report is shown only if you enable it in Settings > Developer Options and User selector is only shown if you have multiple users.

"silent" isn't in the array (config_globalActionsList), but its a possible option as stated by the comment in source code, so you can add:

<item>silent</item>

into the array where you want it to be, and it'll show up in the power menu. You can also add settings and airplane mode as stated by the comment.

Adding additional possible entries (like reboot) requires modifying other source code, which you'll have to compile AOSP to do anyways which defeats the purpose of specifically modifying stock, except maybe in a case like Cataclysm ROM by atl4ntis. Or edit smali.