[ROM][4.2] Android 4.2 for Nerds - Nexus 7 Android Development

Here is my new ASOP distribution. I made no changes to the GUI but unlock all hidden Features and install BusyBox and a terminal. Superuser.apk doesn't work anymore with 4.2, so I have written quick-and-dirty replacement. But be warned: It gives alls apps root rights without asking. Install only apps you really trust. There is a new command "setup-swap". You can create or delete a swap file with it, if you need more memory. "install-gapps" doesn't work currently.
The "install-gnu" plug-in is much bigger now. It supports I18N and UTF-8 now. Your terminal is in the same language you set in the Android config. And I have added more programming languages, too. So if you want a real GNU environment on your Tablet, just type "install-gnu" on the command line. A Bluetooth keyboard is highly recommended.
Because of the December bug here is version 4.2.1 now:
Mirror 1
Mirror 2
My public key is here and here is the signature.
You install it like a factory firmware, so you need "fastboot" in your "PATH", then run "flash.sh". Warning: All data will be overwritten.

Supersu
x-alina said:
Superuser.apk doesn't work anymore with 4.2, so I have written quick-and-dirty replacement
Click to expand...
Click to collapse
Rom sounds good, might flash it, but about superuser, it hasn't worked very well since ICS was introduced (IMO), i have alsways used SuperSU, although 4.2 doesn't have full multi user settings on SuperSU yet, it has been patched to work. Just sayin XD
Also, have you thought about making some of these things flashable (like the install GNU and setup Swap) as I would love these alongside Paranoid android XD
Awesome stuff though =D

Thanks for your work! will test this out!

Nice work, will test it in some time.

All Mirrors are up and running now.
Sorry for the inconvenience.

Android 4.2.1 for Nerds
Because of the December bug here is version 4.2.1 now:
Mirror 1
Mirror 2

I'll test and sent you feedback...

x-alina said:
Here is my new ASOP distribution. I made no changes to the GUI but unlock all hidden Features and install BusyBox and a terminal. Superuser.apk doesn't work anymore with 4.2, so I have written quick-and-dirty replacement. But be warned: It gives alls apps root rights without asking. Install only apps you really trust. There is a new command "setup-swap". You can create or delete a swap file with it, if you need more memory. "install-gapps" doesn't work currently.
Try this mod for root permissions. http://forum.xda-developers.com/showthread.php?t=1663222
Click to expand...
Click to collapse

Related

JFv1.31 Released! (updated 01-03-09)

Update (01-03-09)
v1.31 is out! This is a minor bugfix release to fix a few issues that had cropped up in v1.3.
The changes from v1.3 include:
Fixed the nandroid backup so that it works on sdcards with a raw fat32 filesystem (with no partition)
Added the telnetd binary from RC28
Fixed an issue with SuperUser where it was displaying the wrong processes in the su request popup
SuperUser should allow root to use su without displaying the popup (though there's not much point.. )
Added /system/modules and /system/xbin to fstab in normal and recovery mode
Minor fix for the update-script, so the progress bar acts more sanely
I have the usual RC30 and RC8 versions, and new for v1.3 is an ADP1 version.
ADP1: (md5: 96b2abd9a1da2852bc33b2052ea51b2a)
http://android-dls.com/forum/index.php?f=24&t=223&rb_v=viewtopic
http://www.gotontheinter.net/content/new-images-jf (at bottom of page)
RC30: (md5: 0f2e6a4244410e00028db55b4fbf808c)
http://android-dls.com/forum/index.php?f=24&t=223&rb_v=viewtopic
http://www.gotontheinter.net/content/new-images-jf (at bottom of page)
RC8: (md5: e008bbe1d93abd0c2e5e6218f012f20d)
http://android-dls.com/forum/index.php?f=24&t=223&rb_v=viewtopic
http://www.gotontheinter.net/content/new-images-jf (at bottom of page)
These updates are installed the normal way. Save them to your sdcard named update.zip, boot into recovery mode (home + power), and then press alt+l and alt+s. If you are switch between versions, e.g. from RC30 to ADP1, then it's usually a good idea to perform a wipe. You can try booting up without a wipe, but if it doesn't boot, or you get strange errors once it boots up, go back into recovery and perform a wipe (alt+w)
Note: To install these updates, you need to have a recovery image that uses test keys. If any of the following are true, you most likely have a recovery image that uses test keys
- you have installed my modified recovery image in the past
- you have an ADP1
- you currently have one of my modified firmwares installed
What's new?
The coolest new functionality in v1.3 is a new backup utility that allows you to perform a backup directly from recovery mode with alt+B. This is done using infernix's and brainaid's nandroid script, which they kindly modified to work in recovery mode. Let them know what you think . The backups are stored in a subfolder in the nandroid folder on your sdcard. To restore them, you have to copy them to your computer, and then flash them with the fastboot tool (sorry, no integrated restore yet).
If you get errors when making a backup, first make sure you have enough free space on the sdcard. it needs around 85-90mb. If you have enough space, then try reformatting the sdcard (fat32 is your best bet).
Other changes of note include
This version includes a new busybox binary that I compiled against uclibc, making it much smaller (1.8mb vs 700kb).
All busybox applets are linked at /system/xbin/bb, which is also in the path. So there are many more standard unix commands available in the terminal.
Many more modules and binaries are included in /system/xbin and /system/modules. They were also optimized for size, so even though there are more modules and binaries, they actually take up much less space than they did on v1.2
I added the terminal emulator application to /system/app. (don't worry, it won't, or at least shouldn't , cause any problems if you already have it installed)
got rid of the normal su binary, in favor of koush's su and SuperUser application. See details here
when you boot up into recovery, it will automatically show the text. You can press alt+L to turn off the text and ogle the background. (did I mention there's a new background? shhh. it's a secret )
fixed the annoying uptime bug, where the uptime is shown incorrectly in the settings
added /data/local/bin to the path. Feel free to add your own binaries/scripts here.
includes the /dev/mtd/mtd6 and /dev/mtd/mtd6ro devices, which allow access to the entire flash chip (other than certain restricted areas used by the radio)
new "ro.modversion" property, that is set to "JFv1.3". The intent of this property is so you can know you are running a modified version, as well as identify which version
added a modified /system/etc/security/cacerts.bks file, which contains additional certificates for cacert.org (courtesy of Disconnect)
added a /system/etc/resolv.conf file with the 4.2.2 family of DNS servers, to allow busybox's ping, wget, etc. to resolve host names
See the attached change logs for a complete list of changes with respect to the corresponding "official" firmware.
---------------
Update (01-03-09): Updated the links to point to the v1.31 versions
In addition to the updates themselves, I am also releasing a build environment that can use to build each update from scratch. You can use these to easily make your own custom updates. It includes some utilities that were built from git source. The binaries are for 32bit x86 linux. If you want to run it on a different platform, you're on your own.
NOTE: You don't need these to use my update. Just download one of the updates from above and install it. The build environments are only if you want to make your own customized update.
The general idea of the build environment is that it extracts the original files from the official update (or from my original ADP1 update), and then copies over anything from the various ModifiedFiles folders, then packages it all back up into a ready-to-be-applied update.zip. It does this for the boot image, recovery image and system folder. You can also specify files to delete in the various OriginalFilesToDelete.mk files.
Consider anything new that I created for the build environments (the makefiles, etc.) to be in the public domain. Everything else retains its original license of course.
Instructions:
- extract the build environment into a folder
- download the official update that the update is based on, and put it in the root of the build environment. (note: use my original ADP1 update for the ADP1 build environment. available on this page)
- run make as root. yes, it has to be with root, because the binaries in the 2 cramfs images should be owned by root. (note: I plan on using fakeroot in the future, to workaround the need to be root)
- after make finishes, assuming there are no errors, the update should be in Workspace/update.zip.
Download the build environments here:
ADP1: (md5: 2d116b334515d4d702776b9d74d2e658)
http://android-dls.com/forum/index.php?f=24&t=223&rb_v=viewtopic
http://www.gotontheinter.net/content/new-images-jf (at bottom of page)
RC30: (md5: 29ced6e7601bac47252e51e5ac4f0ca4)
http://android-dls.com/forum/index.php?f=24&t=223&rb_v=viewtopic
http://www.gotontheinter.net/content/new-images-jf (at bottom of page)
RC8: (md5: b26f3cd244da9b8662766db69734000e)
http://android-dls.com/forum/index.php?f=24&t=223&rb_v=viewtopic
http://www.gotontheinter.net/content/new-images-jf (at bottom of page)
Sweet! great timing JF works like a dream!
Btw, love the new recovery background...I feel seizures coming on...
Stericson
Fantastic! Been waiting for your update, looking forward to it. THanks JF and others who made this possible!
Thanks for the great work!!!
Awesome, thanks!
So what would we need to do to replace the browser with Koush's auto-rotating version and how about replacing the alarm clock with Klaxon?
This is awesome! a little pre 2009 present! thanks JF for all that you do !!!
Just posting to say this update worked a-ok for me. Thanks JF for changing busybox and for the new su.
s0niqu3 said:
Awesome, thanks!
So what would we need to do to replace the browser with Koush's auto-rotating version and how about replacing the alarm clock with Klaxon?
Click to expand...
Click to collapse
Download the build environment for the version you want, extract it, put the klaxon and browser apk into system/ModifiedFiles/system/app, put in a delete entry into system/ModifiedFiles/OriginalFilesToDelete.mk for the alarm apk and odex, then run make as root.
JesusFreke said:
Download the build environment for the version you want, extract it, put the klaxon and browser apk into system/ModifiedFiles/system/app, put in a delete entry into system/ModifiedFiles/OriginalFilesToDelete.mk for the alarm apk and odex, then run make as root.
Click to expand...
Click to collapse
Will this work on windows vista with cygwin as opposed to a full linux VM?
Are there any specific binaries I need to install?
thanks again!
one last comment... love the Alt+B i know B is supposed to be for backup, but in my mind it stands for BADASS!!!!!!
s0niqu3 said:
Will this work on windows vista with cygwin as opposed to a full linux VM?
Are there any specific binaries I need to install?
thanks again!
Click to expand...
Click to collapse
JesusFreke said:
The binaries are for 32bit x86 linux. If you want to run it on a different platform, you're on your own.
Click to expand...
Click to collapse
You might be able to get it to work. You'll need to replace the linux binaries in the tools folder with windows equivalents.
But tbh, you're best bet is to install vmware and get an ubuntu VM running.
Did a quick search and could not find what ADP1 is. Is this the developer version?
JesusFreke said:
In addition to the updates themselves, I am also releasing a build environment that can use to build each update from scratch. You can use these to easily make your own custom updates. It includes some utilities that were built from git source. The binaries are for 32bit x86 linux. If you want to run it on a different platform, you're on your own.
The general idea of the build environment is that it extracts the original files from the official update (or from my original ADP1 update), and then copies over anything from the various ModifiedFiles folders, then packages it all back up into a ready-to-be-applied update.zip. It does this for the boot image, recovery image and system folder. You can also specify files to delete in the various OriginalFilesToDelete.mk files.
Consider anything new that I created for the build environments (the makefiles, etc.) to be in the public domain. Everything else retains its original license of course.
Click to expand...
Click to collapse
I applaud you, sir.
momentarylapseofreason said:
Did a quick search and could not find what ADP1 is. Is this the developer version?
Click to expand...
Click to collapse
ADP1 stands for Android Dev Phone 1.
jashsu said:
ADP1 stands for Android Dev Phone 1.
Click to expand...
Click to collapse
What I figured.... thanks!
JesusFreke said:
You might be able to get it to work. You'll need to replace the linux binaries in the tools folder with windows equivalents.
But tbh, you're best bet is to install vmware and get an ubuntu VM running.
Click to expand...
Click to collapse
Ah, thanks for the confirmation.
Is there anyone out there that can tackle this for me? I'm visiting family through the 5th, and don't feel right installing a linux VM on their computer.
If so, PM me, and I can give you the specifics, but really all I'd like is for the alarm clock to be removed and replaced with Klaxon, and for the browser to be replaced with koush's build that auto-rotates.
This would be for a G1 RC30 build.
Cheers, and thanks in advance!
jashsu said:
I applaud you, sir.
Click to expand...
Click to collapse
I stand.. applauded?
Thanks!
Thanks JF, I just flashed the ADP1 version and it is working great so far.
Have you attempted to add in the MyFaves app to the ADP build? I had tried a couple of things previously, but I was running into some errors. I may try it with your new build environment later if it is something you haven't attempted.
BTW - for those looking for a virtualized Linux environment, I also recommend Sun's Virtualbox (http://www.virtualbox.org/). It is free for personal use and provides a lot of the functionality that you get from the paid versions of VMWare. In fact, some things seem to run smoother when running Linux virtualized on Vista 64bit; i.e. I can get copy/paste between OSes and auto-resizing guest screens without a lot of extra hassle. Just make sure that you read up on how to use the USB virtualization so you can create the filter for the phone as a USB device.
Great work once again JesusFreke!
-Brint
s0niqu3 said:
Ah, thanks for the confirmation.
Is there anyone out there that can tackle this for me? I'm visiting family through the 5th, and don't feel right installing a linux VM on their computer.
If so, PM me, and I can give you the specifics, but really all I'd like is for the alarm clock to be removed and replaced with Klaxon, and for the browser to be replaced with koush's build that auto-rotates.
This would be for a G1 RC30 build.
Cheers, and thanks in advance!
Click to expand...
Click to collapse
You can always do it manually of course. Install the update, then remount the system as rw, then delete the alarm apk and odex and the browser apk and odex from /system/app, and copy the klaxon and modified browser apk to /system/app
JF!!! You... are a scholar and a gentleman... A happy new year to you...
s0niqu3 said:
Is there anyone out there that can tackle this for me? I'm visiting family through the 5th, and don't feel right installing a linux VM on their computer.
Click to expand...
Click to collapse
Couldn't you also use an Ubuntu LiveCD just as easily? That would allow temporary access to a 'nix environment without touching the existing drive, mount one of the partitions temporarily for your make environments. Just a thought...

[Windows] Make update.zip of Google apps from NAND dump! Works w/ 1.6 and new Market!

GApps2zip
This script makes an update.zip file that only contains the Google Apps from the HTC release of the 1.5 firmware upgrade for the ADP 1. This update.zip should be flashable on any build and it should work without a problem, but since I'm just a n00b sophomore in highschool, I am naturally poor and can't guarantee anything.
Because there are already a few alternatives to this for Linux and the majority of Android users use Windows, I decided to make this a Windows-only batch script.
You MUST have the Java Runtime Environment installed in order to run this script! The signing utility requires Java and you won't be able to flash an unsigned update. If it doesn't work even if you have Java, you may have to reinstall Java as it is not in your PATH variable for whatever reason.
UPDATE: Updated and, as far as I know, should now work fine with the 1.6 developer images from HTC as well as personal NANDroid backups of most all 1.6 Android ROMs.
INSTRUCTIONS
1) Either do a or b. It is advised to use a personal NANDroid backup (b) as it does not violate any licenses, but it has not been testeda) Google for the file "signed-dream_devphone_userdebug-img-14721.zip" It should be on the HTC support page for the ADP 1, but it wont be the first result in Google. It is not advised to use this method as you need to agree to a license prohibiting modification of the file in order to download it. Rename the file to "backup.zip"​b) Restore to a regular build that has all of the Google Apps (like the regular OTA cupcake update) and then run a NANDroid backup. Then make a zip file that only has the system.img file from the NANDroid dump and name the zip "backup.zip"​2) If you haven't already, unzip the entire contents of the gapps2zip.zip file into a directory. For sake of simplification, I am assuming it is unzipped to C:\gapps2zip
3) Place the "backup.zip" file in the same directory as the GApps2zip.bat file (C:\gapps2zip) and DON'T rename it or unzip it.
4) Open up a command prompt window (Hit Windows + R, type in CMD, then click OK)
5) cd to the directory in which the GApps2zip.bat file, utils directory and the backup.zip file. For example:
Code:
cd C:\gapps2zip
6)Type in "GApps2zip.bat" (without the quotes) and hit enter. Watch and wait.
7) If all goes well, you should have an update_gapps.zip folder in C:\gapps2zip. Put it on your SD card, make a NANDroid backup, and flash after flashing an AOSP (Android Open Source Project) build that doesn't include the Google Apps.
Credits
Cyanogen for his hard work and dedication
Maxisma for a similar script on which this is based
Google for their ingenious ideas (although their legal department can be a pain)
Everyone who is willing to test this script out
Everyone else xD
Redistribution
Feel free to redistribute the archive wherever you like, but please give me credit along with Maxisma and do not modify the archive in any way.
Great job unk!
amgupt01 said:
GApps2zip - Created by Ankush Gupta (twitter.com/unkzdomain and unkzdomain.com)
This script makes an update.zip file that only contains the Google Apps from the HTC release of the 1.5 firmware upgrade for the ADP 1. This update.zip should be flashable on any build and it should work without a problem, but since I'm just a n00b sophomore in highschool, I am naturally poor and can't guarantee anything.
Because there are already a few alternatives to this for Linux and the majority of Android users use Windows, I decided to make this a Windows-only batch script.
You MUST have the Java Runtime Environment installed in order to run this script! The signing utility requires Java and you won't be able to flash an unsigned update.
This script does NOT work on a build that includes the new market as there are some incompatibilities with the files for it and the ones provided by HTC (namely the MarketUpdater.apk for the new market). This is pretty much doesn't matter however, because all AOSP builds will not include ANY Android market anyways.
INSTRUCTIONS
1) Google for the file "signed-dream_devphone_userdebug-img-150275.zip" (It should be on the HTC support page for the ADP 1, but it wont be the first result in Google)
2) If you haven't already, unzip the entire contents of this zip file into a directory. For sake of simplification, I am assuming it is unzipped to C:\gapps2zip
3) Place the "signed-dream_devphone_userdebug-img-150275.zip" file in the same directory as the GApps2zip.bat file (C:\gapps2zip) and DON'T rename it.
4) Open up a command prompt window (Hit Windows + R, type in CMD, then click OK)
5) cd to the directory in which the GApps2zip.bat file, utils directory and the signed-dream_devphone_userdebug-img-150275.zip file. For example:
Code:
cd C:\gapps2zip
6)Type in "GApps2zip.bat" (without the quotes) and hit enter. Watch and wait.
7) If all goes well, you should have an update_gapps.zip folder in C:\gapps2zip. Put it on your SD card, make a NANDroid backup, and flash after flashing an AOSP (Android Open Source Project) build that doesn't include the Google Apps.
Credits
Cyanogen for his hard work and dedication
Maxisma for a similar script on which this is based
Google for their ingenious ideas (although their legal department can be a pain)
Everyone who is willing to test this script out
Everyone else xD
Redistribution
Feel free to redistribute the archive wherever you like, but please give me credit along with Maxisma and do not modify the archive in any way.
Click to expand...
Click to collapse
when it asks u to replace system.img, do you click yes or no?
Looks interesting ill test it out later
Guyver75 said:
when it asks u to replace system.img, do you click yes or no?
Click to expand...
Click to collapse
You click Yes. You shouldnt have extracted the zip though, but it won't make a difference anyways.
Looks interesting ill test it out later
amgupt01 said:
You click Yes. You shouldnt have extracted the zip though, but it won't make a difference anyways.
Click to expand...
Click to collapse
oh ok, oops. i clicked no. guess ill have to redo it
ok trying to understand this. From what i get is you download, Lets say cm 4.2 without google (made up rom dont go looking for it)
then you flash that to are phone.
next when flash update_gapps.zip
Then we will have a cm rom with google apks?
And in returns the update_gapps is kinda like a theme only adding the needed files?
xile6 said:
ok trying to understand this. From what i get is you download, Lets say cm 4.2 without google (made up rom dont go looking for it)
then you flash that to are phone.
next when flash update_gapps.zip
Then we will have a cm rom with google apks?
And in returns the update_gapps is kinda like a theme only adding the needed files?
Click to expand...
Click to collapse
Exactly. The only thing is that since this uses an official, legal source, it doesn't include the new market and stuff...
Ok cool but once 1.6 adp1 is out we will have to update the script and do this again?
amgupt01 said:
This script makes an update.zip file that only contains the Google Apps from the HTC release of the 1.5 firmware upgrade for the ADP 1.
Click to expand...
Click to collapse
I applaud your efforts to help the community. Many thanks.
For those who think this is proof modding and this community will live on, think again. What he's doing aids and abets violation of Goog's rights. This thread will be locked and the links taken down. Welcome to the new world of Android.
xile6 said:
Ok cool but once 1.6 adp1 is out we will have to update the script and do this again?
Click to expand...
Click to collapse
Well, provided that HTC distributes ADP 1.6 the same way as they are 1.5 and that the file dependencies for closed-source apps are similar, we could just reuse this same script with maybe a few minor modifications.
ytj87 said:
I applaud your efforts to help the community. Many thanks.
For those who think this is proof modding and this community will live on, think again. What he's doing aids and abets violation of Goog's rights. This thread will be locked and the links taken down. Welcome to the new world of Android.
Click to expand...
Click to collapse
How does it aid and abet to violations of Google's rights? I am basically linking to an official mirror (HTC) that is licensed by Google to distribute the files.
@ amgupt01
Thanx now all we got to do is let the builds continue.
great job mr. sophomore, you should get together with cyanogen on this although i'm sure he's probably going to do something similar.
is it safe to sign in to google with the newly created update_gapps2zip?
amgupt01 said:
How does it aid and abet to violations of Google's rights? I am basically linking to an official mirror (HTC) that is licensed by Google to distribute the files.
Click to expand...
Click to collapse
I think the issue is that Google doesnt want its closed source apps put on non google-experience phones. This guy's method allows just that.
Cyanogen's method (from what I can gather) is to run an app on your phone that backs up the apps that you have on your phone (presumably licensed copies that you acquired when you purchased your phone, or during an OTA update), and then restores them after you run his barebones ROM. In this manner, you are only using backed up copies of software you are entitled to use.
I read somewhere (maybe in Google's C&D? I'm to lazy to go look) that Google does not allow these applications to be copied or extracted or something to that affect.
Honestly, why on earth would we expect them to react any differently?! This is a growing pain. We will all be better for it when its passed.
Here's how I'm planning on riding this out:
1. When Cyanogen releases 4.2, I will unroot my phone, and get the most recent OTA update from Tmobile.
1. Install Cyanogen's 4.2 ROM, using whatever method of installation is required to back up my closed source applications and restore them.
2. Continue to update Cyanogens ROMs this way until we discover that our old closed source apps are no longer compatible with our state of the art ROM.
3. Begin to seek out alternative apps, or check progress of the new "Open Android Alliance" or whatever those guys are calling themselves since this whole fiasco started, to see how feasible that option is.
4. Buy a new phone? I mean, how far down the road are we talking here?! And yes, when the time comes, assuming Google doesn't do something completely draconian that makes us pine for the good old days when they sent a C&D to Cyanogen, it will be another Android phone (subsequently rooted, of course)
I don't really see another legal option.
Code:
Cyanogen on twitter
So I think I've come up with a solution that should work and not violate any licenses. Just need to polish it up a bit.about 14 hours ago from twidroid
Thanks for this script.. i am amazed of how fast the community is getting up from the C&D .... Open Android Alliance is kicking off, Maxima is already out with a NO Google ROM, and this script, to get google's apps... wonderful...
amgupt01 said:
How does it aid and abet to violations of Google's rights? I am basically linking to an official mirror (HTC) that is licensed by Google to distribute the files.
Click to expand...
Click to collapse
amg, I'm worried on two fronts.
1, HTC is redist'ing Goog bits. They may very well get a c&d. I can't imagine HTC has a license to freely distribute them to anyone and everyone. I have to believe the license is for use on HTC hardware, not any user worldwide as download and extraction would allow.
2, you are aiding in the grabbing of those bits that a user may not have license to.
Granted, I know the vast majority of us have license. But there a few non-Goog experience phone owners around here. I suspect the mods will lock down.
But again... I think that would be wrong. We have license to the bits and grabbing them from HTC is not a violation IMO. But we'll see.
Thank you.
amg,
From the HTC license page when you download:
-----
You may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Google Software or any part of the Google Software. You may only load the Google Software onto the Android Developer Phone 1, and except in conjunction with third party software that makes up the Android system image, you may not combine any part of the Google Software with other software, or distribute any software or device incorporating a part of the Google Software.
-----
So it's clear this is illegal. I think HTC will have to pull this down sooner or later as widespread extraction starts.
btw, I think you're fine. HTC will hear from Goog and this thread will be locked. But otherwise don't worry.

[TOOL] SimpleSU v0.7

So.
As i was slowly preparing DSC v2.0 i met a hard decision: what root tool to include
Both Superuser and SuperSU are nice, but quite heavy
I decided to take my own way - rewrite su executable itself to suit my vision:
I've aknowledged that i have not modified my root access list for half a year. I don't need and don't want a separate Java process to control root access. I want a simple way to allow root access for application (via whitelist), but block unwanted (i.e. all not in list). Still, it should allow end-user to install either SuperSU or Superuser.
In short - ideal su solution for myself that should also work good for depersonalized custom ROM (with predefined access list), leaving it to end-user to decide which app he will install for superuser access.
And i didn't find a ready solution, so decided to write my own.
Here it is (attached):
SimpleSU
Simplest and lightest superuser solution (with access control)
How it's done:
Same as usual SU for Linux with control access list read from /system/etc/dsc.su_list
dsc.su_list structure is very simple:
One line per android app (case sensitive), windows and unix line breaks should be supported fine.
Current proposed list for DSC 2.0 (and an example):
dsc.SimpleSU.acl
dsc.settings
dsc.uv
dsc.levels
dsc.mugen
jackpal.androidterm
ru.org.amip.ClockSync
eu.chainfire.supersu
eu.chainfire.supersu.pro
com.ryosoftware.adbw
com.googlecode.droidwall.free
com.noshufou.android.su
de.schaeuffelhut.android.openvpn
de.schaeuffelhut.android.openvpn.installer
com.elsdoerfer.android.autostarts
com.speedsoftware.rootexplorer
com.geeksoft.screenshot
com.rerware.android.MyBackupPro
com.ghostsq.commander
ws.plattner.cifsmanager
mobi.pruss.superdim
com.force.timezonefixer
com.bigtincan.android.adfree
Caller process tree is walked till init, if match is found, access is granted.
How to install?
Via adb shell:
Code:
adb push su /system/xbin/
adb shell chmod 6755 /system/xbin/su
adb push dsc.su_list /system/etc
adb shell chown root.root /system/etc/dsc.su_list
adb shell chmod 644 /system/etc/dsc.su_list
Note that you have to manually add entries to white list (/system/etc/dsc.su_list) to grant root access in form of app full Java class name. For example, it's com.keramidas.TitaniumBackup for Titanium Backup.
As pointed by dr911, works in multiuser environment (being a linux binary).
Currenly SimpleSU supports two command formats:
Usual: su -c 'make me a sandwich'. Note that only "-c" works now. Seems to be enough though. Command simply passed to the shell.
Legacy (as seen in Google/Android su source): su username make me a sandwich. Shell is not executed in this case, so no environment variables right now in this format.
Have fun,
Sergei.
Changelog:
02.04.2013: v0.7. ":service" suffix granted root access for already granted app, more logging on reject. (0.6 had only more logging)
27.11.2012: GUI updated - forgot about remounting /system in rw mode. Attached to this post.
21.11.2012: GUI done. http://forum.xda-developers.com/showpost.php?p=34439975&postcount=41
14.11.2012: v0.5. LD_LIBRARY_PATH fixup (taken from ChainsDD), pointed by Rupert Rawnsley. Also some legacy format command-line handling changed. Also, insecure version added (no checks made, asked=granted).
11.11.2012: v0.4. Code cleanup, no longer beta, revised and fixed code with potential string overflows.
09.11.2012: v0.3b. Code changed to allow legacy format command execution.
09.11.2012: v0.2b. Fixed call with multiply parameters. OpenVPN installer works. Dynamic linking, so very small binary. Logging to system log.
07.11.2012: Fixed segmentation fault on reject, added version and build date, removed debug info.
A request:
If somebody owns Pro/Elite/other commercial Superuser or SuperSU - would you provide it's full Java class name?
For example, it's
eu.chainfire.supersu
com.noshufou.android.su
for free versions.
eu.chainfire.supersu.pro
Sent from my Amazon Kindle Fire using Tapatalk 2
Can I avoid these little delays (the appearing popup of SuperSU or Superuser) with this alternative?
And if I have Superuser preinstalled can I delete it and are there other files which belongs to it and can be deleted?
Thank you for sharing your work
com.noshufou.android.su.elite for Superuser Elite
Hi
Have you noticed any improvement in terms of speed etc? Is superuser really that heavy? How much RAM can i get by using this and ditching the superuser app? We can use this in our Galaxy 3 forum !
Get the list of all android activities from here
http://activities.droidicon.com/
Androidmarketuser said:
Can I avoid these little delays (the appearing popup of SuperSU or Superuser) with this alternative?
And if I have Superuser preinstalled can I delete it and are there other files which belongs to it and can be deleted?
Thank you for sharing your work
Click to expand...
Click to collapse
Delete system/xbin/su and uninstall your superuser app from the system.
Oh. Looks SimpleSU got in news
Androidmarketuser said:
Can I avoid these little delays (the appearing popup of SuperSU or Superuser) with this alternative?
And if I have Superuser preinstalled can I delete it and are there other files which belongs to it and can be deleted?
Thank you for sharing your work
Click to expand...
Click to collapse
You won't experience any delays - but in cost of manually editing the list. And no popups, it's simply a linux binary. After replacing su binary you may uninstall Java part.
Shree_Jamdar said:
Have you noticed any improvement in terms of speed etc? Is superuser really that heavy? How much RAM can i get by using this and ditching the superuser app? We can use this in our Galaxy 3 forum !
Click to expand...
Click to collapse
I did experience lags when using Superuser and SuperSU. I don't think modern device would benefit from SimpleSU. I expect to free 15-20MB. Good for Streak with 512MB.
I may eventually write a list editor, but most probably won't.
Again, this tool would do as preinstalled SU solution in Custom ROM (though i can't test >2.3 compatibility):
Grant predefined (and included in ROM) apps the superuser rights.
Allow end-user to choose and install he's preffered SU solution right from Play Store.
--
Have fun,
Sergei
_n0p_ said:
You won't experience any delays - but in cost of manually editing the list. And no popups, it's simply a linux binary. After replacing su binary you may uninstall Java part.
I did experience lags when using Superuser and SuperSU. I don't think modern device would benefit from SimpleSU. I expect to free 15-20MB. Good for Streak with 512MB.
I may eventually write a list editor, but most probably won't.
Again, this tool would do as preinstalled SU solution in Custom ROM (though i can't test >2.3 compatibility):
Grant predefined (and included in ROM) apps the superuser rights.
Allow end-user to choose and install he's preffered SU solution right from Play Store.
--
Have fun,
Sergei
Click to expand...
Click to collapse
Exactly what I searched, thanks :good:
I will test it on my old Desire with Android 4.1, I can tell you whether it's compatible or not.
nice tool...very lite. i m using this in extreme barebone roms for my galaxy mini. really nice, but the problem is only some apps r being granted permissions, some denied.
i hope u increase the list of activities. then this is a hit for me
good luck..
Android_United said:
nice tool...very lite. i m using this in extreme barebone roms for my galaxy mini. really nice, but the problem is only some apps r being granted permissions, some denied.
i hope u increase the list of activities. then this is a hit for me
good luck..
Click to expand...
Click to collapse
Can you provide an example of app you have added to the access list, but it didn't work?
i looked in the op and still dont understand how to install?? flash the simple SU zip in recovery.. then what???
evo401 said:
i looked in the op and still dont understand how to install?? flash the simple SU zip in recovery.. then what???
Click to expand...
Click to collapse
if you couldnt read/understand the OP, then your probably better off sticking with SuperSU or SuperUser...
Heres my non-developer understanding (potentially flawed):
Its a binary, with manual entry's (IE text editing) of pre-approved apps, it doesnt have a frontend/gui like SuperSU or SuperUser which allow you to graphically chose what to allow and what to deny...
OP: I like it so far, as for your thoughts on a graphical editor, I for one would love to see one, and before I get jumped for saying then whats the difference between the other options, an editor would be short and sweet, open, edit list, close, ram once again free (since that is the concern), instead of having it stay resident in RAM...
On that note, if I may, there are tools like Rays Toolbox and Android Tuner (formerly system tuner), that I would like to put in a feature request for them to add an editor in the app (Android Tuner already has a few editor's, adding a SimpleSU editor would just add to the overall completeness of the toolkit) to edit the list for SimpleSU, with your permission of course!
Thanks again!
Latest version working on Galaxy fit !!! It really imporves performance on low ram(We got 256mb) devices maybe OP might consider sharing it by moving thread to a more general location on xda rather than on a device forum my thoughts.
Dark Passenger said:
Latest version working on Galaxy fit !!! It really imporves performance on low ram(We got 256mb) devices maybe OP might consider sharing it by moving thread to a more general location on xda rather than on a device forum my thoughts.
Click to expand...
Click to collapse
Yes, exactly.. it works on galaxy y duos and galaxy yseries.. its better to move it to android app development section may be? as it will get more support there i feel.. Please do consider op.. And thanks for this cool app.. Its awesome. And i dont think it needs an editor, as we can have editors from many apps .. i have around 4-5 apps which has editors.. surely users who use this app will be bit advanced users..
and i bet all of them will have file editors.. and all file explorer apps comes with editors nowadays.. well , just my thoughts.. but if you can keep the file browser to bare minimum and keep size of apk less.. then i would surely like to see it too
i am hoping to use this from now on.. so i will give review for new updates.. have you pushed it to play store? i think you should do that.. many will like this idea!
Thanks again..
As far as i understood we can edit it to add new apk names to give permission.. Because Android_united kinda confused me.. So, asked this again.. i did use it and it did worked.. its just may be he didnt see that?
Works like a charm! The only problem I had is that I was doing this through Terminal Emulator, and for some reason, when i did all this, superuser perrmisions were not granted for Terminal Emulator. After a little digging i found that i have to add this line
Code:
jackpal.androidterm2
and leave the one that's there by default
Code:
jackpal.androidterm
to the dsc.su_list
Now it works, i have SU for Terminal Emulator, Adfree, and i added SetDNS (Impossible to use Google play on CM7.2 without it )
I like the idea of this but be extra careful to only whitelist activities you really use.
I could imagine a malware somehow managing to enter your system and masquerading as one of the prepopulated entries in dsc.su_list, though of course no such vulnerability exists so far.
Thank you for feedback.
--
I cannot publish it on Play Store - it's not an Android app. To publish it, i need to write SimpleSU Installer, or something like that (see below).
--
Regarding editor - it would be nice if someone else would write it I really don't expect to have enough free time required.
--
A 0.4 version i consider as stable (revised potentially bad code with possible string overflows) attached to first post.
--
Malware that could act as Java class - i thought of several scenarios, but any requres root access beforehand. And if you install an app - it's your responsibily to be careful.
--
Have fun,
Sergei
_n0p_ said:
Can you provide an example of app you have added to the access list, but it didn't work?
Click to expand...
Click to collapse
titanium backup, es-file explorer. i tested wit only these 2. as these 2 weren't gaining root access, so i stopped using this. if u want me to test wit more apps, i can help u out.
will be using this surely once it receives more updates :good:
:good: gud luck..

[ROM][4.1.2][4.1.1] AOSP for Nerds 2: Running GNU on Android

Here is the next version of my AOSP distribution. It has all the hidden features (camera icon, 720p video, ...) unlocked and comes with a terminal, BusyBox and Superuser pre-installed. I made no changes to the GUI. You can simply type "install-gapps" to install the Google Apps. Typ "setup-swap 1024" to get a 1 GiB big swap file.
The gread new feature is that you can type "install-gnu" to get a full GNU command line environment parallel installed with Android: glibc, bash, gcc, g++, perl, python, mc. nano, vim, gpg, ssh and so on. You can compile your programs on your own tablet. No need for a cross-compiler. I have compiled OpenWrt with it. And you can do all the other stuff you on the normally on the command line do.
And yes a Bluetooth keyboard is highly recommended. I have written a keymap for German Macintosh style keyboards and included it into the distribution.
Here is my PGP key. Please use one of the mirrors. My home server has a really slow Internet connection.
Mirror 1: 4.1.2 (signature), 4.1.1 (signature)
Mirror 1: 4.1.2 (signature)
.
Please tell me, if you miss a command.
x-alina said:
Here is the next version of my AOSP distribution. It has all the hidden features (camera icon, 720p video, ...) unlocked and comes with a terminal and Superuser pre-installed. I made no changes to the GUI. You can simply type "install-gapps" to install the Google Apps. Typ "setup-swap 1024" to get a 1 GiB big swap file.
The gread new feature is that you can type "install-gnu" to get a full GNU command line environment parallel installed with Android: glibc, bash, gcc, g++, perl, python, mc. nano, vim, ssh and so on. You can compile your programs on your own tablet. No need for a cross-compiler. I have compiled OpenWrt with it. And you can do all the other stuff you on the normally on the command line do.
And yes a Bluetooth keyboard is highly recommended. I have written a keymap for German Macintosh style keyboards and included it into the distribution.
Here is my PGP key and here the signature. Please use one of the mirrors. My home server has a really slow Internet connection.
Mirror 1: 4.1.2
4.1.1 version and more mirrors will follow.
Please tell me, if you miss a command.
Click to expand...
Click to collapse
This looks really cool!
I wonder if you could get the DSI XDA kitchen working in the command environment?
I heard you like android
scrosler said:
This looks really cool!
I wonder if you could get the DSI XDA kitchen working in the command environment?
Click to expand...
Click to collapse
I gonna build android on your android to put it onto my android xD
Thanks for your hard work, looks great..
delete this
guys, how to flash this thing ?
---------- Post added at 02:53 PM ---------- Previous post was at 02:05 PM ----------
ok got it, really impressed , Is there any chance to release flashable zip which will turn your rom into this ?, i would like to have 4.2 and ability to compile software on it etc. this would be great. Great job anyway. big thanx
yaro014 said:
guys, how to flash this thing ?
Click to expand...
Click to collapse
You flash it like the factory firmware. You need Linux and fastboot from the SDK in the PATH and than run the ./flash.sh script.
Warning: All data will be overwritten.
Seems really cool... but I dont know if is a good idea to swap the internal memory...
360porcento said:
Seems really cool... but I dont know if is a good idea to swap the internal memory...
Click to expand...
Click to collapse
In the most time the swap file isn't used. It's only a safeguarding and disabled by default.

[APP] µSuper - Minimalistic superuser implementation

Inspired by SimpleSU (I really love it), which is not so simple to use after all (mainly because it is intended for shipping in the ramdisk or the likes), and closed source, I made my own superuser implementation, µSuper.
I provide it to you, mainly so you can give me some feed back or just try it, whatever you prefer.
Just like SimpleSU it uses a text file.
Unlike SimpleSU this text file contains the UIDs of the apps, not their package names (which makes µSU less vulnerable to frauds). It is also not on the hard to access /system partition, but in the private data directory of µSU, and globally set to read-only.
With only 309 SLOC (app and binary combined) I think it is safe to say that it is really tiny.
The source code is publicly available on Github.
@MarcoToo I know this has been here for ages but I'm amazed this thread has less than 600 views and You've only got 3 thanks... It's my favourite SuperUser app as it uses next to no resources. The only thing wrong is that it won't work with anything above JellyBean 4.2.2 which is a shame; I don't supposed you plan to support further Android versions? or is it easy for me to build this to support further versions?
Thanks anyway, all the people not using this are missing out
HTCDreamOn said:
@MarcoToo I know this has been here for ages but I'm amazed this thread has less than 600 views and You've only got 3 thanks... It's my favourite SuperUser app as it uses next to no resources. The only thing wrong is that it won't work with anything above JellyBean 4.2.2 which is a shame; I don't supposed you plan to support further Android versions? or is it easy for me to build this to support further versions?
Thanks anyway, all the people not using this are missing out
Click to expand...
Click to collapse
theres a reason to it, because the developer hasn't kept the app updated, while supersu is updated almost weekly. The lastest SuperSU has way more support as to this because it is outdated, and in beta at that. Safer and more compatible alternative would be SuperSU
Aiko0923 said:
theres a reason to it, because the developer hasn't kept the app updated, while supersu is updated almost weekly. The lastest SuperSU has way more support as to this because it is outdated, and in beta at that. Safer and more compatible alternative would be SuperSU
Click to expand...
Click to collapse
I see your point but I still stick with this SU: SuperSU is closed source, and even Koush' open source Superuser app is theoretically less secure than this, due to the whole granting mechanism; with µSuper the user must explicitly select which apps gain su access whether they ask for it or not, and the code is so small there's little which could go wrong. Each to their own, though , I use this because the Desire Z is lacking in memory and CPU power so every little helps, but on a more powerful device it wouldn't bother me.
HTCDreamOn said:
I don't supposed you plan to support further Android versions? or is it easy for me to build this to support further versions?
Click to expand...
Click to collapse
I think the location for app files has changed from /data/data to something else. Since µSuper's su binary uses a hardcoded path to the permissions file (using an environment variable would be quite unsafe), the only things you would have to change are the targetSdkVersion in the app's AndroidManifest.xml and (if it did change) the path to the permissions file in su.c.
MarcoToo said:
I think the location for app files has changed from /data/data to something else. Since µSuper's su binary uses a hardcoded path to the permissions file (using an environment variable would be quite unsafe), the only things you would have to change are the targetSdkVersion in the app's AndroidManifest.xml and (if it did change) the path to the permissions file in su.c.
Click to expand...
Click to collapse
Forked and synced let's see if I can fix this for later versions I don't suppose you'd know how to implement this into a ROM (using source code)? From the README I assume I'm allowed to

Categories

Resources