yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] preacher65:
Thanks for the super-speedy reply. :) I've been having what I think are some hardware issues with the camera on my bacon, and have to keep flashing stock ROMs while tech support establish whether it's a software problem or hardware. Kind of tedious, but I guess they don't know if I'm doing it all correctly or not. But it means I keep losing my sdcard contents when I flash the stock ROMs, so this script has been a life saver! However I've been reflashing the ROM, booting into android, then copying sdcard contents back manually, and want to streamline the process - since there are nandroid backups on the sdcard, I can just sync the contents back to the device in recovery and then use restore.

Useful to know about the mount points and speed, and now I know what the obb folder's there for. Should have googled it before posting. :o
[Android Software/Hacking General [Developers Only]] beeshyams:
[MENTION=1143630]osmosis[/MENTION] and any body else

Sorry for this off topic post but thought I would try

I am looking for an app preferably or a script that simulates mobile usage like talking, testing, browsing, on line video etc that can be run from the mobile without needing a lap top. This should be configurable to run for X hours

What I am trying to do is to see how much power is consumed under different GPU and CPU frequencies

Can somebody help please
[Android Software/Hacking General [Developers Only]] osm0sis:
You can't simulate actual user actions easily, but you can at least start and stop apps from the command line using the "am" command. You could rig it up on a timer to start and stop the SMS/MMS app, browser, etc. periodically.
[Android Software/Hacking General [Developers Only]] beeshyams:
Thanks for a quick reply

Opening and closing of apps I guess is not tough. Stimulating user actions is what I had in mind. But yes it won't be easy.

One can use MacroDroid for triggering various apps but all of them require user intervention.

I was thinking of one app of it exists that say plays music for x minutes, browses for x minutes , on line video for x minutes etc and all these add up to say a couple of hours . calling ( toll free customer care numbers in peak hours is a great idea, takes hours to get through :), texting yourself etc can then be added. All of this, well most of it at least if it can be done without any user intervention, then one can run the test , say when sleeping and see the power used. That is what I had in mind. Googling didn't help

Thanks again
[Android Software/Hacking General [Developers Only]] mdamaged:
Well, I know Battery HD by smallte.ch has a calibration function which does those things. You could likely do most if not all those things with tasker as well.
[Android Software/Hacking General [Developers Only]] osm0sis:
UPDATE-Nexus.BootUnlocker.zip:

http://v.ht/osm0

My BootUnlocker Script zip has expanded to support "fastboot oem unlock" toggling on the N6 and N9, for possible emergency situations on these devices, thanks to the great - research of [MENTION=3029555]playahate[/MENTION]. Unfortunately, due to extensive bootloader security they can't be supported classically for a full unlock like the others, and Nexus stock recovery won't allow zip sideloads from anything that hasn't been signed with Google's private corporate keys, so this is the best we can do for now. I've also tightened up the scripting significantly, especially for device matching, and made the lockstate check more precise/safe for all devices. :good:

19303

downloads of the previous version! Very cool. Thanks for the interest everyone! Glad people are finding it useful. :D

TK GApps Now Available!:

http://v.ht/TKGApp

I'm also helping [MENTION=2777334]TKruzze[/MENTION] manage things with his new and improved TK GApps (Stock, Full, Mini, Micro, Nano, Pico) packages, the direct continuation of his famous PA GApps 2.0 project, featuring full customization of your Google Apps installation using config files and an intelligent shell script installer. We're a few releases in now and it's a pretty great setup; TKruzze has already added some fantastic new features and extensively updated the documentation! Oh yeah, I was the one who doctored up the "new" logo in Photoshop. :laugh: I've added a blurb in my OPs here under "Other" to connect things up as well. :)

GN_Synapse_Injector_Addon-AK2.zip:

http://v.ht/osmods

And in slightly less universal news (;)), I've pushed an update to my Galaxy Nexus kernel Synapse support injector AK2 addon zip repo, useful as an AnyKernel2 example, or a Synapse custom tweaking app support example for kernel devs, and pretty damn handy/powerful if you want to tweak the hell out of that old device, since I've got way more tunables available userside than Trickster or Adiutor do, and of course completely free. Generally only supporting the Lollipop kernel features, but I'd do bug fixes for KitKat as well if anyone reports one. :cowboy:
[Android Software/Hacking General [Developers Only]] beeshyams:
[MENTION=5490227]mdamaged[/MENTION]

Thanks for the app suggestion. Will explore. Yes, it can be done I suppose by tasker . I use Macro Droid which is pretty much like tasker but was looking at an app for easier solution
[Android Software/Hacking General [Developers Only]] beeshyams:
Thanks. I did try the app and it s close to meeting my needs, and guess will test with that one i get time.

Sending text messages is not a problem also. Only thing left out would be making calls . any idea as to how this can be implemented so v that it is automated. I had c calling a toll free service center in mind

Asking since you mentioned tasker. If you can suggest will try implanting in MacroDroid
[Android Software/Hacking General [Developers Only]] svetovit:
First of all, thank you for the fixes.

Since several days, i try to get crosstool-ng working, but i fail at the step "Installing pass-1 core C Compiler". (Host: Windows 7 64bit, Target: Ubuntu 14.04 with Kernel 3.14.x)

[INFO ] Installing pass-1 core C compiler

[ERROR] make[2]: *** [s-tm-texi] Error 1

[ERROR] make[1]: *** [all-gcc] Error 2

[ERROR]

[ERROR] >>

[ERROR] >> Build failed in step 'Installing pass-1 core C compiler'

[ERROR] >> called in step '(top-level)'

[ERROR] >>

[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@257]

[ERROR] >> called from: do_cc_core_backend[scripts/build/cc/gcc.sh@478]

[ERROR] >> called from: do_cc_core_pass_1[scripts/build/cc/gcc.sh@107]

[ERROR] >> called from: main[scripts/crosstool-NG.sh@638]

[ERROR] >>

[ERROR] >> For more info on this error, look at the file: 'build.log'

[ERROR] >> There is a list of known issues, some with workarounds, in:

[ERROR] >> '/home/hausinger/crosstool/share/doc/crosstool-ng/ct-ng.1.21.0/B - Known issues.txt'

[ERROR]

[ERROR] (elapsed: 15:50.52)

[15:52] / make: *** [build] Error 2

I tried different configurations, but none of them seems to be working.

My situation:

Cygwin 2.871 32-bit

crosstool-ng 1.21

Menuconfig:

Binutils 2.24, glibc 2.19, gcc version 4.8.2, Target OS (linux) with Kernel 3.14.43

Compantion libs: GMP 5.1.3, MPFR 3.1..2, ISL 0.12.2, Cloog 0.18.1, MPC 1.0.2

I have no Idea why crosstool can't build the toolchain successfully. Is there something wrong with my settings?

What Kernel Version did you use?
[Android Software/Hacking General [Developers Only]] osm0sis:
I went for middle of the road with 3.10, but you'll have to look at the actual log like it suggests to see where it went wrong.
[Android Software/Hacking General [Developers Only]] svetovit:
Thank you.

Solved the Problem with installing "diffutils" in Cygwin
[Android Software/Hacking General [Developers Only]] ariekanarienl:
Thank you so much for this script. I was able to unbrick my Nexus 9 with this, I had to make a few changes to make it work though.

First of all, I'm on the Android M preview, and I had accidently OEM locked my Nexus 9 and had a custom recovery installed. The custom recovery looped and other tips about erasing cache and userdata with fastboot didn't work (errored). So I took your script and made it shell friendly by removing the UI updating and echo-ing instead, ran it. Output indicated that OEM unlocking had been enabled, but once I tried it, it still failed.

I modified it to write 8x 1, starting at an offset 4 lower than the one from the script. This triggered an "end of device" reached error, letting me know I at least hit the end of the memory space. After this I was able to fastboot oem unlock :)

Unfortunately I don't know the exact offset now :(
[Android Software/Hacking General [Developers Only]] hatbrox:
Hi,

I have the nexus 6 and it won't boot anymore (this happened after a downgrade from Android M to stock image L 5.1.1)

the N6 is not rooted and doesn't have custom recovery, and the bootloader is locked.

when I run the command adb shell, I get:

Error: Device not found (I suspect that the phone has the OEM unlock setting set to N and the USB debugging set to disable)

​

Note: the phone is however visible in windows 8.1 device manager under Android Device: Android Composite ADB Interface

To be sure I tested this command:

fastboot oem unlock

and I get this error:

'Check Allow OEM Unlock' in Developer Options.

FAILED (remote failure)

Since the phone won't boot, I can't set this option.

Can your BootUnlocker Script zip help me? I would like to try again to install the stock image.

If yes, is there a guide somewhere? I found the guide for the N7 but I understand you need TWRP, which I can't install.

Any help would be appreciated. Thanks
[Android Software/Hacking General [Developers Only]] osm0sis:
Unfortunately, as stated in the instructions, a custom recovery is required since Google won't allow zips not signed with their corporate keys to flash on stock recovery.
[Android Software/Hacking General [Developers Only]] immortalwon:
I am also using the v4 fork on magisk alpha 26403 and using my custom print from chitero's mod, working perfectly without filling in all those additional props you introduced, but would probably make it look more legit.
[Android Software/Hacking General [Developers Only]] rseiler:
@osm0sis Hi, I thought I'd run this by you in case it's of any use and I'm not completely misunderstanding something (like, perhaps, your module isn't even involved).

I inadvertently (long story) was testing in such a way that the json contained only a LF at the end of each line rather than CR+LF. Visually, unless you go out of your way, a file done one way versus the other looks identical, so it can be tricky if you're not thinking about this trap. It matters because only the CR+LF way works (i.e. passes a check) despite the json standard itself apparently being flexible in that area.
[Android Software/Hacking General [Developers Only]] osm0sis:
Mine only have LF (i.e. Linux line endings) and work fine. I think you may have it backwards, because I've seen PI more likely to fail with CR+LF (i.e. DOS/Windows line endings) in the json.

chiteroman's IDE or editor or something keeps randomly saving everything in his repo with CR+LF (annoying), so I wouldn't be surprised if you'd gotten some like that from him at some point, but I just checked and his blank pif.json is currently fine as well (except for using tabs instead of spaces... 😵) 😛
[Android Software/Hacking General [Developers Only]] trevtdogg:
is there an easy to find 'reference' custom.pif.json file (eg. no longer working) that people can use as a template?

ideally one that can be downloaded separately to one of the PIF modules, incase people just want to grab that file on its own.
[Android Software/Hacking General [Developers Only]] osm0sis:
My module includes an empty custom.pif.json template as of v4: https://github.com/osm0sis/PlayIntegrityFork/blob/main/module/example.pif.json

And my guide contains a filled example: https://xdaforums.com/t/module-play-integrity-fix-safetynet-fix.4607985/page-177#post-89189572
[Android Software/Hacking General [Developers Only]] DiamondJohn:
Is there a way to get the current CPU load using BusyBox only? I currently use the following, but TOP is not provided by BusyBox.

top -b -n1 | grep "CPU:" | grep 'sys' | awk '{print $2+$4}'
[Android Software/Hacking General [Developers Only]] HippoMan:
Does busybox offer the "uptime" executable? If so, just run "uptime" ...

% uptime
20:39:56 up 28 days, 4:11, 6 users, load average: 0.71, 0.77, 0.84

This is from my linux box, but the output would be in the same format under Android.

PS: I just found docs, and it looks like "uptime" *should* be available via busybox.
[Android Software/Hacking General [Developers Only]] DiamondJohn:
Unfortunately, uptime give the average not the current instantaneous load.

2:56:04 up 5:26, 1 users, load average: 69.50, 65.64, 64.61

$ top -b -n1 | grep "CPU:" | grep 'sys' | awk '{print $2+$4}'
99
[Android Software/Hacking General [Developers Only]] HippoMan:
Oh, I see what you're looking for. Sorry for misunderstanding.

Interestingly, "top" on both my linux boxes (Ubuntu and Debian) doesn't give the same info that you are able to get. What machine/device did you run that "top" command on?

UPDATE: on my Android device, I can run the following, and I get the following results:

% busybox top -b -n1 | grep "CPU:" | grep 'sys' | awk '{print $2+$4}'
6

It's /system/bin/busybox on my device which is a symlink pointing to /data/adb/magisk/busybox , and I therefore have to run it as root via "su".

But I don't know which busybox software comes with my Magisk installation: it's the Magisk Alpha version 26401
[Android Software/Hacking General [Developers Only]] DiamondJohn:
At this stage, I am building the script on a Ubuntu box 22.04.03 LTS. BusyBox v1.30.1 (Ubuntu 1:1.30.1-7ubuntu3) multi-call binary., on a Oracle VBox

I am running my script with a bang operator of #!/usr/bin/busybox, but I test it by running busybox sh -l and then the piece of code above. And 6 is a possible answer. My 99 is because I am running the CPU very hard, 6 is close to idle.

I have needs for using multiple MUTEX/SEMAPHORE and use a sleep time before the next check on the locked resource, based on the CPU current load. Another surprise for me was that nslookup on both busybox and Ubuntu is not thread-safe. I haven't checked yet, but i will be interested to see if it is on Win64, and even more interesting will be to see if it is thread-safe on the win32 busybox i posted above.
[Android Software/Hacking General [Developers Only]] BillGoss:
Any reason why you can't use toybox (included in Android) instead of busybox for this one command?
[Android Software/Hacking General [Developers Only]] DiamondJohn:
No reason why I "CANT" but MANY reasons of why I wont. I have busybox on my WinPC as well. Which also means not having to startup and maintain a Vbox. And Busybox is simply a single portable exe!!!! The weird thing I have NEVER seen before (I use the VBox to comple ROM and SQLite from source for many years, if I minimize the Vbox the CPU % drops, if I give it focus, it jumps to 100%! WTF! That doesnt happen compiling ROMs, I havent investigated, but the obvious dif is busybox...

Busybox is STABLE. Every year a new version of Android and hence toybox comes out, and then huge / complex scripts stop working. I have been bitten tooooo many times. And hence one of the reasons busybox was probably created and soooooo, much time is spent maintaining it. Stability in dev as upgrades occur are a pretty big thing. No-one wants to program in a language that changes every year, by breaking the way things were done previously, and having to rewrite their code. This is a BIG and complex script

EDIT: And to be clear, the final dest will be WinPC, so this one command WONT be available, only the BusyBox supported commands. And thats exactly what i currently do. When I tested a switch to WinPC thats what highlighted the problem. The command is not available.
[Android Software/Hacking General [Developers Only]] BillGoss:
Thanks for the explanation. Maintainability and platform independence are important.

I, also, like my scripts to run on all my phones and the PC. I run Termux (phones) and Ubuntu (via WSL) on my PC, but I don't have to worry about other user running my stuff! 😄
[Android Software/Hacking General [Developers Only]] DiamondJohn:
Actually, eventually, I may post this script up on github.

It builds host files OR firewall blocklists (currently peerblock for Win) compounding many sources (of different types, inc resolving/converting hosts to IP for the firewall) locally or downloaded, multithreaded. Ands as far as "other users dont need to run", because I use multiple environments, I myself become "multiple users"; another reason to stick with a well defined busybox env.

There are a heap of individual IP firewall blocklists (in IP or CIDR formats), but I have yet to find a script that can combine all of them into one mega list of untrusted IP's. I am currently sitting at blocking around 3.2million IP's. Would the china and the eastern block please stop trying to ping me every second!
[Android Software/Hacking General [Developers Only]] HippoMan:
I think this is a very worthwhile effort!

It's comparatively easy to accomplish this kind of mass IP and CIDR blocking under linux through the use of iptables and ipset, but this isn't nearly so easy to do under Windows.

Your work in this would be very helpful for lots of people.
[Android Software/Hacking General [Developers Only]] DiamondJohn:
I use http://www.PeerBlock.com on Win11, and started using it back on Win7, when large host files stopped working (crashed windows). Windows current "firewall" has sooooo many firewall rules that simply enable their gamming and store features. Neither of which I use.

All peerblocks free list converted to subscription only a few weeks ago, and hence this build script. Which I had actually already built a version years ago.

As for linux, I have not seen any easy way to integrate multiple lists into the firewall and auto the update from the source. and cross between IP, CIDR, hiost resolution & simple copyu prebuilt. But my daily is Windows. Multiple lists in my case, and also some being very specific to me and how I use the internet; a lot of public lists block GtHub! I use those lists, but overlay my own allow list

Probably not the best or server ready, but It is really practical, logical & user friendly. You can leave it enabled, but only temp allow all HTTP, so if you visit a site you think is "safe" and thats blocked, you can temporarily allow HTTP only, and view the site with one button click, or even just allow that single IP for 5min or an hour etc etc. The main weakness (which hasnt caused me any issues I have noticed yet) is that it only supports ipv4, not ipv6. its also pretty old, so maybe it will die soon. I have turned off ipv6 as it wont be firewalled.

I am up to blocking 3,178,388,989 ip addresses, and I can view most "safe" websites without issue.
[Android Software/Hacking General [Developers Only]] HippoMan:
What I do under linux is just store the lists of IP's and CIDR's in an sqlite3 database and then use either a simple python or ruby script (I've used each of those languages at different times) to extract them and feed them to iptables via ipset.

In my case, I get the IP's and CIDR's from two sources:

* Lists of CIDR's from certain countries, all of whose connections I want to block.

* IP's and associated CIDR's that I determine programmatically from hosts that are trying to hack into my SMTP server and SSH server.

On my system, this is almost fully automated via an SMTP milter and via some custom log scrapers that I have written. I can also feed ad hoc IP's or CIDR's manually.

I don't need to worry whether any IP's that are listed might also happen to be contained within any CIDR's I have listed, because iptables handles that automatically.

But I'm sure that something like this could not be performed nearly as easily under Windows, which is why your utility is going to be quite useful.

UPDATE: But also, I have written a utility that takes a list of CIDR's as input as well as a list of IP's. It then returns a list of the supplied IP's that are already contained within the CIDR's in the form of sql DELETE commands which, when run, get rid of these particular IP's from my CIDR/IP list in the sqllite3 database. I occasionally run this utility, and it keeps the table closer to a minimal size.
[Android Software/Hacking General [Developers Only]] chuppito:
Hello, I tried unable to recover. Is there another solution to recover fingerprint on pixel 6? Thank you for your help
[Android Software/Hacking General [Developers Only]] Dragon Kumera:
thx a ton! Will give yours a try!
[Android Software/Hacking General [Developers Only]] osm0sis:
Screw being stuck on this old thread page... bump to the new one... :p
[Android Software/Hacking General [Developers Only]] osm0sis:
Updated my custom pif script!

- update for new Fork v5 System Properties section with "*.build.id", "*.security_patch", and "*api_level" default entries

- add "advanced" command line argument to append new Fork v5 Advanced Settings section with debugging VERBOSE_LOGS entry

- add fallback to ro.build.product if empty ro.product.device

- if first command line argument is a path use prop files from that directory and dump json to current directory

Example output using my Pixel 8 Pro .prop files and "advanced" argument:

system build.prop to custom.pif.json/.prop creator
by osm0sis @ xda-developers

- Using format: json (Advanced)

- Parsing build.prop(s) ...
google/husky/husky:14/UQ1A.231205.015/11084887:user/release-keys

- Parsing build UTC date ...
Fri Nov 10 23:10:00 UTC 2023

- Build date newer than March 2018, adding SECURITY_PATCH ...
2023-12-05

- Parsing build first API level ...
34

- First API level 33 or higher, resetting to 32 ...

- Writing new custom.pif.json ...
{
// Build Fields
"MANUFACTURER": "Google",
"MODEL": "Pixel 8 Pro",
"FINGERPRINT": "google/husky/husky:14/UQ1A.231205.015/11084887:user/release-keys",
"BRAND": "google",
"PRODUCT": "husky",
"DEVICE": "husky",
"RELEASE": "14",
"ID": "UQ1A.231205.015",
"INCREMENTAL": "11084887",
"TYPE": "user",
"TAGS": "release-keys",
"SECURITY_PATCH": "2023-12-05",
"DEVICE_INITIAL_SDK_INT": "32",

// System Properties
"*.build.id": "UQ1A.231205.015",
"*.security_patch": "2023-12-05",
"*api_level": "32",

// Advanced Settings
"VERBOSE_LOGS": "0"
}
[Android Software/Hacking General [Developers Only]] D€INOS:
Nice update osmOsis, I finally pulled the trigger from Chiteroman's old v14.0.

Worked perfectly without any issue, needed do the pif test twice.

Fingerprint been working since adopting it 6 weeks ago.
[Android Software/Hacking General [Developers Only]] Fishawy:
Ah, one more step towards a safer-ish destination :D

Thanks for the continuous supprt mate.
[Android Software/Hacking General [Developers Only]] GabbyWC:
Nice work as usual, osm0sis. I have a question. Why do zip files for the same releases from different sources also have different file sizes and hashes? If we use your PlayIntegrityFork v5.0 as an example, the release obtained by pressing "Update" from Magisk's modules menu downloads Play_Integrity_Fork-v5(5000).zip with a file size of 143,976 bytes and an MD5 hash of bda892af0ff1bf188b9248b9567081ad. Your GitHub releases page has PlayIntegrityFork-v5.zip with a file size of 143,292 bytes and an MD5 hash of 553cf4a39bfb46cfd3d91a15ccbd525b. I've also noticed this with other Magisk modules such as Shamiko. What is causing the file size and hash differences? The different file names should not have such an effect so are there actually differences in the zip file contents?
[Android Software/Hacking General [Developers Only]] osm0sis:
IIRC the Magisk app still streams the zip from the zipUrl in the update.json and replaces the update-binary on-the-fly with the latest from https://github.com/topjohnwu/Magisk/blob/master/scripts/module_installer.sh. That's the same file that I have, so the only difference is the resulting zip size from the recompression when you do an update through the Magisk app. (y)